删除了无用的接口
This commit is contained in:
+583
-249
File diff suppressed because it is too large
Load Diff
+33
-42
@@ -13,10 +13,8 @@ import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
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.entity.ReagentConsumables;
|
||||
import digital.laboratory.platform.reagent.service.AcceptanceRecordFormService;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.AcceptanceRecordFormVO;
|
||||
import digital.laboratory.platform.reagent.vo.ProcurementContentVO;
|
||||
import digital.laboratory.platform.reagent.vo.PurchasingPlanVO;
|
||||
@@ -61,6 +59,14 @@ public class AcceptanceRecordFormController {
|
||||
|
||||
private final OssFile ossFile;
|
||||
|
||||
private final ReferenceMaterialService referenceMaterialService;
|
||||
|
||||
private final BatchDetailsService batchDetailsService;
|
||||
|
||||
private final WarehousingBatchListService warehousingBatchListService;
|
||||
|
||||
private final WarehousingContentService warehousingContentService;
|
||||
|
||||
/**
|
||||
* 通过id查询(验收记录表)
|
||||
*
|
||||
@@ -69,11 +75,23 @@ public class AcceptanceRecordFormController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping()
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_get')" )
|
||||
public R<AcceptanceRecordFormVO> getById(String acceptanceRecordFormId, HttpServletRequest theHttpServletRequest) {
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_get')")
|
||||
public R<AcceptanceRecordFormVO> getById(String acceptanceRecordFormId, String rid, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (rid != null) {
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(rid);
|
||||
BatchDetails byId = batchDetailsService.getById(referenceMaterialServiceById.getBatchDetailsId());
|
||||
WarehousingBatchList byId1 = warehousingBatchListService.getById(byId.getWarehousingBatchListId());
|
||||
WarehousingContent byId2 = warehousingContentService.getById(byId1.getWarehousingContentId());
|
||||
AcceptanceRecordFormVO acceptanceRecordFormVO = acceptanceRecordFormService.getAcceptanceRecordFormVO(byId2.getAcceptanceRecordFormId());
|
||||
if (acceptanceRecordFormVO.getStatus()==4){
|
||||
return R.ok(acceptanceRecordFormVO);
|
||||
}else return R.failed(null);
|
||||
|
||||
}
|
||||
|
||||
AcceptanceRecordFormVO acceptanceRecordFormVO = acceptanceRecordFormService.getAcceptanceRecordFormVO(acceptanceRecordFormId);
|
||||
return R.ok(acceptanceRecordFormVO);
|
||||
//return R.ok(acceptanceRecordFormService.getById(acceptanceRecordFormId));
|
||||
@@ -88,7 +106,7 @@ public class AcceptanceRecordFormController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询验收任务", notes = "分页查询验收任务")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_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) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -97,6 +115,7 @@ public class AcceptanceRecordFormController {
|
||||
.eq(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.ne("status",4)
|
||||
);
|
||||
return R.ok(acceptanceRecordFormVOPage);
|
||||
// return R.ok(acceptanceRecordFormService.page(page, Wrappers.query(acceptanceRecordForm)));
|
||||
@@ -111,14 +130,17 @@ public class AcceptanceRecordFormController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询验收记录", notes = "分页查询验收记录")
|
||||
@GetMapping("/recordPage")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_recordPage')" )
|
||||
public R<IPage<AcceptanceRecordFormVO>> getAcceptanceRecordFormRecordPage(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) {
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_recordPage')")
|
||||
public R<IPage<AcceptanceRecordFormVO>> getAcceptanceRecordFormRecordPage(Page<AcceptanceRecordForm> page, String rid,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)
|
||||
.eq("status",4)
|
||||
.eq("status", 4)
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
);
|
||||
@@ -138,7 +160,7 @@ public class AcceptanceRecordFormController {
|
||||
@ApiOperation(value = "录入(验收记录表)", notes = "录入(验收记录表)")
|
||||
@SysLog("录入(验收记录表)")
|
||||
@PutMapping("/commit")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_add')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_add')")
|
||||
public R<AcceptanceRecordForm> postAddObject(@RequestBody AcceptanceRecordFormDTO acceptanceRecordFormDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -151,37 +173,6 @@ public class AcceptanceRecordFormController {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交(验收记录表)
|
||||
*
|
||||
* @param acceptanceRecordFormDTO (验收记录表)
|
||||
* @return R
|
||||
*/
|
||||
|
||||
// /**
|
||||
// * 通过id删除(验收记录表)
|
||||
// *
|
||||
// * @param acceptanceRecordFormId id
|
||||
// * @return R
|
||||
// */
|
||||
// @ApiOperation(value = "通过id删除(验收记录表)", notes = "通过id删除(验收记录表)")
|
||||
// @SysLog("通过id删除(验收记录表)")
|
||||
// @DeleteMapping("/{acceptanceRecordFormId}")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_del')")
|
||||
// public R<AcceptanceRecordForm> deleteById(@PathVariable String acceptanceRecordFormId, HttpServletRequest theHttpServletRequest) {
|
||||
// Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
// DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
//
|
||||
// AcceptanceRecordForm oldAcceptanceRecordForm = acceptanceRecordFormService.getById(acceptanceRecordFormId);
|
||||
//
|
||||
// if (acceptanceRecordFormService.removeById(acceptanceRecordFormId)) {
|
||||
// return R.ok(oldAcceptanceRecordForm, "对象删除成功");
|
||||
// } else {
|
||||
// return R.failed(oldAcceptanceRecordForm, "对象删除失败");
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
/**
|
||||
* 一级审核(验收记录表)
|
||||
*
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.entity.AngleMark;
|
||||
import digital.laboratory.platform.reagent.service.AngleMarkService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.security.Principal;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/angleMark")
|
||||
@Api(value = "angleMark", tags = "获取角标接口")
|
||||
public class AngleMarkController {
|
||||
|
||||
@Autowired
|
||||
private AngleMarkService angleMarkService;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation(value = "获取全局角标", notes = "获取全局角标")
|
||||
public R<AngleMark> getAngleMark( HttpServletRequest httpServletRequest) {
|
||||
|
||||
Principal principal = httpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
AngleMark mark = angleMarkService.getMark(dlpUser);
|
||||
|
||||
return R.ok(mark);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
-163
@@ -1,163 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
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 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.reagent.entity.CabinetForm;
|
||||
import digital.laboratory.platform.reagent.service.CabinetFormService;
|
||||
import digital.laboratory.platform.reagent.vo.CabinetFormVO;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
|
||||
/**
|
||||
* @author Zhang Xiaolong created at 2023-03-22
|
||||
* @describe 前端控制器
|
||||
* <p>
|
||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
|
||||
* 这里写什么:
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
|
||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
|
||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/cabinet_form")
|
||||
@Api(value = "cabinet_form", tags = "柜子管理")
|
||||
public class CabinetFormController {
|
||||
|
||||
private final CabinetFormService cabinetFormService;
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param cabinetFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询柜子信息", notes = "通过id查询柜子信息")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_get')" )
|
||||
|
||||
public R<CabinetFormVO> getById(String cabinetFormId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
CabinetFormVO formById = cabinetFormService.getFormById(cabinetFormId);
|
||||
|
||||
return R.ok(formById);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param cabinetForm
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_cabinet_form_get')")
|
||||
public R<IPage<CabinetForm>> getCabinetFormPage(Page<CabinetForm> page, CabinetForm cabinetForm, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<CabinetForm> cabinetFormSList = cabinetFormService.page(page, Wrappers.<CabinetForm>query()
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(cabinetFormSList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param cabinetForm
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增柜子信息", notes = "新增柜子信息")
|
||||
@SysLog("新增柜子信息")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_add')" )
|
||||
public R<CabinetForm> postAddObject(@RequestBody CabinetForm cabinetForm, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
CabinetForm form = cabinetFormService.addById(cabinetForm);
|
||||
|
||||
if (form != null) {
|
||||
return R.ok(cabinetForm, "保存成功");
|
||||
} else {
|
||||
return R.failed(cabinetForm, "保存失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param cabinetForm
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改柜子信息", notes = "新增柜子信息")
|
||||
@SysLog("新增柜子信息")
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_cabinet_form_edit')")
|
||||
public R<CabinetForm> putUpdateById(@RequestBody CabinetForm cabinetForm, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
CabinetForm form = cabinetFormService.editById(cabinetForm);
|
||||
|
||||
if (form != null) {
|
||||
return R.ok(cabinetForm, "保存成功");
|
||||
} else {
|
||||
return R.failed(cabinetForm, "保存失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param cabinetFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除柜子信息", notes = "通过id删除柜子信息")
|
||||
@SysLog("通过id删除柜子信息")
|
||||
@DeleteMapping("/{cabinetFormId}")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_cabinet_form_del')")
|
||||
public R<String> deleteById(@PathVariable String cabinetFormId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (cabinetFormService.delById(cabinetFormId)) {
|
||||
return R.ok("删除成功");
|
||||
} else {
|
||||
return R.failed("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+28
-1
@@ -18,6 +18,7 @@ import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
|
||||
import digital.laboratory.platform.reagent.service.CheckScheduleService;
|
||||
import digital.laboratory.platform.reagent.service.InstructionBookService;
|
||||
import digital.laboratory.platform.reagent.service.PeriodVerificationPlanService;
|
||||
import digital.laboratory.platform.reagent.vo.AcceptanceRecordFormVO;
|
||||
import digital.laboratory.platform.reagent.vo.CheckScheduleVO;
|
||||
import org.joda.time.DateTime;
|
||||
@@ -57,6 +58,8 @@ public class CheckScheduleController {
|
||||
|
||||
private final OssFile ossFile;
|
||||
|
||||
private final PeriodVerificationPlanService periodVerificationPlanService;
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
@@ -76,6 +79,31 @@ public class CheckScheduleController {
|
||||
//return R.ok(checkScheduleService.getById(managerId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除期间核查计划明细", notes = "通过id删除期间核查计划明细")
|
||||
@DeleteMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_check_schedule_del')" )
|
||||
public R<String > delById(String id, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PeriodVerificationPlan byId = periodVerificationPlanService.getById(id);
|
||||
CheckScheduleVO checkScheduleVO = checkScheduleService.getCheckScheduleVO(byId.getCheckScheduleId());
|
||||
if (checkScheduleVO.getPeriodVerificationPlanVOS().size()==1) {
|
||||
periodVerificationPlanService.removeById(byId);
|
||||
checkScheduleService.removeById(checkScheduleVO.getId());
|
||||
return R.ok("删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed("删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
@@ -90,7 +118,6 @@ public class CheckScheduleController {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
|
||||
IPage<CheckScheduleVO> checkScheduleVOPage = checkScheduleService.getCheckScheduleVOPage(page, Wrappers.<CheckSchedule>query()
|
||||
.ge(startTime!=null,"create_time", startTime)
|
||||
.le(endTime!=null,"create_time", endTime)
|
||||
|
||||
+19
-7
@@ -85,7 +85,7 @@ public class ComplianceCheckController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping()
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_get')")
|
||||
public R<ComplianceCheckVO> getById(String complianceCheckId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -105,16 +105,28 @@ public class ComplianceCheckController {
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_page')")
|
||||
public R<IPage<ComplianceCheckVO>> getComplianceCheckPage(Page<ComplianceCheck> 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, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
|
||||
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) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (StrUtil.isNotBlank(rid)) {
|
||||
|
||||
IPage<ComplianceCheckVO> complianceCheckList = complianceCheckService.getComplianceCheckVOPage(page, Wrappers.<ComplianceCheck>query()
|
||||
.eq("reference_material_id", rid)
|
||||
.eq("status", 3)
|
||||
.orderByDesc("create_time"));
|
||||
return R.ok(complianceCheckList);
|
||||
}
|
||||
|
||||
IPage<ComplianceCheckVO> complianceCheckSList = complianceCheckService.getComplianceCheckVOPage(page, Wrappers.<ComplianceCheck>query()
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.orderByDesc("create_time")
|
||||
.orderByDesc("create_time").or()
|
||||
|
||||
);
|
||||
|
||||
|
||||
return R.ok(complianceCheckSList);
|
||||
// return R.ok(complianceCheckService.page(page, Wrappers.query(complianceCheck)));
|
||||
}
|
||||
@@ -176,7 +188,7 @@ public class ComplianceCheckController {
|
||||
@ApiOperation(value = "通过id删除(符合性检查记录表)", notes = "通过id删除(符合性检查记录表)")
|
||||
@SysLog("通过id删除(符合性检查记录表)")
|
||||
@DeleteMapping()
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')")
|
||||
public R<String> deleteById(String complianceCheckId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -200,7 +212,7 @@ public class ComplianceCheckController {
|
||||
@ApiOperation(value = "编辑符合性检查记录表", notes = "编辑符合性检查记录表")
|
||||
@SysLog("编辑符合性检查记录表")
|
||||
@PutMapping("/edit")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_edit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_edit')")
|
||||
public R<String> editCheckById(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -224,7 +236,7 @@ public class ComplianceCheckController {
|
||||
@ApiOperation(value = "录入符合性检查方案", notes = "录入符合性检查方案")
|
||||
@SysLog("编辑符合性检查记录表")
|
||||
@PutMapping("/addScheme")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_input')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_input')")
|
||||
public R<String> addScheme(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -248,7 +260,7 @@ public class ComplianceCheckController {
|
||||
@ApiOperation(value = "提交符合性检查记录表", notes = "提交符合性检查记录表")
|
||||
@SysLog("提交符合性检查记录表")
|
||||
@PutMapping("/commit")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_commit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_commit')")
|
||||
public R<String> commitCheck(@RequestBody ComplianceCheckDTO complianceCheckDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
-151
@@ -1,151 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
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 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.reagent.entity.DeactivationApplication;
|
||||
import digital.laboratory.platform.reagent.service.DeactivationApplicationService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
|
||||
/**
|
||||
* (标准物质到期停用申请表)
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (标准物质到期停用申请表) 前端控制器
|
||||
*
|
||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
|
||||
* 这里写什么:
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
|
||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
|
||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/deactivation_application" )
|
||||
@Api(value = "deactivation_application", tags = "(标准物质到期停用申请表)管理")
|
||||
public class DeactivationApplicationController {
|
||||
|
||||
private final DeactivationApplicationService deactivationApplicationService;
|
||||
|
||||
/**
|
||||
* 通过id查询(标准物质到期停用申请表)
|
||||
* @param deactivationApplicationId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{deactivationApplicationId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_deactivation_application_get')" )
|
||||
public R<DeactivationApplication> getById(@PathVariable("deactivationApplicationId" ) String deactivationApplicationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
DeactivationApplication deactivationApplication = deactivationApplicationService.getById(deactivationApplicationId);
|
||||
return R.ok(deactivationApplication);
|
||||
//return R.ok(deactivationApplicationService.getById(deactivationApplicationId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param deactivationApplication (标准物质到期停用申请表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_deactivation_application_get')" )
|
||||
public R<IPage<DeactivationApplication>> getDeactivationApplicationPage(Page<DeactivationApplication> page, DeactivationApplication deactivationApplication, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<DeactivationApplication> deactivationApplicationSList = deactivationApplicationService.page(page, Wrappers.<DeactivationApplication>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(deactivationApplicationSList);
|
||||
// return R.ok(deactivationApplicationService.page(page, Wrappers.query(deactivationApplication)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(标准物质到期停用申请表)
|
||||
* @param deactivationApplication (标准物质到期停用申请表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(标准物质到期停用申请表)", notes = "新增(标准物质到期停用申请表)")
|
||||
@SysLog("新增(标准物质到期停用申请表)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_deactivation_application_add')" )
|
||||
public R<DeactivationApplication> postAddObject(@RequestBody DeactivationApplication deactivationApplication, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
deactivationApplication.setApplicantId(IdWorker.get32UUID().toUpperCase());
|
||||
if (deactivationApplicationService.save(deactivationApplication)) {
|
||||
return R.ok(deactivationApplication, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(deactivationApplication, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(标准物质到期停用申请表)
|
||||
* @param deactivationApplication (标准物质到期停用申请表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(标准物质到期停用申请表)", notes = "修改(标准物质到期停用申请表)")
|
||||
@SysLog("修改(标准物质到期停用申请表)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_deactivation_application_edit')" )
|
||||
public R<DeactivationApplication> putUpdateById(@RequestBody DeactivationApplication deactivationApplication, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (deactivationApplicationService.updateById(deactivationApplication)) {
|
||||
return R.ok(deactivationApplication, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(deactivationApplication, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(标准物质到期停用申请表)
|
||||
* @param deactivationApplicationId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(标准物质到期停用申请表)", notes = "通过id删除(标准物质到期停用申请表)")
|
||||
@SysLog("通过id删除(标准物质到期停用申请表)" )
|
||||
@DeleteMapping("/{deactivationApplicationId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_deactivation_application_del')" )
|
||||
public R<DeactivationApplication> deleteById(@PathVariable String deactivationApplicationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
DeactivationApplication oldDeactivationApplication = deactivationApplicationService.getById(deactivationApplicationId);
|
||||
|
||||
if (deactivationApplicationService.removeById(deactivationApplicationId)) {
|
||||
return R.ok(oldDeactivationApplication, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldDeactivationApplication, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
-151
@@ -1,151 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
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 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.reagent.entity.DisqualificationForm;
|
||||
import digital.laboratory.platform.reagent.service.DisqualificationFormService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-23
|
||||
* @describe 前端控制器
|
||||
*
|
||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
|
||||
* 这里写什么:
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
|
||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
|
||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/disqualification_form" )
|
||||
@Api(value = "disqualification_form", tags = "管理")
|
||||
public class DisqualificationFormController {
|
||||
|
||||
private final DisqualificationFormService disqualificationFormService;
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
* @param disqualificationFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{disqualificationFormId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_disqualification_form_get')" )
|
||||
public R<DisqualificationForm> getById(@PathVariable("disqualificationFormId" ) String disqualificationFormId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
DisqualificationForm disqualificationForm = disqualificationFormService.getById(disqualificationFormId);
|
||||
return R.ok(disqualificationForm);
|
||||
//return R.ok(disqualificationFormService.getById(disqualificationFormId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param disqualificationForm
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_disqualification_form_get')" )
|
||||
public R<IPage<DisqualificationForm>> getDisqualificationFormPage(Page<DisqualificationForm> page, DisqualificationForm disqualificationForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<DisqualificationForm> disqualificationFormSList = disqualificationFormService.page(page, Wrappers.<DisqualificationForm>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(disqualificationFormSList);
|
||||
// return R.ok(disqualificationFormService.page(page, Wrappers.query(disqualificationForm)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param disqualificationForm
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增", notes = "新增")
|
||||
@SysLog("新增" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_disqualification_form_add')" )
|
||||
public R<DisqualificationForm> postAddObject(@RequestBody DisqualificationForm disqualificationForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
disqualificationForm.setDisqualificationFormId(IdWorker.get32UUID().toUpperCase());
|
||||
if (disqualificationFormService.save(disqualificationForm)) {
|
||||
return R.ok(disqualificationForm, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(disqualificationForm, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param disqualificationForm
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改", notes = "修改")
|
||||
@SysLog("修改" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_disqualification_form_edit')" )
|
||||
public R<DisqualificationForm> putUpdateById(@RequestBody DisqualificationForm disqualificationForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (disqualificationFormService.updateById(disqualificationForm)) {
|
||||
return R.ok(disqualificationForm, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(disqualificationForm, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
* @param disqualificationFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除", notes = "通过id删除")
|
||||
@SysLog("通过id删除" )
|
||||
@DeleteMapping("/{disqualificationFormId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_disqualification_form_del')" )
|
||||
public R<DisqualificationForm> deleteById(@PathVariable String disqualificationFormId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
DisqualificationForm oldDisqualificationForm = disqualificationFormService.getById(disqualificationFormId);
|
||||
|
||||
if (disqualificationFormService.removeById(disqualificationFormId)) {
|
||||
return R.ok(oldDisqualificationForm, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldDisqualificationForm, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
-151
@@ -1,151 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
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 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.reagent.entity.ExpirationReminder;
|
||||
import digital.laboratory.platform.reagent.service.ExpirationReminderService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
|
||||
/**
|
||||
* (试剂耗材到期提醒)
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (试剂耗材到期提醒) 前端控制器
|
||||
*
|
||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
|
||||
* 这里写什么:
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
|
||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
|
||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/expiration_reminder" )
|
||||
@Api(value = "expiration_reminder", tags = "(试剂耗材到期提醒)管理")
|
||||
public class ExpirationReminderController {
|
||||
|
||||
private final ExpirationReminderService expirationReminderService;
|
||||
|
||||
/**
|
||||
* 通过id查询(试剂耗材到期提醒)
|
||||
* @param expirationReminderId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{expirationReminderId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_expiration_reminder_get')" )
|
||||
public R<ExpirationReminder> getById(@PathVariable("expirationReminderId" ) String expirationReminderId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ExpirationReminder expirationReminder = expirationReminderService.getById(expirationReminderId);
|
||||
return R.ok(expirationReminder);
|
||||
//return R.ok(expirationReminderService.getById(expirationReminderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param expirationReminder (试剂耗材到期提醒)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_expiration_reminder_get')" )
|
||||
public R<IPage<ExpirationReminder>> getExpirationReminderPage(Page<ExpirationReminder> page, ExpirationReminder expirationReminder, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<ExpirationReminder> expirationReminderSList = expirationReminderService.page(page, Wrappers.<ExpirationReminder>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(expirationReminderSList);
|
||||
// return R.ok(expirationReminderService.page(page, Wrappers.query(expirationReminder)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(试剂耗材到期提醒)
|
||||
* @param expirationReminder (试剂耗材到期提醒)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(试剂耗材到期提醒)", notes = "新增(试剂耗材到期提醒)")
|
||||
@SysLog("新增(试剂耗材到期提醒)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_expiration_reminder_add')" )
|
||||
public R<ExpirationReminder> postAddObject(@RequestBody ExpirationReminder expirationReminder, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
expirationReminder.setExpirationReminderId(IdWorker.get32UUID().toUpperCase());
|
||||
if (expirationReminderService.save(expirationReminder)) {
|
||||
return R.ok(expirationReminder, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(expirationReminder, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(试剂耗材到期提醒)
|
||||
* @param expirationReminder (试剂耗材到期提醒)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(试剂耗材到期提醒)", notes = "修改(试剂耗材到期提醒)")
|
||||
@SysLog("修改(试剂耗材到期提醒)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_expiration_reminder_edit')" )
|
||||
public R<ExpirationReminder> putUpdateById(@RequestBody ExpirationReminder expirationReminder, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (expirationReminderService.updateById(expirationReminder)) {
|
||||
return R.ok(expirationReminder, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(expirationReminder, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(试剂耗材到期提醒)
|
||||
* @param expirationReminderId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(试剂耗材到期提醒)", notes = "通过id删除(试剂耗材到期提醒)")
|
||||
@SysLog("通过id删除(试剂耗材到期提醒)" )
|
||||
@DeleteMapping("/{expirationReminderId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_expiration_reminder_del')" )
|
||||
public R<ExpirationReminder> deleteById(@PathVariable String expirationReminderId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ExpirationReminder oldExpirationReminder = expirationReminderService.getById(expirationReminderId);
|
||||
|
||||
if (expirationReminderService.removeById(expirationReminderId)) {
|
||||
return R.ok(oldExpirationReminder, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldExpirationReminder, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+3
-3
@@ -66,7 +66,7 @@ public class FixedValueReportController {
|
||||
@ApiOperation(value = "上传定值报告", notes = "上传定值报告")
|
||||
@SysLog("上传定值报告")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('fixed_value_report_add')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_add')" )
|
||||
public R<FixedValueReport> upload(String id, String fixedResult,@RequestPart(value = "file", required = false) MultipartFile file, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -130,7 +130,7 @@ public class FixedValueReportController {
|
||||
@ApiOperation(value = "预览定值报告", notes = "预览定值报告")
|
||||
@SysLog("预览定值报告")
|
||||
@GetMapping("/download")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_instruction_book_add')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_add')" )
|
||||
public R<FixedValueReport> download(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -147,7 +147,7 @@ public class FixedValueReportController {
|
||||
|
||||
String fileName = one.getFixedValueReport();
|
||||
|
||||
String path = "reagen_managment" + "/" + "instructionBook" + "/" + byId.getReagentConsumableId();
|
||||
String path = "reagen_managment" + "/" + "fixedValueReport" + "/" + byId.getReagentConsumableId();
|
||||
|
||||
String fileNames = path + "/" + fileName;
|
||||
|
||||
|
||||
+17
-4
@@ -12,8 +12,10 @@ import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
|
||||
import digital.laboratory.platform.reagent.entity.InstructionBook;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
|
||||
import digital.laboratory.platform.reagent.service.InstructionBookService;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
|
||||
import digital.laboratory.platform.reagent.vo.InstructionBookVO;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -57,6 +59,8 @@ public class InstructionBookController {
|
||||
|
||||
private final OssFile ossFile;
|
||||
|
||||
private final ReagentConsumableInventoryService reagentConsumableInventoryService;
|
||||
|
||||
/**
|
||||
* 新增(标准物质期间核查指导书)
|
||||
*
|
||||
@@ -66,13 +70,15 @@ public class InstructionBookController {
|
||||
@ApiOperation(value = "上传(标准物质期间核查指导书)", notes = "上传(标准物质期间核查指导书)")
|
||||
@SysLog("上传(标准物质期间核查指导书)")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_instruction_book_upload')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_upload')" )
|
||||
public R<InstructionBook> upload(String id, @RequestPart(value = "file", required = false) MultipartFile file, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(id);
|
||||
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(Wrappers.<ReagentConsumableInventory>query().eq("reagent_consumable_id", byId.getReagentConsumableId()));
|
||||
|
||||
String path = "reagen_managment" + "/" + "instructionBook" + "/" + byId.getReagentConsumableId();
|
||||
String fileName = FileNameUtil.getName(file.getOriginalFilename());
|
||||
boolean b = ossFile.fileUpload(file, path);
|
||||
@@ -98,7 +104,8 @@ public class InstructionBookController {
|
||||
ossFile.fileGet(fileNames, httpServletResponse.getOutputStream());
|
||||
|
||||
instructionBookService.save(instructionBook);
|
||||
|
||||
one.setInstructionBookId(instructionBook.getId());
|
||||
reagentConsumableInventoryService.updateById(one);
|
||||
return R.ok(instructionBook, "上传成功");
|
||||
} else return R.failed("上传失败");
|
||||
} else {
|
||||
@@ -107,12 +114,18 @@ public class InstructionBookController {
|
||||
instructionBook1.setMakerId(dlpUser.getId());
|
||||
instructionBook1.setInstructionBook(fileName);
|
||||
instructionBook1.setCommitStatus(1);
|
||||
instructionBook1.setAuditTimeOfTechnical(null);
|
||||
instructionBook1.setAuditOpinionOfTechnical("");
|
||||
instructionBook1.setAuditResultOfTechnical(false);
|
||||
instructionBook1.setTechnicalDirectorId("");
|
||||
|
||||
String fileNames = path + "/" + fileName;
|
||||
|
||||
ossFile.fileGet(fileNames, httpServletResponse.getOutputStream());
|
||||
|
||||
instructionBookService.updateById(instructionBook1);
|
||||
one.setInstructionBookId(instructionBook1.getId());
|
||||
reagentConsumableInventoryService.updateById(one);
|
||||
|
||||
return R.ok(instructionBook1, "上传成功");
|
||||
} else return R.failed("上传失败");
|
||||
@@ -130,7 +143,7 @@ public class InstructionBookController {
|
||||
@ApiOperation(value = "预览(标准物质期间核查指导书)", notes = "预览(标准物质期间核查指导书)(标准物质期间核查指导书)")
|
||||
@SysLog("预览(标准物质期间核查指导书)(标准物质期间核查指导书)")
|
||||
@GetMapping("/download")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_instruction_book_download')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_download')" )
|
||||
public R<InstructionBook> download(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -167,7 +180,7 @@ public class InstructionBookController {
|
||||
@ApiOperation(value = "查看(标准物质期间核查指导书)", notes = "查看(标准物质期间核查指导书)(标准物质期间核查指导书)")
|
||||
@SysLog("查看(标准物质期间核查指导书)(标准物质期间核查指导书)")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_instruction_book_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_get')" )
|
||||
public R<InstructionBookVO> getVOById(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
-151
@@ -1,151 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
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 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.reagent.entity.LocationInformation;
|
||||
import digital.laboratory.platform.reagent.service.LocationInformationService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
|
||||
/**
|
||||
* (位置信息)
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (位置信息) 前端控制器
|
||||
*
|
||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
|
||||
* 这里写什么:
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
|
||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
|
||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/location_information" )
|
||||
@Api(value = "location_information", tags = "(位置信息)管理")
|
||||
public class LocationInformationController {
|
||||
|
||||
private final LocationInformationService locationInformationService;
|
||||
|
||||
/**
|
||||
* 通过id查询(位置信息)
|
||||
* @param locationInformationId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{locationInformationId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_location_information_get')" )
|
||||
public R<LocationInformation> getById(@PathVariable("locationInformationId" ) String locationInformationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
LocationInformation locationInformation = locationInformationService.getById(locationInformationId);
|
||||
return R.ok(locationInformation);
|
||||
//return R.ok(locationInformationService.getById(locationInformationId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param locationInformation (位置信息)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_location_information_get')" )
|
||||
public R<IPage<LocationInformation>> getLocationInformationPage(Page<LocationInformation> page, LocationInformation locationInformation, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<LocationInformation> locationInformationSList = locationInformationService.page(page, Wrappers.<LocationInformation>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(locationInformationSList);
|
||||
// return R.ok(locationInformationService.page(page, Wrappers.query(locationInformation)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(位置信息)
|
||||
* @param locationInformation (位置信息)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(位置信息)", notes = "新增(位置信息)")
|
||||
@SysLog("新增(位置信息)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_location_information_add')" )
|
||||
public R<LocationInformation> postAddObject(@RequestBody LocationInformation locationInformation, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
locationInformation.setLocationInformationId(IdWorker.get32UUID().toUpperCase());
|
||||
if (locationInformationService.save(locationInformation)) {
|
||||
return R.ok(locationInformation, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(locationInformation, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(位置信息)
|
||||
* @param locationInformation (位置信息)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(位置信息)", notes = "修改(位置信息)")
|
||||
@SysLog("修改(位置信息)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_location_information_edit')" )
|
||||
public R<LocationInformation> putUpdateById(@RequestBody LocationInformation locationInformation, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (locationInformationService.updateById(locationInformation)) {
|
||||
return R.ok(locationInformation, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(locationInformation, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(位置信息)
|
||||
* @param locationInformationId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(位置信息)", notes = "通过id删除(位置信息)")
|
||||
@SysLog("通过id删除(位置信息)" )
|
||||
@DeleteMapping("/{locationInformationId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_location_information_del')" )
|
||||
public R<LocationInformation> deleteById(@PathVariable String locationInformationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
LocationInformation oldLocationInformation = locationInformationService.getById(locationInformationId);
|
||||
|
||||
if (locationInformationService.removeById(locationInformationId)) {
|
||||
return R.ok(oldLocationInformation, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldLocationInformation, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+20
-8
@@ -63,7 +63,7 @@ public class PeriodVerificationImplementationController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping()
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_get')")
|
||||
public R<PeriodVerificationImplementation> getById(String periodVerificationImplementationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -82,15 +82,27 @@ public class PeriodVerificationImplementationController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_page')" )
|
||||
public R<IPage<PeriodVerificationImplementationVO>> getPeriodVerificationImplementationPage(Page<PeriodVerificationImplementation> page, @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) {
|
||||
@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) {
|
||||
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(StrUtil.isNotBlank(rid), "reference_material_id", rid)
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(periodVerificationImplementationList);
|
||||
|
||||
}
|
||||
|
||||
IPage<PeriodVerificationImplementationVO> periodVerificationImplementationSList = periodVerificationImplementationService.getPeriodVerificationImplementationVOPage(page, Wrappers.<PeriodVerificationImplementation>query()
|
||||
.like(StrUtil.isNotBlank(referenceMaterialName), "reference_material_name", referenceMaterialName)
|
||||
.ge(startTime!=null,"create_time", startTime)
|
||||
.le(endTime!=null,"create_time", endTime)
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.eq(StrUtil.isNotBlank(rid), "reference_material_id", rid)
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(periodVerificationImplementationSList);
|
||||
@@ -107,7 +119,7 @@ public class PeriodVerificationImplementationController {
|
||||
@ApiOperation(value = "录入(标准物质期间核查实施情况及结果记录表)", notes = "录入((标准物质期间核查实施情况及结果记录表)")
|
||||
@SysLog("录入((标准物质期间核查实施情况及结果记录表)")
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_edit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_edit')")
|
||||
public R<PeriodVerificationImplementation> putUpdateById(@RequestBody PeriodVerificationImplementationDTO periodVerificationImplementationDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -117,7 +129,7 @@ public class PeriodVerificationImplementationController {
|
||||
if (periodVerificationImplementation != null) {
|
||||
return R.ok(periodVerificationImplementation, "保存成功");
|
||||
} else {
|
||||
return R.failed("保存对象失败");
|
||||
return R.failed("=");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +166,7 @@ public class PeriodVerificationImplementationController {
|
||||
@ApiOperation(value = "提交(标准物质期间核查实施情况及结果记录表)", notes = "提交(标准物质期间核查实施情况及结果记录表)")
|
||||
@SysLog("提交(标准物质期间核查实施情况及结果记录表)")
|
||||
@PostMapping("/commit")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_commit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_commit')")
|
||||
public R<PeriodVerificationImplementation> commitById(@RequestBody PeriodVerificationImplementationDTO periodVerificationImplementationDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+10
@@ -51,6 +51,8 @@ import java.sql.Date;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -396,6 +398,14 @@ public class PurchaseCatalogueController {
|
||||
if (voList.isEmpty()) {
|
||||
throw new RuntimeException("未查询到相关信息");
|
||||
}
|
||||
Collections.sort(voList, new Comparator<CatalogueDetails>() {
|
||||
|
||||
|
||||
@Override
|
||||
public int compare(CatalogueDetails o1, CatalogueDetails o2) {
|
||||
return Integer.valueOf(o1.getPurchaseCatalogueNumber().substring(5))- Integer.valueOf(o2.getPurchaseCatalogueNumber().substring(5));
|
||||
}
|
||||
});
|
||||
|
||||
String id = IdWorker.get32UUID().toUpperCase();
|
||||
|
||||
|
||||
+39
-49
@@ -85,7 +85,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();
|
||||
@@ -108,30 +108,54 @@ public class ReagentConsumableInventoryController {
|
||||
|
||||
@ApiOperation(value = "标准物质管理列表", notes = "标准物质管理列表")
|
||||
@GetMapping("/standardList")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
public R<IPage<ReagentConsumableInventoryVO>> getReagentConsumableInventoryList(Page<ReagentConsumableInventory> page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
|
||||
@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();
|
||||
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page, Wrappers.<ReagentConsumableInventory>query()
|
||||
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.like(warning!=null&&warning==1, "warning_information", "库存不足")
|
||||
.eq("category", "标准物质").or()
|
||||
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "remark", reagentConsumableName)
|
||||
.like(warning!=null&&warning==1, "warning_information", "库存不足")
|
||||
.eq("category", "标准物质").or()
|
||||
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.eq("category", "标准储备溶液"));
|
||||
.like(warning!=null&&warning==1, "warning_information", "库存不足")
|
||||
.eq("category", "标准储备溶液").or()
|
||||
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "remark", reagentConsumableName)
|
||||
.like(warning!=null&&warning==1, "warning_information", "库存不足")
|
||||
.eq("category", "标准储备溶液"),warning);
|
||||
return R.ok(reagentConsumableInventoryRMVOList);
|
||||
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "试剂耗材管理列表", notes = "试剂耗材管理列表")
|
||||
@GetMapping("/List")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
public R<IPage<ReagentConsumableInventoryVO>> getList(Page page, String reagentConsumableName, HttpServletRequest theHttpServletRequest) {
|
||||
@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();
|
||||
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryRMVOList(page, Wrappers.<ReagentConsumableInventory>query()
|
||||
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryRMVOList = reagentConsumableInventoryService.getReagentConsumableInventoryREVOList(page, Wrappers.<ReagentConsumableInventory>query()
|
||||
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.like(warning!=null&&warning==1, "warning_information", "库存不足")
|
||||
.eq("category", "试剂").or()
|
||||
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "remark", reagentConsumableName)
|
||||
.like(warning!=null&&warning==1, "warning_information", "库存不足")
|
||||
.eq("category", "试剂").or()
|
||||
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.eq("category", "耗材"));
|
||||
.like(warning!=null&&warning==1, "warning_information", "库存不足")
|
||||
.eq("category", "耗材").or()
|
||||
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "remark", reagentConsumableName)
|
||||
.like(warning!=null&&warning==1, "warning_information", "库存不足")
|
||||
.eq("category", "耗材"),warning);
|
||||
return R.ok(reagentConsumableInventoryRMVOList);
|
||||
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
|
||||
}
|
||||
@@ -143,7 +167,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();
|
||||
@@ -167,20 +191,11 @@ public class ReagentConsumableInventoryController {
|
||||
*/
|
||||
@ApiOperation(value = "试剂耗材/标准物质集合列表", notes = "试剂耗材/标准物质集合列表")
|
||||
@GetMapping("/full")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
public R<List<ReagentConsumableInventoryFullVO>> getReagentConsumableInventoryFull(String category, String name, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
QueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
if (category != null) {
|
||||
reagentConsumableInventoryQueryWrapper.eq("category", category);
|
||||
}
|
||||
if (name != null) {
|
||||
reagentConsumableInventoryQueryWrapper.like("reagent_consumable_name", name);
|
||||
}
|
||||
|
||||
List<ReagentConsumableInventoryFullVO> reagentConsumableInventoryFull = reagentConsumableInventoryService.getReagentConsumableInventoryFull(Wrappers.<ReagentConsumableInventory>query()
|
||||
.eq((StrUtil.isNotBlank(category)), "category", category)
|
||||
.like((StrUtil.isNotBlank(name)), "reagent_consumable_name", name));
|
||||
@@ -189,7 +204,6 @@ public class ReagentConsumableInventoryController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**-------标准物质一览表打印*/
|
||||
/**
|
||||
* 标准物质一览表打印
|
||||
@@ -201,7 +215,7 @@ public class ReagentConsumableInventoryController {
|
||||
@SysLog("标准物质一览表打印")
|
||||
@PostMapping("/print")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_print')")
|
||||
public void bizGetPDFInventory( HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
public void bizGetPDFInventory(HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -229,39 +243,17 @@ public class ReagentConsumableInventoryController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成 QRCODE 图像
|
||||
*
|
||||
* @param code QRCODE字符串
|
||||
*
|
||||
* @return R<CaseEventVO>
|
||||
*/
|
||||
@ApiOperation(value = "生成 QRCODE 图像", notes = "生成 QRCODE 图像")
|
||||
@GetMapping("/qrcode")
|
||||
public void genQRCode(String code, HttpServletResponse httpServletResponse) throws IOException {
|
||||
try {
|
||||
// QR Code
|
||||
httpServletResponse.setContentType("image/png");
|
||||
BufferedImage qrImage = QRCodeUtils.genQRCode(code, 150, 150);
|
||||
ImageIO.write(qrImage, "png", httpServletResponse.getOutputStream());
|
||||
} catch (Exception e) {
|
||||
httpServletResponse.sendError(501, e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成 BARCODE 图像
|
||||
*
|
||||
* @param code QRCODE字符串
|
||||
*
|
||||
* @return R<CaseEventVO>
|
||||
*/
|
||||
@ApiOperation(value = "生成条形码", notes = "生成条形码")
|
||||
@GetMapping("/code")
|
||||
@PreAuthorize("@pms.hasAnyPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
|
||||
public String getBarCodeImageBase64( String code, HttpServletResponse httpServletResponse) throws IOException {
|
||||
@PreAuthorize("@pms.hasAnyPermission('reagent_reagent_consumable_inventory_get')")
|
||||
|
||||
public String getBarCodeImageBase64(String code, HttpServletResponse httpServletResponse) throws IOException {
|
||||
|
||||
return reagentConsumableInventoryService.buildCodeLabelContent(code);
|
||||
|
||||
@@ -272,19 +264,17 @@ public class ReagentConsumableInventoryController {
|
||||
* 生成 BARCODE 图像
|
||||
*
|
||||
* @param code QRCODE字符串
|
||||
*
|
||||
* @return R<CaseEventVO>
|
||||
*/
|
||||
@ApiOperation(value = "扫码录入物品编码", notes = "扫码录入物品编码")
|
||||
@PutMapping("/code")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')")
|
||||
public R<String> setCode( String id,String code,HttpServletResponse httpServletResponse) {
|
||||
public R<String> setCode(String id, String code, HttpServletResponse httpServletResponse) {
|
||||
|
||||
reagentConsumableInventoryService.setCode(id,code);
|
||||
reagentConsumableInventoryService.setCode(id, code);
|
||||
|
||||
return R.ok("录入成功");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+12
-11
@@ -64,7 +64,7 @@ public class StandardMaterialApplicationController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_application_get')")
|
||||
public R<StandardMaterialApplicationVO> getById(String id, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -84,7 +84,7 @@ public class StandardMaterialApplicationController {
|
||||
*/
|
||||
@ApiOperation(value = "领用分页查询", notes = "领用分页查询")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_application_page')")
|
||||
public R<IPage<StandardMaterialApplicationVO>> getStandardMaterialApplicationPage(Page<StandardMaterialApplication> page, StandardMaterialApplication standardMaterialApplication, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -100,19 +100,19 @@ public class StandardMaterialApplicationController {
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param standardMaterialApplication (标准物质领用/归还登记表)
|
||||
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "归还任务分页查询", notes = "归还任务分页查询")
|
||||
@GetMapping("/return/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_application_page')")
|
||||
public R<IPage<StandardMaterialApplicationVO>> getList(Page<StandardMaterialApplication> page, String name, @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<StandardMaterialApplicationVO> standardMaterialApplicationSList = standardMaterialApplicationService.getList(page, Wrappers.<StandardMaterialApplication>query()
|
||||
.eq("status", 0)
|
||||
.like(StrUtil.isNotBlank(name),"reference_substance_name", name)
|
||||
.like(StrUtil.isNotBlank(name), "reference_substance_name", name)
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.orderByDesc("create_time")
|
||||
@@ -130,14 +130,15 @@ public class StandardMaterialApplicationController {
|
||||
*/
|
||||
@ApiOperation(value = "归还记录分页查询", notes = "归还记录分页查询")
|
||||
@GetMapping("/return")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_get')" )
|
||||
public R<IPage<StandardMaterialApplicationVO>> getPage(Page<StandardMaterialApplication> page, String name,@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) {
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_application_page')")
|
||||
public R<IPage<StandardMaterialApplicationVO>> getPage(Page<StandardMaterialApplication> page, String rid, String name, @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<StandardMaterialApplicationVO> standardMaterialApplicationSList = standardMaterialApplicationService.getList(page, Wrappers.<StandardMaterialApplication>query()
|
||||
.eq("status", 1)
|
||||
.like(StrUtil.isNotBlank(name),"reference_substance_name", name)
|
||||
.eq(StrUtil.isNotBlank(rid),"reference_material_id", rid)
|
||||
.like(StrUtil.isNotBlank(name), "reference_substance_name", name)
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.orderByDesc("create_time")
|
||||
@@ -156,7 +157,7 @@ public class StandardMaterialApplicationController {
|
||||
@ApiOperation(value = "归还(标准物质领用/归还登记表)", notes = "归还(标准物质领用/归还登记表)")
|
||||
@SysLog("修改(标准物质领用/归还登记表)")
|
||||
@PutMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_edit')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_application_return')")
|
||||
public R<StandardMaterialApplication> putUpdateById(@RequestBody StandardMaterialApplicationDTO standardMaterialApplicationDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -177,7 +178,7 @@ public class StandardMaterialApplicationController {
|
||||
@ApiOperation(value = "通过id删除(标准物质领用/归还登记表)", notes = "通过id删除(标准物质领用/归还登记表)")
|
||||
@SysLog("通过id删除(标准物质领用/归还登记表)")
|
||||
@DeleteMapping("/{standardMaterialApplicationId}")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_standard_material_application_del')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_application_del')")
|
||||
public R<StandardMaterialApplication> deleteById(String standardMaterialApplicationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -202,7 +203,7 @@ public class StandardMaterialApplicationController {
|
||||
@ApiOperation(value = "标准物质领用归还登记表打印", notes = "标准物质领用归还登记表打印")
|
||||
@SysLog("标准物质领用归还登记表打印")
|
||||
@PostMapping("/print")
|
||||
// @PreAuthorize("@pms.hasPermission('EntrustmentEdit')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_application_print')")
|
||||
public void bizGetPDFInventory(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+7
-33
@@ -126,36 +126,15 @@ public class StandardMaterialApprovalFormController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)
|
||||
* 审核(标准物质停用/报废销毁/恢复/降级使用审批表)
|
||||
*
|
||||
* @param auditAndApproveDTO (标准物质停用/报废销毁/恢复/降级使用审批表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
@SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
@PutMapping("/auditPrimary")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_auditPrimary')")
|
||||
public R<StandardMaterialApprovalForm> auditPrimary(@RequestBody AuditAndApproveDTO auditAndApproveDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.auditPrimary(auditAndApproveDTO, dlpUser);
|
||||
|
||||
if (standardMaterialApprovalForm != null) {
|
||||
return R.ok(standardMaterialApprovalForm, "审核成功");
|
||||
} else {
|
||||
return R.failed(standardMaterialApprovalForm, "审核失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)
|
||||
*
|
||||
* @param auditAndApproveDTO (标准物质停用/报废销毁/恢复/降级使用审批表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
@ApiOperation(value = "审核(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "二级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
@SysLog("一级审核(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
@PutMapping("/auditSecondary")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_auditSecondary')")
|
||||
@@ -205,14 +184,10 @@ public class StandardMaterialApprovalFormController {
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(id);
|
||||
|
||||
if (byId.getStatus() == -1) {
|
||||
byId.setStatus(0);
|
||||
if (referenceMaterialService.updateById(byId)) {
|
||||
return R.ok("启用成功");
|
||||
} else {
|
||||
return R.failed("启用失败");
|
||||
if (byId.getStatus()==-3){
|
||||
throw new RuntimeException(String.format("该标准物质已被领用,请先归还后再停用"));
|
||||
}
|
||||
} else {
|
||||
|
||||
byId.setStatus(-1);
|
||||
|
||||
if (referenceMaterialService.updateById(byId)) {
|
||||
@@ -221,7 +196,6 @@ public class StandardMaterialApprovalFormController {
|
||||
return R.failed("停用失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**-------标准物质停用报废销毁恢复降级使用审批表打印*/
|
||||
/**
|
||||
|
||||
+5
-2
@@ -88,7 +88,7 @@ public class StandardReserveSolutionController {
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_page')")
|
||||
public R<IPage<StandardReserveSolutionVO>> getStandardReserveSolutionPage(Page<StandardReserveSolution> page, String solutionName, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) throws ParseException {
|
||||
public R<IPage<StandardReserveSolutionVO>> getStandardReserveSolutionPage(Page<StandardReserveSolution> page,String rid, String solutionName, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) throws ParseException {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
@@ -96,12 +96,15 @@ public class StandardReserveSolutionController {
|
||||
.like(StrUtil.isNotBlank(solutionName), "solution_name", solutionName)
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.orderByDesc("create_time"));
|
||||
.orderByDesc("create_time")
|
||||
.eq(StrUtil.isNotBlank(rid),"reference_material_id",rid));
|
||||
return R.ok(standardReserveSolutionSList);
|
||||
// return R.ok(standardReserveSolutionService.page(page, Wrappers.query(standardReserveSolution)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增(标准储备溶液配制及使用记录表)
|
||||
*
|
||||
|
||||
-151
@@ -1,151 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
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 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.reagent.entity.StorageRegistrationForm;
|
||||
import digital.laboratory.platform.reagent.service.StorageRegistrationFormService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
|
||||
/**
|
||||
* (试剂耗材入库登记表)
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (试剂耗材入库登记表) 前端控制器
|
||||
*
|
||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
|
||||
* 这里写什么:
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
|
||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
|
||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/storage_registration_form" )
|
||||
@Api(value = "storage_registration_form", tags = "(试剂耗材入库登记表)管理")
|
||||
public class StorageRegistrationFormController {
|
||||
|
||||
private final StorageRegistrationFormService storageRegistrationFormService;
|
||||
|
||||
/**
|
||||
* 通过id查询(试剂耗材入库登记表)
|
||||
* @param storageRegistrationFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{storageRegistrationFormId}" )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_get')" )
|
||||
public R<StorageRegistrationForm> getById(@PathVariable("storageRegistrationFormId" ) String storageRegistrationFormId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
StorageRegistrationForm storageRegistrationForm = storageRegistrationFormService.getById(storageRegistrationFormId);
|
||||
return R.ok(storageRegistrationForm);
|
||||
//return R.ok(storageRegistrationFormService.getById(storageRegistrationFormId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param storageRegistrationForm (试剂耗材入库登记表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_get')" )
|
||||
public R<IPage<StorageRegistrationForm>> getStorageRegistrationFormPage(Page<StorageRegistrationForm> page, StorageRegistrationForm storageRegistrationForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<StorageRegistrationForm> storageRegistrationFormSList = storageRegistrationFormService.page(page, Wrappers.<StorageRegistrationForm>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(storageRegistrationFormSList);
|
||||
// return R.ok(storageRegistrationFormService.page(page, Wrappers.query(storageRegistrationForm)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(试剂耗材入库登记表)
|
||||
* @param storageRegistrationForm (试剂耗材入库登记表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(试剂耗材入库登记表)", notes = "新增(试剂耗材入库登记表)")
|
||||
@SysLog("新增(试剂耗材入库登记表)" )
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_add')" )
|
||||
public R<StorageRegistrationForm> postAddObject(@RequestBody StorageRegistrationForm storageRegistrationForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
storageRegistrationForm.setStorageRegistrationFormId(IdWorker.get32UUID().toUpperCase());
|
||||
if (storageRegistrationFormService.save(storageRegistrationForm)) {
|
||||
return R.ok(storageRegistrationForm, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(storageRegistrationForm, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(试剂耗材入库登记表)
|
||||
* @param storageRegistrationForm (试剂耗材入库登记表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(试剂耗材入库登记表)", notes = "修改(试剂耗材入库登记表)")
|
||||
@SysLog("修改(试剂耗材入库登记表)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_edit')" )
|
||||
public R<StorageRegistrationForm> putUpdateById(@RequestBody StorageRegistrationForm storageRegistrationForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (storageRegistrationFormService.updateById(storageRegistrationForm)) {
|
||||
return R.ok(storageRegistrationForm, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(storageRegistrationForm, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(试剂耗材入库登记表)
|
||||
* @param storageRegistrationFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(试剂耗材入库登记表)", notes = "通过id删除(试剂耗材入库登记表)")
|
||||
@SysLog("通过id删除(试剂耗材入库登记表)" )
|
||||
@DeleteMapping("/{storageRegistrationFormId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_del')" )
|
||||
public R<StorageRegistrationForm> deleteById(@PathVariable String storageRegistrationFormId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
StorageRegistrationForm oldStorageRegistrationForm = storageRegistrationFormService.getById(storageRegistrationFormId);
|
||||
|
||||
if (storageRegistrationFormService.removeById(storageRegistrationFormId)) {
|
||||
return R.ok(oldStorageRegistrationForm, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldStorageRegistrationForm, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
-165
@@ -1,165 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
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 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.reagent.entity.StorageRoomForm;
|
||||
import digital.laboratory.platform.reagent.service.StorageRoomFormService;
|
||||
import digital.laboratory.platform.reagent.vo.StorageRoomFormVO;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
|
||||
/**
|
||||
* @author Zhang Xiaolong created at 2023-03-22
|
||||
* @describe 前端控制器
|
||||
* <p>
|
||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
|
||||
* 这里写什么:
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
|
||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
|
||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/storage_room_form")
|
||||
@Api(value = "storage_room_form", tags = "仓库存储室管理")
|
||||
public class StorageRoomFormController {
|
||||
|
||||
private final StorageRoomFormService storageRoomFormService;
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param storageRoomFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询存储室信息", notes = "通过id查询存储室")
|
||||
@GetMapping()
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_get')" )
|
||||
public R<StorageRoomFormVO> getById(String storageRoomFormId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
StorageRoomFormVO formById = storageRoomFormService.getFormById(storageRoomFormId);
|
||||
|
||||
if (formById != null) {
|
||||
return R.ok(formById);
|
||||
} else {
|
||||
return R.failed("不存在该ID对应的存储室");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param storageRoomForm
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_get')" )
|
||||
public R<IPage<StorageRoomForm>> getStorageRoomFormPage(Page<StorageRoomForm> page, StorageRoomForm storageRoomForm, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<StorageRoomForm> storageRoomFormSList = storageRoomFormService.page(page, Wrappers.<StorageRoomForm>query()
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(storageRoomFormSList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param storageRoomForm
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增存储室信息", notes = "新增存储室信息")
|
||||
@SysLog("新增存储室信息")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_add')")
|
||||
public R<StorageRoomForm> postAddObject(@RequestBody StorageRoomForm storageRoomForm, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
StorageRoomForm roomForm = storageRoomFormService.addById(storageRoomForm);
|
||||
|
||||
if (roomForm!=null) {
|
||||
return R.ok(storageRoomForm, "保存成功");
|
||||
} else {
|
||||
return R.failed(storageRoomForm, "保存失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param storageRoomForm
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改存储室信息", notes = "修改存储室信息")
|
||||
@SysLog("修改存储室信息")
|
||||
@PutMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_edit')")
|
||||
public R<StorageRoomForm> putUpdateById(@RequestBody StorageRoomForm storageRoomForm, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
StorageRoomForm roomForm = storageRoomFormService.editById(storageRoomForm);
|
||||
|
||||
if (roomForm!=null) {
|
||||
return R.ok(storageRoomForm, "保存成功");
|
||||
} else {
|
||||
return R.failed(storageRoomForm, "保存失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param storageRoomFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除", notes = "通过id删除")
|
||||
@SysLog("通过id删除")
|
||||
@DeleteMapping("/{storageRoomFormId}")
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_del')")
|
||||
public R<String > deleteById(@PathVariable String storageRoomFormId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (storageRoomFormService.delById(storageRoomFormId)) {
|
||||
return R.ok("删除成功");
|
||||
} else {
|
||||
return R.failed("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,14 +1,10 @@
|
||||
package digital.laboratory.platform.reagent.dto;
|
||||
|
||||
import digital.laboratory.platform.reagent.entity.DisqualificationForm;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@@ -38,6 +34,9 @@ public class ComplianceCheckDTO {
|
||||
@ApiModelProperty(value="(标准物质编号,若选择的物质为标准物质,则需传输编号)")
|
||||
private String reagentConsumableNumber;
|
||||
|
||||
@ApiModelProperty(value="(标准物质Id,若选择的物质为标准物质,则需传输Id)")
|
||||
private String referenceMaterialId;
|
||||
|
||||
@ApiModelProperty(value="(批次ID)")
|
||||
private String batchDetailsId;
|
||||
|
||||
|
||||
@@ -72,4 +72,10 @@ public class DecentralizedRequestDTO {
|
||||
|
||||
private String minimumUnit;
|
||||
|
||||
private String remark;
|
||||
|
||||
private String casNumber;
|
||||
|
||||
private String code;
|
||||
|
||||
}
|
||||
|
||||
@@ -71,5 +71,8 @@ public class PurchaseCatalogueDTO {
|
||||
@ApiModelProperty(value = "CAS 号")
|
||||
private String casNumber;
|
||||
|
||||
@ApiModelProperty(value = "CAS 号")
|
||||
private String code;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -21,6 +21,9 @@ public class StandardMaterialApprovalFormDTO {
|
||||
@ApiModelProperty(value="(定值结果)")
|
||||
private String fixedResult;
|
||||
|
||||
@ApiModelProperty(value="(标准物质管理员意见)")
|
||||
private String auditOpinionOfPrimary;
|
||||
|
||||
@ApiModelProperty(value="(制造商)")
|
||||
private String manufacturerId;
|
||||
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* (验收内容)
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10 14:25:06
|
||||
* @describe (验收内容) 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "acceptance_content", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(验收内容)")
|
||||
public class AcceptanceContent extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (验收记录表ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(验收记录表ID)")
|
||||
private String acceptanceRecordFormId;
|
||||
|
||||
|
||||
/**
|
||||
* (不合格项目)
|
||||
*/
|
||||
@ApiModelProperty(value="(不合格项目)")
|
||||
private String nonconformingItem;
|
||||
|
||||
/**
|
||||
* acceptanceContentId
|
||||
*/
|
||||
@TableId(value = "acceptance_content_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="acceptanceContentId")
|
||||
private String acceptanceContentId;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,42 +1,45 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "(角标管理)")
|
||||
|
||||
public class AngleMark {
|
||||
|
||||
@ApiModelProperty(value="审核审批角标")
|
||||
private Integer reviewAndApproveMark;
|
||||
@ApiModelProperty(value = "审核审批角标")
|
||||
private Integer review = 0;
|
||||
|
||||
@ApiModelProperty(value="采购清单角标")
|
||||
private Integer purchaseListMark;
|
||||
@ApiModelProperty(value = "采购清单角标")
|
||||
private Integer PurchaseList = 0;
|
||||
|
||||
@ApiModelProperty(value="入库角标")
|
||||
private Integer warehousingMark;
|
||||
@ApiModelProperty(value = "入库角标")
|
||||
private Integer warehouse = 0;
|
||||
|
||||
@ApiModelProperty(value="标准储备溶液入库角标")
|
||||
private Integer storageOfSolutionMark;
|
||||
@ApiModelProperty(value = "标准储备溶液入库角标")
|
||||
private Integer storageOfSolutionMark = 0;
|
||||
|
||||
@ApiModelProperty(value="采购入库角标")
|
||||
private Integer purchaseWarehousingMark;
|
||||
@ApiModelProperty(value = "采购入库角标")
|
||||
private Integer purchaseWarehousingMark = 0;
|
||||
|
||||
@ApiModelProperty(value="归还任务角标")
|
||||
private Integer returnMark;
|
||||
@ApiModelProperty(value = "归还任务角标")
|
||||
private Integer returnMark = 0;
|
||||
|
||||
@ApiModelProperty(value="符合性检查角标")
|
||||
private Integer complianceCheckMark;
|
||||
@ApiModelProperty(value = "符合性检查角标")
|
||||
private Integer concordCheck = 0;
|
||||
|
||||
@ApiModelProperty(value="验收任务角标")
|
||||
private Integer acceptanceMark;
|
||||
@ApiModelProperty(value = "验收任务角标")
|
||||
private Integer checkAccept = 0;
|
||||
|
||||
@ApiModelProperty(value="期间核查记录角标")
|
||||
private Integer periodVerificationMark;
|
||||
@ApiModelProperty(value = "期间核查记录角标")
|
||||
private Integer checkPlanList = 0;
|
||||
|
||||
@ApiModelProperty(value="出库任务角标")
|
||||
private Integer deliveryMark;
|
||||
@ApiModelProperty(value = "出库任务角标")
|
||||
private Integer OutboundManagement = 0;
|
||||
|
||||
@ApiModelProperty(value="采购目录角标")
|
||||
private Integer purchaseCatalogueMark;
|
||||
@ApiModelProperty(value = "采购目录角标")
|
||||
private Integer gatherBuyCatalog = 0;
|
||||
}
|
||||
|
||||
@@ -123,6 +123,9 @@ public class BatchDetails extends BaseEntity {
|
||||
@ApiModelProperty(value="预警信息")
|
||||
private String warningInformation;
|
||||
|
||||
@ApiModelProperty(value="签收批次ID")
|
||||
private String warehousingBatchListId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-22 16:04:56
|
||||
* @describe 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "cabinet_form", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "柜子记录表")
|
||||
public class CabinetForm extends BaseEntity {
|
||||
|
||||
/**
|
||||
* cabinetFormId
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="柜子ID:创建时,不用传入,修改时,需传入柜子ID")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* storageRoomFormId
|
||||
*/
|
||||
@ApiModelProperty(value="存储室ID")
|
||||
private String storageRoomFormId;
|
||||
|
||||
/**
|
||||
* name
|
||||
*/
|
||||
@ApiModelProperty(value="柜子名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* number
|
||||
*/
|
||||
@ApiModelProperty(value="柜子编号")
|
||||
private String number;
|
||||
|
||||
/**
|
||||
* specification
|
||||
*/
|
||||
@ApiModelProperty(value="柜子规格:为数字类型")
|
||||
private Integer specification;
|
||||
|
||||
/**
|
||||
* status
|
||||
*/
|
||||
@ApiModelProperty(value="状态(0:未存满,1:已存满)")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* picture
|
||||
*/
|
||||
@ApiModelProperty(value="图片路径")
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* type
|
||||
*/
|
||||
@ApiModelProperty(value="柜子类型")
|
||||
private String type;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ public class ComplianceCheck extends BaseEntity {
|
||||
/**
|
||||
* (状态)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态(0:计划创建,1:已录入方案,2:已提交,3:一级审核通过,4:二级审核通过,-1:审核不通过)")
|
||||
@ApiModelProperty(value = "状态(-1:计划创建,0:已录入方案,1:已提交,2:一级审核通过,3:二级审核通过,-2:审核不通过)")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
@@ -154,4 +154,7 @@ public class ComplianceCheck extends BaseEntity {
|
||||
private String batchDetailsId;
|
||||
|
||||
|
||||
@ApiModelProperty(value="(标准物质Id,若选择的物质为标准物质,则需传输Id)")
|
||||
private String referenceMaterialId;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* (标准物质到期停用申请表)
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10 14:25:04
|
||||
* @describe (标准物质到期停用申请表) 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "deactivation_application", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(标准物质到期停用申请表)")
|
||||
public class DeactivationApplication extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (申请人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(申请人ID)")
|
||||
private String applicantId;
|
||||
|
||||
/**
|
||||
* (申请时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(申请时间)")
|
||||
private LocalDateTime applicationTime;
|
||||
|
||||
/**
|
||||
* (标准物质ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质ID)")
|
||||
private String referenceMaterialId;
|
||||
|
||||
/**
|
||||
* (标准物质编号)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质编号)")
|
||||
private String referenceMaterialNumber;
|
||||
|
||||
/**
|
||||
* deactivationApplicationId
|
||||
*/
|
||||
@TableId(value = "deactivation_application_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="deactivationApplicationId")
|
||||
private String deactivationApplicationId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -130,7 +130,7 @@ public class DecentralizeDetails extends BaseEntity {
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value="备注")
|
||||
@ApiModelProperty(value="申请备注")
|
||||
|
||||
private String remarks;
|
||||
/**
|
||||
@@ -144,13 +144,24 @@ public class DecentralizeDetails extends BaseEntity {
|
||||
*/
|
||||
@ApiModelProperty(value="(用途)")
|
||||
private String purpose;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* (采购清单明细ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(采购清单明细ID)")
|
||||
private String purchaseListDetailsId;
|
||||
/**
|
||||
* CAS号
|
||||
*/
|
||||
@ApiModelProperty(value = "CAS-号")
|
||||
private String casNumber;
|
||||
|
||||
@ApiModelProperty(value = "物品编码")
|
||||
private String code;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-23 11:47:25
|
||||
* @describe 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "disqualification_form", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "")
|
||||
public class DisqualificationForm extends BaseEntity {
|
||||
|
||||
/**
|
||||
* reagentConsumableId
|
||||
*/
|
||||
@ApiModelProperty(value="reagentConsumableId")
|
||||
private String reagentConsumableId;
|
||||
|
||||
/**
|
||||
* complianceCheckId
|
||||
*/
|
||||
@ApiModelProperty(value="符合性检查记录表")
|
||||
private String complianceCheckId;
|
||||
|
||||
|
||||
/**
|
||||
* disqualificationFormId
|
||||
*/
|
||||
@TableId(value = "disqualification_form_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="disqualificationFormId")
|
||||
private String disqualificationFormId;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* (试剂耗材到期提醒)
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10 14:25:04
|
||||
* @describe (试剂耗材到期提醒) 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "expiration_reminder", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(试剂耗材到期提醒)")
|
||||
public class ExpirationReminder extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (试剂耗材有效期/保质期)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材有效期/保质期)")
|
||||
private LocalDateTime expirationDate;
|
||||
|
||||
/**
|
||||
* (试剂耗材到期提醒信息)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材到期提醒信息)")
|
||||
private LocalDateTime expirationMessage;
|
||||
|
||||
/**
|
||||
* (试剂耗材ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材ID)")
|
||||
private String reagentConsumableId;
|
||||
|
||||
/**
|
||||
* (试剂耗材编号)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材编号)")
|
||||
private String reagentConsumableNumber;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* expirationReminderId
|
||||
*/
|
||||
@TableId(value = "expiration_reminder_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="expirationReminderId")
|
||||
private String expirationReminderId;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -10,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.File;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -29,66 +28,64 @@ public class InstructionBook extends BaseEntity {
|
||||
/**
|
||||
* 技术负责人审核意见
|
||||
*/
|
||||
@ApiModelProperty(value="技术负责人审核意见")
|
||||
@ApiModelProperty(value = "技术负责人审核意见")
|
||||
private String auditOpinionOfTechnical;
|
||||
|
||||
/**
|
||||
* 技术负责人审核结果
|
||||
*/
|
||||
@ApiModelProperty(value="技术负责人审核结果")
|
||||
@ApiModelProperty(value = "技术负责人审核结果")
|
||||
private boolean auditResultOfTechnical;
|
||||
|
||||
/**
|
||||
* 技术负责人审核时间
|
||||
*/
|
||||
@ApiModelProperty(value="技术负责人审核时间")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
@ApiModelProperty(value = "技术负责人审核时间")
|
||||
private LocalDateTime auditTimeOfTechnical;
|
||||
|
||||
/**
|
||||
* (提交状态)
|
||||
*/
|
||||
@ApiModelProperty(value="(提交状态)")
|
||||
@ApiModelProperty(value = "(提交状态)")
|
||||
private Integer commitStatus;
|
||||
|
||||
/**
|
||||
* (指导书)
|
||||
*/
|
||||
@ApiModelProperty(value="(指导书)")
|
||||
@ApiModelProperty(value = "(指导书)")
|
||||
private String instructionBook;
|
||||
|
||||
/**
|
||||
* (制定人)
|
||||
*/
|
||||
@ApiModelProperty(value="(制定人)")
|
||||
@ApiModelProperty(value = "(制定人)")
|
||||
private String makerId;
|
||||
|
||||
/**
|
||||
* (标准物质id)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质类id)")
|
||||
@ApiModelProperty(value = "(标准物质类id)")
|
||||
private String referenceMaterialTypeId;
|
||||
|
||||
/**
|
||||
* (制定时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(制定时间)")
|
||||
@ApiModelProperty(value = "(制定时间)")
|
||||
private LocalDateTime commitTime;
|
||||
|
||||
/**
|
||||
* 技术负责人ID
|
||||
*/
|
||||
@ApiModelProperty(value="技术负责人ID")
|
||||
@ApiModelProperty(value = "技术负责人ID")
|
||||
private String technicalDirectorId;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value="申请人")
|
||||
private String createName;
|
||||
/**
|
||||
* instructionBookId
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="id")
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-22 16:10:51
|
||||
* @describe 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "lattice_form", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "")
|
||||
public class LatticeForm extends BaseEntity {
|
||||
|
||||
/**
|
||||
* number
|
||||
*/
|
||||
@ApiModelProperty(value="格子编号")
|
||||
private String number;
|
||||
|
||||
/**
|
||||
* status
|
||||
*/
|
||||
@ApiModelProperty(value="状态(0:未存入,1:已存入)")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* latticeFormId
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="格子ID")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* cabinetFormId
|
||||
*/
|
||||
@ApiModelProperty(value="柜子ID")
|
||||
private String cabinetFormId;
|
||||
|
||||
@ApiModelProperty(value="图片路径")
|
||||
private String picture;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* (位置信息)
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10 14:25:06
|
||||
* @describe (位置信息) 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "location_information", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(位置信息)")
|
||||
public class LocationInformation extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (柜子编号)
|
||||
*/
|
||||
@ApiModelProperty(value="(柜子编号)")
|
||||
private String cabinetNumber;
|
||||
|
||||
/**
|
||||
* (柜子类型)
|
||||
*/
|
||||
@ApiModelProperty(value="(柜子类型)")
|
||||
private String cabinetType;
|
||||
|
||||
/**
|
||||
* (格子编号)
|
||||
*/
|
||||
@ApiModelProperty(value="(格子编号)")
|
||||
private String latticeNumber;
|
||||
|
||||
/**
|
||||
* (试剂耗材入库登记表ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材入库登记表ID)")
|
||||
private String storageRegistrationFormId;
|
||||
|
||||
/**
|
||||
* (存储室号)
|
||||
*/
|
||||
@ApiModelProperty(value="(存储室号)")
|
||||
private String storageRoomNumber;
|
||||
|
||||
/**
|
||||
* (存储室类型)
|
||||
*/
|
||||
@ApiModelProperty(value="(存储室类型)")
|
||||
private String storageRoomType;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* locationInformationId
|
||||
*/
|
||||
@TableId(value = "location_information_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="locationInformationId")
|
||||
private String locationInformationId;
|
||||
|
||||
|
||||
}
|
||||
+2
-3
@@ -1,8 +1,6 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
@@ -30,6 +28,7 @@ public class PeriodVerificationPlan extends BaseEntity {
|
||||
/**
|
||||
* (下次核查日期)
|
||||
*/
|
||||
@TableField(updateStrategy=FieldStrategy.IGNORED)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd ")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@ApiModelProperty(value="(下次核查日期)")
|
||||
|
||||
@@ -45,6 +45,10 @@ public class ReferenceMaterial extends BaseEntity {
|
||||
@ApiModelProperty(value="试剂耗材Id")
|
||||
private String reagentConsumableId;
|
||||
|
||||
@ApiModelProperty(value="使用状态 0 正常使用、-2降级使用")
|
||||
private Integer serviceStatus;
|
||||
|
||||
|
||||
/**
|
||||
* batchDetailsId
|
||||
*/
|
||||
|
||||
-19
@@ -37,36 +37,17 @@ public class StandardMaterialApprovalForm extends BaseEntity {
|
||||
@ApiModelProperty(value="(二级审核意见)")
|
||||
private String auditOpinionOfSecondary;
|
||||
|
||||
/**
|
||||
* (一级审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(一级审核结果)")
|
||||
private Boolean auditResultOfPrimary;
|
||||
|
||||
/**
|
||||
* (二级审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(二级审核结果)")
|
||||
private Boolean auditResultOfSecondary;
|
||||
|
||||
/**
|
||||
* (一级审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(一级审核时间)")
|
||||
private LocalDateTime auditTimeOfPrimary;
|
||||
|
||||
/**
|
||||
* (二级审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(二级审核时间)")
|
||||
private LocalDateTime auditTimeOfSecondary;
|
||||
|
||||
/**
|
||||
* (一级审核人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(一级审核人ID)")
|
||||
private String primaryAuditorId;
|
||||
|
||||
/**
|
||||
* (二级审核人ID)
|
||||
*/
|
||||
|
||||
@@ -33,6 +33,12 @@ public class StandardReserveSolution extends BaseEntity {
|
||||
@ApiModelProperty(value="(配置浓度(mg/mL))")
|
||||
private String configurationConcentration;
|
||||
|
||||
/**
|
||||
* (预警信息)
|
||||
*/
|
||||
@ApiModelProperty(value="(预警信息)")
|
||||
private String warningInformation;
|
||||
|
||||
/**
|
||||
* (配置日期)
|
||||
*/
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* (试剂耗材入库登记表)
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10 14:25:07
|
||||
* @describe (试剂耗材入库登记表) 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "storage_registration_form", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(试剂耗材入库登记表)")
|
||||
public class StorageRegistrationForm extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (入库日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(入库日期)")
|
||||
private LocalDateTime dateOfArrival;
|
||||
|
||||
/**
|
||||
* (入库人)
|
||||
*/
|
||||
@ApiModelProperty(value="(入库人)")
|
||||
private String depositorId;
|
||||
|
||||
/**
|
||||
* (数量)
|
||||
*/
|
||||
@ApiModelProperty(value="(数量)")
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* (试剂耗材ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材ID)")
|
||||
private String reagentConsumableId;
|
||||
|
||||
/**
|
||||
* (备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(备注)")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* storageRegistrationFormId
|
||||
*/
|
||||
@TableId(value = "storage_registration_form_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="storageRegistrationFormId")
|
||||
private String storageRegistrationFormId;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-22 16:03:35
|
||||
* @describe 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "storage_room_form", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "存储室记录表")
|
||||
public class StorageRoomForm extends BaseEntity {
|
||||
/**
|
||||
* 楼层
|
||||
*/
|
||||
@ApiModelProperty(value="楼层")
|
||||
private String floor;
|
||||
|
||||
/**
|
||||
* humidity
|
||||
*/
|
||||
@ApiModelProperty(value="房间位置")
|
||||
private String roomLocation;
|
||||
|
||||
/**
|
||||
* picture
|
||||
*/
|
||||
@ApiModelProperty(value="图片路径")
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* name
|
||||
*/
|
||||
@ApiModelProperty(value="存储室名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* storageRoomFormId
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="存储室ID,创建时,无需传入,修改时需传入存储室ID")
|
||||
private String id;
|
||||
|
||||
|
||||
}
|
||||
@@ -36,7 +36,7 @@ public class WarehousingContent extends BaseEntity {
|
||||
* (总数量)
|
||||
*/
|
||||
@ApiModelProperty(value = "(总数量)")
|
||||
private Integer totalQuantity;
|
||||
private int totalQuantity;
|
||||
|
||||
@ApiModelProperty(value = "物品编码")
|
||||
private String code;
|
||||
@@ -50,7 +50,7 @@ public class WarehousingContent extends BaseEntity {
|
||||
* (签收数量)
|
||||
*/
|
||||
@ApiModelProperty(value = "(入库数量)")
|
||||
private Integer warehousingQuantity;
|
||||
private int warehousingQuantity;
|
||||
|
||||
/**
|
||||
* (目录编号)
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.AcceptanceContent;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* (验收内容) Mapper 接口
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (验收内容) Mapper 类
|
||||
*/
|
||||
@Mapper
|
||||
public interface AcceptanceContentMapper extends BaseMapper<AcceptanceContent> {
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.CabinetForm;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* Mapper 接口
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-22
|
||||
* @describe Mapper 类
|
||||
*/
|
||||
@Mapper
|
||||
public interface CabinetFormMapper extends BaseMapper<CabinetForm> {
|
||||
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.DeactivationApplication;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* (标准物质到期停用申请表) Mapper 接口
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (标准物质到期停用申请表) Mapper 类
|
||||
*/
|
||||
@Mapper
|
||||
public interface DeactivationApplicationMapper extends BaseMapper<DeactivationApplication> {
|
||||
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.DisqualificationForm;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* Mapper 接口
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-23
|
||||
* @describe Mapper 类
|
||||
*/
|
||||
@Mapper
|
||||
public interface DisqualificationFormMapper extends BaseMapper<DisqualificationForm> {
|
||||
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.ExpirationReminder;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* (试剂耗材到期提醒) Mapper 接口
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (试剂耗材到期提醒) Mapper 类
|
||||
*/
|
||||
@Mapper
|
||||
public interface ExpirationReminderMapper extends BaseMapper<ExpirationReminder> {
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.LatticeForm;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* Mapper 接口
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-22
|
||||
* @describe Mapper 类
|
||||
*/
|
||||
@Mapper
|
||||
public interface LatticeFormMapper extends BaseMapper<LatticeForm> {
|
||||
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.LocationInformation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* (位置信息) Mapper 接口
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (位置信息) Mapper 类
|
||||
*/
|
||||
@Mapper
|
||||
public interface LocationInformationMapper extends BaseMapper<LocationInformation> {
|
||||
|
||||
}
|
||||
+2
@@ -30,4 +30,6 @@ public interface StandardMaterialApplicationMapper extends BaseMapper<StandardMa
|
||||
StandardMaterialApplicationVO getStandardMaterialApplicationVO(String id
|
||||
);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import cn.hutool.db.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import digital.laboratory.platform.reagent.entity.StorageRegistrationForm;
|
||||
import digital.laboratory.platform.reagent.vo.StorageRegistrationFormVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (试剂耗材入库登记表) Mapper 接口
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (试剂耗材入库登记表) Mapper 类
|
||||
*/
|
||||
@Mapper
|
||||
public interface StorageRegistrationFormMapper extends BaseMapper<StorageRegistrationForm> {
|
||||
|
||||
List<StorageRegistrationFormVO> getStorageRegistrationFormVOList(QueryWrapper<StorageRegistrationForm> qw);
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.StorageRoomForm;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* Mapper 接口
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-22
|
||||
* @describe Mapper 类
|
||||
*/
|
||||
@Mapper
|
||||
public interface StorageRoomFormMapper extends BaseMapper<StorageRoomForm> {
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.reagent.entity.AcceptanceContent;
|
||||
|
||||
/**
|
||||
* (验收内容)服务类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (验收内容) 服务类
|
||||
*/
|
||||
public interface AcceptanceContentService extends IService<AcceptanceContent> {
|
||||
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.entity.AngleMark;
|
||||
|
||||
public interface AngleMarkService extends IService<AngleMark> {
|
||||
AngleMark getMark(DLPUser dlpUser);
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.reagent.entity.CabinetForm;
|
||||
import digital.laboratory.platform.reagent.vo.CabinetFormVO;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 服务类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-22
|
||||
* @describe 服务类
|
||||
*/
|
||||
public interface CabinetFormService extends IService<CabinetForm> {
|
||||
|
||||
CabinetForm addById(CabinetForm cabinetForm);
|
||||
|
||||
CabinetForm editById(CabinetForm cabinetForm);
|
||||
|
||||
CabinetFormVO getFormById(String id);
|
||||
|
||||
Boolean delById(String id);
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.reagent.entity.DeactivationApplication;
|
||||
|
||||
/**
|
||||
* (标准物质到期停用申请表)服务类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (标准物质到期停用申请表) 服务类
|
||||
*/
|
||||
public interface DeactivationApplicationService extends IService<DeactivationApplication> {
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.reagent.entity.DisqualificationForm;
|
||||
|
||||
/**
|
||||
* 服务类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-23
|
||||
* @describe 服务类
|
||||
*/
|
||||
public interface DisqualificationFormService extends IService<DisqualificationForm> {
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.reagent.entity.ExpirationReminder;
|
||||
|
||||
/**
|
||||
* (试剂耗材到期提醒)服务类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (试剂耗材到期提醒) 服务类
|
||||
*/
|
||||
public interface ExpirationReminderService extends IService<ExpirationReminder> {
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.reagent.entity.LatticeForm;
|
||||
import digital.laboratory.platform.reagent.vo.LocationVO;
|
||||
|
||||
/**
|
||||
* 服务类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-22
|
||||
* @describe 服务类
|
||||
*/
|
||||
public interface LatticeFormService extends IService<LatticeForm> {
|
||||
|
||||
LocationVO getLocationById(String latticeFormId);
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.reagent.entity.LocationInformation;
|
||||
|
||||
/**
|
||||
* (位置信息)服务类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (位置信息) 服务类
|
||||
*/
|
||||
public interface LocationInformationService extends IService<LocationInformation> {
|
||||
|
||||
}
|
||||
+2
@@ -22,4 +22,6 @@ public interface PeriodVerificationPlanService extends IService<PeriodVerificati
|
||||
|
||||
|
||||
IPage<PeriodVerificationPlanVO> getPeriodVerificationPlanVOPage (Page<PeriodVerificationPlan> page, QueryWrapper<PeriodVerificationPlan> qw);
|
||||
|
||||
void getPlan();
|
||||
}
|
||||
|
||||
+4
-1
@@ -23,6 +23,9 @@ import java.util.List;
|
||||
*/
|
||||
public interface ReagentConsumableInventoryService extends IService<ReagentConsumableInventory> {
|
||||
|
||||
//试剂耗材/标准物质标准物质管理列表
|
||||
IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryREVOList(IPage<ReagentConsumableInventory> page, QueryWrapper<ReagentConsumableInventory> qw, Integer warning);
|
||||
|
||||
ReagentConsumableInventory addById(String reagentConsumableId, Integer quantity);
|
||||
|
||||
ReagentConsumableInventory reduceById(String reagentConsumableId, Integer quantity);
|
||||
@@ -32,7 +35,7 @@ public interface ReagentConsumableInventoryService extends IService<ReagentConsu
|
||||
//分页查询试剂耗材
|
||||
IPage<ReagentConsumableInventoryFullVO> getAllRM(IPage<ReagentConsumableInventory> page, QueryWrapper<ReagentConsumableInventory> qw);
|
||||
|
||||
IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryRMVOList(IPage<ReagentConsumableInventory> page,QueryWrapper<ReagentConsumableInventory>qw);
|
||||
IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryRMVOList(IPage<ReagentConsumableInventory> page,QueryWrapper<ReagentConsumableInventory>qw,Integer warning);
|
||||
|
||||
List<ReagentConsumableInventoryFullVO> getReagentConsumableInventoryFull(QueryWrapper<ReagentConsumableInventory> qw);
|
||||
|
||||
|
||||
+2
@@ -20,4 +20,6 @@ public interface ReferenceMaterialService extends IService<ReferenceMaterial> {
|
||||
List<ReferenceMaterialVO> getReferenceMaterialVOList(String batchDetailsId);
|
||||
|
||||
List<ReferenceMaterialVO> getReferenceMaterialList();
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
@@ -22,6 +22,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface StandardMaterialApplicationService extends IService<StandardMaterialApplication> {
|
||||
|
||||
|
||||
StandardMaterialApplication returnById(StandardMaterialApplicationDTO standardMaterialApplicationDTO);
|
||||
|
||||
IPage<StandardMaterialApplicationVO> getPage(IPage<StandardMaterialApplication> page, QueryWrapper<StandardMaterialApplication> qwl);
|
||||
|
||||
-2
@@ -25,8 +25,6 @@ public interface StandardMaterialApprovalFormService extends IService<StandardMa
|
||||
|
||||
StandardMaterialApprovalFormVO getVO(String standardMaterialApprovalFormId);
|
||||
|
||||
StandardMaterialApprovalForm auditPrimary(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser);
|
||||
|
||||
//二级审核
|
||||
StandardMaterialApprovalForm auditSecondary(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser);
|
||||
|
||||
|
||||
+1
@@ -22,6 +22,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface StandardReserveSolutionService extends IService<StandardReserveSolution> {
|
||||
|
||||
|
||||
StandardReserveSolutionVO getStandardReserveSolutionVOById(String id);
|
||||
|
||||
StandardReserveSolutionVO addById(StandardReserveSolutionDTO standardReserveSolutionDTO, DLPUser dlpUser);
|
||||
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.dto.StorageRegistrationFormDTO;
|
||||
import digital.laboratory.platform.reagent.entity.StorageRegistrationForm;
|
||||
import digital.laboratory.platform.reagent.vo.StorageRegistrationFormVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (试剂耗材入库登记表)服务类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (试剂耗材入库登记表) 服务类
|
||||
*/
|
||||
public interface StorageRegistrationFormService extends IService<StorageRegistrationForm> {
|
||||
|
||||
//List<StorageRegistrationFormVO> getStorageRegistrationFormVOList (QueryWrapper<StorageRegistrationForm> qw);
|
||||
//List<StorageRegistrationForm> editFormById(List<StorageRegistrationFormDTO> storageRegistrationFormDTOList, DLPUser dlpUser);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.reagent.entity.StorageRoomForm;
|
||||
import digital.laboratory.platform.reagent.vo.StorageRoomFormVO;
|
||||
|
||||
/**
|
||||
* 服务类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-22
|
||||
* @describe 服务类
|
||||
*/
|
||||
public interface StorageRoomFormService extends IService<StorageRoomForm> {
|
||||
|
||||
StorageRoomForm addById(StorageRoomForm storageRoomForm);
|
||||
|
||||
StorageRoomForm editById(StorageRoomForm storageRoomForm);
|
||||
|
||||
StorageRoomFormVO getFormById(String id);
|
||||
|
||||
Boolean delById(String id);
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.AcceptanceContent;
|
||||
import digital.laboratory.platform.reagent.mapper.AcceptanceContentMapper;
|
||||
import digital.laboratory.platform.reagent.service.AcceptanceContentService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* (验收内容)服务实现类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (验收内容) 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class AcceptanceContentServiceImpl extends ServiceImpl<AcceptanceContentMapper, AcceptanceContent> implements AcceptanceContentService {
|
||||
|
||||
}
|
||||
+55
-11
@@ -69,21 +69,64 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
public AcceptanceRecordForm commitForm(AcceptanceRecordFormDTO acceptanceRecordFormDTO, DLPUser dlpUser) {
|
||||
|
||||
AcceptanceRecordForm byId = acceptanceRecordFormService.getById(acceptanceRecordFormDTO.getAcceptanceRecordFormId());
|
||||
//将审核审批信息清空
|
||||
if (byId.getStatus() == -2) {
|
||||
|
||||
if (byId.getStatus() != 0) {
|
||||
throw new RuntimeException(String.format("当前状态不能提交"));
|
||||
BeanUtils.copyProperties(acceptanceRecordFormDTO,byId);
|
||||
byId.setUserName(dlpUser.getName());
|
||||
byId.setAuditResultOfPrimary(false);
|
||||
byId.setAuditOpinionOfPrimary("");
|
||||
byId.setAuditTimeOfPrimary(null);
|
||||
byId.setPrimaryAuditorId("");
|
||||
byId.setCommitTime(LocalDateTime.now());
|
||||
byId.setStatus(1);
|
||||
byId.setDateOfAcceptance(LocalDateTime.now());
|
||||
if (acceptanceRecordFormService.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
throw new RuntimeException(String.format("重新提交失败"));
|
||||
}
|
||||
} if (byId.getStatus() == -3) {
|
||||
|
||||
if (byId.getStatus() == -3|byId.getStatus()==-4) {
|
||||
BeanUtils.copyProperties(acceptanceRecordFormDTO,byId);
|
||||
byId.setUserName(dlpUser.getName());
|
||||
byId.setAuditResultOfSecondary(false);
|
||||
byId.setAuditOpinionOfSecondary("");
|
||||
byId.setAuditTimeOfSecondary(null);
|
||||
byId.setSecondaryAuditorId("");
|
||||
byId.setAuditResultOfPrimary(false);
|
||||
byId.setAuditOpinionOfPrimary("");
|
||||
byId.setAuditTimeOfPrimary(null);
|
||||
byId.setPrimaryAuditorId("");
|
||||
byId.setCommitTime(LocalDateTime.now());
|
||||
byId.setStatus(1);
|
||||
byId.setDateOfAcceptance(LocalDateTime.now());
|
||||
if (acceptanceRecordFormService.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
throw new RuntimeException(String.format("重新提交失败"));
|
||||
}
|
||||
} if (byId.getStatus() == -4) {
|
||||
|
||||
AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.addForm(byId.getReagentConsumableId(), byId.getSupplierId());
|
||||
BeanUtils.copyProperties(acceptanceRecordFormDTO,acceptanceRecordForm);
|
||||
acceptanceRecordForm.setUserName(dlpUser.getName());
|
||||
acceptanceRecordForm.setCommitTime(LocalDateTime.now());
|
||||
acceptanceRecordForm.setStatus(1);
|
||||
acceptanceRecordForm.setDateOfAcceptance(LocalDateTime.now());
|
||||
if (acceptanceRecordFormService.updateById(acceptanceRecordForm)) {
|
||||
return acceptanceRecordForm;
|
||||
BeanUtils.copyProperties(acceptanceRecordFormDTO,byId);
|
||||
byId.setUserName(dlpUser.getName());
|
||||
byId.setAuditResultOfThreeLevel(false);
|
||||
byId.setAuditOpinionOfThreeLevel("");
|
||||
byId.setAuditTimeOfThreeLevel(null);
|
||||
byId.setThreeLevelAuditorId("");
|
||||
byId.setAuditResultOfSecondary(false);
|
||||
byId.setAuditOpinionOfSecondary("");
|
||||
byId.setAuditTimeOfSecondary(null);
|
||||
byId.setSecondaryAuditorId("");
|
||||
byId.setAuditResultOfPrimary(false);
|
||||
byId.setAuditOpinionOfPrimary("");
|
||||
byId.setAuditTimeOfPrimary(null);
|
||||
byId.setPrimaryAuditorId("");
|
||||
byId.setCommitTime(LocalDateTime.now());
|
||||
byId.setStatus(1);
|
||||
byId.setDateOfAcceptance(LocalDateTime.now());
|
||||
if (acceptanceRecordFormService.updateById(byId)) {
|
||||
return byId;
|
||||
} else {
|
||||
throw new RuntimeException(String.format("重新提交失败"));
|
||||
}
|
||||
@@ -383,4 +426,5 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+94
-11
@@ -1,34 +1,117 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.AngleMark;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.AngleMarkMapper;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
|
||||
public class AngleMarkServiceImpl extends ServiceImpl<AngleMarkMapper, AngleMark> implements AngleMarkService {
|
||||
|
||||
@Autowired
|
||||
private ReviewAndApproveService reviewAndApproveService;
|
||||
|
||||
@Autowired
|
||||
private PurchaseListService purchaseListService;
|
||||
|
||||
private WarehousingContentService warehousingContentService;
|
||||
|
||||
@Autowired
|
||||
private AcceptanceRecordFormService acceptanceRecordFormService;
|
||||
|
||||
@Autowired
|
||||
private ComplianceCheckService complianceCheckService;
|
||||
|
||||
@Autowired
|
||||
private PeriodVerificationImplementationService periodVerificationImplementationService;
|
||||
|
||||
@Autowired
|
||||
private DeliveryRegistrationFormService deliveryRegistrationFormService;
|
||||
|
||||
@Autowired
|
||||
private PurchaseCatalogueService purchaseCatalogueService;
|
||||
@Autowired
|
||||
private StandardMaterialApplicationService standardMaterialApplicationService;
|
||||
@Autowired
|
||||
private WarehousingRecordFormService warehousingRecordFormService;
|
||||
@Autowired
|
||||
private StandardReserveSolutionService standardReserveSolutionService;
|
||||
|
||||
|
||||
public AngleMark getMark() {
|
||||
return null;
|
||||
@Override
|
||||
public AngleMark getMark(DLPUser dlpUser) {
|
||||
|
||||
AngleMark angleMark = new AngleMark();
|
||||
|
||||
ReviewAndApprove reviewAndApproveList = reviewAndApproveService.getReviewAndApproveList(dlpUser);
|
||||
//审核审批角标
|
||||
angleMark.setReview(reviewAndApproveList.getCentralizedRequestVOList().size() +
|
||||
reviewAndApproveList.getCheckScheduleVOList().size() +
|
||||
reviewAndApproveList.getEvaluationFormVOList().size() +
|
||||
reviewAndApproveList.getDecentralizedRequestVOList().size() +
|
||||
reviewAndApproveList.getInstructionBookList().size() +
|
||||
reviewAndApproveList.getPurchaseCatalogueVOList().size() +
|
||||
reviewAndApproveList.getAcceptanceRecordFormVOList().size() +
|
||||
reviewAndApproveList.getPeriodVerificationImplementationVOList().size() +
|
||||
reviewAndApproveList.getStandardMaterialApprovalFormList().size() +
|
||||
reviewAndApproveList.getComplianceCheckVOList().size() +
|
||||
reviewAndApproveList.getPurchasingPlanVOList().size());
|
||||
|
||||
//验收任务角标
|
||||
if (dlpUser.getPermissions().contains("reagent_acceptance_record_form_add")) {
|
||||
angleMark.setCheckAccept(acceptanceRecordFormService.list(Wrappers.<AcceptanceRecordForm>query()
|
||||
.eq("status", 0).or()
|
||||
.eq("status", -2).or()
|
||||
.eq("status", -3).or()
|
||||
.eq("status", -4)).size());
|
||||
}
|
||||
//采购目录角标
|
||||
if (dlpUser.getPermissions().contains("reagent_purchase_catalogue_commit")) {
|
||||
angleMark.setGatherBuyCatalog(purchaseCatalogueService.list(Wrappers.<PurchaseCatalogue>query()
|
||||
.eq("status", 3).or()
|
||||
.eq("status", -3)).size());
|
||||
}
|
||||
//采购清单角标
|
||||
if (dlpUser.getPermissions().contains("reagent_purchase_list_commit"))
|
||||
angleMark.setPurchaseList(purchaseListService.list(Wrappers.<PurchaseList>query()
|
||||
.eq("status", 0)).size());
|
||||
|
||||
//采购入库任务角标
|
||||
if (dlpUser.getPermissions().contains("reagent_warehousing_record_form_add")) {
|
||||
angleMark.setPurchaseWarehousingMark(warehousingRecordFormService.list(Wrappers.<WarehousingRecordForm>query()
|
||||
.eq("status", 0).or()
|
||||
.eq("status", 1)).size());
|
||||
}
|
||||
//标准储备溶液入库角标
|
||||
if (dlpUser.getPermissions().contains("reagent_standard_reserve_solution_warehousing")) {
|
||||
angleMark.setStorageOfSolutionMark(standardReserveSolutionService.list(Wrappers.<StandardReserveSolution>query()
|
||||
.eq("status", 0)).size());
|
||||
}
|
||||
//标准物质归还角标
|
||||
if (dlpUser.getPermissions().contains("reagent_standard_material_application_return")) {
|
||||
angleMark.setReturnMark(standardMaterialApplicationService.list(Wrappers.<StandardMaterialApplication>query()
|
||||
.eq("status", 0)).size());
|
||||
}
|
||||
//符合性检查角标
|
||||
if (dlpUser.getPermissions().contains("reagent_compliance_check_commit")) {
|
||||
angleMark.setConcordCheck(complianceCheckService.list(Wrappers.<ComplianceCheck>query()
|
||||
.eq("status", 0).or()
|
||||
.eq("status", -2).or()
|
||||
.eq("status", -3).or()
|
||||
.eq("status", -1)).size());
|
||||
}
|
||||
//出库任务角标
|
||||
if (dlpUser.getPermissions().contains("reagent_delivery_registration_form_commit")) {
|
||||
angleMark.setOutboundManagement(deliveryRegistrationFormService.list(Wrappers.<DeliveryRegistrationForm>query()
|
||||
.eq("status", 0)).size());
|
||||
}
|
||||
//入库任务角标
|
||||
angleMark.setWarehouse(angleMark.getReturnMark() + angleMark.getStorageOfSolutionMark() + angleMark.getPurchaseWarehousingMark());
|
||||
|
||||
//期间核查任务角标
|
||||
if (dlpUser.getPermissions().contains("reagent_period_verification_implementation_commit")) {
|
||||
angleMark.setCheckPlanList(periodVerificationImplementationService.list(Wrappers.<PeriodVerificationImplementation>query()
|
||||
.eq("commit_status", 0).or()
|
||||
.eq("commit_status", -2)).size());}
|
||||
|
||||
return angleMark;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+2
-5
@@ -112,14 +112,11 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
|
||||
reagentConsumablesSet.setApplicationForUseId(applicationForUse.getId());
|
||||
|
||||
if (applicationForUseDTO.getReferenceMaterialId()!=null){
|
||||
if (applicationForUseDTO.getReferenceMaterialId() != null) {
|
||||
|
||||
reagentConsumablesSet.setReferenceMaterialId(applicationForUseDTO.getReferenceMaterialId());
|
||||
//判定标准物质状态是否为可以领用
|
||||
if (referenceMaterialService.getById(applicationForUseDTO.getReferenceMaterialId()).getStatus()!=0){
|
||||
|
||||
throw new RuntimeException(String.format("当前标准物质不可领用"));
|
||||
}}
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
|
||||
-142
@@ -1,142 +0,0 @@
|
||||
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.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.CabinetForm;
|
||||
import digital.laboratory.platform.reagent.entity.LatticeForm;
|
||||
import digital.laboratory.platform.reagent.mapper.CabinetFormMapper;
|
||||
import digital.laboratory.platform.reagent.service.CabinetFormService;
|
||||
import digital.laboratory.platform.reagent.service.LatticeFormService;
|
||||
import digital.laboratory.platform.reagent.vo.CabinetFormVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务实现类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-22
|
||||
* @describe 服务实现类
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class CabinetFormServiceImpl extends ServiceImpl<CabinetFormMapper, CabinetForm> implements CabinetFormService {
|
||||
|
||||
private CabinetFormService cabinetFormService;
|
||||
|
||||
private LatticeFormService latticeFormService;
|
||||
|
||||
@Transactional
|
||||
@Override//新增柜子
|
||||
public CabinetForm addById(CabinetForm cabinetForm){
|
||||
|
||||
CabinetForm form = new CabinetForm();
|
||||
|
||||
BeanUtils.copyProperties(cabinetForm,form);
|
||||
|
||||
form.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
for (int i = 0; i < cabinetForm.getSpecification(); i++) {
|
||||
|
||||
LatticeForm latticeForm = new LatticeForm();
|
||||
|
||||
latticeForm.setCabinetFormId(form.getId());
|
||||
latticeForm.setId(IdWorker.get32UUID().toUpperCase());
|
||||
latticeForm.setNumber(form.getName()+"-"+(i+1));
|
||||
|
||||
latticeFormService.save(latticeForm);
|
||||
}
|
||||
|
||||
if (cabinetFormService.save(form)){
|
||||
return form;
|
||||
}else throw new RuntimeException(String.format("保存失败"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional//修改柜子信息
|
||||
public CabinetForm editById(CabinetForm cabinetForm){
|
||||
|
||||
CabinetForm byId = cabinetFormService.getById(cabinetForm.getId());
|
||||
|
||||
LambdaQueryWrapper<LatticeForm> latticeFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
latticeFormLambdaQueryWrapper.eq(LatticeForm::getCabinetFormId,byId.getId());
|
||||
|
||||
List<LatticeForm> list = latticeFormService.list(latticeFormLambdaQueryWrapper);
|
||||
//判断柜子是否为空
|
||||
for (LatticeForm latticeForm : list) {
|
||||
|
||||
if (latticeForm.getStatus()==1){
|
||||
throw new RuntimeException(String.format("当前柜子有物品存放,不允许修改"));
|
||||
}
|
||||
}
|
||||
latticeFormService.removeBatchByIds(list);
|
||||
|
||||
BeanUtils.copyProperties(cabinetForm,byId);
|
||||
//重新录入格子信息
|
||||
for (int i = 0; i < cabinetForm.getSpecification(); i++) {
|
||||
|
||||
LatticeForm latticeForm = new LatticeForm();
|
||||
|
||||
latticeForm.setCabinetFormId(byId.getId());
|
||||
latticeForm.setId(IdWorker.get32UUID().toUpperCase());
|
||||
latticeForm.setNumber(byId.getName()+"-"+(i+1));
|
||||
|
||||
latticeFormService.save(latticeForm);
|
||||
}
|
||||
|
||||
if (cabinetFormService.updateById(cabinetForm)){
|
||||
return byId;
|
||||
}else throw new RuntimeException(String.format("保存失败"));
|
||||
}
|
||||
|
||||
@Override//通过ID查询柜子信息
|
||||
public CabinetFormVO getFormById(String id){
|
||||
|
||||
CabinetForm byId = cabinetFormService.getById(id);
|
||||
|
||||
LambdaQueryWrapper<LatticeForm> latticeFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
latticeFormLambdaQueryWrapper.eq(LatticeForm::getCabinetFormId,id);
|
||||
|
||||
List<LatticeForm> list = latticeFormService.list(latticeFormLambdaQueryWrapper);
|
||||
|
||||
CabinetFormVO cabinetFormVO = new CabinetFormVO();
|
||||
|
||||
BeanUtils.copyProperties(byId,cabinetFormVO);
|
||||
|
||||
cabinetFormVO.setLatticeFormList(list);
|
||||
|
||||
return cabinetFormVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean delById(String id){
|
||||
|
||||
CabinetForm byId = cabinetFormService.getById(id);
|
||||
|
||||
LambdaQueryWrapper<LatticeForm> latticeFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
latticeFormLambdaQueryWrapper.eq(LatticeForm::getCabinetFormId,id);
|
||||
|
||||
List<LatticeForm> list = latticeFormService.list(latticeFormLambdaQueryWrapper);
|
||||
|
||||
for (LatticeForm latticeForm : list) {
|
||||
|
||||
if (latticeForm.getStatus()==1){
|
||||
throw new RuntimeException(String.format("当前柜子有物品存放,不允许修改"));
|
||||
}
|
||||
}
|
||||
latticeFormService.removeBatchByIds(list);
|
||||
|
||||
if (cabinetFormService.removeById(byId)){
|
||||
return true;
|
||||
}else throw new RuntimeException(String.format("删除失败"));
|
||||
}
|
||||
|
||||
}
|
||||
+11
-3
@@ -133,15 +133,14 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
|
||||
} else throw new RuntimeException(String.format("保存失败"));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public CheckSchedule commitPlan(List<PeriodVerificationPlanDTO> periodVerificationPlanDTOS, DLPUser dlpUser) {
|
||||
|
||||
CheckSchedule byId = checkScheduleService.getById(periodVerificationPlanDTOS.get(0).getCheckScheduleId());
|
||||
|
||||
|
||||
|
||||
if (byId == null|byId.getStatus()==-2) {
|
||||
if (byId == null) {
|
||||
|
||||
CheckSchedule checkSchedule = checkScheduleService.addPlan(periodVerificationPlanDTOS, dlpUser);
|
||||
checkSchedule.setStatus(1);
|
||||
@@ -152,6 +151,15 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
|
||||
|
||||
} else {
|
||||
|
||||
if (byId.getStatus()==-2){
|
||||
|
||||
CheckScheduleVO checkScheduleVO = checkScheduleService.addPlan(periodVerificationPlanDTOS, dlpUser);
|
||||
|
||||
return checkScheduleVO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
CheckSchedule checkSchedule = checkScheduleService.editPlan(periodVerificationPlanDTOS);
|
||||
|
||||
checkSchedule.setStatus(1);
|
||||
|
||||
+26
-2
@@ -169,6 +169,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
|
||||
byId.setDateOfInspection(LocalDateTime.now());
|
||||
|
||||
|
||||
byId.setNonconformingItem(nonconformingItem);
|
||||
|
||||
if (complianceCheckService.updateById(byId)) {
|
||||
@@ -185,7 +186,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
ComplianceCheck byId = complianceCheckService.getById(complianceCheckDTO.getComplianceCheckId());
|
||||
|
||||
byId.setInspectionScheme(complianceCheckDTO.getInspectionScheme());
|
||||
byId.setExecutorId(dlpUser.getId());
|
||||
|
||||
byId.setStatus(0);
|
||||
|
||||
if (complianceCheckService.updateById(byId)) {
|
||||
@@ -195,6 +196,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
}
|
||||
|
||||
@Override//提交符合性检查
|
||||
@Transactional
|
||||
public ComplianceCheck commitCheck(ComplianceCheckDTO complianceCheckDTO, DLPUser dlpUser) {
|
||||
|
||||
String complianceCheckId = complianceCheckDTO.getComplianceCheckId();
|
||||
@@ -202,7 +204,7 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
ComplianceCheck byId = complianceCheckService.getById(complianceCheckId);
|
||||
|
||||
String nonconformingItem = complianceCheckDTO.getNonconformingItem();
|
||||
|
||||
byId.setExecutorId(dlpUser.getId());
|
||||
byId.setExaminationConclusion(complianceCheckDTO.getExaminationConclusion());
|
||||
byId.setNonconformingItem(nonconformingItem);
|
||||
|
||||
@@ -218,6 +220,28 @@ public class ComplianceCheckServiceImpl extends ServiceImpl<ComplianceCheckMappe
|
||||
blacklistService.addListById(byId.getReagentConsumableId(), batchDetails.getSupplierId());
|
||||
}
|
||||
|
||||
if (byId.getStatus()==-2){
|
||||
|
||||
byId.setPrimaryAuditorId("");
|
||||
byId.setAuditOpinionOfPrimary("");
|
||||
byId.setAuditTimeOfPrimary(null);
|
||||
byId.setAuditResultOfPrimary(false);
|
||||
|
||||
}
|
||||
|
||||
if (byId.getStatus()==-3){
|
||||
byId.setPrimaryAuditorId("");
|
||||
byId.setAuditOpinionOfPrimary("");
|
||||
byId.setAuditTimeOfPrimary(null);
|
||||
byId.setAuditResultOfPrimary(false);
|
||||
|
||||
byId.setSecondaryAuditorId("");
|
||||
byId.setAuditOpinionOfSecondary("");
|
||||
byId.setAuditTimeOfSecondary(null);
|
||||
byId.setAuditResultOfSecondary(false);
|
||||
|
||||
}
|
||||
|
||||
byId.setStatus(1);
|
||||
|
||||
if (complianceCheckService.updateById(byId)) {
|
||||
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.DeactivationApplication;
|
||||
import digital.laboratory.platform.reagent.mapper.DeactivationApplicationMapper;
|
||||
import digital.laboratory.platform.reagent.service.DeactivationApplicationService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* (标准物质到期停用申请表)服务实现类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (标准物质到期停用申请表) 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class DeactivationApplicationServiceImpl extends ServiceImpl<DeactivationApplicationMapper, DeactivationApplication> implements DeactivationApplicationService {
|
||||
|
||||
}
|
||||
+27
-22
@@ -288,6 +288,32 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
byId.setApprovalOfTime(LocalDateTime.now());
|
||||
|
||||
if (auditAndApproveDto.getApproveResult() == true) {
|
||||
|
||||
//如果未购入过该物品,则将该物品信息更新至试剂耗材类
|
||||
LambdaQueryWrapper<DecentralizeDetails> decentralizeDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizeDetailsLambdaQueryWrapper.eq(DecentralizeDetails::getDecentralizedRequestId, byId.getId());
|
||||
|
||||
List<DecentralizeDetails> decentralizeDetailsList = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper);
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
for (DecentralizeDetails decentralizeDetails : decentralizeDetailsList) {
|
||||
|
||||
if (decentralizeDetails.getReagentConsumableId() == null) {
|
||||
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(decentralizeDetails);
|
||||
|
||||
decentralizeDetails.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||
|
||||
decentralizeDetailsService.updateById(decentralizeDetails);
|
||||
} else {
|
||||
ReagentConsumables byId1 = reagentConsumablesService.getById(decentralizeDetails.getReagentConsumableId());
|
||||
byId1.setTechnicalParameter(decentralizeDetails.getTechnicalParameter());
|
||||
reagentConsumablesService.updateById(byId1);
|
||||
}
|
||||
}
|
||||
|
||||
//创建采购清单
|
||||
LambdaQueryWrapper<DecentralizeDetails> decentralizeDetailsLambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
|
||||
@@ -296,7 +322,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
List<DecentralizeDetails> list = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper1);
|
||||
|
||||
PurchaseList purchaseList = new PurchaseList();
|
||||
purchaseList.setId(IdWorker.get32UUID().toUpperCase());
|
||||
purchaseList.setId(byId.getCreateBy());
|
||||
purchaseList.setName(DateTime.now() + "采购清单");
|
||||
purchaseList.setStatus(0);
|
||||
purchaseList.setType("分散采购申请");
|
||||
@@ -319,28 +345,7 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
decentralizeDetailsService.updateById(decentralizeDetails);
|
||||
|
||||
}
|
||||
if (byId.getResultOfApproval() == true) {
|
||||
//如果未购入过该物品,则将该物品信息更新至试剂耗材类
|
||||
LambdaQueryWrapper<DecentralizeDetails> decentralizeDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizeDetailsLambdaQueryWrapper.eq(DecentralizeDetails::getDecentralizedRequestId, byId.getId());
|
||||
|
||||
List<DecentralizeDetails> decentralizeDetailsList = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper);
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
for (DecentralizeDetails decentralizeDetails : decentralizeDetailsList) {
|
||||
|
||||
if (decentralizeDetails.getReagentConsumableId() == null) {
|
||||
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(decentralizeDetails);
|
||||
|
||||
decentralizeDetails.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||
|
||||
decentralizeDetailsService.updateById(decentralizeDetails);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
byId.setStatus(5);
|
||||
} else {
|
||||
|
||||
+17
-1
@@ -16,6 +16,7 @@ import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.DeliveryRegistrationFormVO;
|
||||
import digital.laboratory.platform.reagent.vo.OutgoingContentsVO;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumablesSetVO;
|
||||
import digital.laboratory.platform.sys.feign.RemoteCabinetService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -77,6 +78,10 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
@Autowired
|
||||
private SupplierInformationService supplierInformationService;
|
||||
|
||||
@Autowired
|
||||
private RemoteCabinetService remoteCabinetService;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional//创建出库任务
|
||||
public DeliveryRegistrationForm addFrom(String applicationForUseId) {
|
||||
@@ -241,6 +246,10 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
standardMaterialApplication.setStatus(0);
|
||||
}
|
||||
ReferenceMaterial byId1 = referenceMaterialService.getById(outgoingContentsDTO.getReferenceMaterialId());
|
||||
if (byId1.getStatus()==-3){
|
||||
|
||||
throw new RuntimeException(String.format("该物品已被其他工作人员领用"));
|
||||
}
|
||||
|
||||
byId1.setStatus(-3);
|
||||
|
||||
@@ -298,7 +307,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
standardMaterialApplication.setReferenceMaterialId(outgoingContentsDTO.getReferenceMaterialId());
|
||||
standardMaterialApplications.add(standardMaterialApplication);
|
||||
//录入标准储备溶液使用记录
|
||||
SolutionUseForm solutionUseForm = solutionUseFormService.useById(outgoingContentsDTO.getNumber(), dlpUser);
|
||||
SolutionUseForm solutionUseForm = solutionUseFormService.useById(outgoingContentsDTO.getReferenceMaterialId(), dlpUser);
|
||||
|
||||
solutionUseForm.setStandardMaterialApplicationId(standardMaterialApplication.getStandardMaterialApplicationId());
|
||||
|
||||
@@ -308,6 +317,10 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(referenceMaterialId);
|
||||
|
||||
if (referenceMaterial.getStatus()==-3){
|
||||
|
||||
throw new RuntimeException(String.format("该物品已被其他工作人员领用"));
|
||||
}
|
||||
referenceMaterial.setStatus(-3);
|
||||
|
||||
referenceMaterialService.updateById(referenceMaterial);
|
||||
@@ -316,6 +329,8 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
|
||||
reagentConsumableInventory.setTotalQuantity(reagentConsumableInventory.getTotalQuantity() - outgoingContentsDTO.getQuantity());
|
||||
|
||||
reagentConsumableInventoryService.updateById(reagentConsumableInventory);
|
||||
|
||||
BatchDetails batchDetails = batchDetailsService.getById(outgoingContentsDTO.getBatchDetailsId());
|
||||
|
||||
if (batchDetails!=null){
|
||||
@@ -370,6 +385,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
complianceCheckDTO.setComplianceCheckId(IdWorker.get32UUID().toUpperCase());
|
||||
complianceCheckDTO.setReagentConsumableNumber(outgoingContentsDTO.getNumber());
|
||||
complianceCheckDTO.setBatchDetailsId(batchDetailsService.getById(outgoingContentsDTO.getBatchDetailsId()).getBatchDetailsId());
|
||||
complianceCheckDTO.setReferenceMaterialId(outgoingContentsDTO.getReferenceMaterialId());
|
||||
complianceCheckService.addCheck(complianceCheckDTO, dlpUser);
|
||||
}
|
||||
outgoingContentsList.add(outgoingContents);
|
||||
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.DisqualificationForm;
|
||||
import digital.laboratory.platform.reagent.mapper.DisqualificationFormMapper;
|
||||
import digital.laboratory.platform.reagent.service.DisqualificationFormService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 服务实现类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-23
|
||||
* @describe 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class DisqualificationFormServiceImpl extends ServiceImpl<DisqualificationFormMapper, DisqualificationForm> implements DisqualificationFormService {
|
||||
|
||||
}
|
||||
+56
-11
@@ -73,6 +73,7 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
||||
|
||||
EvaluationForm evaluationForm = new EvaluationForm();
|
||||
evaluationForm.setId(IdWorker.get32UUID().toUpperCase());
|
||||
evaluationForm.setStatus(0);
|
||||
evaluationForm.setSupplierInformationId(supplierInformationId);
|
||||
|
||||
if (evaluationFormService.save(evaluationForm)) {
|
||||
@@ -87,23 +88,67 @@ public class EvaluationFormServiceImpl extends ServiceImpl<EvaluationFormMapper,
|
||||
|
||||
if (!(StrUtil.isNotBlank(evaluationFormDTO.getContactNumber()) &
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getContactPerson()) &
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierBusinessLicense())&
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierPassesQualityAssuranceSystem())&
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierProductCertification())&
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getCheckAndCalibrateEfficiencyOfSupplies())&
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getOverallSupplierServiceSatisfaction())&
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierAttitude())&
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierEquipmentAndFacilities())&
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierTechnologyAndManagementCapability())&
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getWhetherTheSupplierDeliversOnTime())&
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierInformationId())&
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getEvaluationFormId()))){
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierBusinessLicense()) &
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierPassesQualityAssuranceSystem()) &
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierProductCertification()) &
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getCheckAndCalibrateEfficiencyOfSupplies()) &
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getOverallSupplierServiceSatisfaction()) &
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierAttitude()) &
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierEquipmentAndFacilities()) &
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierTechnologyAndManagementCapability()) &
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getWhetherTheSupplierDeliversOnTime()) &
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getSupplierInformationId()) &
|
||||
StrUtil.isNotBlank(evaluationFormDTO.getEvaluationFormId()))) {
|
||||
|
||||
throw new RuntimeException(String.format("请完善评价信息后再提交"));
|
||||
}
|
||||
|
||||
EvaluationForm evaluationForm = evaluationFormService.getById(evaluationFormDTO.getEvaluationFormId());
|
||||
|
||||
if (evaluationForm.getStatus() == -3) {
|
||||
|
||||
BeanUtils.copyProperties(evaluationFormDTO, evaluationForm);
|
||||
|
||||
evaluationForm.setSecondaryUserId("");
|
||||
evaluationForm.setCommentsResultFromSecondary(false);
|
||||
evaluationForm.setCommentsFromSecondary("");
|
||||
evaluationForm.setCommentsDateFromSecondary(null);
|
||||
evaluationForm.setPrimaryUserId(dlpUser.getId());
|
||||
evaluationForm.setCommentsDateFromPrimary(LocalDate.now());
|
||||
evaluationForm.setStatus(2);
|
||||
evaluationForm.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (evaluationFormService.updateById(evaluationForm)) {
|
||||
return evaluationForm;
|
||||
} else throw new RuntimeException(String.format("提交失败"));
|
||||
|
||||
}
|
||||
|
||||
if (evaluationForm.getStatus() == -4) {
|
||||
|
||||
BeanUtils.copyProperties(evaluationFormDTO, evaluationForm);
|
||||
|
||||
evaluationForm.setSecondaryUserId("");
|
||||
evaluationForm.setCommentsResultFromSecondary(false);
|
||||
evaluationForm.setCommentsFromSecondary("");
|
||||
evaluationForm.setCommentsDateFromSecondary(null);
|
||||
|
||||
evaluationForm.setThreeLevelUserId("");
|
||||
evaluationForm.setCommentsResultFromThreeLevel(false);
|
||||
evaluationForm.setCommentsFromThreeLevel("");
|
||||
evaluationForm.setCommentsDateFromThreeLevel(null);
|
||||
|
||||
evaluationForm.setPrimaryUserId(dlpUser.getId());
|
||||
evaluationForm.setCommentsDateFromPrimary(LocalDate.now());
|
||||
evaluationForm.setStatus(2);
|
||||
evaluationForm.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (evaluationFormService.updateById(evaluationForm)) {
|
||||
return evaluationForm;
|
||||
} else throw new RuntimeException(String.format("提交失败"));
|
||||
|
||||
}
|
||||
|
||||
BeanUtils.copyProperties(evaluationFormDTO, evaluationForm);
|
||||
|
||||
evaluationForm.setPrimaryUserId(dlpUser.getId());
|
||||
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.ExpirationReminder;
|
||||
import digital.laboratory.platform.reagent.mapper.ExpirationReminderMapper;
|
||||
import digital.laboratory.platform.reagent.service.ExpirationReminderService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* (试剂耗材到期提醒)服务实现类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (试剂耗材到期提醒) 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class ExpirationReminderServiceImpl extends ServiceImpl<ExpirationReminderMapper, ExpirationReminder> implements ExpirationReminderService {
|
||||
|
||||
}
|
||||
+2
@@ -62,9 +62,11 @@ public class InstructionBookServiceImpl extends ServiceImpl<InstructionBookMappe
|
||||
public InstructionBookVO getVO(String id){
|
||||
|
||||
InstructionBookVO instructionBookVO = baseMapper.getInstructionBookVO(id);
|
||||
|
||||
if (instructionBookVO==null){
|
||||
return null;
|
||||
}
|
||||
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(id);
|
||||
instructionBookVO.setReagentConsumables(byId);
|
||||
|
||||
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.CabinetForm;
|
||||
import digital.laboratory.platform.reagent.entity.LatticeForm;
|
||||
import digital.laboratory.platform.reagent.entity.StorageRoomForm;
|
||||
import digital.laboratory.platform.reagent.mapper.LatticeFormMapper;
|
||||
import digital.laboratory.platform.reagent.service.CabinetFormService;
|
||||
import digital.laboratory.platform.reagent.service.LatticeFormService;
|
||||
import digital.laboratory.platform.reagent.service.StorageRoomFormService;
|
||||
import digital.laboratory.platform.reagent.vo.LocationVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 服务实现类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-22
|
||||
* @describe 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class LatticeFormServiceImpl extends ServiceImpl<LatticeFormMapper, LatticeForm> implements LatticeFormService {
|
||||
|
||||
@Autowired
|
||||
private LatticeFormService latticeFormService;
|
||||
|
||||
@Autowired
|
||||
private CabinetFormService cabinetFormService;
|
||||
|
||||
@Autowired
|
||||
private StorageRoomFormService storageRoomFormService;
|
||||
@Override
|
||||
public LocationVO getLocationById(String latticeFormId){
|
||||
|
||||
LatticeForm latticeForm = latticeFormService.getById(latticeFormId);
|
||||
|
||||
CabinetForm cabinetForm = cabinetFormService.getById(latticeForm.getCabinetFormId());
|
||||
|
||||
StorageRoomForm storageRoomForm = storageRoomFormService.getById(cabinetForm.getStorageRoomFormId());
|
||||
|
||||
LocationVO locationVO = new LocationVO();
|
||||
|
||||
locationVO.setLatticeFormNumber(latticeForm.getNumber());
|
||||
locationVO.setCabinetFormType(cabinetForm.getType());
|
||||
locationVO.setCabinetFormNumber(cabinetForm.getNumber());
|
||||
locationVO.setStorageRoomFormName(storageRoomForm.getName());
|
||||
|
||||
return locationVO;
|
||||
}
|
||||
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.LocationInformation;
|
||||
import digital.laboratory.platform.reagent.mapper.LocationInformationMapper;
|
||||
import digital.laboratory.platform.reagent.service.LocationInformationService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* (位置信息)服务实现类
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (位置信息) 服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class LocationInformationServiceImpl extends ServiceImpl<LocationInformationMapper, LocationInformation> implements LocationInformationService {
|
||||
|
||||
}
|
||||
+62
-32
@@ -21,10 +21,8 @@ import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
|
||||
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
|
||||
import digital.laboratory.platform.reagent.mapper.PeriodVerificationImplementationMapper;
|
||||
import digital.laboratory.platform.reagent.service.PeriodVerificationImplementationService;
|
||||
import digital.laboratory.platform.reagent.service.PeriodVerificationPlanService;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
|
||||
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.InstructionBookVO;
|
||||
import digital.laboratory.platform.reagent.vo.PeriodVerificationImplementationVO;
|
||||
import feign.Response;
|
||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
@@ -39,6 +37,7 @@ import java.io.ByteArrayInputStream;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (标准物质期间核查实施情况及结果记录表)服务实现类
|
||||
@@ -64,6 +63,9 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
@Autowired
|
||||
private OssFile ossFile;
|
||||
|
||||
@Autowired
|
||||
private InstructionBookService instructionBookService;
|
||||
|
||||
@Autowired
|
||||
private RemoteWord2PDFService remoteWord2PDFService;
|
||||
|
||||
@@ -72,6 +74,18 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
|
||||
IPage<PeriodVerificationImplementationVO> periodVerificationImplementationVOPage = baseMapper.getPeriodVerificationImplementationVOPage(page, qw);
|
||||
|
||||
List<PeriodVerificationImplementationVO> records = periodVerificationImplementationVOPage.getRecords();
|
||||
|
||||
for (PeriodVerificationImplementationVO record : records) {
|
||||
|
||||
InstructionBookVO vo = instructionBookService.getVO(referenceMaterialService.getById(record.getReferenceMaterialId()).getReagentConsumableId());
|
||||
|
||||
if (vo!=null){
|
||||
if (vo.isAuditResultOfTechnical()){
|
||||
|
||||
record.setInstructionBook("有");}
|
||||
}
|
||||
}
|
||||
return periodVerificationImplementationVOPage;
|
||||
}
|
||||
|
||||
@@ -97,6 +111,8 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
periodVerificationImplementation.setPeriodVerificationPlanId(periodVerificationPlan.getId());
|
||||
periodVerificationImplementation.setCauseOfDissatisfactionResult(false);
|
||||
|
||||
|
||||
|
||||
LambdaQueryWrapper<ReferenceMaterial> referenceMaterialLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
referenceMaterialLambdaQueryWrapper.eq(ReferenceMaterial::getId, periodVerificationPlan.getReferenceMaterialId());
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getOne(referenceMaterialLambdaQueryWrapper);
|
||||
@@ -137,7 +153,7 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
|
||||
reagentConsumablesService.updateById(byId2);
|
||||
|
||||
if (periodVerificationImplementationService.updateById(byId) ) {
|
||||
if (periodVerificationImplementationService.updateById(byId)) {
|
||||
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("保存失败"));
|
||||
@@ -149,26 +165,24 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
|
||||
PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.editById(periodVerificationImplementationDTO, dlpUser);
|
||||
|
||||
periodVerificationImplementation.setCommitStatus(1);
|
||||
|
||||
periodVerificationImplementation.setCommitTime(LocalDateTime.now());
|
||||
|
||||
String result = periodVerificationImplementationDTO.getResult();
|
||||
|
||||
periodVerificationImplementation.setCheckingTime(LocalDate.now());
|
||||
|
||||
PeriodVerificationPlan periodVerificationPlan = periodVerificationPlanService.getById(periodVerificationImplementationDTO.getPeriodVerificationPlanId());
|
||||
if (periodVerificationImplementation.getCommitStatus()==-2){
|
||||
|
||||
periodVerificationPlan.setVerificationResult(result);
|
||||
periodVerificationImplementation.setAuditOpinionOfTechnical("");
|
||||
periodVerificationImplementation.setAuditTimeOfTechnical(null);
|
||||
periodVerificationImplementation.setAuditResultOfTechnical(false);
|
||||
periodVerificationImplementation.setTechnicalDirectorId("");
|
||||
|
||||
periodVerificationPlan.setImplementationDate(periodVerificationImplementation.getCheckingTime());
|
||||
}
|
||||
|
||||
periodVerificationPlan.setInspectorId(dlpUser.getId());
|
||||
periodVerificationImplementation.setCommitStatus(1);
|
||||
|
||||
periodVerificationPlan.setDateOfNextCheck(periodVerificationImplementation.getCheckingTime().plusMonths(periodVerificationPlan.getPlannedVerificationCycle()));
|
||||
|
||||
if (periodVerificationImplementationService.updateById(periodVerificationImplementation)&& periodVerificationPlanService
|
||||
.updateById(periodVerificationPlan)) {
|
||||
if (periodVerificationImplementationService.updateById(periodVerificationImplementation)) {
|
||||
|
||||
return periodVerificationImplementation;
|
||||
|
||||
@@ -187,6 +201,20 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
|
||||
if (auditAndApproveDTO.getAuditResult() == true) {
|
||||
|
||||
PeriodVerificationPlan periodVerificationPlan = periodVerificationPlanService.getById(byId.getPeriodVerificationPlanId());
|
||||
|
||||
periodVerificationPlan.setVerificationResult(byId.getResult());
|
||||
|
||||
periodVerificationPlan.setImplementationDate(byId.getCheckingTime());
|
||||
|
||||
periodVerificationPlan.setInspectorId(dlpUser.getId());
|
||||
|
||||
periodVerificationPlan.setDeviationAndUncertainty(byId.getDeviationAndUncertainty());
|
||||
|
||||
periodVerificationPlan.setDateOfNextCheck(byId.getCheckingTime().plusMonths(periodVerificationPlan.getPlannedVerificationCycle()));
|
||||
|
||||
periodVerificationPlanService.updateById(periodVerificationPlan);
|
||||
|
||||
byId.setCommitStatus(2);
|
||||
} else byId.setCommitStatus(-2);
|
||||
|
||||
@@ -195,6 +223,8 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
} else throw new RuntimeException(String.format("审核失败"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void periodVerificationImplementationTablePDF(PeriodVerificationImplementationVO periodVerificationImplementationVO, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
System.out.println("periodVerificationImplementationTablePDF.................");
|
||||
@@ -220,29 +250,29 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
|
||||
ConfigureBuilder builder = Configure.builder().buildGramer("${", "}").useSpringEL(false);
|
||||
|
||||
builder.bind("voList",policy).build();
|
||||
builder.bind("voList", policy).build();
|
||||
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, builder.build()).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("id",id);
|
||||
put("size",1);
|
||||
put("referenceMaterialName",periodVerificationImplementationVO.getReferenceMaterialName());
|
||||
put("referenceMaterialNumber",periodVerificationImplementationVO.getReferenceMaterialNumber());
|
||||
put("standardValueOrPurity",periodVerificationImplementationVO.getStandardValueOrPurity());
|
||||
put("deviationAndUncertainty",periodVerificationImplementationVO.getDeviationAndUncertainty());
|
||||
put("inspectorName",periodVerificationImplementationVO.getInspectorName());
|
||||
put("verificationMethod",periodVerificationImplementationVO.getVerificationMethod());
|
||||
put("implementationAndResults",periodVerificationImplementationVO.getImplementationAndResults());
|
||||
put("causeOfDissatisfactionResult",periodVerificationImplementationVO.isCauseOfDissatisfactionResult());
|
||||
put("causeOfDissatisfaction",periodVerificationImplementationVO.getCauseOfDissatisfaction());
|
||||
put("auditOpinionOfTechnical",periodVerificationImplementationVO.getAuditTimeOfTechnical());
|
||||
put("technicalDirectorName",periodVerificationImplementationVO.getTechnicalDirectorName());
|
||||
put("remarks",periodVerificationImplementationVO.getRemarks());
|
||||
put("checkingTime", LocalDateTimeUtil.format(periodVerificationImplementationVO.getCheckingTime(),"yyyy年MM月dd日"));
|
||||
put("auditTimeOfTechnical", LocalDateTimeUtil.format(periodVerificationImplementationVO.getAuditTimeOfTechnical(),"yyyy年MM月dd日"));
|
||||
put("id", id);
|
||||
put("size", 1);
|
||||
put("referenceMaterialName", periodVerificationImplementationVO.getReferenceMaterialName());
|
||||
put("referenceMaterialNumber", periodVerificationImplementationVO.getReferenceMaterialNumber());
|
||||
put("standardValueOrPurity", periodVerificationImplementationVO.getStandardValueOrPurity());
|
||||
put("deviationAndUncertainty", periodVerificationImplementationVO.getDeviationAndUncertainty());
|
||||
put("inspectorName", periodVerificationImplementationVO.getInspectorName());
|
||||
put("verificationMethod", periodVerificationImplementationVO.getVerificationMethod());
|
||||
put("implementationAndResults", periodVerificationImplementationVO.getImplementationAndResults());
|
||||
put("causeOfDissatisfactionResult", periodVerificationImplementationVO.isCauseOfDissatisfactionResult());
|
||||
put("causeOfDissatisfaction", periodVerificationImplementationVO.getCauseOfDissatisfaction());
|
||||
put("auditOpinionOfTechnical", periodVerificationImplementationVO.getAuditTimeOfTechnical());
|
||||
put("technicalDirectorName", periodVerificationImplementationVO.getTechnicalDirectorName());
|
||||
put("remarks", periodVerificationImplementationVO.getRemarks());
|
||||
put("checkingTime", LocalDateTimeUtil.format(periodVerificationImplementationVO.getCheckingTime(), "yyyy年MM月dd日"));
|
||||
put("auditTimeOfTechnical", LocalDateTimeUtil.format(periodVerificationImplementationVO.getAuditTimeOfTechnical(), "yyyy年MM月dd日"));
|
||||
|
||||
}}
|
||||
);
|
||||
|
||||
+46
-5
@@ -2,19 +2,22 @@ package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
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.reagent.entity.CheckSchedule;
|
||||
import digital.laboratory.platform.reagent.entity.PeriodVerificationPlan;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
|
||||
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
|
||||
import digital.laboratory.platform.reagent.mapper.PeriodVerificationPlanMapper;
|
||||
import digital.laboratory.platform.reagent.service.PeriodVerificationPlanService;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
|
||||
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.CheckScheduleVO;
|
||||
import digital.laboratory.platform.reagent.vo.PeriodVerificationPlanVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -31,8 +34,18 @@ public class PeriodVerificationPlanServiceImpl extends ServiceImpl<PeriodVerific
|
||||
|
||||
@Autowired
|
||||
private ReferenceMaterialService referenceMaterialService;
|
||||
|
||||
@Autowired
|
||||
private PeriodVerificationPlanService periodVerificationPlanService;
|
||||
|
||||
@Autowired
|
||||
private PeriodVerificationImplementationService periodVerificationImplementationService;
|
||||
|
||||
@Autowired
|
||||
private CheckScheduleService checkScheduleService;
|
||||
|
||||
@Override
|
||||
public List<PeriodVerificationPlanVO> getPeriodVerificationPlanVOList(String checkScheduleId){
|
||||
public List<PeriodVerificationPlanVO> getPeriodVerificationPlanVOList(String checkScheduleId) {
|
||||
|
||||
List<PeriodVerificationPlanVO> periodVerificationPlanVOPage = baseMapper.getPeriodVerificationPlanVOList(checkScheduleId);
|
||||
|
||||
@@ -50,17 +63,45 @@ public class PeriodVerificationPlanServiceImpl extends ServiceImpl<PeriodVerific
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<PeriodVerificationPlanVO> getPeriodVerificationPlanVOPage(Page<PeriodVerificationPlan> page, QueryWrapper<PeriodVerificationPlan> qw){
|
||||
public IPage<PeriodVerificationPlanVO> getPeriodVerificationPlanVOPage(Page<PeriodVerificationPlan> page, QueryWrapper<PeriodVerificationPlan> qw) {
|
||||
|
||||
IPage<PeriodVerificationPlanVO> periodVerificationPlanVOPage = baseMapper.getPeriodVerificationPlanVOPage(page, qw);
|
||||
|
||||
return periodVerificationPlanVOPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getPlan() {
|
||||
|
||||
ArrayList<PeriodVerificationPlanVO> periodVerificationPlanVOArrayList = new ArrayList<>();
|
||||
//查询审核已通过的期间核查计划
|
||||
List<CheckSchedule> checkScheduleList = checkScheduleService.list(Wrappers.<CheckSchedule>query().eq("status", 2));
|
||||
//获取所有的计划明细
|
||||
for (CheckSchedule checkSchedule : checkScheduleList) {
|
||||
|
||||
CheckScheduleVO checkScheduleVO = checkScheduleService.getCheckScheduleVO(checkSchedule.getId());
|
||||
|
||||
List<PeriodVerificationPlanVO> periodVerificationPlanVOS = checkScheduleVO.getPeriodVerificationPlanVOS();
|
||||
|
||||
periodVerificationPlanVOArrayList.addAll(periodVerificationPlanVOS);
|
||||
}
|
||||
//循环计划明细,判断是否需要创建该期间核查计划
|
||||
for (PeriodVerificationPlan periodVerificationPlan : periodVerificationPlanVOArrayList) {
|
||||
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(periodVerificationPlan.getReferenceMaterialId());
|
||||
//判断标准物质是否正常使用
|
||||
if (referenceMaterialServiceById.getStatus() != -1 & referenceMaterialServiceById.getStatus() != -4 & periodVerificationPlan.getDateOfNextCheck() != null) {
|
||||
|
||||
if (periodVerificationPlan.getDateOfNextCheck().isBefore(LocalDate.now().plusDays(3L))) {
|
||||
|
||||
periodVerificationImplementationService.addById(periodVerificationPlan);
|
||||
|
||||
periodVerificationPlan.setDateOfNextCheck(null);
|
||||
|
||||
periodVerificationPlanService.updateById(periodVerificationPlan);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-5
@@ -27,9 +27,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* (采购目录)服务实现类
|
||||
@@ -253,8 +251,8 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
.eq("brand", catalogueDetails.getBrand())
|
||||
.eq("category", catalogueDetails.getCategory())
|
||||
.eq("specification_and_model", catalogueDetails.getSpecificationAndModel())
|
||||
.eq("standard_value_or_purity", catalogueDetails.getStandardValueOrPurity())
|
||||
.eq("cas_number", catalogueDetails.getCasNumber()));
|
||||
.eq("standard_value_or_purity", catalogueDetails.getStandardValueOrPurity()
|
||||
));
|
||||
|
||||
if (one == null) {
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(catalogueDetails);
|
||||
@@ -320,6 +318,14 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
|
||||
throw new RuntimeException(String.format("未存在已发布的采购目录"));
|
||||
}
|
||||
Collections.sort(catalogueDetailsList, new Comparator<CatalogueDetails>() {
|
||||
|
||||
|
||||
@Override
|
||||
public int compare(CatalogueDetails o1, CatalogueDetails o2) {
|
||||
return Integer.valueOf(o1.getPurchaseCatalogueNumber().substring(5))- Integer.valueOf(o2.getPurchaseCatalogueNumber().substring(5));
|
||||
}
|
||||
});
|
||||
return catalogueDetailsList;
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -182,7 +182,6 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(Wrappers.<ReagentConsumableInventory>query()
|
||||
.eq("reagent_consumable_id", byId.getReagentConsumableId()));
|
||||
|
||||
|
||||
WarehousingContent warehousingContent = new WarehousingContent();
|
||||
//完善入库内容信息
|
||||
warehousingContent.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
+2
-4
@@ -272,7 +272,6 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
ProcurementContent byId = procurementContentService.getById(purchasingPlanDTO.getProcurementContentId());
|
||||
|
||||
byId.setUnitPrice(purchasingPlanDTO.getUnitPrice());
|
||||
byId.setQuantityPurchased(purchasingPlanDTO.getQuantityPurchased());
|
||||
|
||||
PurchasingPlan purchasingPlan = purchasingPlanService.getById(byId.getPurchasingPlanId());
|
||||
|
||||
@@ -336,7 +335,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
|
||||
purchasingPlanService.removeById(purchasingPlan);
|
||||
|
||||
return null;
|
||||
return true;
|
||||
}
|
||||
calculatedAmount(byId.getPurchasingPlanId());
|
||||
|
||||
@@ -419,8 +418,6 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
return byId;
|
||||
|
||||
} else throw new RuntimeException(String.format("换货失败"));
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -445,6 +442,7 @@ public class PurchasingPlanServiceImpl extends ServiceImpl<PurchasingPlanMapper,
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public PurchasingPlan auditById(AuditAndApproveDTO auditAndApproveDto, DLPUser dlpUser) {
|
||||
|
||||
|
||||
+107
-7
@@ -17,7 +17,6 @@ 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.entity.*;
|
||||
import digital.laboratory.platform.reagent.handle.AppStartupRunner;
|
||||
import digital.laboratory.platform.reagent.mapper.ReagentConsumableInventoryMapper;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.*;
|
||||
@@ -72,11 +71,102 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
@Autowired
|
||||
private RemoteWord2PDFService remoteWord2PDFService;
|
||||
|
||||
@Autowired
|
||||
private InstructionBookService instructionBookService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private OssFile ossFile;
|
||||
|
||||
@Override//试剂耗材/标准物质标准物质管理列表
|
||||
public IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryRMVOList(IPage<ReagentConsumableInventory> page, QueryWrapper<ReagentConsumableInventory> qw) {
|
||||
public IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryRMVOList(IPage<ReagentConsumableInventory> page, QueryWrapper<ReagentConsumableInventory> qw, Integer warning) {
|
||||
|
||||
|
||||
if (warning != null) {
|
||||
|
||||
if (warning == 2) {
|
||||
|
||||
List<ReagentConsumableInventoryVO> reagentConsumableInventoryVOList = new ArrayList<>();
|
||||
|
||||
List<BatchDetails> list = batchDetailsService.list(Wrappers.<BatchDetails>query()
|
||||
.eq("warning_information", "即将过期").or()
|
||||
.eq("warning_information", "已过期").or()
|
||||
.eq("warning_information", "即将到达存储期限").or()
|
||||
.eq("warning_information", "已超过存储期限"));
|
||||
|
||||
if (list.size() != 0) {
|
||||
for (BatchDetails batchDetails : list) {
|
||||
|
||||
ReagentConsumableInventory byId = reagentConsumableInventoryService.getById(batchDetails.getReagentConsumableInventoryId());
|
||||
ReagentConsumableInventoryVO reagentConsumableInventoryVO = new ReagentConsumableInventoryVO();
|
||||
BeanUtils.copyProperties(byId, reagentConsumableInventoryVO);
|
||||
reagentConsumableInventoryVO.setBatchDetailsVOS(batchDetailsService.getBatchDetailsList(reagentConsumableInventoryVO.getReagentConsumableInventoryId()));
|
||||
if (!reagentConsumableInventoryVOList.contains(reagentConsumableInventoryVO)) {
|
||||
if (reagentConsumableInventoryVO.getCategory().equals("标准物质")) {
|
||||
reagentConsumableInventoryVOList.add(reagentConsumableInventoryVO);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
PageUtils pageUtils = new PageUtils();
|
||||
|
||||
return pageUtils.getPages((int) page.getCurrent(), (int) page.getSize(), reagentConsumableInventoryVOList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryVOPage = baseMapper.getReagentConsumableInventoryVOPage(page, qw);
|
||||
|
||||
List<ReagentConsumableInventoryVO> records = reagentConsumableInventoryVOPage.getRecords();
|
||||
|
||||
for (ReagentConsumableInventoryVO reagentConsumableInventoryVO : records) {
|
||||
|
||||
List<BatchDetailsVO> batchDetailsVOList = batchDetailsService.getBatchDetailsList(reagentConsumableInventoryVO.getReagentConsumableInventoryId());
|
||||
//赋值试剂耗材批次明细
|
||||
reagentConsumableInventoryVO.setBatchDetailsVOS(batchDetailsVOList);
|
||||
}
|
||||
return reagentConsumableInventoryVOPage;
|
||||
}
|
||||
|
||||
@Override//试剂耗材管理列表
|
||||
public IPage<ReagentConsumableInventoryVO> getReagentConsumableInventoryREVOList(IPage<ReagentConsumableInventory> page, QueryWrapper<ReagentConsumableInventory> qw, Integer warning) {
|
||||
|
||||
|
||||
if (warning != null) {
|
||||
|
||||
if (warning == 2) {
|
||||
|
||||
List<ReagentConsumableInventoryVO> reagentConsumableInventoryVOList = new ArrayList<>();
|
||||
|
||||
List<BatchDetails> list = batchDetailsService.list(Wrappers.<BatchDetails>query()
|
||||
.eq("warning_information", "即将过期").or()
|
||||
.eq("warning_information", "已过期").or()
|
||||
.eq("warning_information", "即将到达存储期限").or()
|
||||
.eq("warning_information", "已超过存储期限"));
|
||||
//查找具有到期批次物品的试剂耗材类信息
|
||||
if (list.size() != 0) {
|
||||
for (BatchDetails batchDetails : list) {
|
||||
|
||||
ReagentConsumableInventory byId = reagentConsumableInventoryService.getById(batchDetails.getReagentConsumableInventoryId());
|
||||
ReagentConsumableInventoryVO reagentConsumableInventoryVO = new ReagentConsumableInventoryVO();
|
||||
BeanUtils.copyProperties(byId, reagentConsumableInventoryVO);
|
||||
reagentConsumableInventoryVO.setBatchDetailsVOS(batchDetailsService.getBatchDetailsList(reagentConsumableInventoryVO.getReagentConsumableInventoryId()));
|
||||
|
||||
if (!reagentConsumableInventoryVOList.contains(reagentConsumableInventoryVO)) {
|
||||
if (reagentConsumableInventoryVO.getCategory().equals("试剂") || reagentConsumableInventoryVO.getCategory().equals("耗材")) {
|
||||
reagentConsumableInventoryVOList.add(reagentConsumableInventoryVO);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
PageUtils pageUtils = new PageUtils();
|
||||
|
||||
return pageUtils.getPages((int) page.getCurrent(), (int) page.getSize(), reagentConsumableInventoryVOList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
IPage<ReagentConsumableInventoryVO> reagentConsumableInventoryVOPage = baseMapper.getReagentConsumableInventoryVOPage(page, qw);
|
||||
|
||||
@@ -121,6 +211,11 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
one.setTotalQuantity(one.getTotalQuantity() - quantity);
|
||||
|
||||
if (one.getTotalQuantity() <= one.getWarningValue()) {
|
||||
|
||||
one.setWarningInformation("库存不足");
|
||||
}
|
||||
|
||||
if (reagentConsumableInventoryService.updateById(one)) {
|
||||
|
||||
return one;
|
||||
@@ -385,21 +480,26 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(id);
|
||||
|
||||
if (referenceMaterialServiceById==null){
|
||||
|
||||
throw new RuntimeException(String.format("请先入库后再进行打印条码"));
|
||||
}
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
referenceMaterialServiceById.setCode(LocalDateTimeUtil.format(LocalDateTime.now(),"yyyyMMddHHmmssSSS"));
|
||||
referenceMaterialServiceById.setCode(LocalDateTimeUtil.format(LocalDateTime.now(), "yyyyMMddHHmmssSSS"));
|
||||
|
||||
referenceMaterialService.updateById(referenceMaterialServiceById);
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(referenceMaterialServiceById.getReagentConsumableId());
|
||||
String reagentConsumableName = byId.getReagentConsumableName();
|
||||
ReferenceMaterialVO referenceMaterial = new ReferenceMaterialVO();
|
||||
BeanUtils.copyProperties(referenceMaterialServiceById,referenceMaterial);
|
||||
referenceMaterial.setCodeName(referenceMaterial.getNumber()+"-"+referenceMaterialServiceById.getCode());
|
||||
BeanUtils.copyProperties(referenceMaterialServiceById, referenceMaterial);
|
||||
referenceMaterial.setCodeName(referenceMaterial.getNumber() + "-" + referenceMaterialServiceById.getCode());
|
||||
data.put("referenceMaterial", referenceMaterial);
|
||||
|
||||
String templateFileName = AppStartupRunner.getCfg( "labelTemplate_standardSubstance");
|
||||
String templateFileName = "标准物质标签模板.vm";
|
||||
|
||||
return remoteTemplate2htmlService.getHtml(templateFileName,data);
|
||||
return remoteTemplate2htmlService.getHtml(templateFileName, data);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
-2
@@ -37,6 +37,4 @@ public class ReagentConsumablesServiceImpl extends ServiceImpl<ReagentConsumable
|
||||
return reagentConsumables;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+16
-8
@@ -9,6 +9,7 @@ import digital.laboratory.platform.reagent.mapper.ReagentConsumablesSetMapper;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesSetService;
|
||||
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumablesSetVO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -36,34 +37,36 @@ public class ReagentConsumablesSetServiceImpl extends ServiceImpl<ReagentConsuma
|
||||
@Autowired
|
||||
private ReagentConsumableInventoryService reagentConsumableInventoryService;
|
||||
|
||||
@Autowired
|
||||
private ReferenceMaterialService referenceMaterialService;
|
||||
|
||||
@Override
|
||||
public List<ReagentConsumablesSetVO> getList(String applicationForUseId){
|
||||
public List<ReagentConsumablesSetVO> getList(String applicationForUseId) {
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumablesSet> reagentConsumablesSetLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
reagentConsumablesSetLambdaQueryWrapper.eq(ReagentConsumablesSet::getApplicationForUseId,applicationForUseId);
|
||||
reagentConsumablesSetLambdaQueryWrapper.eq(ReagentConsumablesSet::getApplicationForUseId, applicationForUseId);
|
||||
|
||||
List<ReagentConsumablesSet> list = reagentConsumablesSetService.list(reagentConsumablesSetLambdaQueryWrapper);
|
||||
|
||||
List<ReagentConsumablesSetVO> reagentConsumablesSetVOS = new ArrayList<>();
|
||||
|
||||
|
||||
|
||||
if (list.size()!=0){
|
||||
if (list.size() != 0) {
|
||||
//查找出试剂耗材名称
|
||||
for (ReagentConsumablesSet reagentConsumablesSet : list) {
|
||||
|
||||
ReagentConsumablesSetVO reagentConsumablesSetVO = new ReagentConsumablesSetVO();
|
||||
|
||||
BeanUtils.copyProperties(reagentConsumablesSet,reagentConsumablesSetVO);
|
||||
BeanUtils.copyProperties(reagentConsumablesSet, reagentConsumablesSetVO);
|
||||
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(reagentConsumablesSetVO.getReagentConsumableId());
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId,reagentConsumablesSet.getReagentConsumableId());
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, reagentConsumablesSet.getReagentConsumableId());
|
||||
|
||||
if (byId.getCategory().equals("试剂")|byId.getCategory().equals("耗材")){
|
||||
if (byId.getCategory().equals("试剂") | byId.getCategory().equals("耗材")) {
|
||||
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||
|
||||
@@ -73,8 +76,13 @@ public class ReagentConsumablesSetServiceImpl extends ServiceImpl<ReagentConsuma
|
||||
|
||||
reagentConsumablesSetVO.setReagentConsumables(byId);
|
||||
|
||||
if (reagentConsumablesSetVO.getReferenceMaterialId()!=null){
|
||||
reagentConsumablesSetVO.setReferenceMaterialNumber(referenceMaterialService.getById(reagentConsumablesSetVO.getReferenceMaterialId()).getNumber()
|
||||
);}
|
||||
|
||||
reagentConsumablesSetVOS.add(reagentConsumablesSetVO);
|
||||
}}
|
||||
}
|
||||
}
|
||||
return reagentConsumablesSetVOS;
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -1,15 +1,19 @@
|
||||
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.common.feign.RemoteWord2PDFService;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
|
||||
import digital.laboratory.platform.reagent.entity.ReferenceMaterial;
|
||||
import digital.laboratory.platform.reagent.entity.StandardMaterialApprovalForm;
|
||||
import digital.laboratory.platform.reagent.mapper.ReferenceMaterialMapper;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
|
||||
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
|
||||
import digital.laboratory.platform.reagent.service.StandardMaterialApprovalFormService;
|
||||
import digital.laboratory.platform.reagent.vo.ReferenceMaterialVO;
|
||||
import digital.laboratory.platform.reagent.vo.StandardMaterialApprovalFormVO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -40,6 +44,9 @@ public class ReferenceMaterialServiceImpl extends ServiceImpl<ReferenceMaterialM
|
||||
@Autowired
|
||||
private RemoteWord2PDFService remoteWord2PDFService;
|
||||
|
||||
@Autowired
|
||||
private StandardMaterialApprovalFormService standardMaterialApprovalFormService;
|
||||
|
||||
@Override
|
||||
public List<ReferenceMaterialVO> getReferenceMaterialVOList(String batchDetailsId){
|
||||
|
||||
|
||||
+6
-45
@@ -397,32 +397,12 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
periodVerificationImplementationVOS.addAll(periodVerificationImplementationVOS1);
|
||||
}
|
||||
|
||||
//标准物质管理一级审核
|
||||
if (permissions.contains("reagent_standard_material_approval_form_auditPrimary")){
|
||||
|
||||
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,1);
|
||||
|
||||
List<StandardMaterialApprovalForm> list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<StandardMaterialApprovalFormVO> standardMaterialApprovalFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (StandardMaterialApprovalForm standardMaterialApprovalForm : list) {
|
||||
|
||||
StandardMaterialApprovalFormVO vo = standardMaterialApprovalFormService.getVO(standardMaterialApprovalForm.getId());
|
||||
|
||||
standardMaterialApprovalFormVOS1.add(vo);
|
||||
}
|
||||
standardMaterialApprovalFormVOS.addAll(standardMaterialApprovalFormVOS1);
|
||||
}
|
||||
|
||||
//标准物质管理二级审核
|
||||
//标准物质管理审核
|
||||
if (permissions.contains("reagent_standard_material_approval_form_auditSecondary")){
|
||||
|
||||
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,2);
|
||||
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,1);
|
||||
|
||||
List<StandardMaterialApprovalForm> list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper);
|
||||
|
||||
@@ -653,7 +633,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
decentralizedRequestVOS.addAll(decentralizedRequestVOList);
|
||||
}
|
||||
|
||||
if (permissions.contains("reagent_purchase_catalogue_primary")) {
|
||||
if (permissions.contains("reagent_purchase_catalogue_audit")) {
|
||||
//采购目录一级已审核列表
|
||||
LambdaQueryWrapper<PurchaseCatalogue> purchaseCatalogueLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
@@ -673,7 +653,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
|
||||
}
|
||||
//采购目录已审核列表
|
||||
if (permissions.contains("reagent_purchase_catalogue_secondary")) {
|
||||
if (permissions.contains("reagent_purchase_catalogue_audit")) {
|
||||
|
||||
LambdaQueryWrapper<PurchaseCatalogue> purchaseCatalogueLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
@@ -872,32 +852,13 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
periodVerificationImplementationVOS.addAll(periodVerificationImplementationVOS1);
|
||||
}
|
||||
|
||||
//标准物质管理一级已审核列表
|
||||
if (permissions.contains("reagent_standard_material_approval_form_auditPrimary")){
|
||||
|
||||
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,2).or().eq(StandardMaterialApprovalForm::getCommitStatus, -2);
|
||||
|
||||
List<StandardMaterialApprovalForm> list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper);
|
||||
|
||||
ArrayList<StandardMaterialApprovalFormVO> standardMaterialApprovalFormVOS1 = new ArrayList<>();
|
||||
|
||||
for (StandardMaterialApprovalForm standardMaterialApprovalForm : list) {
|
||||
|
||||
StandardMaterialApprovalFormVO vo = standardMaterialApprovalFormService.getVO(standardMaterialApprovalForm.getId());
|
||||
|
||||
standardMaterialApprovalFormVOS1.add(vo);
|
||||
}
|
||||
standardMaterialApprovalFormVOS.addAll(standardMaterialApprovalFormVOS1);
|
||||
}
|
||||
|
||||
//标准物质管理二级已审核列表
|
||||
//标准物质管理已审核列表
|
||||
if (permissions.contains("reagent_standard_material_approval_form_auditSecondary")){
|
||||
|
||||
LambdaQueryWrapper<StandardMaterialApprovalForm> standardMaterialApprovalFormLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,3).or().eq(StandardMaterialApprovalForm::getCommitStatus, -3);
|
||||
standardMaterialApprovalFormLambdaQueryWrapper.eq(StandardMaterialApprovalForm::getCommitStatus,4).or().eq(StandardMaterialApprovalForm::getCommitStatus, -4);
|
||||
|
||||
List<StandardMaterialApprovalForm> list = standardMaterialApprovalFormService.list(standardMaterialApprovalFormLambdaQueryWrapper);
|
||||
|
||||
|
||||
+2
-2
@@ -30,13 +30,13 @@ public class SolutionUseFormServiceImpl extends ServiceImpl<SolutionUseFormMappe
|
||||
}
|
||||
|
||||
@Override
|
||||
public SolutionUseForm useById(String solutionNumbering, DLPUser dlpUser){
|
||||
public SolutionUseForm useById(String referenceMaterialId, DLPUser dlpUser){
|
||||
|
||||
SolutionUseForm solutionUseForm = new SolutionUseForm();
|
||||
|
||||
LambdaQueryWrapper<StandardReserveSolution> standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getSolutionNumbering,solutionNumbering);
|
||||
standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getReferenceId,referenceMaterialId);
|
||||
|
||||
StandardReserveSolution standardReserveSolution = standardReserveSolutionService.getOne(standardReserveSolutionLambdaQueryWrapper);
|
||||
|
||||
|
||||
+11
-2
@@ -78,6 +78,9 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
@Autowired
|
||||
private RemoteWord2PDFService remoteWord2PDFService;
|
||||
|
||||
|
||||
|
||||
|
||||
@Override//归还标准物质
|
||||
@Transactional
|
||||
public StandardMaterialApplication returnById(StandardMaterialApplicationDTO standardMaterialApplicationDTO) {
|
||||
@@ -112,7 +115,12 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
}
|
||||
|
||||
} else {
|
||||
referenceMaterial.setStatus(0);
|
||||
if (referenceMaterial.getServiceStatus()!=null){
|
||||
if (referenceMaterial.getServiceStatus()==-2){
|
||||
referenceMaterial.setStatus(-2);
|
||||
}
|
||||
}else {
|
||||
referenceMaterial.setStatus(0);}
|
||||
BatchDetails byId2 = batchDetailsService.getById(referenceMaterial.getBatchDetailsId());
|
||||
byId2.setQuantity(byId2.getQuantity() + 1);
|
||||
ReagentConsumableInventory byId1 = reagentConsumableInventoryService.getById(referenceMaterial.getReagentConsumableInventoryId());
|
||||
@@ -122,6 +130,7 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
}
|
||||
batchDetailsService.updateById(byId2);
|
||||
reagentConsumableInventoryService.updateById(byId1);
|
||||
remoteCabinetService.updateCabinet(standardMaterialApplicationDTO.getLatticeId(),referenceMaterial.getId(),"1");
|
||||
|
||||
}
|
||||
referenceMaterialService.updateById(referenceMaterial);
|
||||
@@ -173,7 +182,7 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
|
||||
LambdaQueryWrapper<StandardReserveSolution> standardReserveSolutionLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getSolutionNumbering, record.getReferenceMaterialNumber());
|
||||
standardReserveSolutionLambdaQueryWrapper.eq(StandardReserveSolution::getReferenceId, record.getReferenceMaterialId());
|
||||
|
||||
StandardReserveSolution one = standardReserveSolutionService.getOne(standardReserveSolutionLambdaQueryWrapper);
|
||||
|
||||
|
||||
+59
-73
@@ -61,58 +61,26 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
@Autowired
|
||||
private RemoteWord2PDFService remoteWord2PDFService;
|
||||
|
||||
@Override
|
||||
@Override//提交表单
|
||||
public StandardMaterialApprovalForm commitById(StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, DLPUser dlpUser) {
|
||||
|
||||
StandardMaterialApprovalForm standardMaterialApprovalForm = new StandardMaterialApprovalForm();
|
||||
|
||||
BeanUtils.copyProperties(standardMaterialApprovalFormDTO, standardMaterialApprovalForm);
|
||||
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId());
|
||||
|
||||
if (referenceMaterialServiceById.getStatus()==-3){
|
||||
|
||||
throw new RuntimeException(String.format("该标准物质/溶液已被领用,请归还后,再进行操作"));
|
||||
}
|
||||
|
||||
standardMaterialApprovalForm.setApplicantId(dlpUser.getId());
|
||||
|
||||
standardMaterialApprovalForm.setApplicantName(dlpUser.getName());
|
||||
|
||||
standardMaterialApprovalForm.setCommitStatus(1);
|
||||
|
||||
standardMaterialApprovalForm.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
standardMaterialApprovalForm.setCommitTime(LocalDateTime.now());
|
||||
|
||||
if (standardMaterialApprovalFormDTO.getApplicationContent() == 1 ) {
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId());
|
||||
|
||||
byId.setStatus(-1);
|
||||
|
||||
referenceMaterialService.updateById(byId);
|
||||
|
||||
} else if (standardMaterialApprovalFormDTO.getApplicationContent() == 4) {
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId());
|
||||
|
||||
byId.setStatus(-2);
|
||||
|
||||
referenceMaterialService.updateById(byId);
|
||||
|
||||
|
||||
}else if (standardMaterialApprovalFormDTO.getApplicationContent()==2){
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId());
|
||||
|
||||
byId.setStatus(-4);
|
||||
|
||||
referenceMaterialService.updateById(byId);
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(standardMaterialApprovalFormDTO.getReferenceMaterialId());
|
||||
|
||||
byId.setStatus(0);
|
||||
|
||||
referenceMaterialService.updateById(byId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (standardMaterialApprovalFormService.save(standardMaterialApprovalForm)) {
|
||||
return standardMaterialApprovalForm;
|
||||
@@ -140,28 +108,8 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override//一级审核
|
||||
public StandardMaterialApprovalForm auditPrimary(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
|
||||
|
||||
StandardMaterialApprovalForm byId = standardMaterialApprovalFormService.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
byId.setAuditOpinionOfPrimary(auditAndApproveDTO.getAuditOpinion());
|
||||
byId.setAuditResultOfPrimary(auditAndApproveDTO.getAuditResult());
|
||||
byId.setPrimaryAuditorId(dlpUser.getId());
|
||||
byId.setAuditTimeOfPrimary(LocalDateTime.now());
|
||||
|
||||
if (auditAndApproveDTO.getAuditResult() == true) {
|
||||
byId.setCommitStatus(2);
|
||||
} else {
|
||||
byId.setCommitStatus(-2);
|
||||
}
|
||||
|
||||
if (standardMaterialApprovalFormService.updateById(byId)) {
|
||||
return byId;
|
||||
} else throw new RuntimeException(String.format("审核失败"));
|
||||
}
|
||||
|
||||
@Override//二级审核
|
||||
@Override//审核
|
||||
public StandardMaterialApprovalForm auditSecondary(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
|
||||
|
||||
StandardMaterialApprovalForm byId = standardMaterialApprovalFormService.getById(auditAndApproveDTO.getUuId());
|
||||
@@ -183,19 +131,57 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
@Override//审批
|
||||
public StandardMaterialApprovalForm approveById(AuditAndApproveDTO auditAndApproveDTO, DLPUser dlpUser) {
|
||||
|
||||
StandardMaterialApprovalForm byId = standardMaterialApprovalFormService.getById(auditAndApproveDTO.getUuId());
|
||||
StandardMaterialApprovalForm byId1 = standardMaterialApprovalFormService.getById(auditAndApproveDTO.getUuId());
|
||||
|
||||
byId.setOpinionOfApproval(auditAndApproveDTO.getAuditOpinion());
|
||||
byId.setResultOfApproval(auditAndApproveDTO.getAuditResult());
|
||||
byId.setApproverId(dlpUser.getId());
|
||||
byId.setApprovalOfTime(LocalDateTime.now());
|
||||
byId1.setOpinionOfApproval(auditAndApproveDTO.getApproveOpinion());
|
||||
byId1.setResultOfApproval(auditAndApproveDTO.getApproveResult());
|
||||
byId1.setApproverId(dlpUser.getId());
|
||||
byId1.setApprovalOfTime(LocalDateTime.now());
|
||||
if (auditAndApproveDTO.getApproveResult() == true) {
|
||||
byId.setCommitStatus(5);
|
||||
} else {
|
||||
byId.setCommitStatus(-5);
|
||||
|
||||
if (byId1.getApplicationContent() == 1 ) {
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(byId1.getReferenceMaterialId());
|
||||
|
||||
byId.setStatus(-1);
|
||||
byId.setStatus(-1);
|
||||
|
||||
referenceMaterialService.updateById(byId);
|
||||
|
||||
} else if (byId1.getApplicationContent() == 4) {
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(byId1.getReferenceMaterialId());
|
||||
|
||||
byId.setStatus(-2);
|
||||
byId.setServiceStatus(-2);
|
||||
|
||||
referenceMaterialService.updateById(byId);
|
||||
|
||||
|
||||
}else if (byId1.getApplicationContent()==2){
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(byId1.getReferenceMaterialId());
|
||||
|
||||
byId.setStatus(-4);
|
||||
|
||||
referenceMaterialService.updateById(byId);
|
||||
|
||||
}
|
||||
if (standardMaterialApprovalFormService.updateById(byId)) {
|
||||
return byId;
|
||||
else {
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(byId1.getReferenceMaterialId());
|
||||
|
||||
byId.setStatus(0);
|
||||
byId.setServiceStatus(0);
|
||||
|
||||
referenceMaterialService.updateById(byId);
|
||||
|
||||
}
|
||||
byId1.setCommitStatus(5);
|
||||
} else {
|
||||
byId1.setCommitStatus(-5);
|
||||
}
|
||||
if (standardMaterialApprovalFormService.updateById(byId1)) {
|
||||
return byId1;
|
||||
} else throw new RuntimeException(String.format("审批失败"));
|
||||
}
|
||||
|
||||
@@ -269,7 +255,7 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
put("purchaseTime", LocalDateTimeUtil.format(standardMaterialApprovalFormVO.getProcessingTime(),"yyyy年MM月dd日"));
|
||||
put("commitTime", LocalDateTimeUtil.format(standardMaterialApprovalFormVO.getCommitTime(),"yyyy年MM月dd日"));
|
||||
put("processingTime", LocalDateTimeUtil.format(standardMaterialApprovalFormVO.getProcessingTime(),"yyyy年MM月dd日"));
|
||||
put("auditTimeOfPrimary", LocalDateTimeUtil.format(standardMaterialApprovalFormVO.getAuditTimeOfPrimary(),"yyyy年MM月dd日"));
|
||||
put("auditTimeOfPrimary", LocalDateTimeUtil.format(standardMaterialApprovalFormVO.getCommitTime(),"yyyy年MM月dd日"));
|
||||
put("auditTimeOfSecondary", LocalDateTimeUtil.format(standardMaterialApprovalFormVO.getAuditTimeOfSecondary(),"yyyy年MM月dd日"));
|
||||
put("approvalOfTime", LocalDateTimeUtil.format(standardMaterialApprovalFormVO.getApprovalOfTime(),"yyyy年MM月dd日"));
|
||||
put("quantity", standardMaterialApprovalFormVO.getQuantity());
|
||||
@@ -279,7 +265,7 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
put("agentName", standardMaterialApprovalFormVO.getAgentName());
|
||||
put("reasonForApplicationPrint",standardMaterialApprovalFormVO.getReasonForApplicationPrint());
|
||||
put("auditOpinionOfPrimary",standardMaterialApprovalFormVO.getAuditOpinionOfPrimary());
|
||||
put("primaryAuditorName",standardMaterialApprovalFormVO.getPrimaryAuditorName());
|
||||
put("primaryAuditorName",standardMaterialApprovalFormVO.getApplicantName());
|
||||
put("auditOpinionOfSecondary",standardMaterialApprovalFormVO.getAuditOpinionOfSecondary());
|
||||
put("secondaryAuditorName",standardMaterialApprovalFormVO.getSecondaryAuditorName());
|
||||
put("opinionOfApproval",standardMaterialApprovalFormVO.getOpinionOfApproval());
|
||||
|
||||
+9
-2
@@ -5,6 +5,7 @@ import cn.hutool.core.io.IoUtil;
|
||||
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.Constants;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -25,6 +26,7 @@ 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.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
@@ -76,6 +78,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
@Autowired
|
||||
private BatchDetailsService batchDetailsService;
|
||||
|
||||
|
||||
@Override//通过ID查询标准溶液的配置记录
|
||||
public StandardReserveSolutionVO getStandardReserveSolutionVOById(String id) {
|
||||
|
||||
@@ -93,6 +96,11 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
@Transactional
|
||||
public StandardReserveSolutionVO addById(StandardReserveSolutionDTO standardReserveSolutionDTO, DLPUser dlpUser) {
|
||||
|
||||
if (referenceMaterialService.getById(standardReserveSolutionDTO.getReferenceMaterialId()).getStatus()!=-3){
|
||||
|
||||
throw new RuntimeException(String.format("请先领用标准物质后,再进行操作"));
|
||||
}
|
||||
|
||||
StandardReserveSolution standardReserveSolution = new StandardReserveSolution();
|
||||
|
||||
BeanUtils.copyProperties(standardReserveSolutionDTO, standardReserveSolution);
|
||||
@@ -210,6 +218,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
reagentConsumableInventory.setCreateTime(LocalDateTime.now());
|
||||
reagentConsumableInventory.setUpdateTime(LocalDateTime.now());
|
||||
|
||||
|
||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||
//获取当前年月日
|
||||
Date date = new Date();
|
||||
@@ -304,8 +313,6 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
BeanUtils.copyProperties(standardReserveSolutionVOById,standardReserveSolutionFullVO);
|
||||
|
||||
|
||||
|
||||
return standardReserveSolutionFullVO;
|
||||
}
|
||||
@Override
|
||||
|
||||
+21
-10
@@ -67,7 +67,7 @@ public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSoluti
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@Override
|
||||
public IPage<StandardSolutionCurveVO> getStandardSolutionCurveVOPage(IPage<StandardSolutionCurve> page, QueryWrapper<StandardSolutionCurve> qw){
|
||||
public IPage<StandardSolutionCurveVO> getStandardSolutionCurveVOPage(IPage<StandardSolutionCurve> page, QueryWrapper<StandardSolutionCurve> qw) {
|
||||
|
||||
IPage<StandardSolutionCurveVO> standardSolutionCurveVOPage = baseMapper.getStandardSolutionCurveVOPage(page, qw);
|
||||
|
||||
@@ -75,18 +75,27 @@ public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSoluti
|
||||
}
|
||||
|
||||
@Override
|
||||
public StandardSolutionCurve addById(StandardSolutionCurveDTO standardSolutionCurveDTO, DLPUser dlpUser){
|
||||
public StandardSolutionCurve addById(StandardSolutionCurveDTO standardSolutionCurveDTO, DLPUser dlpUser) {
|
||||
|
||||
StandardSolutionCurve standardSolutionCurve = new StandardSolutionCurve();
|
||||
|
||||
StandardReserveSolution byId = standardReserveSolutionService.getById(standardSolutionCurveDTO.getSolutionId());
|
||||
|
||||
if (byId.getStatus()!=1){
|
||||
if (byId.getStatus() != 1) {
|
||||
throw new RuntimeException(String.format("当前标准储备溶液还未入库,请先入库后再使用"));
|
||||
}
|
||||
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(byId.getReferenceId());
|
||||
|
||||
if (referenceMaterial.getStatus() != -3) {
|
||||
throw new RuntimeException(String.format("请先领用该标准储备溶液后,再进行操作"));
|
||||
|
||||
} else if (!(referenceMaterial.getStatus() == 0 || referenceMaterial.getStatus() == -2)) {
|
||||
|
||||
throw new RuntimeException(String.format("该标准储备溶液已使用完毕或已停止使用/报废使用,不能进行操作"));
|
||||
|
||||
}
|
||||
|
||||
standardSolutionCurve.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(referenceMaterial.getReagentConsumableId());
|
||||
@@ -99,11 +108,12 @@ public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSoluti
|
||||
standardSolutionCurve.setReferenceMaterialId(referenceMaterial.getId());
|
||||
standardSolutionCurve.setDispenserId(dlpUser.getId());
|
||||
|
||||
if (standardSolutionCurveService.save(standardSolutionCurve)){
|
||||
if (standardSolutionCurveService.save(standardSolutionCurve)) {
|
||||
return standardSolutionCurve;
|
||||
}else throw new RuntimeException(String.format("配置失败"));
|
||||
} else throw new RuntimeException(String.format("配置失败"));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void standardSolutionCurveTablePDF(List<StandardSolutionCurveVO> voList, String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
System.out.println("standardSolutionCurveTablePDF.................");
|
||||
@@ -113,7 +123,7 @@ public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSoluti
|
||||
|
||||
standardSolutionCurveVO.setSerialnNumber(x.toString());
|
||||
|
||||
standardSolutionCurveVO.setConfigurationDatePrint(LocalDateTimeUtil.format(standardSolutionCurveVO.getConfigurationDate(),"yyyy年MM月dd日"));
|
||||
standardSolutionCurveVO.setConfigurationDatePrint(LocalDateTimeUtil.format(standardSolutionCurveVO.getConfigurationDate(), "yyyy年MM月dd日"));
|
||||
|
||||
x++;
|
||||
}
|
||||
@@ -143,9 +153,9 @@ public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSoluti
|
||||
*/
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, builder.build()).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("voList",voList);
|
||||
put("id",id);
|
||||
put("size",1);
|
||||
put("voList", voList);
|
||||
put("id", id);
|
||||
put("size", 1);
|
||||
|
||||
|
||||
}}
|
||||
@@ -179,9 +189,10 @@ public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSoluti
|
||||
System.out.println(String.format("转换为 PDF 结束"));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public StandardSolutionCurveVO getStandardSolutionCurveVO(String id){
|
||||
public StandardSolutionCurveVO getStandardSolutionCurveVO(String id) {
|
||||
|
||||
StandardSolutionCurveVO standardSolutionCurveVO = baseMapper.getStandardSolutionCurveVO(id);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user