3.14
This commit is contained in:
+151
@@ -0,0 +1,151 @@
|
||||
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.AcceptanceContent;
|
||||
import digital.laboratory.platform.reagent.service.AcceptanceContentService;
|
||||
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("/acceptance_content" )
|
||||
@Api(value = "acceptance_content", tags = "(验收内容)管理")
|
||||
public class AcceptanceContentController {
|
||||
|
||||
private final AcceptanceContentService acceptanceContentService;
|
||||
|
||||
/**
|
||||
* 通过id查询(验收内容)
|
||||
* @param acceptanceContentId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{acceptanceContentId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_content_get')" )
|
||||
public R<AcceptanceContent> getById(@PathVariable("acceptanceContentId" ) String acceptanceContentId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
AcceptanceContent acceptanceContent = acceptanceContentService.getById(acceptanceContentId);
|
||||
return R.ok(acceptanceContent);
|
||||
//return R.ok(acceptanceContentService.getById(acceptanceContentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param acceptanceContent (验收内容)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_content_get')" )
|
||||
public R<IPage<AcceptanceContent>> getAcceptanceContentPage(Page<AcceptanceContent> page, AcceptanceContent acceptanceContent, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<AcceptanceContent> acceptanceContentSList = acceptanceContentService.page(page, Wrappers.<AcceptanceContent>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(acceptanceContentSList);
|
||||
// return R.ok(acceptanceContentService.page(page, Wrappers.query(acceptanceContent)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(验收内容)
|
||||
* @param acceptanceContent (验收内容)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(验收内容)", notes = "新增(验收内容)")
|
||||
@SysLog("新增(验收内容)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_content_add')" )
|
||||
public R<AcceptanceContent> postAddObject(@RequestBody AcceptanceContent acceptanceContent, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
acceptanceContent.setAcceptanceContentId(IdWorker.get32UUID().toUpperCase());
|
||||
if (acceptanceContentService.save(acceptanceContent)) {
|
||||
return R.ok(acceptanceContent, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(acceptanceContent, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(验收内容)
|
||||
* @param acceptanceContent (验收内容)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(验收内容)", notes = "修改(验收内容)")
|
||||
@SysLog("修改(验收内容)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_content_edit')" )
|
||||
public R<AcceptanceContent> putUpdateById(@RequestBody AcceptanceContent acceptanceContent, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (acceptanceContentService.updateById(acceptanceContent)) {
|
||||
return R.ok(acceptanceContent, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(acceptanceContent, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(验收内容)
|
||||
* @param acceptanceContentId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(验收内容)", notes = "通过id删除(验收内容)")
|
||||
@SysLog("通过id删除(验收内容)" )
|
||||
@DeleteMapping("/{acceptanceContentId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_content_del')" )
|
||||
public R<AcceptanceContent> deleteById(@PathVariable String acceptanceContentId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
AcceptanceContent oldAcceptanceContent = acceptanceContentService.getById(acceptanceContentId);
|
||||
|
||||
if (acceptanceContentService.removeById(acceptanceContentId)) {
|
||||
return R.ok(oldAcceptanceContent, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldAcceptanceContent, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.AcceptanceRecordForm;
|
||||
import digital.laboratory.platform.reagent.service.AcceptanceRecordFormService;
|
||||
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("/acceptance_record_form" )
|
||||
@Api(value = "acceptance_record_form", tags = "(验收记录表)管理")
|
||||
public class AcceptanceRecordFormController {
|
||||
|
||||
private final AcceptanceRecordFormService acceptanceRecordFormService;
|
||||
|
||||
/**
|
||||
* 通过id查询(验收记录表)
|
||||
* @param acceptanceRecordFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{acceptanceRecordFormId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_get')" )
|
||||
public R<AcceptanceRecordForm> getById(@PathVariable("acceptanceRecordFormId" ) String acceptanceRecordFormId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.getById(acceptanceRecordFormId);
|
||||
return R.ok(acceptanceRecordForm);
|
||||
//return R.ok(acceptanceRecordFormService.getById(acceptanceRecordFormId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param acceptanceRecordForm (验收记录表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_get')" )
|
||||
public R<IPage<AcceptanceRecordForm>> getAcceptanceRecordFormPage(Page<AcceptanceRecordForm> page, AcceptanceRecordForm acceptanceRecordForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<AcceptanceRecordForm> acceptanceRecordFormSList = acceptanceRecordFormService.page(page, Wrappers.<AcceptanceRecordForm>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(acceptanceRecordFormSList);
|
||||
// return R.ok(acceptanceRecordFormService.page(page, Wrappers.query(acceptanceRecordForm)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(验收记录表)
|
||||
* @param acceptanceRecordForm (验收记录表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(验收记录表)", notes = "新增(验收记录表)")
|
||||
@SysLog("新增(验收记录表)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_add')" )
|
||||
public R<AcceptanceRecordForm> postAddObject(@RequestBody AcceptanceRecordForm acceptanceRecordForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
acceptanceRecordForm.setAcceptanceRecordFormId(IdWorker.get32UUID().toUpperCase());
|
||||
if (acceptanceRecordFormService.save(acceptanceRecordForm)) {
|
||||
return R.ok(acceptanceRecordForm, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(acceptanceRecordForm, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(验收记录表)
|
||||
* @param acceptanceRecordForm (验收记录表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(验收记录表)", notes = "修改(验收记录表)")
|
||||
@SysLog("修改(验收记录表)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_acceptance_record_form_edit')" )
|
||||
public R<AcceptanceRecordForm> putUpdateById(@RequestBody AcceptanceRecordForm acceptanceRecordForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (acceptanceRecordFormService.updateById(acceptanceRecordForm)) {
|
||||
return R.ok(acceptanceRecordForm, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(acceptanceRecordForm, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过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, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.AfterSaleSituation;
|
||||
import digital.laboratory.platform.reagent.service.AfterSaleSituationService;
|
||||
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("/after_sale_situation" )
|
||||
@Api(value = "after_sale_situation", tags = "服务商/供应商响应、资质和售后情况管理")
|
||||
public class AfterSaleSituationController {
|
||||
|
||||
private final AfterSaleSituationService afterSaleSituationService;
|
||||
|
||||
/**
|
||||
* 通过id查询服务商/供应商响应、资质和售后情况
|
||||
* @param afterSaleSituationId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{afterSaleSituationId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_after_sale_situation_get')" )
|
||||
public R<AfterSaleSituation> getById(@PathVariable("afterSaleSituationId" ) String afterSaleSituationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
AfterSaleSituation afterSaleSituation = afterSaleSituationService.getById(afterSaleSituationId);
|
||||
return R.ok(afterSaleSituation);
|
||||
//return R.ok(afterSaleSituationService.getById(afterSaleSituationId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param afterSaleSituation 服务商/供应商响应、资质和售后情况
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_after_sale_situation_get')" )
|
||||
public R<IPage<AfterSaleSituation>> getAfterSaleSituationPage(Page<AfterSaleSituation> page, AfterSaleSituation afterSaleSituation, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<AfterSaleSituation> afterSaleSituationSList = afterSaleSituationService.page(page, Wrappers.<AfterSaleSituation>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(afterSaleSituationSList);
|
||||
// return R.ok(afterSaleSituationService.page(page, Wrappers.query(afterSaleSituation)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增服务商/供应商响应、资质和售后情况
|
||||
* @param afterSaleSituation 服务商/供应商响应、资质和售后情况
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增服务商/供应商响应、资质和售后情况", notes = "新增服务商/供应商响应、资质和售后情况")
|
||||
@SysLog("新增服务商/供应商响应、资质和售后情况" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_after_sale_situation_add')" )
|
||||
public R<AfterSaleSituation> postAddObject(@RequestBody AfterSaleSituation afterSaleSituation, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
afterSaleSituation.setAfterSaleSituationId(IdWorker.get32UUID().toUpperCase());
|
||||
if (afterSaleSituationService.save(afterSaleSituation)) {
|
||||
return R.ok(afterSaleSituation, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(afterSaleSituation, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改服务商/供应商响应、资质和售后情况
|
||||
* @param afterSaleSituation 服务商/供应商响应、资质和售后情况
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改服务商/供应商响应、资质和售后情况", notes = "修改服务商/供应商响应、资质和售后情况")
|
||||
@SysLog("修改服务商/供应商响应、资质和售后情况" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_after_sale_situation_edit')" )
|
||||
public R<AfterSaleSituation> putUpdateById(@RequestBody AfterSaleSituation afterSaleSituation, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (afterSaleSituationService.updateById(afterSaleSituation)) {
|
||||
return R.ok(afterSaleSituation, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(afterSaleSituation, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除服务商/供应商响应、资质和售后情况
|
||||
* @param afterSaleSituationId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除服务商/供应商响应、资质和售后情况", notes = "通过id删除服务商/供应商响应、资质和售后情况")
|
||||
@SysLog("通过id删除服务商/供应商响应、资质和售后情况" )
|
||||
@DeleteMapping("/{afterSaleSituationId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_after_sale_situation_del')" )
|
||||
public R<AfterSaleSituation> deleteById(@PathVariable String afterSaleSituationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
AfterSaleSituation oldAfterSaleSituation = afterSaleSituationService.getById(afterSaleSituationId);
|
||||
|
||||
if (afterSaleSituationService.removeById(afterSaleSituationId)) {
|
||||
return R.ok(oldAfterSaleSituation, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldAfterSaleSituation, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.ApplicationForUse;
|
||||
import digital.laboratory.platform.reagent.service.ApplicationForUseService;
|
||||
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("/application_for_use" )
|
||||
@Api(value = "application_for_use", tags = "(试剂耗材领用申请表)管理")
|
||||
public class ApplicationForUseController {
|
||||
|
||||
private final ApplicationForUseService applicationForUseService;
|
||||
|
||||
/**
|
||||
* 通过id查询(试剂耗材领用申请表)
|
||||
* @param applicationForUseId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{applicationForUseId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_get')" )
|
||||
public R<ApplicationForUse> getById(@PathVariable("applicationForUseId" ) String applicationForUseId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ApplicationForUse applicationForUse = applicationForUseService.getById(applicationForUseId);
|
||||
return R.ok(applicationForUse);
|
||||
//return R.ok(applicationForUseService.getById(applicationForUseId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param applicationForUse (试剂耗材领用申请表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_get')" )
|
||||
public R<IPage<ApplicationForUse>> getApplicationForUsePage(Page<ApplicationForUse> page, ApplicationForUse applicationForUse, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<ApplicationForUse> applicationForUseSList = applicationForUseService.page(page, Wrappers.<ApplicationForUse>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(applicationForUseSList);
|
||||
// return R.ok(applicationForUseService.page(page, Wrappers.query(applicationForUse)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(试剂耗材领用申请表)
|
||||
* @param applicationForUse (试剂耗材领用申请表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(试剂耗材领用申请表)", notes = "新增(试剂耗材领用申请表)")
|
||||
@SysLog("新增(试剂耗材领用申请表)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_add')" )
|
||||
public R<ApplicationForUse> postAddObject(@RequestBody ApplicationForUse applicationForUse, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
applicationForUse.setApplicationForUseId(IdWorker.get32UUID().toUpperCase());
|
||||
if (applicationForUseService.save(applicationForUse)) {
|
||||
return R.ok(applicationForUse, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(applicationForUse, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(试剂耗材领用申请表)
|
||||
* @param applicationForUse (试剂耗材领用申请表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(试剂耗材领用申请表)", notes = "修改(试剂耗材领用申请表)")
|
||||
@SysLog("修改(试剂耗材领用申请表)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_edit')" )
|
||||
public R<ApplicationForUse> putUpdateById(@RequestBody ApplicationForUse applicationForUse, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (applicationForUseService.updateById(applicationForUse)) {
|
||||
return R.ok(applicationForUse, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(applicationForUse, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(试剂耗材领用申请表)
|
||||
* @param applicationForUseId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(试剂耗材领用申请表)", notes = "通过id删除(试剂耗材领用申请表)")
|
||||
@SysLog("通过id删除(试剂耗材领用申请表)" )
|
||||
@DeleteMapping("/{applicationForUseId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_del')" )
|
||||
public R<ApplicationForUse> deleteById(@PathVariable String applicationForUseId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ApplicationForUse oldApplicationForUse = applicationForUseService.getById(applicationForUseId);
|
||||
|
||||
if (applicationForUseService.removeById(applicationForUseId)) {
|
||||
return R.ok(oldApplicationForUse, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldApplicationForUse, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.BatchDetails;
|
||||
import digital.laboratory.platform.reagent.service.BatchDetailsService;
|
||||
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("/batch_details" )
|
||||
@Api(value = "batch_details", tags = "批次明细管理")
|
||||
public class BatchDetailsController {
|
||||
|
||||
private final BatchDetailsService batchDetailsService;
|
||||
|
||||
/**
|
||||
* 通过id查询批次明细
|
||||
* @param batchDetailsId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{batchDetailsId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_batch_details_get')" )
|
||||
public R<BatchDetails> getById(@PathVariable("batchDetailsId" ) String batchDetailsId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
BatchDetails batchDetails = batchDetailsService.getById(batchDetailsId);
|
||||
return R.ok(batchDetails);
|
||||
//return R.ok(batchDetailsService.getById(batchDetailsId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param batchDetails 批次明细
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_batch_details_get')" )
|
||||
public R<IPage<BatchDetails>> getBatchDetailsPage(Page<BatchDetails> page, BatchDetails batchDetails, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<BatchDetails> batchDetailsSList = batchDetailsService.page(page, Wrappers.<BatchDetails>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(batchDetailsSList);
|
||||
// return R.ok(batchDetailsService.page(page, Wrappers.query(batchDetails)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增批次明细
|
||||
* @param batchDetails 批次明细
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增批次明细", notes = "新增批次明细")
|
||||
@SysLog("新增批次明细" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_batch_details_add')" )
|
||||
public R<BatchDetails> postAddObject(@RequestBody BatchDetails batchDetails, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
batchDetails.setBatchDetailsId(IdWorker.get32UUID().toUpperCase());
|
||||
if (batchDetailsService.save(batchDetails)) {
|
||||
return R.ok(batchDetails, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(batchDetails, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改批次明细
|
||||
* @param batchDetails 批次明细
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改批次明细", notes = "修改批次明细")
|
||||
@SysLog("修改批次明细" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_batch_details_edit')" )
|
||||
public R<BatchDetails> putUpdateById(@RequestBody BatchDetails batchDetails, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (batchDetailsService.updateById(batchDetails)) {
|
||||
return R.ok(batchDetails, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(batchDetails, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除批次明细
|
||||
* @param batchDetailsId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除批次明细", notes = "通过id删除批次明细")
|
||||
@SysLog("通过id删除批次明细" )
|
||||
@DeleteMapping("/{batchDetailsId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_batch_details_del')" )
|
||||
public R<BatchDetails> deleteById(@PathVariable String batchDetailsId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
BatchDetails oldBatchDetails = batchDetailsService.getById(batchDetailsId);
|
||||
|
||||
if (batchDetailsService.removeById(batchDetailsId)) {
|
||||
return R.ok(oldBatchDetails, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldBatchDetails, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.Blacklist;
|
||||
import digital.laboratory.platform.reagent.service.BlacklistService;
|
||||
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("/blacklist" )
|
||||
@Api(value = "blacklist", tags = "(试剂耗材黑名单)管理")
|
||||
public class BlacklistController {
|
||||
|
||||
private final BlacklistService blacklistService;
|
||||
|
||||
/**
|
||||
* 通过id查询(试剂耗材黑名单)
|
||||
* @param blacklistId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{blacklistId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_blacklist_get')" )
|
||||
public R<Blacklist> getById(@PathVariable("blacklistId" ) String blacklistId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
Blacklist blacklist = blacklistService.getById(blacklistId);
|
||||
return R.ok(blacklist);
|
||||
//return R.ok(blacklistService.getById(blacklistId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param blacklist (试剂耗材黑名单)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_blacklist_get')" )
|
||||
public R<IPage<Blacklist>> getBlacklistPage(Page<Blacklist> page, Blacklist blacklist, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<Blacklist> blacklistSList = blacklistService.page(page, Wrappers.<Blacklist>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(blacklistSList);
|
||||
// return R.ok(blacklistService.page(page, Wrappers.query(blacklist)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(试剂耗材黑名单)
|
||||
* @param blacklist (试剂耗材黑名单)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(试剂耗材黑名单)", notes = "新增(试剂耗材黑名单)")
|
||||
@SysLog("新增(试剂耗材黑名单)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_blacklist_add')" )
|
||||
public R<Blacklist> postAddObject(@RequestBody Blacklist blacklist, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
blacklist.setBlacklistId(IdWorker.get32UUID().toUpperCase());
|
||||
if (blacklistService.save(blacklist)) {
|
||||
return R.ok(blacklist, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(blacklist, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(试剂耗材黑名单)
|
||||
* @param blacklist (试剂耗材黑名单)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(试剂耗材黑名单)", notes = "修改(试剂耗材黑名单)")
|
||||
@SysLog("修改(试剂耗材黑名单)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_blacklist_edit')" )
|
||||
public R<Blacklist> putUpdateById(@RequestBody Blacklist blacklist, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (blacklistService.updateById(blacklist)) {
|
||||
return R.ok(blacklist, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(blacklist, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(试剂耗材黑名单)
|
||||
* @param blacklistId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(试剂耗材黑名单)", notes = "通过id删除(试剂耗材黑名单)")
|
||||
@SysLog("通过id删除(试剂耗材黑名单)" )
|
||||
@DeleteMapping("/{blacklistId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_blacklist_del')" )
|
||||
public R<Blacklist> deleteById(@PathVariable String blacklistId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
Blacklist oldBlacklist = blacklistService.getById(blacklistId);
|
||||
|
||||
if (blacklistService.removeById(blacklistId)) {
|
||||
return R.ok(oldBlacklist, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldBlacklist, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.CatalogueDetails;
|
||||
import digital.laboratory.platform.reagent.service.CatalogueDetailsService;
|
||||
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("/catalogue_details" )
|
||||
@Api(value = "catalogue_details", tags = "(采购目录明细)管理")
|
||||
public class CatalogueDetailsController {
|
||||
|
||||
private final CatalogueDetailsService catalogueDetailsService;
|
||||
|
||||
/**
|
||||
* 通过id查询(采购目录明细)
|
||||
* @param catalogueDetailsId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{catalogueDetailsId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_catalogue_details_get')" )
|
||||
public R<CatalogueDetails> getById(@PathVariable("catalogueDetailsId" ) String catalogueDetailsId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
CatalogueDetails catalogueDetails = catalogueDetailsService.getById(catalogueDetailsId);
|
||||
return R.ok(catalogueDetails);
|
||||
//return R.ok(catalogueDetailsService.getById(catalogueDetailsId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param catalogueDetails (采购目录明细)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_catalogue_details_get')" )
|
||||
public R<IPage<CatalogueDetails>> getCatalogueDetailsPage(Page<CatalogueDetails> page, CatalogueDetails catalogueDetails, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<CatalogueDetails> catalogueDetailsSList = catalogueDetailsService.page(page, Wrappers.<CatalogueDetails>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(catalogueDetailsSList);
|
||||
// return R.ok(catalogueDetailsService.page(page, Wrappers.query(catalogueDetails)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(采购目录明细)
|
||||
* @param catalogueDetails (采购目录明细)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(采购目录明细)", notes = "新增(采购目录明细)")
|
||||
@SysLog("新增(采购目录明细)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_catalogue_details_add')" )
|
||||
public R<CatalogueDetails> postAddObject(@RequestBody CatalogueDetails catalogueDetails, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
catalogueDetails.setCatalogueDetailsId(IdWorker.get32UUID().toUpperCase());
|
||||
if (catalogueDetailsService.save(catalogueDetails)) {
|
||||
return R.ok(catalogueDetails, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(catalogueDetails, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(采购目录明细)
|
||||
* @param catalogueDetails (采购目录明细)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(采购目录明细)", notes = "修改(采购目录明细)")
|
||||
@SysLog("修改(采购目录明细)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_catalogue_details_edit')" )
|
||||
public R<CatalogueDetails> putUpdateById(@RequestBody CatalogueDetails catalogueDetails, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (catalogueDetailsService.updateById(catalogueDetails)) {
|
||||
return R.ok(catalogueDetails, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(catalogueDetails, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(采购目录明细)
|
||||
* @param catalogueDetailsId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(采购目录明细)", notes = "通过id删除(采购目录明细)")
|
||||
@SysLog("通过id删除(采购目录明细)" )
|
||||
@DeleteMapping("/{catalogueDetailsId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_catalogue_details_del')" )
|
||||
public R<CatalogueDetails> deleteById(@PathVariable String catalogueDetailsId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
CatalogueDetails oldCatalogueDetails = catalogueDetailsService.getById(catalogueDetailsId);
|
||||
|
||||
if (catalogueDetailsService.removeById(catalogueDetailsId)) {
|
||||
return R.ok(oldCatalogueDetails, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldCatalogueDetails, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+306
@@ -0,0 +1,306 @@
|
||||
package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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.dto.AuditAndApproveDto;
|
||||
import digital.laboratory.platform.reagent.dto.CentralizedRequestDto;
|
||||
import digital.laboratory.platform.reagent.entity.CentralizedRequest;
|
||||
import digital.laboratory.platform.reagent.entity.DetailsOfCentralized;
|
||||
import digital.laboratory.platform.reagent.service.CentralizedRequestService;
|
||||
import digital.laboratory.platform.reagent.service.DetailsOfCentralizedService;
|
||||
import digital.laboratory.platform.reagent.vo.CentralizedRequestVo;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (集中采购申请)
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (集中采购申请) 前端控制器
|
||||
* <p>
|
||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
|
||||
* 这里写什么:
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
|
||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
|
||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/centralized_request")
|
||||
@Api(value = "centralized_request", tags = "集中采购申请管理")
|
||||
public class CentralizedRequestController {
|
||||
|
||||
@Autowired
|
||||
private final CentralizedRequestService centralizedRequestService;
|
||||
|
||||
@Autowired
|
||||
private final DetailsOfCentralizedService detailsOfCentralizedService;
|
||||
|
||||
/**
|
||||
* 通过id查询(集中采购申请)
|
||||
*
|
||||
* @param centralizedRequestId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{centralizedRequestId}")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_centralized_request_get')")
|
||||
public R<CentralizedRequest> getById(@PathVariable("centralizedRequestId") String centralizedRequestId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
CentralizedRequestVo vo = centralizedRequestService.getRequest(centralizedRequestId);
|
||||
|
||||
if (vo!=null){
|
||||
return R.ok(vo);
|
||||
}else {
|
||||
return R.failed("未查询到该数据");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param centralizedRequest 集中采购申请
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('CentralizedPurchaseRequestList')")
|
||||
public R<IPage<CentralizedRequest>> getCentralizedRequestPage(Page<CentralizedRequest> page, CentralizedRequest centralizedRequest, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<CentralizedRequest> centralizedRequestSList = centralizedRequestService.page(page, Wrappers.<CentralizedRequest>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
|
||||
return R.ok(centralizedRequestSList);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(集中采购申请)
|
||||
*
|
||||
* @param centralizedRequestDtoList 集中采购申请
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增集中采购申请", notes = "新增集中采购申请")
|
||||
@SysLog("新增集中采购申请")
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_centralized_request_add')")
|
||||
public R<CentralizedRequest> postAddObject(@RequestBody List<CentralizedRequestDto> centralizedRequestDtoList, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
//获取申请人id
|
||||
CentralizedRequest centralizedRequest = new CentralizedRequest();
|
||||
|
||||
List<DetailsOfCentralized> detailsOfCentralizedList= centralizedRequestService.saveRequest(centralizedRequest, centralizedRequestDtoList, dlpUser);
|
||||
|
||||
if (centralizedRequestService.save(centralizedRequest) & detailsOfCentralizedService.saveBatch(detailsOfCentralizedList)) {
|
||||
return R.ok(centralizedRequest, "保存成功");
|
||||
} else {
|
||||
return R.failed(centralizedRequest, "保存失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增集中采购申请明细
|
||||
*
|
||||
* @param centralizedRequestDto 集中采购申请
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增集中采购申请明细", notes = "新增集中采购申请明细")
|
||||
@SysLog("新增集中采购申请明细")
|
||||
@PostMapping("/details")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_add')")
|
||||
public R<DetailsOfCentralized> postAddDetails(@RequestBody CentralizedRequestDto centralizedRequestDto, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
DetailsOfCentralized detailsOfCentralized = centralizedRequestService.addDetails(centralizedRequestDto);
|
||||
|
||||
if (detailsOfCentralizedService.save(detailsOfCentralized)) {
|
||||
return R.ok(detailsOfCentralized, "添加成功");
|
||||
} else {
|
||||
return R.failed(detailsOfCentralized, "添加失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交(集中采购申请)
|
||||
*
|
||||
* @param centralizedRequestId 集中采购申请
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "提交集中采购申请", notes = "提交集中采购申请")
|
||||
@SysLog("提交集中采购申请")
|
||||
@PutMapping("/commit/{centralizedRequestId}")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_centralized_request_commit')")
|
||||
public R<CentralizedRequest> postCommitObject(@PathVariable String centralizedRequestId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
CentralizedRequest centralizedRequest = centralizedRequestService.commit(centralizedRequestId);
|
||||
|
||||
if (centralizedRequest!=null¢ralizedRequestService.updateById(centralizedRequest)){
|
||||
return R.ok(centralizedRequest,"提交成功");
|
||||
}else {
|
||||
return R.failed("填写信息有误,请完善填写内容");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(集中采购申请)
|
||||
*
|
||||
* @param centralizedRequestDto (集中采购申请)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改集中采购申请明细", notes = "修改集中采购申请明细")
|
||||
@SysLog("修改(集中采购申请)")
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_centralized_request_edit')")
|
||||
public R<DetailsOfCentralized> putUpdateById(@RequestBody CentralizedRequestDto centralizedRequestDto, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
DetailsOfCentralized detailsOfCentralized = centralizedRequestService.editDetails(centralizedRequestDto);
|
||||
|
||||
if (detailsOfCentralizedService.updateById(detailsOfCentralized)) {
|
||||
return R.ok(detailsOfCentralized, "保存成功");
|
||||
} else {
|
||||
return R.failed(detailsOfCentralized, "保存失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(集中采购申请)
|
||||
*
|
||||
* @param centralizedRequestId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除集中采购申请", notes = "通过id删除集中采购申请")
|
||||
@SysLog("通过id删除集中采购申请")
|
||||
@DeleteMapping("/{centralizedRequestId}")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_centralized_request_del')")
|
||||
public R<CentralizedRequest> deleteById(@PathVariable String centralizedRequestId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
List<DetailsOfCentralized> list = centralizedRequestService.delRequest(centralizedRequestId);
|
||||
|
||||
CentralizedRequest oldcentralizedRequest = centralizedRequestService.getById(centralizedRequestId);
|
||||
|
||||
if (oldcentralizedRequest.getStatus()==0&detailsOfCentralizedService.removeBatchByIds(list) & centralizedRequestService.removeById(centralizedRequestId)) {
|
||||
return R.ok(oldcentralizedRequest, "删除成功");
|
||||
} else {
|
||||
return R.failed(oldcentralizedRequest, "删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除集中采购申请明细
|
||||
*
|
||||
* @param detailsOfCentralizedId
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除集中采购申请明细", notes = "通过id删除集中采购申请明细")
|
||||
@SysLog("通过id删除(集中采购申请)")
|
||||
@DeleteMapping("/details/{detailsOfCentralizedId}")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_del')")
|
||||
public R<DetailsOfCentralized> deleteDetailsById(@PathVariable String detailsOfCentralizedId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
DetailsOfCentralized oldDetailsOfCentralized = detailsOfCentralizedService.getById(detailsOfCentralizedId);
|
||||
|
||||
if (detailsOfCentralizedService.removeById(oldDetailsOfCentralized)) {
|
||||
return R.ok(oldDetailsOfCentralized, "删除成功");
|
||||
} else {
|
||||
return R.failed(oldDetailsOfCentralized, "删除失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除集中采购申请明细
|
||||
*
|
||||
* @param auditAndApproveDto
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "审核集中采购申请明细", notes = "审核集中采购申请明细")
|
||||
@SysLog("审核集中采购申请明细")
|
||||
@PutMapping("/check")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_centralized_request_check')")
|
||||
public R<CentralizedRequest> checkRequest(@RequestBody AuditAndApproveDto auditAndApproveDto, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
CentralizedRequest centralizedRequest = centralizedRequestService.checkRequest(auditAndApproveDto, dlpUser);
|
||||
|
||||
if (centralizedRequestService.updateById(centralizedRequest)) {
|
||||
return R.ok(centralizedRequest, "审核成功");
|
||||
} else {
|
||||
return R.failed(centralizedRequest, "审核失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核申请分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param centralizedRequest 集中采购申请
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("audit/page")
|
||||
@PreAuthorize("@pms.hasPermission('AuditCentralizedPurchaseRequestList')")
|
||||
public R<IPage<CentralizedRequest>> getAuditCentralizedRequestPage(Page<CentralizedRequest> page, CentralizedRequest centralizedRequest, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<CentralizedRequest> centralizedRequestSList = centralizedRequestService.page(page, Wrappers.<CentralizedRequest>query()
|
||||
.eq("status", 1)
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(centralizedRequestSList);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.CheckContent;
|
||||
import digital.laboratory.platform.reagent.service.CheckContentService;
|
||||
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("/check_content" )
|
||||
@Api(value = "check_content", tags = "(检查内容)管理")
|
||||
public class CheckContentController {
|
||||
|
||||
private final CheckContentService checkContentService;
|
||||
|
||||
/**
|
||||
* 通过id查询(检查内容)
|
||||
* @param checkContentId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{checkContentId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_check_content_get')" )
|
||||
public R<CheckContent> getById(@PathVariable("checkContentId" ) String checkContentId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
CheckContent checkContent = checkContentService.getById(checkContentId);
|
||||
return R.ok(checkContent);
|
||||
//return R.ok(checkContentService.getById(checkContentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param checkContent (检查内容)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_check_content_get')" )
|
||||
public R<IPage<CheckContent>> getCheckContentPage(Page<CheckContent> page, CheckContent checkContent, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<CheckContent> checkContentSList = checkContentService.page(page, Wrappers.<CheckContent>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(checkContentSList);
|
||||
// return R.ok(checkContentService.page(page, Wrappers.query(checkContent)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(检查内容)
|
||||
* @param checkContent (检查内容)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(检查内容)", notes = "新增(检查内容)")
|
||||
@SysLog("新增(检查内容)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_check_content_add')" )
|
||||
public R<CheckContent> postAddObject(@RequestBody CheckContent checkContent, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
checkContent.setCheckContentId(IdWorker.get32UUID().toUpperCase());
|
||||
if (checkContentService.save(checkContent)) {
|
||||
return R.ok(checkContent, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(checkContent, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(检查内容)
|
||||
* @param checkContent (检查内容)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(检查内容)", notes = "修改(检查内容)")
|
||||
@SysLog("修改(检查内容)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_check_content_edit')" )
|
||||
public R<CheckContent> putUpdateById(@RequestBody CheckContent checkContent, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (checkContentService.updateById(checkContent)) {
|
||||
return R.ok(checkContent, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(checkContent, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(检查内容)
|
||||
* @param checkContentId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(检查内容)", notes = "通过id删除(检查内容)")
|
||||
@SysLog("通过id删除(检查内容)" )
|
||||
@DeleteMapping("/{checkContentId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_check_content_del')" )
|
||||
public R<CheckContent> deleteById(@PathVariable String checkContentId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
CheckContent oldCheckContent = checkContentService.getById(checkContentId);
|
||||
|
||||
if (checkContentService.removeById(checkContentId)) {
|
||||
return R.ok(oldCheckContent, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldCheckContent, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.ComplianceCheck;
|
||||
import digital.laboratory.platform.reagent.service.ComplianceCheckService;
|
||||
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("/compliance_check" )
|
||||
@Api(value = "compliance_check", tags = "(符合性检查记录表)管理")
|
||||
public class ComplianceCheckController {
|
||||
|
||||
private final ComplianceCheckService complianceCheckService;
|
||||
|
||||
/**
|
||||
* 通过id查询(符合性检查记录表)
|
||||
* @param complianceCheckId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{complianceCheckId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_get')" )
|
||||
public R<ComplianceCheck> getById(@PathVariable("complianceCheckId" ) String complianceCheckId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ComplianceCheck complianceCheck = complianceCheckService.getById(complianceCheckId);
|
||||
return R.ok(complianceCheck);
|
||||
//return R.ok(complianceCheckService.getById(complianceCheckId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param complianceCheck (符合性检查记录表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_get')" )
|
||||
public R<IPage<ComplianceCheck>> getComplianceCheckPage(Page<ComplianceCheck> page, ComplianceCheck complianceCheck, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<ComplianceCheck> complianceCheckSList = complianceCheckService.page(page, Wrappers.<ComplianceCheck>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(complianceCheckSList);
|
||||
// return R.ok(complianceCheckService.page(page, Wrappers.query(complianceCheck)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(符合性检查记录表)
|
||||
* @param complianceCheck (符合性检查记录表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(符合性检查记录表)", notes = "新增(符合性检查记录表)")
|
||||
@SysLog("新增(符合性检查记录表)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_add')" )
|
||||
public R<ComplianceCheck> postAddObject(@RequestBody ComplianceCheck complianceCheck, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
complianceCheck.setComplianceCheckId(IdWorker.get32UUID().toUpperCase());
|
||||
if (complianceCheckService.save(complianceCheck)) {
|
||||
return R.ok(complianceCheck, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(complianceCheck, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(符合性检查记录表)
|
||||
* @param complianceCheck (符合性检查记录表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(符合性检查记录表)", notes = "修改(符合性检查记录表)")
|
||||
@SysLog("修改(符合性检查记录表)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_edit')" )
|
||||
public R<ComplianceCheck> putUpdateById(@RequestBody ComplianceCheck complianceCheck, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (complianceCheckService.updateById(complianceCheck)) {
|
||||
return R.ok(complianceCheck, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(complianceCheck, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(符合性检查记录表)
|
||||
* @param complianceCheckId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(符合性检查记录表)", notes = "通过id删除(符合性检查记录表)")
|
||||
@SysLog("通过id删除(符合性检查记录表)" )
|
||||
@DeleteMapping("/{complianceCheckId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_compliance_check_del')" )
|
||||
public R<ComplianceCheck> deleteById(@PathVariable String complianceCheckId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ComplianceCheck oldComplianceCheck = complianceCheckService.getById(complianceCheckId);
|
||||
|
||||
if (complianceCheckService.removeById(complianceCheckId)) {
|
||||
return R.ok(oldComplianceCheck, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldComplianceCheck, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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
@@ -0,0 +1,151 @@
|
||||
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.DecentralizeDetails;
|
||||
import digital.laboratory.platform.reagent.service.DecentralizeDetailsService;
|
||||
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("/decentralize_details" )
|
||||
@Api(value = "decentralize_details", tags = "分散采购申请明细管理")
|
||||
public class DecentralizeDetailsController {
|
||||
|
||||
private final DecentralizeDetailsService decentralizeDetailsService;
|
||||
|
||||
/**
|
||||
* 通过id查询分散采购申请明细
|
||||
* @param decentralizeDetailsId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{decentralizeDetailsId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralize_details_get')" )
|
||||
public R<DecentralizeDetails> getById(@PathVariable("decentralizeDetailsId" ) String decentralizeDetailsId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
DecentralizeDetails decentralizeDetails = decentralizeDetailsService.getById(decentralizeDetailsId);
|
||||
return R.ok(decentralizeDetails);
|
||||
//return R.ok(decentralizeDetailsService.getById(decentralizeDetailsId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param decentralizeDetails 分散采购申请明细
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralize_details_get')" )
|
||||
public R<IPage<DecentralizeDetails>> getDecentralizeDetailsPage(Page<DecentralizeDetails> page, DecentralizeDetails decentralizeDetails, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<DecentralizeDetails> decentralizeDetailsSList = decentralizeDetailsService.page(page, Wrappers.<DecentralizeDetails>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(decentralizeDetailsSList);
|
||||
// return R.ok(decentralizeDetailsService.page(page, Wrappers.query(decentralizeDetails)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增分散采购申请明细
|
||||
* @param decentralizeDetails 分散采购申请明细
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增分散采购申请明细", notes = "新增分散采购申请明细")
|
||||
@SysLog("新增分散采购申请明细" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralize_details_add')" )
|
||||
public R<DecentralizeDetails> postAddObject(@RequestBody DecentralizeDetails decentralizeDetails, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
decentralizeDetails.setDecentralizeDetailsId(IdWorker.get32UUID().toUpperCase());
|
||||
if (decentralizeDetailsService.save(decentralizeDetails)) {
|
||||
return R.ok(decentralizeDetails, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(decentralizeDetails, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改分散采购申请明细
|
||||
* @param decentralizeDetails 分散采购申请明细
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改分散采购申请明细", notes = "修改分散采购申请明细")
|
||||
@SysLog("修改分散采购申请明细" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralize_details_edit')" )
|
||||
public R<DecentralizeDetails> putUpdateById(@RequestBody DecentralizeDetails decentralizeDetails, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (decentralizeDetailsService.updateById(decentralizeDetails)) {
|
||||
return R.ok(decentralizeDetails, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(decentralizeDetails, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除分散采购申请明细
|
||||
* @param decentralizeDetailsId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除分散采购申请明细", notes = "通过id删除分散采购申请明细")
|
||||
@SysLog("通过id删除分散采购申请明细" )
|
||||
@DeleteMapping("/{decentralizeDetailsId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralize_details_del')" )
|
||||
public R<DecentralizeDetails> deleteById(@PathVariable String decentralizeDetailsId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
DecentralizeDetails oldDecentralizeDetails = decentralizeDetailsService.getById(decentralizeDetailsId);
|
||||
|
||||
if (decentralizeDetailsService.removeById(decentralizeDetailsId)) {
|
||||
return R.ok(oldDecentralizeDetails, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldDecentralizeDetails, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.DecentralizedRequest;
|
||||
import digital.laboratory.platform.reagent.service.DecentralizedRequestService;
|
||||
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("/decentralized_request" )
|
||||
@Api(value = "decentralized_request", tags = "(分散采购申请)管理")
|
||||
public class DecentralizedRequestController {
|
||||
|
||||
private final DecentralizedRequestService decentralizedRequestService;
|
||||
|
||||
/**
|
||||
* 通过id查询(分散采购申请)
|
||||
* @param decentralizedRequestId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{decentralizedRequestId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralized_request_get')" )
|
||||
public R<DecentralizedRequest> getById(@PathVariable("decentralizedRequestId" ) String decentralizedRequestId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
DecentralizedRequest decentralizedRequest = decentralizedRequestService.getById(decentralizedRequestId);
|
||||
return R.ok(decentralizedRequest);
|
||||
//return R.ok(decentralizedRequestService.getById(decentralizedRequestId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param decentralizedRequest (分散采购申请)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralized_request_get')" )
|
||||
public R<IPage<DecentralizedRequest>> getDecentralizedRequestPage(Page<DecentralizedRequest> page, DecentralizedRequest decentralizedRequest, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<DecentralizedRequest> decentralizedRequestSList = decentralizedRequestService.page(page, Wrappers.<DecentralizedRequest>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(decentralizedRequestSList);
|
||||
// return R.ok(decentralizedRequestService.page(page, Wrappers.query(decentralizedRequest)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(分散采购申请)
|
||||
* @param decentralizedRequest (分散采购申请)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(分散采购申请)", notes = "新增(分散采购申请)")
|
||||
@SysLog("新增(分散采购申请)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralized_request_add')" )
|
||||
public R<DecentralizedRequest> postAddObject(@RequestBody DecentralizedRequest decentralizedRequest, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
decentralizedRequest.setDecentralizedRequestId(IdWorker.get32UUID().toUpperCase());
|
||||
if (decentralizedRequestService.save(decentralizedRequest)) {
|
||||
return R.ok(decentralizedRequest, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(decentralizedRequest, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(分散采购申请)
|
||||
* @param decentralizedRequest (分散采购申请)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(分散采购申请)", notes = "修改(分散采购申请)")
|
||||
@SysLog("修改(分散采购申请)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralized_request_edit')" )
|
||||
public R<DecentralizedRequest> putUpdateById(@RequestBody DecentralizedRequest decentralizedRequest, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (decentralizedRequestService.updateById(decentralizedRequest)) {
|
||||
return R.ok(decentralizedRequest, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(decentralizedRequest, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(分散采购申请)
|
||||
* @param decentralizedRequestId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(分散采购申请)", notes = "通过id删除(分散采购申请)")
|
||||
@SysLog("通过id删除(分散采购申请)" )
|
||||
@DeleteMapping("/{decentralizedRequestId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_decentralized_request_del')" )
|
||||
public R<DecentralizedRequest> deleteById(@PathVariable String decentralizedRequestId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
DecentralizedRequest oldDecentralizedRequest = decentralizedRequestService.getById(decentralizedRequestId);
|
||||
|
||||
if (decentralizedRequestService.removeById(decentralizedRequestId)) {
|
||||
return R.ok(oldDecentralizedRequest, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldDecentralizedRequest, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.DeliveryRegistrationForm;
|
||||
import digital.laboratory.platform.reagent.service.DeliveryRegistrationFormService;
|
||||
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("/delivery_registration_form" )
|
||||
@Api(value = "delivery_registration_form", tags = "(试剂耗材出库登记表)管理")
|
||||
public class DeliveryRegistrationFormController {
|
||||
|
||||
private final DeliveryRegistrationFormService deliveryRegistrationFormService;
|
||||
|
||||
/**
|
||||
* 通过id查询(试剂耗材出库登记表)
|
||||
* @param deliveryRegistrationFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{deliveryRegistrationFormId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_get')" )
|
||||
public R<DeliveryRegistrationForm> getById(@PathVariable("deliveryRegistrationFormId" ) String deliveryRegistrationFormId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
DeliveryRegistrationForm deliveryRegistrationForm = deliveryRegistrationFormService.getById(deliveryRegistrationFormId);
|
||||
return R.ok(deliveryRegistrationForm);
|
||||
//return R.ok(deliveryRegistrationFormService.getById(deliveryRegistrationFormId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param deliveryRegistrationForm (试剂耗材出库登记表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_get')" )
|
||||
public R<IPage<DeliveryRegistrationForm>> getDeliveryRegistrationFormPage(Page<DeliveryRegistrationForm> page, DeliveryRegistrationForm deliveryRegistrationForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<DeliveryRegistrationForm> deliveryRegistrationFormSList = deliveryRegistrationFormService.page(page, Wrappers.<DeliveryRegistrationForm>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(deliveryRegistrationFormSList);
|
||||
// return R.ok(deliveryRegistrationFormService.page(page, Wrappers.query(deliveryRegistrationForm)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(试剂耗材出库登记表)
|
||||
* @param deliveryRegistrationForm (试剂耗材出库登记表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(试剂耗材出库登记表)", notes = "新增(试剂耗材出库登记表)")
|
||||
@SysLog("新增(试剂耗材出库登记表)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_add')" )
|
||||
public R<DeliveryRegistrationForm> postAddObject(@RequestBody DeliveryRegistrationForm deliveryRegistrationForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
deliveryRegistrationForm.setDeliveryRegistrationFormId(IdWorker.get32UUID().toUpperCase());
|
||||
if (deliveryRegistrationFormService.save(deliveryRegistrationForm)) {
|
||||
return R.ok(deliveryRegistrationForm, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(deliveryRegistrationForm, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(试剂耗材出库登记表)
|
||||
* @param deliveryRegistrationForm (试剂耗材出库登记表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(试剂耗材出库登记表)", notes = "修改(试剂耗材出库登记表)")
|
||||
@SysLog("修改(试剂耗材出库登记表)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_edit')" )
|
||||
public R<DeliveryRegistrationForm> putUpdateById(@RequestBody DeliveryRegistrationForm deliveryRegistrationForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (deliveryRegistrationFormService.updateById(deliveryRegistrationForm)) {
|
||||
return R.ok(deliveryRegistrationForm, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(deliveryRegistrationForm, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(试剂耗材出库登记表)
|
||||
* @param deliveryRegistrationFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(试剂耗材出库登记表)", notes = "通过id删除(试剂耗材出库登记表)")
|
||||
@SysLog("通过id删除(试剂耗材出库登记表)" )
|
||||
@DeleteMapping("/{deliveryRegistrationFormId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_delivery_registration_form_del')" )
|
||||
public R<DeliveryRegistrationForm> deleteById(@PathVariable String deliveryRegistrationFormId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
DeliveryRegistrationForm oldDeliveryRegistrationForm = deliveryRegistrationFormService.getById(deliveryRegistrationFormId);
|
||||
|
||||
if (deliveryRegistrationFormService.removeById(deliveryRegistrationFormId)) {
|
||||
return R.ok(oldDeliveryRegistrationForm, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldDeliveryRegistrationForm, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.DetailsOfCentralized;
|
||||
import digital.laboratory.platform.reagent.service.DetailsOfCentralizedService;
|
||||
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("/details_of_centralized" )
|
||||
@Api(value = "details_of_centralized", tags = "(集中采购申请明细)管理")
|
||||
public class DetailsOfCentralizedController {
|
||||
|
||||
private final DetailsOfCentralizedService detailsOfCentralizedService;
|
||||
|
||||
/**
|
||||
* 通过id查询(集中采购申请明细)
|
||||
* @param detailsOfCentralizedId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{detailsOfCentralizedId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_get')" )
|
||||
public R<DetailsOfCentralized> getById(@PathVariable("detailsOfCentralizedId" ) String detailsOfCentralizedId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
DetailsOfCentralized detailsOfCentralized = detailsOfCentralizedService.getById(detailsOfCentralizedId);
|
||||
return R.ok(detailsOfCentralized);
|
||||
//return R.ok(detailsOfCentralizedService.getById(detailsOfCentralizedId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param detailsOfCentralized (集中采购申请明细)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_get')" )
|
||||
public R<IPage<DetailsOfCentralized>> getDetailsOfCentralizedPage(Page<DetailsOfCentralized> page, DetailsOfCentralized detailsOfCentralized, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<DetailsOfCentralized> detailsOfCentralizedSList = detailsOfCentralizedService.page(page, Wrappers.<DetailsOfCentralized>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(detailsOfCentralizedSList);
|
||||
// return R.ok(detailsOfCentralizedService.page(page, Wrappers.query(detailsOfCentralized)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(集中采购申请明细)
|
||||
* @param detailsOfCentralized (集中采购申请明细)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(集中采购申请明细)", notes = "新增(集中采购申请明细)")
|
||||
@SysLog("新增(集中采购申请明细)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_add')" )
|
||||
public R<DetailsOfCentralized> postAddObject(@RequestBody DetailsOfCentralized detailsOfCentralized, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
detailsOfCentralized.setDetailsOfCentralizedId(IdWorker.get32UUID().toUpperCase());
|
||||
if (detailsOfCentralizedService.save(detailsOfCentralized)) {
|
||||
return R.ok(detailsOfCentralized, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(detailsOfCentralized, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(集中采购申请明细)
|
||||
* @param detailsOfCentralized (集中采购申请明细)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(集中采购申请明细)", notes = "修改(集中采购申请明细)")
|
||||
@SysLog("修改(集中采购申请明细)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_edit')" )
|
||||
public R<DetailsOfCentralized> putUpdateById(@RequestBody DetailsOfCentralized detailsOfCentralized, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (detailsOfCentralizedService.updateById(detailsOfCentralized)) {
|
||||
return R.ok(detailsOfCentralized, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(detailsOfCentralized, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(集中采购申请明细)
|
||||
* @param detailsOfCentralizedId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(集中采购申请明细)", notes = "通过id删除(集中采购申请明细)")
|
||||
@SysLog("通过id删除(集中采购申请明细)" )
|
||||
@DeleteMapping("/{detailsOfCentralizedId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_details_of_centralized_del')" )
|
||||
public R<DetailsOfCentralized> deleteById(@PathVariable String detailsOfCentralizedId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
DetailsOfCentralized oldDetailsOfCentralized = detailsOfCentralizedService.getById(detailsOfCentralizedId);
|
||||
|
||||
if (detailsOfCentralizedService.removeById(detailsOfCentralizedId)) {
|
||||
return R.ok(oldDetailsOfCentralized, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldDetailsOfCentralized, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.EvaluationForm;
|
||||
import digital.laboratory.platform.reagent.service.EvaluationFormService;
|
||||
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("/evaluation_form" )
|
||||
@Api(value = "evaluation_form", tags = "(服务商/供应商评价表)管理")
|
||||
public class EvaluationFormController {
|
||||
|
||||
private final EvaluationFormService evaluationFormService;
|
||||
|
||||
/**
|
||||
* 通过id查询(服务商/供应商评价表)
|
||||
* @param evaluationFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{evaluationFormId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_evaluation_form_get')" )
|
||||
public R<EvaluationForm> getById(@PathVariable("evaluationFormId" ) String evaluationFormId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
EvaluationForm evaluationForm = evaluationFormService.getById(evaluationFormId);
|
||||
return R.ok(evaluationForm);
|
||||
//return R.ok(evaluationFormService.getById(evaluationFormId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param evaluationForm (服务商/供应商评价表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_evaluation_form_get')" )
|
||||
public R<IPage<EvaluationForm>> getEvaluationFormPage(Page<EvaluationForm> page, EvaluationForm evaluationForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<EvaluationForm> evaluationFormSList = evaluationFormService.page(page, Wrappers.<EvaluationForm>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(evaluationFormSList);
|
||||
// return R.ok(evaluationFormService.page(page, Wrappers.query(evaluationForm)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(服务商/供应商评价表)
|
||||
* @param evaluationForm (服务商/供应商评价表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(服务商/供应商评价表)", notes = "新增(服务商/供应商评价表)")
|
||||
@SysLog("新增(服务商/供应商评价表)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_evaluation_form_add')" )
|
||||
public R<EvaluationForm> postAddObject(@RequestBody EvaluationForm evaluationForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
evaluationForm.setEvaluationFormId(IdWorker.get32UUID().toUpperCase());
|
||||
if (evaluationFormService.save(evaluationForm)) {
|
||||
return R.ok(evaluationForm, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(evaluationForm, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(服务商/供应商评价表)
|
||||
* @param evaluationForm (服务商/供应商评价表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(服务商/供应商评价表)", notes = "修改(服务商/供应商评价表)")
|
||||
@SysLog("修改(服务商/供应商评价表)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_evaluation_form_edit')" )
|
||||
public R<EvaluationForm> putUpdateById(@RequestBody EvaluationForm evaluationForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (evaluationFormService.updateById(evaluationForm)) {
|
||||
return R.ok(evaluationForm, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(evaluationForm, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(服务商/供应商评价表)
|
||||
* @param evaluationFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(服务商/供应商评价表)", notes = "通过id删除(服务商/供应商评价表)")
|
||||
@SysLog("通过id删除(服务商/供应商评价表)" )
|
||||
@DeleteMapping("/{evaluationFormId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_evaluation_form_del')" )
|
||||
public R<EvaluationForm> deleteById(@PathVariable String evaluationFormId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
EvaluationForm oldEvaluationForm = evaluationFormService.getById(evaluationFormId);
|
||||
|
||||
if (evaluationFormService.removeById(evaluationFormId)) {
|
||||
return R.ok(oldEvaluationForm, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldEvaluationForm, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.EvaluationResult;
|
||||
import digital.laboratory.platform.reagent.service.EvaluationResultService;
|
||||
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("/evaluation_result" )
|
||||
@Api(value = "evaluation_result", tags = "(服务商/供应商评价结果)管理")
|
||||
public class EvaluationResultController {
|
||||
|
||||
private final EvaluationResultService evaluationResultService;
|
||||
|
||||
/**
|
||||
* 通过id查询(服务商/供应商评价结果)
|
||||
* @param evaluationResultId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{evaluationResultId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_evaluation_result_get')" )
|
||||
public R<EvaluationResult> getById(@PathVariable("evaluationResultId" ) String evaluationResultId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
EvaluationResult evaluationResult = evaluationResultService.getById(evaluationResultId);
|
||||
return R.ok(evaluationResult);
|
||||
//return R.ok(evaluationResultService.getById(evaluationResultId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param evaluationResult (服务商/供应商评价结果)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_evaluation_result_get')" )
|
||||
public R<IPage<EvaluationResult>> getEvaluationResultPage(Page<EvaluationResult> page, EvaluationResult evaluationResult, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<EvaluationResult> evaluationResultSList = evaluationResultService.page(page, Wrappers.<EvaluationResult>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(evaluationResultSList);
|
||||
// return R.ok(evaluationResultService.page(page, Wrappers.query(evaluationResult)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(服务商/供应商评价结果)
|
||||
* @param evaluationResult (服务商/供应商评价结果)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(服务商/供应商评价结果)", notes = "新增(服务商/供应商评价结果)")
|
||||
@SysLog("新增(服务商/供应商评价结果)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_evaluation_result_add')" )
|
||||
public R<EvaluationResult> postAddObject(@RequestBody EvaluationResult evaluationResult, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
evaluationResult.setEvaluationResultId(IdWorker.get32UUID().toUpperCase());
|
||||
if (evaluationResultService.save(evaluationResult)) {
|
||||
return R.ok(evaluationResult, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(evaluationResult, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(服务商/供应商评价结果)
|
||||
* @param evaluationResult (服务商/供应商评价结果)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(服务商/供应商评价结果)", notes = "修改(服务商/供应商评价结果)")
|
||||
@SysLog("修改(服务商/供应商评价结果)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_evaluation_result_edit')" )
|
||||
public R<EvaluationResult> putUpdateById(@RequestBody EvaluationResult evaluationResult, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (evaluationResultService.updateById(evaluationResult)) {
|
||||
return R.ok(evaluationResult, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(evaluationResult, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(服务商/供应商评价结果)
|
||||
* @param evaluationResultId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(服务商/供应商评价结果)", notes = "通过id删除(服务商/供应商评价结果)")
|
||||
@SysLog("通过id删除(服务商/供应商评价结果)" )
|
||||
@DeleteMapping("/{evaluationResultId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_evaluation_result_del')" )
|
||||
public R<EvaluationResult> deleteById(@PathVariable String evaluationResultId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
EvaluationResult oldEvaluationResult = evaluationResultService.getById(evaluationResultId);
|
||||
|
||||
if (evaluationResultService.removeById(evaluationResultId)) {
|
||||
return R.ok(oldEvaluationResult, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldEvaluationResult, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.FixedValueReport;
|
||||
import digital.laboratory.platform.reagent.service.FixedValueReportService;
|
||||
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("/fixed_value_report" )
|
||||
@Api(value = "fixed_value_report", tags = "(定值报告)管理")
|
||||
public class FixedValueReportController {
|
||||
|
||||
private final FixedValueReportService fixedValueReportService;
|
||||
|
||||
/**
|
||||
* 通过id查询(定值报告)
|
||||
* @param fixedValueReportId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{fixedValueReportId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_fixed_value_report_get')" )
|
||||
public R<FixedValueReport> getById(@PathVariable("fixedValueReportId" ) String fixedValueReportId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
FixedValueReport fixedValueReport = fixedValueReportService.getById(fixedValueReportId);
|
||||
return R.ok(fixedValueReport);
|
||||
//return R.ok(fixedValueReportService.getById(fixedValueReportId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param fixedValueReport (定值报告)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_fixed_value_report_get')" )
|
||||
public R<IPage<FixedValueReport>> getFixedValueReportPage(Page<FixedValueReport> page, FixedValueReport fixedValueReport, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<FixedValueReport> fixedValueReportSList = fixedValueReportService.page(page, Wrappers.<FixedValueReport>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(fixedValueReportSList);
|
||||
// return R.ok(fixedValueReportService.page(page, Wrappers.query(fixedValueReport)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(定值报告)
|
||||
* @param fixedValueReport (定值报告)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(定值报告)", notes = "新增(定值报告)")
|
||||
@SysLog("新增(定值报告)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_fixed_value_report_add')" )
|
||||
public R<FixedValueReport> postAddObject(@RequestBody FixedValueReport fixedValueReport, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
fixedValueReport.setFixedValueReportId(IdWorker.get32UUID().toUpperCase());
|
||||
if (fixedValueReportService.save(fixedValueReport)) {
|
||||
return R.ok(fixedValueReport, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(fixedValueReport, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(定值报告)
|
||||
* @param fixedValueReport (定值报告)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(定值报告)", notes = "修改(定值报告)")
|
||||
@SysLog("修改(定值报告)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_fixed_value_report_edit')" )
|
||||
public R<FixedValueReport> putUpdateById(@RequestBody FixedValueReport fixedValueReport, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (fixedValueReportService.updateById(fixedValueReport)) {
|
||||
return R.ok(fixedValueReport, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(fixedValueReport, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(定值报告)
|
||||
* @param fixedValueReportId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(定值报告)", notes = "通过id删除(定值报告)")
|
||||
@SysLog("通过id删除(定值报告)" )
|
||||
@DeleteMapping("/{fixedValueReportId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_fixed_value_report_del')" )
|
||||
public R<FixedValueReport> deleteById(@PathVariable String fixedValueReportId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
FixedValueReport oldFixedValueReport = fixedValueReportService.getById(fixedValueReportId);
|
||||
|
||||
if (fixedValueReportService.removeById(fixedValueReportId)) {
|
||||
return R.ok(oldFixedValueReport, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldFixedValueReport, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.InstructionBook;
|
||||
import digital.laboratory.platform.reagent.service.InstructionBookService;
|
||||
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("/instruction_book" )
|
||||
@Api(value = "instruction_book", tags = "(标准物质期间核查指导书)管理")
|
||||
public class InstructionBookController {
|
||||
|
||||
private final InstructionBookService instructionBookService;
|
||||
|
||||
/**
|
||||
* 通过id查询(标准物质期间核查指导书)
|
||||
* @param instructionBookId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{instructionBookId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_get')" )
|
||||
public R<InstructionBook> getById(@PathVariable("instructionBookId" ) String instructionBookId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
InstructionBook instructionBook = instructionBookService.getById(instructionBookId);
|
||||
return R.ok(instructionBook);
|
||||
//return R.ok(instructionBookService.getById(instructionBookId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param instructionBook (标准物质期间核查指导书)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_get')" )
|
||||
public R<IPage<InstructionBook>> getInstructionBookPage(Page<InstructionBook> page, InstructionBook instructionBook, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<InstructionBook> instructionBookSList = instructionBookService.page(page, Wrappers.<InstructionBook>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(instructionBookSList);
|
||||
// return R.ok(instructionBookService.page(page, Wrappers.query(instructionBook)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(标准物质期间核查指导书)
|
||||
* @param instructionBook (标准物质期间核查指导书)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(标准物质期间核查指导书)", notes = "新增(标准物质期间核查指导书)")
|
||||
@SysLog("新增(标准物质期间核查指导书)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_add')" )
|
||||
public R<InstructionBook> postAddObject(@RequestBody InstructionBook instructionBook, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
instructionBook.setInstructionBookId(IdWorker.get32UUID().toUpperCase());
|
||||
if (instructionBookService.save(instructionBook)) {
|
||||
return R.ok(instructionBook, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(instructionBook, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(标准物质期间核查指导书)
|
||||
* @param instructionBook (标准物质期间核查指导书)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(标准物质期间核查指导书)", notes = "修改(标准物质期间核查指导书)")
|
||||
@SysLog("修改(标准物质期间核查指导书)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_edit')" )
|
||||
public R<InstructionBook> putUpdateById(@RequestBody InstructionBook instructionBook, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (instructionBookService.updateById(instructionBook)) {
|
||||
return R.ok(instructionBook, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(instructionBook, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(标准物质期间核查指导书)
|
||||
* @param instructionBookId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(标准物质期间核查指导书)", notes = "通过id删除(标准物质期间核查指导书)")
|
||||
@SysLog("通过id删除(标准物质期间核查指导书)" )
|
||||
@DeleteMapping("/{instructionBookId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_instruction_book_del')" )
|
||||
public R<InstructionBook> deleteById(@PathVariable String instructionBookId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
InstructionBook oldInstructionBook = instructionBookService.getById(instructionBookId);
|
||||
|
||||
if (instructionBookService.removeById(instructionBookId)) {
|
||||
return R.ok(oldInstructionBook, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldInstructionBook, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.OutgoingContents;
|
||||
import digital.laboratory.platform.reagent.service.OutgoingContentsService;
|
||||
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("/outgoing_contents" )
|
||||
@Api(value = "outgoing_contents", tags = "(出库内容)管理")
|
||||
public class OutgoingContentsController {
|
||||
|
||||
private final OutgoingContentsService outgoingContentsService;
|
||||
|
||||
/**
|
||||
* 通过id查询(出库内容)
|
||||
* @param outgoingContentsId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{outgoingContentsId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_outgoing_contents_get')" )
|
||||
public R<OutgoingContents> getById(@PathVariable("outgoingContentsId" ) String outgoingContentsId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
OutgoingContents outgoingContents = outgoingContentsService.getById(outgoingContentsId);
|
||||
return R.ok(outgoingContents);
|
||||
//return R.ok(outgoingContentsService.getById(outgoingContentsId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param outgoingContents (出库内容)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_outgoing_contents_get')" )
|
||||
public R<IPage<OutgoingContents>> getOutgoingContentsPage(Page<OutgoingContents> page, OutgoingContents outgoingContents, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<OutgoingContents> outgoingContentsSList = outgoingContentsService.page(page, Wrappers.<OutgoingContents>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(outgoingContentsSList);
|
||||
// return R.ok(outgoingContentsService.page(page, Wrappers.query(outgoingContents)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(出库内容)
|
||||
* @param outgoingContents (出库内容)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(出库内容)", notes = "新增(出库内容)")
|
||||
@SysLog("新增(出库内容)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_outgoing_contents_add')" )
|
||||
public R<OutgoingContents> postAddObject(@RequestBody OutgoingContents outgoingContents, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
outgoingContents.setOutgoingContentsId(IdWorker.get32UUID().toUpperCase());
|
||||
if (outgoingContentsService.save(outgoingContents)) {
|
||||
return R.ok(outgoingContents, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(outgoingContents, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(出库内容)
|
||||
* @param outgoingContents (出库内容)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(出库内容)", notes = "修改(出库内容)")
|
||||
@SysLog("修改(出库内容)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_outgoing_contents_edit')" )
|
||||
public R<OutgoingContents> putUpdateById(@RequestBody OutgoingContents outgoingContents, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (outgoingContentsService.updateById(outgoingContents)) {
|
||||
return R.ok(outgoingContents, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(outgoingContents, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(出库内容)
|
||||
* @param outgoingContentsId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(出库内容)", notes = "通过id删除(出库内容)")
|
||||
@SysLog("通过id删除(出库内容)" )
|
||||
@DeleteMapping("/{outgoingContentsId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_outgoing_contents_del')" )
|
||||
public R<OutgoingContents> deleteById(@PathVariable String outgoingContentsId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
OutgoingContents oldOutgoingContents = outgoingContentsService.getById(outgoingContentsId);
|
||||
|
||||
if (outgoingContentsService.removeById(outgoingContentsId)) {
|
||||
return R.ok(oldOutgoingContents, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldOutgoingContents, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.PeriodVerificationImplementation;
|
||||
import digital.laboratory.platform.reagent.service.PeriodVerificationImplementationService;
|
||||
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("/period_verification_implementation" )
|
||||
@Api(value = "period_verification_implementation", tags = "(标准物质期间核查实施情况及结果记录表)管理")
|
||||
public class PeriodVerificationImplementationController {
|
||||
|
||||
private final PeriodVerificationImplementationService periodVerificationImplementationService;
|
||||
|
||||
/**
|
||||
* 通过id查询(标准物质期间核查实施情况及结果记录表)
|
||||
* @param periodVerificationImplementationId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{periodVerificationImplementationId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_get')" )
|
||||
public R<PeriodVerificationImplementation> getById(@PathVariable("periodVerificationImplementationId" ) String periodVerificationImplementationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PeriodVerificationImplementation periodVerificationImplementation = periodVerificationImplementationService.getById(periodVerificationImplementationId);
|
||||
return R.ok(periodVerificationImplementation);
|
||||
//return R.ok(periodVerificationImplementationService.getById(periodVerificationImplementationId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param periodVerificationImplementation (标准物质期间核查实施情况及结果记录表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_get')" )
|
||||
public R<IPage<PeriodVerificationImplementation>> getPeriodVerificationImplementationPage(Page<PeriodVerificationImplementation> page, PeriodVerificationImplementation periodVerificationImplementation, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<PeriodVerificationImplementation> periodVerificationImplementationSList = periodVerificationImplementationService.page(page, Wrappers.<PeriodVerificationImplementation>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(periodVerificationImplementationSList);
|
||||
// return R.ok(periodVerificationImplementationService.page(page, Wrappers.query(periodVerificationImplementation)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(标准物质期间核查实施情况及结果记录表)
|
||||
* @param periodVerificationImplementation (标准物质期间核查实施情况及结果记录表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(标准物质期间核查实施情况及结果记录表)", notes = "新增(标准物质期间核查实施情况及结果记录表)")
|
||||
@SysLog("新增(标准物质期间核查实施情况及结果记录表)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_add')" )
|
||||
public R<PeriodVerificationImplementation> postAddObject(@RequestBody PeriodVerificationImplementation periodVerificationImplementation, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
periodVerificationImplementation.setPeriodVerificationImplementationId(IdWorker.get32UUID().toUpperCase());
|
||||
if (periodVerificationImplementationService.save(periodVerificationImplementation)) {
|
||||
return R.ok(periodVerificationImplementation, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(periodVerificationImplementation, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(标准物质期间核查实施情况及结果记录表)
|
||||
* @param periodVerificationImplementation (标准物质期间核查实施情况及结果记录表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(标准物质期间核查实施情况及结果记录表)", notes = "修改(标准物质期间核查实施情况及结果记录表)")
|
||||
@SysLog("修改(标准物质期间核查实施情况及结果记录表)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_edit')" )
|
||||
public R<PeriodVerificationImplementation> putUpdateById(@RequestBody PeriodVerificationImplementation periodVerificationImplementation, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (periodVerificationImplementationService.updateById(periodVerificationImplementation)) {
|
||||
return R.ok(periodVerificationImplementation, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(periodVerificationImplementation, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(标准物质期间核查实施情况及结果记录表)
|
||||
* @param periodVerificationImplementationId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(标准物质期间核查实施情况及结果记录表)", notes = "通过id删除(标准物质期间核查实施情况及结果记录表)")
|
||||
@SysLog("通过id删除(标准物质期间核查实施情况及结果记录表)" )
|
||||
@DeleteMapping("/{periodVerificationImplementationId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_implementation_del')" )
|
||||
public R<PeriodVerificationImplementation> deleteById(@PathVariable String periodVerificationImplementationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PeriodVerificationImplementation oldPeriodVerificationImplementation = periodVerificationImplementationService.getById(periodVerificationImplementationId);
|
||||
|
||||
if (periodVerificationImplementationService.removeById(periodVerificationImplementationId)) {
|
||||
return R.ok(oldPeriodVerificationImplementation, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldPeriodVerificationImplementation, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.PeriodVerificationPlan;
|
||||
import digital.laboratory.platform.reagent.service.PeriodVerificationPlanService;
|
||||
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("/period_verification_plan" )
|
||||
@Api(value = "period_verification_plan", tags = "(标准物质期间核查计划和确认表)管理")
|
||||
public class PeriodVerificationPlanController {
|
||||
|
||||
private final PeriodVerificationPlanService periodVerificationPlanService;
|
||||
|
||||
/**
|
||||
* 通过id查询(标准物质期间核查计划和确认表)
|
||||
* @param periodVerificationPlanId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{periodVerificationPlanId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_plan_get')" )
|
||||
public R<PeriodVerificationPlan> getById(@PathVariable("periodVerificationPlanId" ) String periodVerificationPlanId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PeriodVerificationPlan periodVerificationPlan = periodVerificationPlanService.getById(periodVerificationPlanId);
|
||||
return R.ok(periodVerificationPlan);
|
||||
//return R.ok(periodVerificationPlanService.getById(periodVerificationPlanId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param periodVerificationPlan (标准物质期间核查计划和确认表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_plan_get')" )
|
||||
public R<IPage<PeriodVerificationPlan>> getPeriodVerificationPlanPage(Page<PeriodVerificationPlan> page, PeriodVerificationPlan periodVerificationPlan, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<PeriodVerificationPlan> periodVerificationPlanSList = periodVerificationPlanService.page(page, Wrappers.<PeriodVerificationPlan>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(periodVerificationPlanSList);
|
||||
// return R.ok(periodVerificationPlanService.page(page, Wrappers.query(periodVerificationPlan)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(标准物质期间核查计划和确认表)
|
||||
* @param periodVerificationPlan (标准物质期间核查计划和确认表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(标准物质期间核查计划和确认表)", notes = "新增(标准物质期间核查计划和确认表)")
|
||||
@SysLog("新增(标准物质期间核查计划和确认表)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_plan_add')" )
|
||||
public R<PeriodVerificationPlan> postAddObject(@RequestBody PeriodVerificationPlan periodVerificationPlan, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
periodVerificationPlan.setPeriodVerificationPlanId(IdWorker.get32UUID().toUpperCase());
|
||||
if (periodVerificationPlanService.save(periodVerificationPlan)) {
|
||||
return R.ok(periodVerificationPlan, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(periodVerificationPlan, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(标准物质期间核查计划和确认表)
|
||||
* @param periodVerificationPlan (标准物质期间核查计划和确认表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(标准物质期间核查计划和确认表)", notes = "修改(标准物质期间核查计划和确认表)")
|
||||
@SysLog("修改(标准物质期间核查计划和确认表)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_plan_edit')" )
|
||||
public R<PeriodVerificationPlan> putUpdateById(@RequestBody PeriodVerificationPlan periodVerificationPlan, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (periodVerificationPlanService.updateById(periodVerificationPlan)) {
|
||||
return R.ok(periodVerificationPlan, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(periodVerificationPlan, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(标准物质期间核查计划和确认表)
|
||||
* @param periodVerificationPlanId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(标准物质期间核查计划和确认表)", notes = "通过id删除(标准物质期间核查计划和确认表)")
|
||||
@SysLog("通过id删除(标准物质期间核查计划和确认表)" )
|
||||
@DeleteMapping("/{periodVerificationPlanId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_period_verification_plan_del')" )
|
||||
public R<PeriodVerificationPlan> deleteById(@PathVariable String periodVerificationPlanId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PeriodVerificationPlan oldPeriodVerificationPlan = periodVerificationPlanService.getById(periodVerificationPlanId);
|
||||
|
||||
if (periodVerificationPlanService.removeById(periodVerificationPlanId)) {
|
||||
return R.ok(oldPeriodVerificationPlan, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldPeriodVerificationPlan, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.ProcurementContent;
|
||||
import digital.laboratory.platform.reagent.service.ProcurementContentService;
|
||||
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("/procurement_content" )
|
||||
@Api(value = "procurement_content", tags = "(采购内容)管理")
|
||||
public class ProcurementContentController {
|
||||
|
||||
private final ProcurementContentService procurementContentService;
|
||||
|
||||
/**
|
||||
* 通过id查询(采购内容)
|
||||
* @param procurementContentId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{procurementContentId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_procurement_content_get')" )
|
||||
public R<ProcurementContent> getById(@PathVariable("procurementContentId" ) String procurementContentId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ProcurementContent procurementContent = procurementContentService.getById(procurementContentId);
|
||||
return R.ok(procurementContent);
|
||||
//return R.ok(procurementContentService.getById(procurementContentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param procurementContent (采购内容)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_procurement_content_get')" )
|
||||
public R<IPage<ProcurementContent>> getProcurementContentPage(Page<ProcurementContent> page, ProcurementContent procurementContent, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<ProcurementContent> procurementContentSList = procurementContentService.page(page, Wrappers.<ProcurementContent>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(procurementContentSList);
|
||||
// return R.ok(procurementContentService.page(page, Wrappers.query(procurementContent)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(采购内容)
|
||||
* @param procurementContent (采购内容)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(采购内容)", notes = "新增(采购内容)")
|
||||
@SysLog("新增(采购内容)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_procurement_content_add')" )
|
||||
public R<ProcurementContent> postAddObject(@RequestBody ProcurementContent procurementContent, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
procurementContent.setProcurementContentId(IdWorker.get32UUID().toUpperCase());
|
||||
if (procurementContentService.save(procurementContent)) {
|
||||
return R.ok(procurementContent, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(procurementContent, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(采购内容)
|
||||
* @param procurementContent (采购内容)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(采购内容)", notes = "修改(采购内容)")
|
||||
@SysLog("修改(采购内容)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_procurement_content_edit')" )
|
||||
public R<ProcurementContent> putUpdateById(@RequestBody ProcurementContent procurementContent, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (procurementContentService.updateById(procurementContent)) {
|
||||
return R.ok(procurementContent, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(procurementContent, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(采购内容)
|
||||
* @param procurementContentId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(采购内容)", notes = "通过id删除(采购内容)")
|
||||
@SysLog("通过id删除(采购内容)" )
|
||||
@DeleteMapping("/{procurementContentId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_procurement_content_del')" )
|
||||
public R<ProcurementContent> deleteById(@PathVariable String procurementContentId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ProcurementContent oldProcurementContent = procurementContentService.getById(procurementContentId);
|
||||
|
||||
if (procurementContentService.removeById(procurementContentId)) {
|
||||
return R.ok(oldProcurementContent, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldProcurementContent, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.ProvideServicesOrSupplies;
|
||||
import digital.laboratory.platform.reagent.service.ProvideServicesOrSuppliesService;
|
||||
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("/provide_services_or_supplies" )
|
||||
@Api(value = "provide_services_or_supplies", tags = "提供服务或供应品管理")
|
||||
public class ProvideServicesOrSuppliesController {
|
||||
|
||||
private final ProvideServicesOrSuppliesService provideServicesOrSuppliesService;
|
||||
|
||||
/**
|
||||
* 通过id查询提供服务或供应品
|
||||
* @param provideServicesOrSuppliesid id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{provideServicesOrSuppliesid}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_get')" )
|
||||
public R<ProvideServicesOrSupplies> getById(@PathVariable("provideServicesOrSuppliesid" ) String provideServicesOrSuppliesid, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ProvideServicesOrSupplies provideServicesOrSupplies = provideServicesOrSuppliesService.getById(provideServicesOrSuppliesid);
|
||||
return R.ok(provideServicesOrSupplies);
|
||||
//return R.ok(provideServicesOrSuppliesService.getById(provideServicesOrSuppliesid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param provideServicesOrSupplies 提供服务或供应品
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_get')" )
|
||||
public R<IPage<ProvideServicesOrSupplies>> getProvideServicesOrSuppliesPage(Page<ProvideServicesOrSupplies> page, ProvideServicesOrSupplies provideServicesOrSupplies, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<ProvideServicesOrSupplies> provideServicesOrSuppliesSList = provideServicesOrSuppliesService.page(page, Wrappers.<ProvideServicesOrSupplies>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(provideServicesOrSuppliesSList);
|
||||
// return R.ok(provideServicesOrSuppliesService.page(page, Wrappers.query(provideServicesOrSupplies)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增提供服务或供应品
|
||||
* @param provideServicesOrSupplies 提供服务或供应品
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增提供服务或供应品", notes = "新增提供服务或供应品")
|
||||
@SysLog("新增提供服务或供应品" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_add')" )
|
||||
public R<ProvideServicesOrSupplies> postAddObject(@RequestBody ProvideServicesOrSupplies provideServicesOrSupplies, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
provideServicesOrSupplies.setEvaluationFormId(IdWorker.get32UUID().toUpperCase());
|
||||
if (provideServicesOrSuppliesService.save(provideServicesOrSupplies)) {
|
||||
return R.ok(provideServicesOrSupplies, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(provideServicesOrSupplies, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改提供服务或供应品
|
||||
* @param provideServicesOrSupplies 提供服务或供应品
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改提供服务或供应品", notes = "修改提供服务或供应品")
|
||||
@SysLog("修改提供服务或供应品" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_edit')" )
|
||||
public R<ProvideServicesOrSupplies> putUpdateById(@RequestBody ProvideServicesOrSupplies provideServicesOrSupplies, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (provideServicesOrSuppliesService.updateById(provideServicesOrSupplies)) {
|
||||
return R.ok(provideServicesOrSupplies, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(provideServicesOrSupplies, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除提供服务或供应品
|
||||
* @param provideServicesOrSuppliesid id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除提供服务或供应品", notes = "通过id删除提供服务或供应品")
|
||||
@SysLog("通过id删除提供服务或供应品" )
|
||||
@DeleteMapping("/{provideServicesOrSuppliesid}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_provide_services_or_supplies_del')" )
|
||||
public R<ProvideServicesOrSupplies> deleteById(@PathVariable String provideServicesOrSuppliesid, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ProvideServicesOrSupplies oldProvideServicesOrSupplies = provideServicesOrSuppliesService.getById(provideServicesOrSuppliesid);
|
||||
|
||||
if (provideServicesOrSuppliesService.removeById(provideServicesOrSuppliesid)) {
|
||||
return R.ok(oldProvideServicesOrSupplies, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldProvideServicesOrSupplies, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
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 com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
|
||||
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.dto.PurchaseCatalogueDto;
|
||||
import digital.laboratory.platform.reagent.entity.CatalogueDetails;
|
||||
import digital.laboratory.platform.reagent.entity.PurchaseCatalogue;
|
||||
import digital.laboratory.platform.reagent.service.CatalogueDetailsService;
|
||||
import digital.laboratory.platform.reagent.service.PurchaseCatalogueService;
|
||||
import digital.laboratory.platform.reagent.vo.PurchaseCatalogueVo;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (采购目录)
|
||||
*
|
||||
* @author Zhang Xiaolong created at 2023-03-10
|
||||
* @describe (采购目录) 前端控制器
|
||||
* <p>
|
||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中
|
||||
* 这里写什么:
|
||||
* 为前端提供数据, 接受前端的数据
|
||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理
|
||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的
|
||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/purchase_catalogue")
|
||||
@Api(value = "purchase_catalogue", tags = "采购目录管理")
|
||||
public class PurchaseCatalogueController {
|
||||
|
||||
@Autowired
|
||||
private final PurchaseCatalogueService purchaseCatalogueService;
|
||||
@Autowired
|
||||
private final CatalogueDetailsService catalogueDetailsService;
|
||||
|
||||
/**
|
||||
* 通过id查询(采购目录)
|
||||
*
|
||||
* @param purchaseCatalogueId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{purchaseCatalogueId}")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_get')")
|
||||
public R<PurchaseCatalogue> getById(@PathVariable("purchaseCatalogueId") String purchaseCatalogueId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PurchaseCatalogueVo catalogueVo = purchaseCatalogueService.getCatalogue(purchaseCatalogueId);
|
||||
|
||||
return R.ok(catalogueVo);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param purchaseCatalogue (采购目录)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_get')")
|
||||
public R<IPage<PurchaseCatalogue>> getPurchaseCataloguePage(Page<PurchaseCatalogue> page, PurchaseCatalogue purchaseCatalogue, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<PurchaseCatalogue> purchaseCatalogueSList = purchaseCatalogueService.page(page, Wrappers.<PurchaseCatalogue>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(purchaseCatalogueSList);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(采购目录)
|
||||
*
|
||||
* @param purchaseCatalogueDtoList (采购目录)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(采购目录)", notes = "新增(采购目录)")
|
||||
@SysLog("新增(采购目录)")
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_add')")
|
||||
public R<PurchaseCatalogue> postAddObject(@RequestBody List<PurchaseCatalogueDto> purchaseCatalogueDtoList, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PurchaseCatalogue purchaseCatalogue = new PurchaseCatalogue();
|
||||
|
||||
List<CatalogueDetails> catalogueDetailsList = purchaseCatalogueService.addCatalogue(dlpUser, purchaseCatalogueDtoList, purchaseCatalogue);
|
||||
|
||||
if (purchaseCatalogueService.save(purchaseCatalogue) & catalogueDetailsService.saveBatch(catalogueDetailsList)) {
|
||||
|
||||
return R.ok(purchaseCatalogue, "保存成功");
|
||||
} else {
|
||||
return R.failed(purchaseCatalogue, "保存失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(采购目录)
|
||||
*
|
||||
* @param purchaseCatalogueDto (采购目录)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改采购目录明细", notes = "修改采购目录明细")
|
||||
@SysLog("修改明细采购目录明细")
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_edit')")
|
||||
public R<CatalogueDetails> putUpdateById(@RequestBody PurchaseCatalogueDto purchaseCatalogueDto, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
CatalogueDetails catalogueDetails = purchaseCatalogueService.editCatalogue(purchaseCatalogueDto);
|
||||
|
||||
if (catalogueDetailsService.updateById(catalogueDetails)) {
|
||||
return R.ok(catalogueDetails, "修改成功");
|
||||
} else {
|
||||
return R.failed(catalogueDetails, "修改失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(采购目录)
|
||||
*
|
||||
* @param purchaseCatalogueId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除采购目录", notes = "通过id删除采购目录")
|
||||
@SysLog("通过id删除采购目录")
|
||||
@DeleteMapping("/{purchaseCatalogueId}")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_del')")
|
||||
public R<PurchaseCatalogue> deleteById(@PathVariable String purchaseCatalogueId, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (purchaseCatalogueService.getById(purchaseCatalogueId)!=null){
|
||||
|
||||
}else {
|
||||
return R.failed("未能查到当前id数据,请重新输入");
|
||||
}
|
||||
PurchaseCatalogue oldPurchaseCatalogue = purchaseCatalogueService.getById(purchaseCatalogueId);
|
||||
|
||||
List<CatalogueDetails> list = purchaseCatalogueService.delCatalogue(purchaseCatalogueId);
|
||||
|
||||
if (purchaseCatalogueService.removeById(purchaseCatalogueId)&catalogueDetailsService.removeBatchByIds(list)) {
|
||||
|
||||
return R.ok(oldPurchaseCatalogue, "目录删除成功");
|
||||
} else {
|
||||
return R.failed(oldPurchaseCatalogue, "目录删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.PurchaseList;
|
||||
import digital.laboratory.platform.reagent.service.PurchaseListService;
|
||||
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("/purchase_list" )
|
||||
@Api(value = "purchase_list", tags = "(采购清单)管理")
|
||||
public class PurchaseListController {
|
||||
|
||||
private final PurchaseListService purchaseListService;
|
||||
|
||||
/**
|
||||
* 通过id查询(采购清单)
|
||||
* @param purchaseListId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{purchaseListId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_list_get')" )
|
||||
public R<PurchaseList> getById(@PathVariable("purchaseListId" ) String purchaseListId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PurchaseList purchaseList = purchaseListService.getById(purchaseListId);
|
||||
return R.ok(purchaseList);
|
||||
//return R.ok(purchaseListService.getById(purchaseListId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param purchaseList (采购清单)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_list_get')" )
|
||||
public R<IPage<PurchaseList>> getPurchaseListPage(Page<PurchaseList> page, PurchaseList purchaseList, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<PurchaseList> purchaseListSList = purchaseListService.page(page, Wrappers.<PurchaseList>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(purchaseListSList);
|
||||
// return R.ok(purchaseListService.page(page, Wrappers.query(purchaseList)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(采购清单)
|
||||
* @param purchaseList (采购清单)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(采购清单)", notes = "新增(采购清单)")
|
||||
@SysLog("新增(采购清单)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_list_add')" )
|
||||
public R<PurchaseList> postAddObject(@RequestBody PurchaseList purchaseList, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
purchaseList.setPurchaseListId(IdWorker.get32UUID().toUpperCase());
|
||||
if (purchaseListService.save(purchaseList)) {
|
||||
return R.ok(purchaseList, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(purchaseList, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(采购清单)
|
||||
* @param purchaseList (采购清单)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(采购清单)", notes = "修改(采购清单)")
|
||||
@SysLog("修改(采购清单)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_list_edit')" )
|
||||
public R<PurchaseList> putUpdateById(@RequestBody PurchaseList purchaseList, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (purchaseListService.updateById(purchaseList)) {
|
||||
return R.ok(purchaseList, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(purchaseList, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(采购清单)
|
||||
* @param purchaseListId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(采购清单)", notes = "通过id删除(采购清单)")
|
||||
@SysLog("通过id删除(采购清单)" )
|
||||
@DeleteMapping("/{purchaseListId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_list_del')" )
|
||||
public R<PurchaseList> deleteById(@PathVariable String purchaseListId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PurchaseList oldPurchaseList = purchaseListService.getById(purchaseListId);
|
||||
|
||||
if (purchaseListService.removeById(purchaseListId)) {
|
||||
return R.ok(oldPurchaseList, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldPurchaseList, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.PurchaselistDetails;
|
||||
import digital.laboratory.platform.reagent.service.PurchaselistDetailsService;
|
||||
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("/purchaselist_details" )
|
||||
@Api(value = "purchaselist_details", tags = "(采购清单明细)管理")
|
||||
public class PurchaselistDetailsController {
|
||||
|
||||
private final PurchaselistDetailsService purchaselistDetailsService;
|
||||
|
||||
/**
|
||||
* 通过id查询(采购清单明细)
|
||||
* @param purchaselistDetailsId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{purchaselistDetailsId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchaselist_details_get')" )
|
||||
public R<PurchaselistDetails> getById(@PathVariable("purchaselistDetailsId" ) String purchaselistDetailsId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PurchaselistDetails purchaselistDetails = purchaselistDetailsService.getById(purchaselistDetailsId);
|
||||
return R.ok(purchaselistDetails);
|
||||
//return R.ok(purchaselistDetailsService.getById(purchaselistDetailsId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param purchaselistDetails (采购清单明细)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchaselist_details_get')" )
|
||||
public R<IPage<PurchaselistDetails>> getPurchaselistDetailsPage(Page<PurchaselistDetails> page, PurchaselistDetails purchaselistDetails, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<PurchaselistDetails> purchaselistDetailsSList = purchaselistDetailsService.page(page, Wrappers.<PurchaselistDetails>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(purchaselistDetailsSList);
|
||||
// return R.ok(purchaselistDetailsService.page(page, Wrappers.query(purchaselistDetails)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(采购清单明细)
|
||||
* @param purchaselistDetails (采购清单明细)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(采购清单明细)", notes = "新增(采购清单明细)")
|
||||
@SysLog("新增(采购清单明细)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchaselist_details_add')" )
|
||||
public R<PurchaselistDetails> postAddObject(@RequestBody PurchaselistDetails purchaselistDetails, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
purchaselistDetails.setPurchaselistDetailsId(IdWorker.get32UUID().toUpperCase());
|
||||
if (purchaselistDetailsService.save(purchaselistDetails)) {
|
||||
return R.ok(purchaselistDetails, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(purchaselistDetails, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(采购清单明细)
|
||||
* @param purchaselistDetails (采购清单明细)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(采购清单明细)", notes = "修改(采购清单明细)")
|
||||
@SysLog("修改(采购清单明细)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchaselist_details_edit')" )
|
||||
public R<PurchaselistDetails> putUpdateById(@RequestBody PurchaselistDetails purchaselistDetails, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (purchaselistDetailsService.updateById(purchaselistDetails)) {
|
||||
return R.ok(purchaselistDetails, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(purchaselistDetails, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(采购清单明细)
|
||||
* @param purchaselistDetailsId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(采购清单明细)", notes = "通过id删除(采购清单明细)")
|
||||
@SysLog("通过id删除(采购清单明细)" )
|
||||
@DeleteMapping("/{purchaselistDetailsId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchaselist_details_del')" )
|
||||
public R<PurchaselistDetails> deleteById(@PathVariable String purchaselistDetailsId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PurchaselistDetails oldPurchaselistDetails = purchaselistDetailsService.getById(purchaselistDetailsId);
|
||||
|
||||
if (purchaselistDetailsService.removeById(purchaselistDetailsId)) {
|
||||
return R.ok(oldPurchaselistDetails, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldPurchaselistDetails, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.PurchasingPlan;
|
||||
import digital.laboratory.platform.reagent.service.PurchasingPlanService;
|
||||
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("/purchasing_plan" )
|
||||
@Api(value = "purchasing_plan", tags = "(采购计划)管理")
|
||||
public class PurchasingPlanController {
|
||||
|
||||
private final PurchasingPlanService purchasingPlanService;
|
||||
|
||||
/**
|
||||
* 通过id查询(采购计划)
|
||||
* @param purchasingPlanId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{purchasingPlanId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_get')" )
|
||||
public R<PurchasingPlan> getById(@PathVariable("purchasingPlanId" ) String purchasingPlanId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PurchasingPlan purchasingPlan = purchasingPlanService.getById(purchasingPlanId);
|
||||
return R.ok(purchasingPlan);
|
||||
//return R.ok(purchasingPlanService.getById(purchasingPlanId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param purchasingPlan (采购计划)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_get')" )
|
||||
public R<IPage<PurchasingPlan>> getPurchasingPlanPage(Page<PurchasingPlan> page, PurchasingPlan purchasingPlan, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<PurchasingPlan> purchasingPlanSList = purchasingPlanService.page(page, Wrappers.<PurchasingPlan>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(purchasingPlanSList);
|
||||
// return R.ok(purchasingPlanService.page(page, Wrappers.query(purchasingPlan)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(采购计划)
|
||||
* @param purchasingPlan (采购计划)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(采购计划)", notes = "新增(采购计划)")
|
||||
@SysLog("新增(采购计划)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_add')" )
|
||||
public R<PurchasingPlan> postAddObject(@RequestBody PurchasingPlan purchasingPlan, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
purchasingPlan.setPurchasingPlanId(IdWorker.get32UUID().toUpperCase());
|
||||
if (purchasingPlanService.save(purchasingPlan)) {
|
||||
return R.ok(purchasingPlan, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(purchasingPlan, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(采购计划)
|
||||
* @param purchasingPlan (采购计划)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(采购计划)", notes = "修改(采购计划)")
|
||||
@SysLog("修改(采购计划)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_edit')" )
|
||||
public R<PurchasingPlan> putUpdateById(@RequestBody PurchasingPlan purchasingPlan, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (purchasingPlanService.updateById(purchasingPlan)) {
|
||||
return R.ok(purchasingPlan, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(purchasingPlan, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(采购计划)
|
||||
* @param purchasingPlanId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(采购计划)", notes = "通过id删除(采购计划)")
|
||||
@SysLog("通过id删除(采购计划)" )
|
||||
@DeleteMapping("/{purchasingPlanId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_del')" )
|
||||
public R<PurchasingPlan> deleteById(@PathVariable String purchasingPlanId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
PurchasingPlan oldPurchasingPlan = purchasingPlanService.getById(purchasingPlanId);
|
||||
|
||||
if (purchasingPlanService.removeById(purchasingPlanId)) {
|
||||
return R.ok(oldPurchasingPlan, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldPurchasingPlan, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.ReagentConsumableInventory;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService;
|
||||
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("/reagent_consumable_inventory" )
|
||||
@Api(value = "reagent_consumable_inventory", tags = "试剂耗材库存管理")
|
||||
public class ReagentConsumableInventoryController {
|
||||
|
||||
private final ReagentConsumableInventoryService reagentConsumableInventoryService;
|
||||
|
||||
/**
|
||||
* 通过id查询试剂耗材库存
|
||||
* @param reagentConsumableInventoryId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{reagentConsumableInventoryId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
public R<ReagentConsumableInventory> getById(@PathVariable("reagentConsumableInventoryId" ) String reagentConsumableInventoryId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ReagentConsumableInventory reagentConsumableInventory = reagentConsumableInventoryService.getById(reagentConsumableInventoryId);
|
||||
return R.ok(reagentConsumableInventory);
|
||||
//return R.ok(reagentConsumableInventoryService.getById(reagentConsumableInventoryId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param reagentConsumableInventory 试剂耗材库存
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_get')" )
|
||||
public R<IPage<ReagentConsumableInventory>> getReagentConsumableInventoryPage(Page<ReagentConsumableInventory> page, ReagentConsumableInventory reagentConsumableInventory, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<ReagentConsumableInventory> reagentConsumableInventorySList = reagentConsumableInventoryService.page(page, Wrappers.<ReagentConsumableInventory>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(reagentConsumableInventorySList);
|
||||
// return R.ok(reagentConsumableInventoryService.page(page, Wrappers.query(reagentConsumableInventory)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增试剂耗材库存
|
||||
* @param reagentConsumableInventory 试剂耗材库存
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增试剂耗材库存", notes = "新增试剂耗材库存")
|
||||
@SysLog("新增试剂耗材库存" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_add')" )
|
||||
public R<ReagentConsumableInventory> postAddObject(@RequestBody ReagentConsumableInventory reagentConsumableInventory, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
reagentConsumableInventory.setReagentConsumableInventoryId(IdWorker.get32UUID().toUpperCase());
|
||||
if (reagentConsumableInventoryService.save(reagentConsumableInventory)) {
|
||||
return R.ok(reagentConsumableInventory, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(reagentConsumableInventory, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改试剂耗材库存
|
||||
* @param reagentConsumableInventory 试剂耗材库存
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改试剂耗材库存", notes = "修改试剂耗材库存")
|
||||
@SysLog("修改试剂耗材库存" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_edit')" )
|
||||
public R<ReagentConsumableInventory> putUpdateById(@RequestBody ReagentConsumableInventory reagentConsumableInventory, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (reagentConsumableInventoryService.updateById(reagentConsumableInventory)) {
|
||||
return R.ok(reagentConsumableInventory, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(reagentConsumableInventory, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除试剂耗材库存
|
||||
* @param reagentConsumableInventoryId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除试剂耗材库存", notes = "通过id删除试剂耗材库存")
|
||||
@SysLog("通过id删除试剂耗材库存" )
|
||||
@DeleteMapping("/{reagentConsumableInventoryId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumable_inventory_del')" )
|
||||
public R<ReagentConsumableInventory> deleteById(@PathVariable String reagentConsumableInventoryId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ReagentConsumableInventory oldReagentConsumableInventory = reagentConsumableInventoryService.getById(reagentConsumableInventoryId);
|
||||
|
||||
if (reagentConsumableInventoryService.removeById(reagentConsumableInventoryId)) {
|
||||
return R.ok(oldReagentConsumableInventory, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldReagentConsumableInventory, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.ReagentConsumables;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
|
||||
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("/reagent_consumables" )
|
||||
@Api(value = "reagent_consumables", tags = "(试剂耗材类)管理")
|
||||
public class ReagentConsumablesController {
|
||||
|
||||
private final ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
/**
|
||||
* 通过id查询(试剂耗材类)
|
||||
* @param reagentConsumablesId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{reagentConsumablesId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_get')" )
|
||||
public R<ReagentConsumables> getById(@PathVariable("reagentConsumablesId" ) String reagentConsumablesId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.getById(reagentConsumablesId);
|
||||
return R.ok(reagentConsumables);
|
||||
//return R.ok(reagentConsumablesService.getById(reagentConsumablesId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param reagentConsumables (试剂耗材类)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_get')" )
|
||||
public R<IPage<ReagentConsumables>> getReagentConsumablesPage(Page<ReagentConsumables> page, ReagentConsumables reagentConsumables, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<ReagentConsumables> reagentConsumablesSList = reagentConsumablesService.page(page, Wrappers.<ReagentConsumables>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(reagentConsumablesSList);
|
||||
// return R.ok(reagentConsumablesService.page(page, Wrappers.query(reagentConsumables)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(试剂耗材类)
|
||||
* @param reagentConsumables (试剂耗材类)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(试剂耗材类)", notes = "新增(试剂耗材类)")
|
||||
@SysLog("新增(试剂耗材类)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_add')" )
|
||||
public R<ReagentConsumables> postAddObject(@RequestBody ReagentConsumables reagentConsumables, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
reagentConsumables.setReagentConsumablesId(IdWorker.get32UUID().toUpperCase());
|
||||
if (reagentConsumablesService.save(reagentConsumables)) {
|
||||
return R.ok(reagentConsumables, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(reagentConsumables, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(试剂耗材类)
|
||||
* @param reagentConsumables (试剂耗材类)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(试剂耗材类)", notes = "修改(试剂耗材类)")
|
||||
@SysLog("修改(试剂耗材类)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_edit')" )
|
||||
public R<ReagentConsumables> putUpdateById(@RequestBody ReagentConsumables reagentConsumables, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (reagentConsumablesService.updateById(reagentConsumables)) {
|
||||
return R.ok(reagentConsumables, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(reagentConsumables, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(试剂耗材类)
|
||||
* @param reagentConsumablesId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(试剂耗材类)", notes = "通过id删除(试剂耗材类)")
|
||||
@SysLog("通过id删除(试剂耗材类)" )
|
||||
@DeleteMapping("/{reagentConsumablesId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_del')" )
|
||||
public R<ReagentConsumables> deleteById(@PathVariable String reagentConsumablesId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ReagentConsumables oldReagentConsumables = reagentConsumablesService.getById(reagentConsumablesId);
|
||||
|
||||
if (reagentConsumablesService.removeById(reagentConsumablesId)) {
|
||||
return R.ok(oldReagentConsumables, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldReagentConsumables, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.ReagentConsumablesSet;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesSetService;
|
||||
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("/reagent_consumables_set" )
|
||||
@Api(value = "reagent_consumables_set", tags = "(试剂耗材集合)管理")
|
||||
public class ReagentConsumablesSetController {
|
||||
|
||||
private final ReagentConsumablesSetService reagentConsumablesSetService;
|
||||
|
||||
/**
|
||||
* 通过id查询(试剂耗材集合)
|
||||
* @param reagentConsumablesSetid id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{reagentConsumablesSetid}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_set_get')" )
|
||||
public R<ReagentConsumablesSet> getById(@PathVariable("reagentConsumablesSetid" ) String reagentConsumablesSetid, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ReagentConsumablesSet reagentConsumablesSet = reagentConsumablesSetService.getById(reagentConsumablesSetid);
|
||||
return R.ok(reagentConsumablesSet);
|
||||
//return R.ok(reagentConsumablesSetService.getById(reagentConsumablesSetid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param reagentConsumablesSet (试剂耗材集合)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_set_get')" )
|
||||
public R<IPage<ReagentConsumablesSet>> getReagentConsumablesSetPage(Page<ReagentConsumablesSet> page, ReagentConsumablesSet reagentConsumablesSet, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<ReagentConsumablesSet> reagentConsumablesSetSList = reagentConsumablesSetService.page(page, Wrappers.<ReagentConsumablesSet>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(reagentConsumablesSetSList);
|
||||
// return R.ok(reagentConsumablesSetService.page(page, Wrappers.query(reagentConsumablesSet)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(试剂耗材集合)
|
||||
* @param reagentConsumablesSet (试剂耗材集合)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(试剂耗材集合)", notes = "新增(试剂耗材集合)")
|
||||
@SysLog("新增(试剂耗材集合)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_set_add')" )
|
||||
public R<ReagentConsumablesSet> postAddObject(@RequestBody ReagentConsumablesSet reagentConsumablesSet, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
reagentConsumablesSet.setReagentConsumableId(IdWorker.get32UUID().toUpperCase());
|
||||
if (reagentConsumablesSetService.save(reagentConsumablesSet)) {
|
||||
return R.ok(reagentConsumablesSet, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(reagentConsumablesSet, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(试剂耗材集合)
|
||||
* @param reagentConsumablesSet (试剂耗材集合)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(试剂耗材集合)", notes = "修改(试剂耗材集合)")
|
||||
@SysLog("修改(试剂耗材集合)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_set_edit')" )
|
||||
public R<ReagentConsumablesSet> putUpdateById(@RequestBody ReagentConsumablesSet reagentConsumablesSet, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (reagentConsumablesSetService.updateById(reagentConsumablesSet)) {
|
||||
return R.ok(reagentConsumablesSet, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(reagentConsumablesSet, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(试剂耗材集合)
|
||||
* @param reagentConsumablesSetid id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(试剂耗材集合)", notes = "通过id删除(试剂耗材集合)")
|
||||
@SysLog("通过id删除(试剂耗材集合)" )
|
||||
@DeleteMapping("/{reagentConsumablesSetid}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_reagent_consumables_set_del')" )
|
||||
public R<ReagentConsumablesSet> deleteById(@PathVariable String reagentConsumablesSetid, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ReagentConsumablesSet oldReagentConsumablesSet = reagentConsumablesSetService.getById(reagentConsumablesSetid);
|
||||
|
||||
if (reagentConsumablesSetService.removeById(reagentConsumablesSetid)) {
|
||||
return R.ok(oldReagentConsumablesSet, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldReagentConsumablesSet, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.RequisitionRecord;
|
||||
import digital.laboratory.platform.reagent.service.RequisitionRecordService;
|
||||
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("/requisition_record" )
|
||||
@Api(value = "requisition_record", tags = "(试剂耗材领用记录表)管理")
|
||||
public class RequisitionRecordController {
|
||||
|
||||
private final RequisitionRecordService requisitionRecordService;
|
||||
|
||||
/**
|
||||
* 通过id查询(试剂耗材领用记录表)
|
||||
* @param requisitionRecordId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{requisitionRecordId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_requisition_record_get')" )
|
||||
public R<RequisitionRecord> getById(@PathVariable("requisitionRecordId" ) String requisitionRecordId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
RequisitionRecord requisitionRecord = requisitionRecordService.getById(requisitionRecordId);
|
||||
return R.ok(requisitionRecord);
|
||||
//return R.ok(requisitionRecordService.getById(requisitionRecordId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param requisitionRecord (试剂耗材领用记录表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_requisition_record_get')" )
|
||||
public R<IPage<RequisitionRecord>> getRequisitionRecordPage(Page<RequisitionRecord> page, RequisitionRecord requisitionRecord, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<RequisitionRecord> requisitionRecordSList = requisitionRecordService.page(page, Wrappers.<RequisitionRecord>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(requisitionRecordSList);
|
||||
// return R.ok(requisitionRecordService.page(page, Wrappers.query(requisitionRecord)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(试剂耗材领用记录表)
|
||||
* @param requisitionRecord (试剂耗材领用记录表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(试剂耗材领用记录表)", notes = "新增(试剂耗材领用记录表)")
|
||||
@SysLog("新增(试剂耗材领用记录表)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_requisition_record_add')" )
|
||||
public R<RequisitionRecord> postAddObject(@RequestBody RequisitionRecord requisitionRecord, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
requisitionRecord.setRequisitionRecordId(IdWorker.get32UUID().toUpperCase());
|
||||
if (requisitionRecordService.save(requisitionRecord)) {
|
||||
return R.ok(requisitionRecord, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(requisitionRecord, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(试剂耗材领用记录表)
|
||||
* @param requisitionRecord (试剂耗材领用记录表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(试剂耗材领用记录表)", notes = "修改(试剂耗材领用记录表)")
|
||||
@SysLog("修改(试剂耗材领用记录表)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_requisition_record_edit')" )
|
||||
public R<RequisitionRecord> putUpdateById(@RequestBody RequisitionRecord requisitionRecord, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (requisitionRecordService.updateById(requisitionRecord)) {
|
||||
return R.ok(requisitionRecord, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(requisitionRecord, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(试剂耗材领用记录表)
|
||||
* @param requisitionRecordId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(试剂耗材领用记录表)", notes = "通过id删除(试剂耗材领用记录表)")
|
||||
@SysLog("通过id删除(试剂耗材领用记录表)" )
|
||||
@DeleteMapping("/{requisitionRecordId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_requisition_record_del')" )
|
||||
public R<RequisitionRecord> deleteById(@PathVariable String requisitionRecordId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
RequisitionRecord oldRequisitionRecord = requisitionRecordService.getById(requisitionRecordId);
|
||||
|
||||
if (requisitionRecordService.removeById(requisitionRecordId)) {
|
||||
return R.ok(oldRequisitionRecord, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldRequisitionRecord, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.SignedBatchList;
|
||||
import digital.laboratory.platform.reagent.service.SignedBatchListService;
|
||||
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("/signed_batch_list" )
|
||||
@Api(value = "signed_batch_list", tags = "签收批次明细管理")
|
||||
public class SignedBatchListController {
|
||||
|
||||
private final SignedBatchListService signedBatchListService;
|
||||
|
||||
/**
|
||||
* 通过id查询签收批次明细
|
||||
* @param signedBatchListId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{signedBatchListId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_signed_batch_list_get')" )
|
||||
public R<SignedBatchList> getById(@PathVariable("signedBatchListId" ) String signedBatchListId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
SignedBatchList signedBatchList = signedBatchListService.getById(signedBatchListId);
|
||||
return R.ok(signedBatchList);
|
||||
//return R.ok(signedBatchListService.getById(signedBatchListId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param signedBatchList 签收批次明细
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_signed_batch_list_get')" )
|
||||
public R<IPage<SignedBatchList>> getSignedBatchListPage(Page<SignedBatchList> page, SignedBatchList signedBatchList, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<SignedBatchList> signedBatchListSList = signedBatchListService.page(page, Wrappers.<SignedBatchList>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(signedBatchListSList);
|
||||
// return R.ok(signedBatchListService.page(page, Wrappers.query(signedBatchList)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增签收批次明细
|
||||
* @param signedBatchList 签收批次明细
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增签收批次明细", notes = "新增签收批次明细")
|
||||
@SysLog("新增签收批次明细" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_signed_batch_list_add')" )
|
||||
public R<SignedBatchList> postAddObject(@RequestBody SignedBatchList signedBatchList, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
signedBatchList.setSignedBatchListId(IdWorker.get32UUID().toUpperCase());
|
||||
if (signedBatchListService.save(signedBatchList)) {
|
||||
return R.ok(signedBatchList, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(signedBatchList, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改签收批次明细
|
||||
* @param signedBatchList 签收批次明细
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改签收批次明细", notes = "修改签收批次明细")
|
||||
@SysLog("修改签收批次明细" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_signed_batch_list_edit')" )
|
||||
public R<SignedBatchList> putUpdateById(@RequestBody SignedBatchList signedBatchList, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (signedBatchListService.updateById(signedBatchList)) {
|
||||
return R.ok(signedBatchList, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(signedBatchList, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除签收批次明细
|
||||
* @param signedBatchListId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除签收批次明细", notes = "通过id删除签收批次明细")
|
||||
@SysLog("通过id删除签收批次明细" )
|
||||
@DeleteMapping("/{signedBatchListId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_signed_batch_list_del')" )
|
||||
public R<SignedBatchList> deleteById(@PathVariable String signedBatchListId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
SignedBatchList oldSignedBatchList = signedBatchListService.getById(signedBatchListId);
|
||||
|
||||
if (signedBatchListService.removeById(signedBatchListId)) {
|
||||
return R.ok(oldSignedBatchList, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldSignedBatchList, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.SigningRecordForm;
|
||||
import digital.laboratory.platform.reagent.service.SigningRecordFormService;
|
||||
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("/signing_record_form" )
|
||||
@Api(value = "signing_record_form", tags = "签收记录表管理")
|
||||
public class SigningRecordFormController {
|
||||
|
||||
private final SigningRecordFormService signingRecordFormService;
|
||||
|
||||
/**
|
||||
* 通过id查询签收记录表
|
||||
* @param signingRecordFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{signingRecordFormId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_signing_record_form_get')" )
|
||||
public R<SigningRecordForm> getById(@PathVariable("signingRecordFormId" ) String signingRecordFormId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
SigningRecordForm signingRecordForm = signingRecordFormService.getById(signingRecordFormId);
|
||||
return R.ok(signingRecordForm);
|
||||
//return R.ok(signingRecordFormService.getById(signingRecordFormId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param signingRecordForm 签收记录表
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_signing_record_form_get')" )
|
||||
public R<IPage<SigningRecordForm>> getSigningRecordFormPage(Page<SigningRecordForm> page, SigningRecordForm signingRecordForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<SigningRecordForm> signingRecordFormSList = signingRecordFormService.page(page, Wrappers.<SigningRecordForm>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(signingRecordFormSList);
|
||||
// return R.ok(signingRecordFormService.page(page, Wrappers.query(signingRecordForm)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增签收记录表
|
||||
* @param signingRecordForm 签收记录表
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增签收记录表", notes = "新增签收记录表")
|
||||
@SysLog("新增签收记录表" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_signing_record_form_add')" )
|
||||
public R<SigningRecordForm> postAddObject(@RequestBody SigningRecordForm signingRecordForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
signingRecordForm.setSigningRecordFormId(IdWorker.get32UUID().toUpperCase());
|
||||
if (signingRecordFormService.save(signingRecordForm)) {
|
||||
return R.ok(signingRecordForm, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(signingRecordForm, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改签收记录表
|
||||
* @param signingRecordForm 签收记录表
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改签收记录表", notes = "修改签收记录表")
|
||||
@SysLog("修改签收记录表" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_signing_record_form_edit')" )
|
||||
public R<SigningRecordForm> putUpdateById(@RequestBody SigningRecordForm signingRecordForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (signingRecordFormService.updateById(signingRecordForm)) {
|
||||
return R.ok(signingRecordForm, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(signingRecordForm, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除签收记录表
|
||||
* @param signingRecordFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除签收记录表", notes = "通过id删除签收记录表")
|
||||
@SysLog("通过id删除签收记录表" )
|
||||
@DeleteMapping("/{signingRecordFormId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_signing_record_form_del')" )
|
||||
public R<SigningRecordForm> deleteById(@PathVariable String signingRecordFormId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
SigningRecordForm oldSigningRecordForm = signingRecordFormService.getById(signingRecordFormId);
|
||||
|
||||
if (signingRecordFormService.removeById(signingRecordFormId)) {
|
||||
return R.ok(oldSigningRecordForm, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldSigningRecordForm, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.StandardMaterialApplication;
|
||||
import digital.laboratory.platform.reagent.service.StandardMaterialApplicationService;
|
||||
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("/standard_material_application" )
|
||||
@Api(value = "standard_material_application", tags = "(标准物质领用/归还登记表)管理")
|
||||
public class StandardMaterialApplicationController {
|
||||
|
||||
private final StandardMaterialApplicationService standardMaterialApplicationService;
|
||||
|
||||
/**
|
||||
* 通过id查询(标准物质领用/归还登记表)
|
||||
* @param standardMaterialApplicationId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{standardMaterialApplicationId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_application_get')" )
|
||||
public R<StandardMaterialApplication> getById(@PathVariable("standardMaterialApplicationId" ) String standardMaterialApplicationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
StandardMaterialApplication standardMaterialApplication = standardMaterialApplicationService.getById(standardMaterialApplicationId);
|
||||
return R.ok(standardMaterialApplication);
|
||||
//return R.ok(standardMaterialApplicationService.getById(standardMaterialApplicationId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param standardMaterialApplication (标准物质领用/归还登记表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_application_get')" )
|
||||
public R<IPage<StandardMaterialApplication>> getStandardMaterialApplicationPage(Page<StandardMaterialApplication> page, StandardMaterialApplication standardMaterialApplication, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<StandardMaterialApplication> standardMaterialApplicationSList = standardMaterialApplicationService.page(page, Wrappers.<StandardMaterialApplication>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(standardMaterialApplicationSList);
|
||||
// return R.ok(standardMaterialApplicationService.page(page, Wrappers.query(standardMaterialApplication)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(标准物质领用/归还登记表)
|
||||
* @param standardMaterialApplication (标准物质领用/归还登记表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(标准物质领用/归还登记表)", notes = "新增(标准物质领用/归还登记表)")
|
||||
@SysLog("新增(标准物质领用/归还登记表)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_application_add')" )
|
||||
public R<StandardMaterialApplication> postAddObject(@RequestBody StandardMaterialApplication standardMaterialApplication, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
standardMaterialApplication.setStandardMaterialApplicationId(IdWorker.get32UUID().toUpperCase());
|
||||
if (standardMaterialApplicationService.save(standardMaterialApplication)) {
|
||||
return R.ok(standardMaterialApplication, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(standardMaterialApplication, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(标准物质领用/归还登记表)
|
||||
* @param standardMaterialApplication (标准物质领用/归还登记表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(标准物质领用/归还登记表)", notes = "修改(标准物质领用/归还登记表)")
|
||||
@SysLog("修改(标准物质领用/归还登记表)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_application_edit')" )
|
||||
public R<StandardMaterialApplication> putUpdateById(@RequestBody StandardMaterialApplication standardMaterialApplication, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (standardMaterialApplicationService.updateById(standardMaterialApplication)) {
|
||||
return R.ok(standardMaterialApplication, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(standardMaterialApplication, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(标准物质领用/归还登记表)
|
||||
* @param standardMaterialApplicationId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(标准物质领用/归还登记表)", notes = "通过id删除(标准物质领用/归还登记表)")
|
||||
@SysLog("通过id删除(标准物质领用/归还登记表)" )
|
||||
@DeleteMapping("/{standardMaterialApplicationId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_application_del')" )
|
||||
public R<StandardMaterialApplication> deleteById(@PathVariable String standardMaterialApplicationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
StandardMaterialApplication oldStandardMaterialApplication = standardMaterialApplicationService.getById(standardMaterialApplicationId);
|
||||
|
||||
if (standardMaterialApplicationService.removeById(standardMaterialApplicationId)) {
|
||||
return R.ok(oldStandardMaterialApplication, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldStandardMaterialApplication, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.StandardMaterialApprovalForm;
|
||||
import digital.laboratory.platform.reagent.service.StandardMaterialApprovalFormService;
|
||||
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("/standard_material_approval_form" )
|
||||
@Api(value = "standard_material_approval_form", tags = "(标准物质停用/报废销毁/恢复/降级使用审批表)管理")
|
||||
public class StandardMaterialApprovalFormController {
|
||||
|
||||
private final StandardMaterialApprovalFormService standardMaterialApprovalFormService;
|
||||
|
||||
/**
|
||||
* 通过id查询(标准物质停用/报废销毁/恢复/降级使用审批表)
|
||||
* @param standardMaterialApprovalFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{standardMaterialApprovalFormId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')" )
|
||||
public R<StandardMaterialApprovalForm> getById(@PathVariable("standardMaterialApprovalFormId" ) String standardMaterialApprovalFormId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
StandardMaterialApprovalForm standardMaterialApprovalForm = standardMaterialApprovalFormService.getById(standardMaterialApprovalFormId);
|
||||
return R.ok(standardMaterialApprovalForm);
|
||||
//return R.ok(standardMaterialApprovalFormService.getById(standardMaterialApprovalFormId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param standardMaterialApprovalForm (标准物质停用/报废销毁/恢复/降级使用审批表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')" )
|
||||
public R<IPage<StandardMaterialApprovalForm>> getStandardMaterialApprovalFormPage(Page<StandardMaterialApprovalForm> page, StandardMaterialApprovalForm standardMaterialApprovalForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<StandardMaterialApprovalForm> standardMaterialApprovalFormSList = standardMaterialApprovalFormService.page(page, Wrappers.<StandardMaterialApprovalForm>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(standardMaterialApprovalFormSList);
|
||||
// return R.ok(standardMaterialApprovalFormService.page(page, Wrappers.query(standardMaterialApprovalForm)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(标准物质停用/报废销毁/恢复/降级使用审批表)
|
||||
* @param standardMaterialApprovalForm (标准物质停用/报废销毁/恢复/降级使用审批表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "新增(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
@SysLog("新增(标准物质停用/报废销毁/恢复/降级使用审批表)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_add')" )
|
||||
public R<StandardMaterialApprovalForm> postAddObject(@RequestBody StandardMaterialApprovalForm standardMaterialApprovalForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
standardMaterialApprovalForm.setStandardMaterialApprovalFormId(IdWorker.get32UUID().toUpperCase());
|
||||
if (standardMaterialApprovalFormService.save(standardMaterialApprovalForm)) {
|
||||
return R.ok(standardMaterialApprovalForm, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(standardMaterialApprovalForm, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(标准物质停用/报废销毁/恢复/降级使用审批表)
|
||||
* @param standardMaterialApprovalForm (标准物质停用/报废销毁/恢复/降级使用审批表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "修改(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
@SysLog("修改(标准物质停用/报废销毁/恢复/降级使用审批表)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_edit')" )
|
||||
public R<StandardMaterialApprovalForm> putUpdateById(@RequestBody StandardMaterialApprovalForm standardMaterialApprovalForm, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (standardMaterialApprovalFormService.updateById(standardMaterialApprovalForm)) {
|
||||
return R.ok(standardMaterialApprovalForm, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(standardMaterialApprovalForm, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(标准物质停用/报废销毁/恢复/降级使用审批表)
|
||||
* @param standardMaterialApprovalFormId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "通过id删除(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
@SysLog("通过id删除(标准物质停用/报废销毁/恢复/降级使用审批表)" )
|
||||
@DeleteMapping("/{standardMaterialApprovalFormId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_del')" )
|
||||
public R<StandardMaterialApprovalForm> deleteById(@PathVariable String standardMaterialApprovalFormId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
StandardMaterialApprovalForm oldStandardMaterialApprovalForm = standardMaterialApprovalFormService.getById(standardMaterialApprovalFormId);
|
||||
|
||||
if (standardMaterialApprovalFormService.removeById(standardMaterialApprovalFormId)) {
|
||||
return R.ok(oldStandardMaterialApprovalForm, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldStandardMaterialApprovalForm, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.StandardReserveSolution;
|
||||
import digital.laboratory.platform.reagent.service.StandardReserveSolutionService;
|
||||
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("/standard_reserve_solution" )
|
||||
@Api(value = "standard_reserve_solution", tags = "(标准储备溶液配制及使用记录表)管理")
|
||||
public class StandardReserveSolutionController {
|
||||
|
||||
private final StandardReserveSolutionService standardReserveSolutionService;
|
||||
|
||||
/**
|
||||
* 通过id查询(标准储备溶液配制及使用记录表)
|
||||
* @param standardReserveSolutionId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{standardReserveSolutionId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
|
||||
public R<StandardReserveSolution> getById(@PathVariable("standardReserveSolutionId" ) String standardReserveSolutionId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
StandardReserveSolution standardReserveSolution = standardReserveSolutionService.getById(standardReserveSolutionId);
|
||||
return R.ok(standardReserveSolution);
|
||||
//return R.ok(standardReserveSolutionService.getById(standardReserveSolutionId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param standardReserveSolution (标准储备溶液配制及使用记录表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_get')" )
|
||||
public R<IPage<StandardReserveSolution>> getStandardReserveSolutionPage(Page<StandardReserveSolution> page, StandardReserveSolution standardReserveSolution, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<StandardReserveSolution> standardReserveSolutionSList = standardReserveSolutionService.page(page, Wrappers.<StandardReserveSolution>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(standardReserveSolutionSList);
|
||||
// return R.ok(standardReserveSolutionService.page(page, Wrappers.query(standardReserveSolution)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(标准储备溶液配制及使用记录表)
|
||||
* @param standardReserveSolution (标准储备溶液配制及使用记录表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(标准储备溶液配制及使用记录表)", notes = "新增(标准储备溶液配制及使用记录表)")
|
||||
@SysLog("新增(标准储备溶液配制及使用记录表)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_add')" )
|
||||
public R<StandardReserveSolution> postAddObject(@RequestBody StandardReserveSolution standardReserveSolution, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
standardReserveSolution.setStandardReserveSolutionId(IdWorker.get32UUID().toUpperCase());
|
||||
if (standardReserveSolutionService.save(standardReserveSolution)) {
|
||||
return R.ok(standardReserveSolution, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(standardReserveSolution, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(标准储备溶液配制及使用记录表)
|
||||
* @param standardReserveSolution (标准储备溶液配制及使用记录表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(标准储备溶液配制及使用记录表)", notes = "修改(标准储备溶液配制及使用记录表)")
|
||||
@SysLog("修改(标准储备溶液配制及使用记录表)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_edit')" )
|
||||
public R<StandardReserveSolution> putUpdateById(@RequestBody StandardReserveSolution standardReserveSolution, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (standardReserveSolutionService.updateById(standardReserveSolution)) {
|
||||
return R.ok(standardReserveSolution, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(standardReserveSolution, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(标准储备溶液配制及使用记录表)
|
||||
* @param standardReserveSolutionId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(标准储备溶液配制及使用记录表)", notes = "通过id删除(标准储备溶液配制及使用记录表)")
|
||||
@SysLog("通过id删除(标准储备溶液配制及使用记录表)" )
|
||||
@DeleteMapping("/{standardReserveSolutionId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_reserve_solution_del')" )
|
||||
public R<StandardReserveSolution> deleteById(@PathVariable String standardReserveSolutionId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
StandardReserveSolution oldStandardReserveSolution = standardReserveSolutionService.getById(standardReserveSolutionId);
|
||||
|
||||
if (standardReserveSolutionService.removeById(standardReserveSolutionId)) {
|
||||
return R.ok(oldStandardReserveSolution, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldStandardReserveSolution, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.StandardSolutionCurve;
|
||||
import digital.laboratory.platform.reagent.service.StandardSolutionCurveService;
|
||||
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("/standard_solution_curve" )
|
||||
@Api(value = "standard_solution_curve", tags = "(标准工作曲线溶液配置记录表)管理")
|
||||
public class StandardSolutionCurveController {
|
||||
|
||||
private final StandardSolutionCurveService standardSolutionCurveService;
|
||||
|
||||
/**
|
||||
* 通过id查询(标准工作曲线溶液配置记录表)
|
||||
* @param standardSolutionCurveId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{standardSolutionCurveId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_get')" )
|
||||
public R<StandardSolutionCurve> getById(@PathVariable("standardSolutionCurveId" ) String standardSolutionCurveId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
StandardSolutionCurve standardSolutionCurve = standardSolutionCurveService.getById(standardSolutionCurveId);
|
||||
return R.ok(standardSolutionCurve);
|
||||
//return R.ok(standardSolutionCurveService.getById(standardSolutionCurveId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param standardSolutionCurve (标准工作曲线溶液配置记录表)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_get')" )
|
||||
public R<IPage<StandardSolutionCurve>> getStandardSolutionCurvePage(Page<StandardSolutionCurve> page, StandardSolutionCurve standardSolutionCurve, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<StandardSolutionCurve> standardSolutionCurveSList = standardSolutionCurveService.page(page, Wrappers.<StandardSolutionCurve>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(standardSolutionCurveSList);
|
||||
// return R.ok(standardSolutionCurveService.page(page, Wrappers.query(standardSolutionCurve)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(标准工作曲线溶液配置记录表)
|
||||
* @param standardSolutionCurve (标准工作曲线溶液配置记录表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(标准工作曲线溶液配置记录表)", notes = "新增(标准工作曲线溶液配置记录表)")
|
||||
@SysLog("新增(标准工作曲线溶液配置记录表)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_add')" )
|
||||
public R<StandardSolutionCurve> postAddObject(@RequestBody StandardSolutionCurve standardSolutionCurve, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
standardSolutionCurve.setStandardSolutionCurveId(IdWorker.get32UUID().toUpperCase());
|
||||
if (standardSolutionCurveService.save(standardSolutionCurve)) {
|
||||
return R.ok(standardSolutionCurve, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(standardSolutionCurve, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(标准工作曲线溶液配置记录表)
|
||||
* @param standardSolutionCurve (标准工作曲线溶液配置记录表)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(标准工作曲线溶液配置记录表)", notes = "修改(标准工作曲线溶液配置记录表)")
|
||||
@SysLog("修改(标准工作曲线溶液配置记录表)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_edit')" )
|
||||
public R<StandardSolutionCurve> putUpdateById(@RequestBody StandardSolutionCurve standardSolutionCurve, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (standardSolutionCurveService.updateById(standardSolutionCurve)) {
|
||||
return R.ok(standardSolutionCurve, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(standardSolutionCurve, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(标准工作曲线溶液配置记录表)
|
||||
* @param standardSolutionCurveId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(标准工作曲线溶液配置记录表)", notes = "通过id删除(标准工作曲线溶液配置记录表)")
|
||||
@SysLog("通过id删除(标准工作曲线溶液配置记录表)" )
|
||||
@DeleteMapping("/{standardSolutionCurveId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_solution_curve_del')" )
|
||||
public R<StandardSolutionCurve> deleteById(@PathVariable String standardSolutionCurveId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
StandardSolutionCurve oldStandardSolutionCurve = standardSolutionCurveService.getById(standardSolutionCurveId);
|
||||
|
||||
if (standardSolutionCurveService.removeById(standardSolutionCurveId)) {
|
||||
return R.ok(oldStandardSolutionCurve, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldStandardSolutionCurve, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
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.SupplierInformation;
|
||||
import digital.laboratory.platform.reagent.service.SupplierInformationService;
|
||||
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("/supplier_information" )
|
||||
@Api(value = "supplier_information", tags = "(服务商/供应商信息)管理")
|
||||
public class SupplierInformationController {
|
||||
|
||||
private final SupplierInformationService supplierInformationService;
|
||||
|
||||
/**
|
||||
* 通过id查询(服务商/供应商信息)
|
||||
* @param supplierInformationId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping("/{supplierInformationId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
|
||||
public R<SupplierInformation> getById(@PathVariable("supplierInformationId" ) String supplierInformationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
SupplierInformation supplierInformation = supplierInformationService.getById(supplierInformationId);
|
||||
return R.ok(supplierInformation);
|
||||
//return R.ok(supplierInformationService.getById(supplierInformationId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param supplierInformation (服务商/供应商信息)
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_get')" )
|
||||
public R<IPage<SupplierInformation>> getSupplierInformationPage(Page<SupplierInformation> page, SupplierInformation supplierInformation, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<SupplierInformation> supplierInformationSList = supplierInformationService.page(page, Wrappers.<SupplierInformation>query()
|
||||
.eq("create_by", dlpUser.getId())
|
||||
.orderByDesc("create_time")
|
||||
);
|
||||
return R.ok(supplierInformationSList);
|
||||
// return R.ok(supplierInformationService.page(page, Wrappers.query(supplierInformation)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增(服务商/供应商信息)
|
||||
* @param supplierInformation (服务商/供应商信息)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "新增(服务商/供应商信息)", notes = "新增(服务商/供应商信息)")
|
||||
@SysLog("新增(服务商/供应商信息)" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_add')" )
|
||||
public R<SupplierInformation> postAddObject(@RequestBody SupplierInformation supplierInformation, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
supplierInformation.setSupplierInformationId(IdWorker.get32UUID().toUpperCase());
|
||||
if (supplierInformationService.save(supplierInformation)) {
|
||||
return R.ok(supplierInformation, "对象创建成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(supplierInformation, "对象创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改(服务商/供应商信息)
|
||||
* @param supplierInformation (服务商/供应商信息)
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "修改(服务商/供应商信息)", notes = "修改(服务商/供应商信息)")
|
||||
@SysLog("修改(服务商/供应商信息)" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_edit')" )
|
||||
public R<SupplierInformation> putUpdateById(@RequestBody SupplierInformation supplierInformation, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
if (supplierInformationService.updateById(supplierInformation)) {
|
||||
return R.ok(supplierInformation, "保存对象成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(supplierInformation, "保存对象失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除(服务商/供应商信息)
|
||||
* @param supplierInformationId id
|
||||
* @return R
|
||||
*/
|
||||
@ApiOperation(value = "通过id删除(服务商/供应商信息)", notes = "通过id删除(服务商/供应商信息)")
|
||||
@SysLog("通过id删除(服务商/供应商信息)" )
|
||||
@DeleteMapping("/{supplierInformationId}" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_supplier_information_del')" )
|
||||
public R<SupplierInformation> deleteById(@PathVariable String supplierInformationId, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
SupplierInformation oldSupplierInformation = supplierInformationService.getById(supplierInformationId);
|
||||
|
||||
if (supplierInformationService.removeById(supplierInformationId)) {
|
||||
return R.ok(oldSupplierInformation, "对象删除成功");
|
||||
}
|
||||
else {
|
||||
return R.failed(oldSupplierInformation, "对象删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package digital.laboratory.platform.reagent.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AuditAndApproveDto {
|
||||
|
||||
private String auditId;
|
||||
|
||||
private String auditResult;
|
||||
|
||||
private String auditOpinion;
|
||||
|
||||
private String approveResult;
|
||||
|
||||
private String approveOpinion;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package digital.laboratory.platform.reagent.dto;
|
||||
|
||||
import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
|
||||
import digital.laboratory.platform.reagent.entity.CentralizedRequest;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class CentralizedRequestDto {
|
||||
|
||||
private String centralizedRequestId;
|
||||
|
||||
private String purchaseCatalogueNumber;
|
||||
|
||||
private Integer quantityPurchased;
|
||||
|
||||
private String reagentConsumableId;
|
||||
|
||||
private String remarks;
|
||||
|
||||
private String catalogueDetailsId;
|
||||
|
||||
private String detailsOfCentralizedId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package digital.laboratory.platform.reagent.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PurchaseCatalogueDto {
|
||||
|
||||
private String brand;
|
||||
|
||||
private String category;
|
||||
|
||||
private String devivationOrUncertainty;
|
||||
|
||||
private String number;
|
||||
|
||||
private String packagedCopies;
|
||||
|
||||
private String purchaseCatalogueId;
|
||||
|
||||
private String purchaseCatalogueNumber;
|
||||
|
||||
private String reagentConsumableId;
|
||||
|
||||
private String species;
|
||||
|
||||
private String specificationAndModel;
|
||||
|
||||
private String standardValueOrPurity;
|
||||
|
||||
private Double unitPrice;
|
||||
|
||||
private String catalogueDetailsId;
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
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 consistentQuantity;
|
||||
|
||||
/**
|
||||
* (数量一致备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(数量一致备注)")
|
||||
private String cRemark;
|
||||
|
||||
/**
|
||||
* (供货周期)
|
||||
*/
|
||||
@ApiModelProperty(value="(供货周期)")
|
||||
private String deliveryCycle;
|
||||
|
||||
/**
|
||||
* (供货周期备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(供货周期备注)")
|
||||
private String dRemark;
|
||||
|
||||
/**
|
||||
* (包装完好)
|
||||
*/
|
||||
@ApiModelProperty(value="(包装完好)")
|
||||
private String packingSound;
|
||||
|
||||
/**
|
||||
* (包装完好备注备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(包装完好备注备注)")
|
||||
private String pRemark;
|
||||
|
||||
/**
|
||||
* (品牌、型号一致)
|
||||
*/
|
||||
@ApiModelProperty(value="(品牌、型号一致)")
|
||||
private String theSameBrandAndModel;
|
||||
|
||||
/**
|
||||
* (品牌、型号一致备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(品牌、型号一致备注)")
|
||||
private String tRemark;
|
||||
|
||||
/**
|
||||
* (有效期)
|
||||
*/
|
||||
@ApiModelProperty(value="(有效期)")
|
||||
private String validityPeriod;
|
||||
|
||||
/**
|
||||
* (有效期备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(有效期备注)")
|
||||
private String vRemark;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* acceptanceContentId
|
||||
*/
|
||||
@TableId(value = "acceptance_content_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="acceptanceContentId")
|
||||
private String acceptanceContentId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
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_record_form", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(验收记录表)")
|
||||
public class AcceptanceRecordForm extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (验收结论)
|
||||
*/
|
||||
@ApiModelProperty(value="(验收结论)")
|
||||
private String acceptanceConclusion;
|
||||
|
||||
/**
|
||||
* 部门负责人审核时间
|
||||
*/
|
||||
@ApiModelProperty(value="部门负责人审核时间")
|
||||
private LocalDateTime auditTimeOfDepartment;
|
||||
|
||||
/**
|
||||
* (验收日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(验收日期)")
|
||||
private LocalDateTime dateOfAcceptance;
|
||||
|
||||
/**
|
||||
* (部门负责人审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(部门负责人审核意见)")
|
||||
private String auditOpinionOfDepartment;
|
||||
|
||||
/**
|
||||
* (部门负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(部门负责人ID)")
|
||||
private String departmentHeadId;
|
||||
|
||||
/**
|
||||
* (后续处理情况)
|
||||
*/
|
||||
@ApiModelProperty(value="(后续处理情况)")
|
||||
private String followUpTreatment;
|
||||
|
||||
/**
|
||||
* (不合格项目)
|
||||
*/
|
||||
@ApiModelProperty(value="(不合格项目)")
|
||||
private String nonconformingItem;
|
||||
|
||||
/**
|
||||
* (质量负责人审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人审核意见)")
|
||||
private String auditOpinionOfQuality;
|
||||
|
||||
/**
|
||||
* (质量负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人ID)")
|
||||
private String qualityManagerId;
|
||||
|
||||
/**
|
||||
* (质量负责人审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人审核时间)")
|
||||
private String auditTimeOfQuality;
|
||||
|
||||
/**
|
||||
* (试剂耗材ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材ID)")
|
||||
private String reagentConsumableId;
|
||||
|
||||
/**
|
||||
* (试剂耗材管理员审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材管理员审核意见)")
|
||||
private String auditOpinionOfManage;
|
||||
|
||||
/**
|
||||
* (试剂耗材管理员审核日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材管理员审核日期)")
|
||||
private LocalDateTime auditTimeOfManager;
|
||||
|
||||
/**
|
||||
* (试剂耗材管理员ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材管理员ID)")
|
||||
private String reagentSuppliesManagerId;
|
||||
|
||||
/**
|
||||
* 签收批次明细ID
|
||||
*/
|
||||
@ApiModelProperty(value="签收批次明细ID")
|
||||
private String signedBatchListId;
|
||||
|
||||
/**
|
||||
* acceptanceRecordFormId
|
||||
*/
|
||||
@TableId(value = "acceptance_record_form_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="acceptanceRecordFormId")
|
||||
private String acceptanceRecordFormId;
|
||||
|
||||
/**
|
||||
* 试剂耗材管理员审核结果
|
||||
*/
|
||||
@ApiModelProperty(value="试剂耗材管理员审核结果")
|
||||
private String auditResultOfManager;
|
||||
|
||||
/**
|
||||
* 部门负责人审核结果
|
||||
*/
|
||||
@ApiModelProperty(value="部门负责人审核结果")
|
||||
private String auditResultOfDepartment;
|
||||
|
||||
/**
|
||||
* (质量负责人审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人审核结果)")
|
||||
private String auditResultOfQuality;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
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 = "after_sale_situation", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "服务商/供应商响应、资质和售后情况")
|
||||
public class AfterSaleSituation extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (服务商/供应商评价表ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(服务商/供应商评价表ID)")
|
||||
private String evaluationFormId;
|
||||
|
||||
/**
|
||||
* (供应商营业执照)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商营业执照)")
|
||||
private String supplierBusinessLicense;
|
||||
|
||||
/**
|
||||
* (供应商通过质量保证体系)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商通过质量保证体系)")
|
||||
private String supplierPassesQualityAssuranceSystem;
|
||||
|
||||
/**
|
||||
* (供应商产品认证)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商产品认证)")
|
||||
private String supplierProductCertification;
|
||||
|
||||
/**
|
||||
* afterSaleSituationId
|
||||
*/
|
||||
@TableId(value = "after_sale_situation_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="afterSaleSituationId")
|
||||
private String afterSaleSituationId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
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 = "application_for_use", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(试剂耗材领用申请表)")
|
||||
public class ApplicationForUse extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (领取日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(领取日期)")
|
||||
private LocalDateTime dateOfCollection;
|
||||
|
||||
/**
|
||||
* (领用人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(领用人ID)")
|
||||
private String recipientId;
|
||||
|
||||
/**
|
||||
* (备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(备注)")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* (状态)
|
||||
*/
|
||||
@ApiModelProperty(value="(状态)")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* (用途)
|
||||
*/
|
||||
@ApiModelProperty(value="(用途)")
|
||||
private String use;
|
||||
|
||||
/**
|
||||
* applicationForUseId
|
||||
*/
|
||||
@TableId(value = "application_for_use_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="applicationForUseId")
|
||||
private String applicationForUseId;
|
||||
|
||||
/**
|
||||
* deliveryRegistrationFormId
|
||||
*/
|
||||
@ApiModelProperty(value="deliveryRegistrationFormId")
|
||||
private String deliveryRegistrationFormId;
|
||||
|
||||
/**
|
||||
* requisitionRecordId
|
||||
*/
|
||||
@ApiModelProperty(value="requisitionRecordId")
|
||||
private String requisitionRecordId;
|
||||
|
||||
/**
|
||||
* claimCode
|
||||
*/
|
||||
@ApiModelProperty(value="claimCode")
|
||||
private String claimCode;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
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 = "batch_details", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "批次明细")
|
||||
public class BatchDetails extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (批次)
|
||||
*/
|
||||
@ApiModelProperty(value="(批次)")
|
||||
private String batch;
|
||||
|
||||
/**
|
||||
* (批号)
|
||||
*/
|
||||
@ApiModelProperty(value="(批号)")
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* (符合性检验情况)
|
||||
*/
|
||||
@ApiModelProperty(value="(符合性检验情况)")
|
||||
private String complianceTestSituation;
|
||||
|
||||
/**
|
||||
* (上次期间核查日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(上次期间核查日期)")
|
||||
private LocalDateTime dateOfLastCheck;
|
||||
|
||||
/**
|
||||
* (生产日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(生产日期)")
|
||||
private LocalDateTime dateOfProduction;
|
||||
|
||||
/**
|
||||
* (偏差/不确定度)
|
||||
*/
|
||||
@ApiModelProperty(value="(偏差/不确定度)")
|
||||
private String deviationOrUncertainty;
|
||||
|
||||
/**
|
||||
* (有效日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(有效日期)")
|
||||
private LocalDateTime expirationDate;
|
||||
|
||||
/**
|
||||
* (定值结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(定值结果)")
|
||||
private String fixedResult;
|
||||
|
||||
/**
|
||||
* (编号)
|
||||
*/
|
||||
@ApiModelProperty(value="(编号)")
|
||||
private String number;
|
||||
|
||||
/**
|
||||
* (购置时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(购置时间)")
|
||||
private LocalDateTime purchaseTime;
|
||||
|
||||
/**
|
||||
* (数量)
|
||||
*/
|
||||
@ApiModelProperty(value="(数量)")
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* (试剂耗材库存ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材库存ID)")
|
||||
private String reagentConsumableInventoryId;
|
||||
|
||||
/**
|
||||
* (使用状态)
|
||||
*/
|
||||
@ApiModelProperty(value="(使用状态)")
|
||||
private Integer serviceStatus;
|
||||
|
||||
/**
|
||||
* (供应商ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商ID)")
|
||||
private String supplierId;
|
||||
|
||||
/**
|
||||
* (预警值)
|
||||
*/
|
||||
@ApiModelProperty(value="(预警值)")
|
||||
private Integer warningValue;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* batchDetailsId
|
||||
*/
|
||||
@TableId(value = "batch_details_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="batchDetailsId")
|
||||
private String batchDetailsId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
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 = "blacklist", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(试剂耗材黑名单)")
|
||||
public class Blacklist extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (试剂耗材ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材ID)")
|
||||
private String reagentConsumableId;
|
||||
|
||||
/**
|
||||
* (符合性检查结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(符合性检查结果)")
|
||||
private String resultsOfComplianceCheck;
|
||||
|
||||
/**
|
||||
* (供应商ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商ID)")
|
||||
private String supplierId;
|
||||
|
||||
/**
|
||||
* blacklistId
|
||||
*/
|
||||
@TableId(value = "blacklist_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="blacklistId")
|
||||
private String blacklistId;
|
||||
|
||||
/**
|
||||
* complianceCheckId
|
||||
*/
|
||||
@ApiModelProperty(value="complianceCheckId")
|
||||
private String complianceCheckId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
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 = "catalogue_details", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(采购目录明细)")
|
||||
public class CatalogueDetails extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (品牌)
|
||||
*/
|
||||
@ApiModelProperty(value="(品牌)")
|
||||
private String brand;
|
||||
|
||||
/**
|
||||
* (类别)
|
||||
*/
|
||||
@ApiModelProperty(value="(类别)")
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 偏差/不确定度
|
||||
*/
|
||||
@ApiModelProperty(value="偏差/不确定度")
|
||||
private String deviationOrUncertainty;
|
||||
|
||||
/**
|
||||
* 编号(标准物质)
|
||||
*/
|
||||
@ApiModelProperty(value="编号(标准物质)")
|
||||
private String number;
|
||||
|
||||
/**
|
||||
* 包装份数
|
||||
*/
|
||||
@ApiModelProperty(value="包装份数")
|
||||
private String packagedCopies;
|
||||
|
||||
/**
|
||||
* 采购目录ID
|
||||
*/
|
||||
@ApiModelProperty(value="采购目录ID")
|
||||
private String purchaseCatalogueId;
|
||||
|
||||
/**
|
||||
* (采购目录编号)
|
||||
*/
|
||||
@ApiModelProperty(value="(采购目录编号)")
|
||||
private String purchaseCatalogueNumber;
|
||||
|
||||
/**
|
||||
* 试剂耗材ID
|
||||
*/
|
||||
@ApiModelProperty(value="试剂耗材ID")
|
||||
private String reagentConsumableId;
|
||||
|
||||
/**
|
||||
* (种类)
|
||||
*/
|
||||
@ApiModelProperty(value="(种类)")
|
||||
private String species;
|
||||
|
||||
/**
|
||||
* (规格型号)
|
||||
*/
|
||||
@ApiModelProperty(value="(规格型号)")
|
||||
private String specificationAndModel;
|
||||
|
||||
/**
|
||||
* (标准值/纯度)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准值/纯度)")
|
||||
private String standardValueOrPurity;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
@ApiModelProperty(value="单价")
|
||||
private Double unitPrice;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* catalogueDetailsId
|
||||
*/
|
||||
@TableId(value = "catalogue_details_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="catalogueDetailsId")
|
||||
private String catalogueDetailsId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
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 = "centralized_request", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(集中采购申请)")
|
||||
public class CentralizedRequest extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (申请人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(申请人ID)")
|
||||
private String applicantId;
|
||||
|
||||
/**
|
||||
* (审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(审核意见)")
|
||||
private String auditOpinion;
|
||||
|
||||
/**
|
||||
* (审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(审核结果)")
|
||||
private String auditResult;
|
||||
|
||||
/**
|
||||
* (审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(审核时间)")
|
||||
private LocalDateTime auditTime;
|
||||
|
||||
/**
|
||||
* (申请日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(申请日期)")
|
||||
private LocalDateTime dateOfApplication;
|
||||
|
||||
/**
|
||||
* (部门负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(部门负责人ID)")
|
||||
private String headOfDepartmentId;
|
||||
|
||||
/**
|
||||
* 采购计划ID
|
||||
*/
|
||||
@ApiModelProperty(value="采购计划ID")
|
||||
private String purchasingPlanId;
|
||||
|
||||
/**
|
||||
* (状态)
|
||||
*/
|
||||
@ApiModelProperty(value="(状态)")
|
||||
private Integer status;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* centralizedRequestId
|
||||
*/
|
||||
@TableId(value = "centralized_request_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="centralizedRequestId")
|
||||
private String centralizedRequestId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
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 = "check_content", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(检查内容)")
|
||||
public class CheckContent extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
@ApiModelProperty(value="品牌")
|
||||
private String brand;
|
||||
|
||||
/**
|
||||
* (符合性检查记录表ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(符合性检查记录表ID)")
|
||||
private String complianceCheckId;
|
||||
|
||||
/**
|
||||
* (试剂耗材ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材ID)")
|
||||
private String reagentConsumableId;
|
||||
|
||||
/**
|
||||
* (规格型号)
|
||||
*/
|
||||
@ApiModelProperty(value="(规格型号)")
|
||||
private String specificationAndModel;
|
||||
|
||||
/**
|
||||
* checkContentId
|
||||
*/
|
||||
@TableId(value = "check_content_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="checkContentId")
|
||||
private String checkContentId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
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 = "compliance_check", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(符合性检查记录表)")
|
||||
public class ComplianceCheck extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (部门负责人审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(部门负责人审核意见)")
|
||||
private String auditOpinionOfDepartment;
|
||||
|
||||
/**
|
||||
* (技术负责人审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核意见)")
|
||||
private String auditOpinionOfTechnical;
|
||||
|
||||
/**
|
||||
* (部门负责人审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(部门负责人审核结果)")
|
||||
private String auditResultOfDepartment;
|
||||
|
||||
/**
|
||||
* (技术负责人审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核结果)")
|
||||
private String auditResultOfTechnical;
|
||||
|
||||
/**
|
||||
* (部门负责人审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(部门负责人审核时间)")
|
||||
private LocalDateTime auditTimeOfDepartment;
|
||||
|
||||
/**
|
||||
* (技术负责人审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核时间)")
|
||||
private LocalDateTime auditTimeOfTechnical;
|
||||
|
||||
/**
|
||||
* (检查不符合项目)
|
||||
*/
|
||||
@ApiModelProperty(value="(检查不符合项目)")
|
||||
private String checkForNonconformities;
|
||||
|
||||
/**
|
||||
* (检查日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(检查日期)")
|
||||
private LocalDateTime dateOfInspection;
|
||||
|
||||
/**
|
||||
* (检查结论)
|
||||
*/
|
||||
@ApiModelProperty(value="(检查结论)")
|
||||
private String examinationConclusion;
|
||||
|
||||
/**
|
||||
* (执行人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(执行人ID)")
|
||||
private String executorId;
|
||||
|
||||
/**
|
||||
* (部门负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(部门负责人ID)")
|
||||
private String headOfDepartmentId;
|
||||
|
||||
/**
|
||||
* (检查方案)
|
||||
*/
|
||||
@ApiModelProperty(value="(检查方案)")
|
||||
private String inspectionScheme;
|
||||
|
||||
/**
|
||||
* (状态)
|
||||
*/
|
||||
@ApiModelProperty(value="(状态)")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* (技术负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人ID)")
|
||||
private String technicalDirectorId;
|
||||
|
||||
/**
|
||||
* complianceCheckId
|
||||
*/
|
||||
@TableId(value = "compliance_check_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="complianceCheckId")
|
||||
private String complianceCheckId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
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;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
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 = "decentralize_details", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "分散采购申请明细")
|
||||
public class DecentralizeDetails extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (品牌)
|
||||
*/
|
||||
@ApiModelProperty(value="(品牌)")
|
||||
private String brand;
|
||||
|
||||
/**
|
||||
* (类别)
|
||||
*/
|
||||
@ApiModelProperty(value="(类别)")
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* (分散采购申请ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(分散采购申请ID)")
|
||||
private String decentralizedRequestId;
|
||||
|
||||
/**
|
||||
* 偏差/不确定度
|
||||
*/
|
||||
@ApiModelProperty(value="偏差/不确定度")
|
||||
private String deviationOrUncertainty;
|
||||
|
||||
/**
|
||||
* decentralizeDetailsId
|
||||
*/
|
||||
@TableId(value = "decentralize_details_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="decentralizeDetailsId")
|
||||
private String decentralizeDetailsId;
|
||||
|
||||
/**
|
||||
* 包装份数
|
||||
*/
|
||||
@ApiModelProperty(value="包装份数")
|
||||
private String packagedCopies;
|
||||
|
||||
/**
|
||||
* (数量)
|
||||
*/
|
||||
@ApiModelProperty(value="(数量)")
|
||||
private String quantity;
|
||||
|
||||
/**
|
||||
* (试剂耗材ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材ID)")
|
||||
private String reagentConsumableId;
|
||||
|
||||
/**
|
||||
* (种类)
|
||||
*/
|
||||
@ApiModelProperty(value="(种类)")
|
||||
private String species;
|
||||
|
||||
/**
|
||||
* (规格型号)
|
||||
*/
|
||||
@ApiModelProperty(value="(规格型号)")
|
||||
private String specificationAndModel;
|
||||
|
||||
/**
|
||||
* (标准值/纯度)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准值/纯度)")
|
||||
private String standardValueOrPurity;
|
||||
|
||||
/**
|
||||
* (技术参数)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术参数)")
|
||||
private String technicalParameter;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
@ApiModelProperty(value="单价")
|
||||
private Double unitPrice;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (用途)
|
||||
*/
|
||||
@ApiModelProperty(value="(用途)")
|
||||
private String use;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
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 = "decentralized_request", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(分散采购申请)")
|
||||
public class DecentralizedRequest extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (申请人id)
|
||||
*/
|
||||
@ApiModelProperty(value="(申请人id)")
|
||||
private String applicantId;
|
||||
|
||||
/**
|
||||
* (主任审批意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(主任审批意见)")
|
||||
private String opinionOfApproval;
|
||||
|
||||
/**
|
||||
* (主任审批结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(主任审批结果)")
|
||||
private String resultOfApproval;
|
||||
|
||||
/**
|
||||
* (主任审批时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(主任审批时间)")
|
||||
private LocalDateTime approvalOfTime;
|
||||
|
||||
/**
|
||||
* (部门负责人审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(部门负责人审核意见)")
|
||||
private String auditOpinionOfDepartment;
|
||||
|
||||
/**
|
||||
* (质量负责人审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人审核意见)")
|
||||
private String auditOpinionOfQuality;
|
||||
|
||||
/**
|
||||
* (技术负责人审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核意见)")
|
||||
private String auditOpinionOfTechnical;
|
||||
|
||||
/**
|
||||
* (部门负责人审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(部门负责人审核结果)")
|
||||
private String auditResultOfDepartment;
|
||||
|
||||
/**
|
||||
* (质量负责人审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人审核结果)")
|
||||
private String auditResultOfQuality;
|
||||
|
||||
/**
|
||||
* (技术负责人审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核结果)")
|
||||
private String auditResultOfTechnical;
|
||||
|
||||
/**
|
||||
* (部门负责人审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(部门负责人审核时间)")
|
||||
private LocalDateTime auditTimeOfDepartment;
|
||||
|
||||
/**
|
||||
* (质量负责人审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人审核时间)")
|
||||
private LocalDateTime auditTimeOfQuality;
|
||||
|
||||
/**
|
||||
* (技术负责人审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核时间)")
|
||||
private LocalDateTime auditTimeOfTechnical;
|
||||
|
||||
/**
|
||||
* (需要符合性检验)
|
||||
*/
|
||||
@ApiModelProperty(value="(需要符合性检验)")
|
||||
private String complianceTesting;
|
||||
|
||||
/**
|
||||
* (申请日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(申请日期)")
|
||||
private String dateOfApplication;
|
||||
|
||||
/**
|
||||
* (主任ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(主任ID)")
|
||||
private String directorId;
|
||||
|
||||
/**
|
||||
* (部门负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(部门负责人ID)")
|
||||
private String headOfDepartmentId;
|
||||
|
||||
/**
|
||||
* decentralizedRequestId
|
||||
*/
|
||||
@TableId(value = "decentralized_request_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="decentralizedRequestId")
|
||||
private String decentralizedRequestId;
|
||||
|
||||
/**
|
||||
* (采购清单ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(采购清单ID)")
|
||||
private String purchaseListId;
|
||||
|
||||
/**
|
||||
* (质量负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人ID)")
|
||||
private String qualitySupervisorId;
|
||||
|
||||
/**
|
||||
* (提交状态)
|
||||
*/
|
||||
@ApiModelProperty(value="(提交状态)")
|
||||
private String status;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (技术负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人ID)")
|
||||
private String technicalDirectorId;
|
||||
|
||||
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
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 = "delivery_registration_form", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(试剂耗材出库登记表)")
|
||||
public class DeliveryRegistrationForm extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (出库日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(出库日期)")
|
||||
private LocalDateTime dateOfDelivery;
|
||||
|
||||
/**
|
||||
* (出库人)
|
||||
*/
|
||||
@ApiModelProperty(value="(出库人)")
|
||||
private String depositorId;
|
||||
|
||||
/**
|
||||
* (出库申请人)
|
||||
*/
|
||||
@ApiModelProperty(value="(出库申请人)")
|
||||
private String outgoingApplicantId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* deliveryRegistrationFormId
|
||||
*/
|
||||
@TableId(value = "delivery_registration_form_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="deliveryRegistrationFormId")
|
||||
private String deliveryRegistrationFormId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
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 = "details_of_centralized", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(集中采购申请明细)")
|
||||
public class DetailsOfCentralized extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (集中采购申请ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(集中采购申请ID)")
|
||||
private String centralizedRequestId;
|
||||
|
||||
/**
|
||||
* (采购目录编号)
|
||||
*/
|
||||
@ApiModelProperty(value="(采购目录编号)")
|
||||
private String purchaseCatalogueNumber;
|
||||
|
||||
/**
|
||||
* (采购数量)
|
||||
*/
|
||||
@ApiModelProperty(value="(采购数量)")
|
||||
private Integer quantityPurchased;
|
||||
|
||||
/**
|
||||
* (试剂耗材ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材ID)")
|
||||
private String reagentConsumableId;
|
||||
|
||||
/**
|
||||
* (备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(备注)")
|
||||
private String remarks;
|
||||
|
||||
|
||||
/**
|
||||
* detailsOfCentralizedId
|
||||
*/
|
||||
@TableId(value = "details_of_centralized_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="detailsOfCentralizedId")
|
||||
private String detailsOfCentralizedId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
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 = "evaluation_form", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(服务商/供应商评价表)")
|
||||
public class EvaluationForm extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (采购负责人评价意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(采购负责人评价意见)")
|
||||
private String commentsFromThePurchasingManager;
|
||||
|
||||
/**
|
||||
* (技术负责人评价意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人评价意见)")
|
||||
private String commentsFromTheTechnicalDirector;
|
||||
|
||||
/**
|
||||
* (联系电话)
|
||||
*/
|
||||
@ApiModelProperty(value="(联系电话)")
|
||||
private String contactNumber;
|
||||
|
||||
/**
|
||||
* (联系人)
|
||||
*/
|
||||
@ApiModelProperty(value="(联系人)")
|
||||
private String contactPerson;
|
||||
|
||||
/**
|
||||
* (采购负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(采购负责人ID)")
|
||||
private String purchasingManagerId;
|
||||
|
||||
/**
|
||||
* (质量负责人评价意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人评价意见)")
|
||||
private String qualitySupervisorEvaluationComments;
|
||||
|
||||
/**
|
||||
* (质量负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人ID)")
|
||||
private String qualitySupervisorId;
|
||||
|
||||
/**
|
||||
* (服务商/供应商ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(服务商/供应商ID)")
|
||||
private String serviceProviderAndSupplierId;
|
||||
|
||||
/**
|
||||
* (技术负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人ID)")
|
||||
private String technicalDirectorId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* evaluationFormId
|
||||
*/
|
||||
@TableId(value = "evaluation_form_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="evaluationFormId")
|
||||
private String evaluationFormId;
|
||||
|
||||
/**
|
||||
* supplierInformationId
|
||||
*/
|
||||
@ApiModelProperty(value="supplierInformationId")
|
||||
private String supplierInformationId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
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 = "evaluation_result", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(服务商/供应商评价结果)")
|
||||
public class EvaluationResult extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (对供应品检验校准效率)
|
||||
*/
|
||||
@ApiModelProperty(value="(对供应品检验校准效率)")
|
||||
private String checkAndCalibrateEfficiencyOfSupplies;
|
||||
|
||||
/**
|
||||
* (对供应商总体服务是否满意)
|
||||
*/
|
||||
@ApiModelProperty(value="(对供应商总体服务是否满意)")
|
||||
private String overallSupplierServiceSatisfaction;
|
||||
|
||||
/**
|
||||
* (服务商/供应商评价表id)
|
||||
*/
|
||||
@ApiModelProperty(value="(服务商/供应商评价表id)")
|
||||
private String evaluationFormId;
|
||||
|
||||
/**
|
||||
* (供应商态度)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商态度)")
|
||||
private String supplierAttitude;
|
||||
|
||||
/**
|
||||
* (供应商设备与设施)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商设备与设施)")
|
||||
private String supplierEquipmentAndFacilities;
|
||||
|
||||
/**
|
||||
* (供应商技术与管理能力)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商技术与管理能力)")
|
||||
private String supplierTechnologyAndManagementCapability;
|
||||
|
||||
/**
|
||||
* (供应商交货是否及时)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商交货是否及时)")
|
||||
private String whetherTheSupplierDeliversOnTime;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* evaluationResultId
|
||||
*/
|
||||
@TableId(value = "evaluation_result_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="evaluationResultId")
|
||||
private String evaluationResultId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
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 = "fixed_value_report", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(定值报告)")
|
||||
public class FixedValueReport extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (定值报告URL)
|
||||
*/
|
||||
@ApiModelProperty(value="(定值报告URL)")
|
||||
private String fixedValueReport;
|
||||
|
||||
/**
|
||||
* 标准物质ID
|
||||
*/
|
||||
@ApiModelProperty(value="标准物质ID")
|
||||
private String referenceSubstanceId;
|
||||
|
||||
/**
|
||||
* fixedValueReportId
|
||||
*/
|
||||
@TableId(value = "fixed_value_report_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="fixedValueReportId")
|
||||
private String fixedValueReportId;
|
||||
|
||||
/**
|
||||
* 定值结果
|
||||
*/
|
||||
@ApiModelProperty(value="定值结果")
|
||||
private String fixedResult;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
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 = "instruction_book", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(标准物质期间核查指导书)")
|
||||
public class InstructionBook extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 技术负责人审核意见
|
||||
*/
|
||||
@ApiModelProperty(value="技术负责人审核意见")
|
||||
private String auditOpinionOfTechnical;
|
||||
|
||||
/**
|
||||
* 技术负责人审核结果
|
||||
*/
|
||||
@ApiModelProperty(value="技术负责人审核结果")
|
||||
private String auditResultOfTechnical;
|
||||
|
||||
/**
|
||||
* 技术负责人审核时间
|
||||
*/
|
||||
@ApiModelProperty(value="技术负责人审核时间")
|
||||
private LocalDateTime auditTimeOfTechnical;
|
||||
|
||||
/**
|
||||
* (提交状态)
|
||||
*/
|
||||
@ApiModelProperty(value="(提交状态)")
|
||||
private Integer commitStatus;
|
||||
|
||||
/**
|
||||
* (指导书)
|
||||
*/
|
||||
@ApiModelProperty(value="(指导书)")
|
||||
private String instructionBook;
|
||||
|
||||
/**
|
||||
* (制定人)
|
||||
*/
|
||||
@ApiModelProperty(value="(制定人)")
|
||||
private String makerId;
|
||||
|
||||
/**
|
||||
* (标准物质id)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质id)")
|
||||
private String referenceMaterialId;
|
||||
|
||||
/**
|
||||
* (制定时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(制定时间)")
|
||||
private LocalDateTime setTime;
|
||||
|
||||
/**
|
||||
* 技术负责人ID
|
||||
*/
|
||||
@ApiModelProperty(value="技术负责人ID")
|
||||
private String technicalDirectorId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* instructionBookId
|
||||
*/
|
||||
@TableId(value = "instruction_book_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="instructionBookId")
|
||||
private String instructionBookId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
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 = "outgoing_contents", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(出库内容)")
|
||||
public class OutgoingContents extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (试剂耗材出库登记表ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材出库登记表ID)")
|
||||
private String deliveryRegistrationFormId;
|
||||
|
||||
/**
|
||||
* (出库用途)
|
||||
*/
|
||||
@ApiModelProperty(value="(出库用途)")
|
||||
private String outboundUse;
|
||||
|
||||
/**
|
||||
* (数量)
|
||||
*/
|
||||
@ApiModelProperty(value="(数量)")
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* (试剂耗材ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材ID)")
|
||||
private String reagentConsumableId;
|
||||
|
||||
/**
|
||||
* (试剂耗材类型)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材类型)")
|
||||
private String reagentConsumableType;
|
||||
|
||||
/**
|
||||
* (备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(备注)")
|
||||
private String remarks;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* outgoingContentsId
|
||||
*/
|
||||
@TableId(value = "outgoing_contents_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="outgoingContentsId")
|
||||
private String outgoingContentsId;
|
||||
|
||||
|
||||
}
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
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 = "period_verification_implementation", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(标准物质期间核查实施情况及结果记录表)")
|
||||
public class PeriodVerificationImplementation extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (技术负责人审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核意见)")
|
||||
private String auditOpinionOfTechnical;
|
||||
|
||||
/**
|
||||
* (技术负责人审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核结果)")
|
||||
private String auditResultOfTechnical;
|
||||
|
||||
/**
|
||||
* (技术负责人审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核时间)")
|
||||
private LocalDateTime auditTimeOfTechnical;
|
||||
|
||||
/**
|
||||
* (不满足应用要求原因分析)
|
||||
*/
|
||||
@ApiModelProperty(value="(不满足应用要求原因分析)")
|
||||
private String causeOfDissatisfaction;
|
||||
|
||||
/**
|
||||
* (核查时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(核查时间)")
|
||||
private LocalDateTime checkingTime;
|
||||
|
||||
/**
|
||||
* (提交状态)
|
||||
*/
|
||||
@ApiModelProperty(value="(提交状态)")
|
||||
private Integer commitStatus;
|
||||
|
||||
/**
|
||||
* (偏差/不确定度)
|
||||
*/
|
||||
@ApiModelProperty(value="(偏差/不确定度)")
|
||||
private String deviationAndUncertainty;
|
||||
|
||||
/**
|
||||
* (核查实施情况及结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(核查实施情况及结果)")
|
||||
private String implementationAndResults;
|
||||
|
||||
/**
|
||||
* (核查人员ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(核查人员ID)")
|
||||
private String inspectorId;
|
||||
|
||||
/**
|
||||
* (编号)
|
||||
*/
|
||||
@ApiModelProperty(value="(编号)")
|
||||
private String number;
|
||||
|
||||
/**
|
||||
* (核查人员意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(核查人员意见)")
|
||||
private String opinionOfInspector;
|
||||
|
||||
/**
|
||||
* (标准物质ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质ID)")
|
||||
private String referenceMaterialId;
|
||||
|
||||
/**
|
||||
* (备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(备注)")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* (标准值/纯度)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准值/纯度)")
|
||||
private String standardValueAndPurity;
|
||||
|
||||
/**
|
||||
* (技术负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人ID)")
|
||||
private String technicalDirectorId;
|
||||
|
||||
/**
|
||||
* (核查方法)
|
||||
*/
|
||||
@ApiModelProperty(value="(核查方法)")
|
||||
private String verificationMethod;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* periodVerificationImplementationId
|
||||
*/
|
||||
@TableId(value = "period_verification_implementation_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="periodVerificationImplementationId")
|
||||
private String periodVerificationImplementationId;
|
||||
|
||||
/**
|
||||
* periodVerificationPlanId
|
||||
*/
|
||||
@ApiModelProperty(value="periodVerificationPlanId")
|
||||
private String periodVerificationPlanId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
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 = "period_verification_plan", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(标准物质期间核查计划和确认表)")
|
||||
public class PeriodVerificationPlan extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (技术负责人审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核意见)")
|
||||
private String auditOpinionOfTechnical;
|
||||
|
||||
/**
|
||||
* (技术负责人审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核结果)")
|
||||
private String auditResultOfTechnical;
|
||||
|
||||
/**
|
||||
* (技术负责人审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核时间)")
|
||||
private LocalDateTime auditTimeOfTechnical;
|
||||
|
||||
/**
|
||||
* (提交状态)
|
||||
*/
|
||||
@ApiModelProperty(value="(提交状态)")
|
||||
private Integer commitStatus;
|
||||
|
||||
/**
|
||||
* (下次核查日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(下次核查日期)")
|
||||
private LocalDateTime dateOfNextCheck;
|
||||
|
||||
/**
|
||||
* (偏差/不确定度)
|
||||
*/
|
||||
@ApiModelProperty(value="(偏差/不确定度)")
|
||||
private String deviationAndUncertainty;
|
||||
|
||||
/**
|
||||
* (核查人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(核查人ID)")
|
||||
private String inspectorId;
|
||||
|
||||
/**
|
||||
* (指导书ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(指导书ID)")
|
||||
private String instructionBookId;
|
||||
|
||||
/**
|
||||
* (编号)
|
||||
*/
|
||||
@ApiModelProperty(value="(编号)")
|
||||
private String number;
|
||||
|
||||
/**
|
||||
* (计划核查周期)
|
||||
*/
|
||||
@ApiModelProperty(value="(计划核查周期)")
|
||||
private LocalDateTime plannedVerificationCycle;
|
||||
|
||||
/**
|
||||
* (标准物质管理员ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质管理员ID)")
|
||||
private String managerId;
|
||||
|
||||
/**
|
||||
* (标准物质ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质ID)")
|
||||
private String referenceMaterialid;
|
||||
|
||||
/**
|
||||
* (计划核查日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(计划核查日期)")
|
||||
private LocalDateTime scheduledVerificationDate;
|
||||
|
||||
/**
|
||||
* (标准值/纯度)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准值/纯度)")
|
||||
private String standardValueAndPurity;
|
||||
|
||||
/**
|
||||
* (技术负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人ID)")
|
||||
private String technicalDirectorId;
|
||||
|
||||
/**
|
||||
* (核查依据)
|
||||
*/
|
||||
@ApiModelProperty(value="(核查依据)")
|
||||
private String verificationBasis;
|
||||
|
||||
/**
|
||||
* (核查实施日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(核查实施日期)")
|
||||
private LocalDateTime implementationDate;
|
||||
|
||||
/**
|
||||
* (核查结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(核查结果)")
|
||||
private String verificationResult;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* periodVerificationPlanId
|
||||
*/
|
||||
@TableId(value = "period_verification_plan_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="periodVerificationPlanId")
|
||||
private String periodVerificationPlanId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
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 = "procurement_content", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(采购内容)")
|
||||
public class ProcurementContent extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (采购计划id)
|
||||
*/
|
||||
@ApiModelProperty(value="(采购计划id)")
|
||||
private String purchasingPlanId;
|
||||
|
||||
/**
|
||||
* (数量)
|
||||
*/
|
||||
@ApiModelProperty(value="(数量)")
|
||||
private String quantity;
|
||||
|
||||
/**
|
||||
* (试剂耗材ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材ID)")
|
||||
private String reagentConsumableId;
|
||||
|
||||
/**
|
||||
* (小计)
|
||||
*/
|
||||
@ApiModelProperty(value="(小计)")
|
||||
private String subtotal;
|
||||
|
||||
/**
|
||||
* (单价)
|
||||
*/
|
||||
@ApiModelProperty(value="(单价)")
|
||||
private Double unitPrice;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* procurementContentId
|
||||
*/
|
||||
@TableId(value = "procurement_content_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="procurementContentId")
|
||||
private String procurementContentId;
|
||||
|
||||
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
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 = "provide_services_or_supplies", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "提供服务或供应品")
|
||||
public class ProvideServicesOrSupplies extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (试剂耗材ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材ID)")
|
||||
private String reagentConsumableId;
|
||||
|
||||
/**
|
||||
* (服务商/供应商评价表ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(服务商/供应商评价表ID)")
|
||||
private String evaluationFormId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* provideServicesOrSuppliesid
|
||||
*/
|
||||
@TableId(value = "provide_services_or_suppliesID", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="provideServicesOrSuppliesid")
|
||||
private String provideServicesOrSuppliesid;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
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:05
|
||||
* @describe (采购目录) 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "purchase_catalogue", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(采购目录)")
|
||||
public class PurchaseCatalogue extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (质量负责人审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人审核意见)")
|
||||
private String auditOpinionOfQuality;
|
||||
|
||||
/**
|
||||
* (技术负责人审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核意见)")
|
||||
private String auditOpinionOfTechnical;
|
||||
|
||||
/**
|
||||
* (质量负责人审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人审核结果)")
|
||||
private String auditResultOfQuality;
|
||||
|
||||
/**
|
||||
* (技术负责人审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核结果)")
|
||||
private String auditResultOfTechnical;
|
||||
|
||||
/**
|
||||
* (质量负责人审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人审核时间)")
|
||||
private LocalDateTime auditTimeOfQuality;
|
||||
|
||||
/**
|
||||
* (技术负责人审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核时间)")
|
||||
private LocalDateTime auditTimeOfTechnical;
|
||||
|
||||
/**
|
||||
* (质量负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(质量负责人ID)")
|
||||
private String qualitySupervisorid;
|
||||
|
||||
/**
|
||||
* 发布日期
|
||||
*/
|
||||
@ApiModelProperty(value="发布日期")
|
||||
private LocalDateTime releaseDate;
|
||||
|
||||
/**
|
||||
* (状态)
|
||||
*/
|
||||
@ApiModelProperty(value="(状态)")
|
||||
private String status;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (技术负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人ID)")
|
||||
private String technicalDirectorid;
|
||||
|
||||
/**
|
||||
* purchaseCatalogueId
|
||||
*/
|
||||
@TableId(value = "purchase_catalogue_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="purchaseCatalogueId")
|
||||
private String purchaseCatalogueId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
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:05
|
||||
* @describe (采购清单) 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "purchase_list", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(采购清单)")
|
||||
public class PurchaseList extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 清单名称
|
||||
*/
|
||||
@ApiModelProperty(value="清单名称")
|
||||
private String name;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* purchaseListId
|
||||
*/
|
||||
@TableId(value = "purchase_list_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="purchaseListId")
|
||||
private String purchaseListId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
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 = "purchaselist_details", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(采购清单明细)")
|
||||
public class PurchaselistDetails extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (采购目录编号)
|
||||
*/
|
||||
@ApiModelProperty(value="(采购目录编号)")
|
||||
private String purchaseCatalogueNumber;
|
||||
|
||||
/**
|
||||
* (采购清单ID)·
|
||||
*/
|
||||
@ApiModelProperty(value="(采购清单ID)·")
|
||||
private String purchaseListId;
|
||||
|
||||
/**
|
||||
* (采购量)
|
||||
*/
|
||||
@ApiModelProperty(value="(采购量)")
|
||||
private Integer purchaseQuantity;
|
||||
|
||||
/**
|
||||
* (试剂耗材ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材ID)")
|
||||
private String peagentConsumableId;
|
||||
|
||||
/**
|
||||
* (备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(备注)")
|
||||
private String pemarks;
|
||||
|
||||
/**
|
||||
* (供应商ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商ID)")
|
||||
private String supplierId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* purchaselistDetailsId
|
||||
*/
|
||||
@TableId(value = "purchaselist_details_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="purchaselistDetailsId")
|
||||
private String purchaselistDetailsId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
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 = "purchasing_plan", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(采购计划)")
|
||||
public class PurchasingPlan extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (经费预算)
|
||||
*/
|
||||
@ApiModelProperty(value="(经费预算)")
|
||||
private String appropriationBudget;
|
||||
|
||||
/**
|
||||
* (主任审批意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(主任审批意见)")
|
||||
private String approvalOpinion;
|
||||
|
||||
/**
|
||||
* (主任审批结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(主任审批结果)")
|
||||
private String approvalResult;
|
||||
|
||||
/**
|
||||
* (主任审批时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(主任审批时间)")
|
||||
private String approvalTime;
|
||||
|
||||
/**
|
||||
* (试剂耗材管理员审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材管理员审核意见)")
|
||||
private String auditOpinionOfManager;
|
||||
|
||||
/**
|
||||
* (技术负责人审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核意见)")
|
||||
private String auditOpinionOfTechnical;
|
||||
|
||||
/**
|
||||
* (试剂耗材管理员审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材管理员审核结果)")
|
||||
private String auditResultOfManager;
|
||||
|
||||
/**
|
||||
* (技术负责人审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核结果)")
|
||||
private String auditResultOfTechnical;
|
||||
|
||||
/**
|
||||
* (试剂耗材管理员审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材管理员审核时间)")
|
||||
private LocalDateTime auditTimeOfManager;
|
||||
|
||||
/**
|
||||
* (技术负责人审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核时间)")
|
||||
private LocalDateTime auditTimeOfTechnical;
|
||||
|
||||
/**
|
||||
* (主任ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(主任ID)")
|
||||
private String airectorId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (采购清单ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(采购清单ID)")
|
||||
private String purchaseListId;
|
||||
|
||||
/**
|
||||
* (试剂耗材管理员ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材管理员ID)")
|
||||
private String reagentSuppliesManagerId;
|
||||
|
||||
/**
|
||||
* 发布日期
|
||||
*/
|
||||
@ApiModelProperty(value="发布日期")
|
||||
private LocalDateTime releaseDate;
|
||||
|
||||
/**
|
||||
* (状态)
|
||||
*/
|
||||
@ApiModelProperty(value="(状态)")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* (技术负责人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人ID)")
|
||||
private String technicalDirectorId;
|
||||
|
||||
/**
|
||||
* purchasingPlanId
|
||||
*/
|
||||
@TableId(value = "purchasing_plan_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="purchasingPlanId")
|
||||
private String purchasingPlanId;
|
||||
|
||||
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
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:05
|
||||
* @describe 试剂耗材库存 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "reagent_consumable_inventory", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "试剂耗材库存")
|
||||
public class ReagentConsumableInventory extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (品牌)
|
||||
*/
|
||||
@ApiModelProperty(value="(品牌)")
|
||||
private String brand;
|
||||
|
||||
/**
|
||||
* (类别)
|
||||
*/
|
||||
@ApiModelProperty(value="(类别)")
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 偏差/不确定度
|
||||
*/
|
||||
@ApiModelProperty(value="偏差/不确定度")
|
||||
private String deviationOrUncertainty;
|
||||
|
||||
/**
|
||||
* (指导书ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(指导书ID)")
|
||||
private String instructionBookId;
|
||||
|
||||
/**
|
||||
* (试剂耗材名称)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材名称)")
|
||||
private String reagentConsumablesName;
|
||||
|
||||
/**
|
||||
* (规格型号)
|
||||
*/
|
||||
@ApiModelProperty(value="(规格型号)")
|
||||
private String specificationAndModel;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (标准值/纯度)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准值/纯度)")
|
||||
private String standardValueOrPurity;
|
||||
|
||||
/**
|
||||
* (技术参数)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术参数)")
|
||||
private String technicalParameter;
|
||||
|
||||
/**
|
||||
* (总数量)
|
||||
*/
|
||||
@ApiModelProperty(value="(总数量)")
|
||||
private String totalQuantity;
|
||||
|
||||
/**
|
||||
* reagentConsumableInventoryId
|
||||
*/
|
||||
@TableId(value = "reagent_consumable_inventory_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="reagentConsumableInventoryId")
|
||||
private String reagentConsumableInventoryId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
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:05
|
||||
* @describe (试剂耗材类) 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "reagent_consumables", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(试剂耗材类)")
|
||||
public class ReagentConsumables extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
@ApiModelProperty(value="品牌")
|
||||
private String brand;
|
||||
|
||||
/**
|
||||
* 类别
|
||||
*/
|
||||
@ApiModelProperty(value="类别")
|
||||
private String catagory;
|
||||
|
||||
/**
|
||||
* 偏差/不确定度
|
||||
*/
|
||||
@ApiModelProperty(value="偏差/不确定度")
|
||||
private String deviationOrUncertainty;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(value="名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 种类
|
||||
*/
|
||||
@ApiModelProperty(value="种类")
|
||||
private String species;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty(value="规格型号")
|
||||
private String specificationAndModel;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (标准值/纯度)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准值/纯度)")
|
||||
private String standardValueOrPurity;
|
||||
|
||||
/**
|
||||
* (技术参数)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术参数)")
|
||||
private String technicalParameter;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
@ApiModelProperty(value="单价")
|
||||
private Double unitPrice;
|
||||
|
||||
/**
|
||||
* reagentConsumablesId
|
||||
*/
|
||||
@TableId(value = "reagent_consumables_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="reagentConsumablesId")
|
||||
private String reagentConsumablesId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
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 = "reagent_consumables_set", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(试剂耗材集合)")
|
||||
public class ReagentConsumablesSet extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (试剂耗材领用申请表ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材领用申请表ID)")
|
||||
private String applicationForUseId;
|
||||
|
||||
/**
|
||||
* (数量)
|
||||
*/
|
||||
@ApiModelProperty(value="(数量)")
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* (试剂耗材ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材ID)")
|
||||
private String reagentConsumableId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* reagentConsumablesSetid
|
||||
*/
|
||||
@TableId(value = "reagent_consumables_setID", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="reagentConsumablesSetid")
|
||||
private String reagentConsumablesSetid;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
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:05
|
||||
* @describe (试剂耗材领用记录表) 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "requisition_record", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(试剂耗材领用记录表)")
|
||||
public class RequisitionRecord extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (领用日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(领用日期)")
|
||||
private LocalDateTime dateOfClaim;
|
||||
|
||||
/**
|
||||
* (领用量)
|
||||
*/
|
||||
@ApiModelProperty(value="(领用量)")
|
||||
private Integer drawingamount;
|
||||
|
||||
/**
|
||||
* (试剂耗材ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材ID)")
|
||||
private String reagentConsumableId;
|
||||
|
||||
/**
|
||||
* (领用人)
|
||||
*/
|
||||
@ApiModelProperty(value="(领用人)")
|
||||
private String recipientId;
|
||||
|
||||
/**
|
||||
* (备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(备注)")
|
||||
private String remarks;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (规格型号)
|
||||
*/
|
||||
@ApiModelProperty(value="(规格型号)")
|
||||
private String specificationAndModel;
|
||||
|
||||
/**
|
||||
* requisitionRecordId
|
||||
*/
|
||||
@TableId(value = "requisition_record_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="requisitionRecordId")
|
||||
private String requisitionRecordId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
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 = "signed_batch_list", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "签收批次明细")
|
||||
public class SignedBatchList extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (批次)
|
||||
*/
|
||||
@ApiModelProperty(value="(批次)")
|
||||
private String batch;
|
||||
|
||||
/**
|
||||
* (批号)
|
||||
*/
|
||||
@ApiModelProperty(value="(批号)")
|
||||
private String batchnumber;
|
||||
|
||||
/**
|
||||
* (生产日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(生产日期)")
|
||||
private LocalDateTime dateOfProduction;
|
||||
|
||||
/**
|
||||
* 购置日期
|
||||
*/
|
||||
@ApiModelProperty(value="购置日期")
|
||||
private LocalDateTime dateOfPurchase;
|
||||
|
||||
/**
|
||||
* 签收日期
|
||||
*/
|
||||
@ApiModelProperty(value="签收日期")
|
||||
private LocalDateTime dateOfReceipt;
|
||||
|
||||
/**
|
||||
* (有效日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(有效日期)")
|
||||
private LocalDateTime expirationDate;
|
||||
|
||||
/**
|
||||
* (数量)
|
||||
*/
|
||||
@ApiModelProperty(value="(数量)")
|
||||
private Integer quantity;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (试剂耗材ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材ID)")
|
||||
private String reagentConsumableId;
|
||||
|
||||
/**
|
||||
* 签收人ID
|
||||
*/
|
||||
@ApiModelProperty(value="签收人ID")
|
||||
private String signatoryId;
|
||||
|
||||
/**
|
||||
* 签收记录表ID
|
||||
*/
|
||||
@ApiModelProperty(value="签收记录表ID")
|
||||
private String signingRecordFormId;
|
||||
|
||||
/**
|
||||
* (供应商ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商ID)")
|
||||
private String supplierId;
|
||||
|
||||
/**
|
||||
* (预警值)
|
||||
*/
|
||||
@ApiModelProperty(value="(预警值)")
|
||||
private Integer warningvalue;
|
||||
|
||||
/**
|
||||
* signedBatchListId
|
||||
*/
|
||||
@TableId(value = "signed_batch_list_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="signedBatchListId")
|
||||
private String signedBatchListId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
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:05
|
||||
* @describe 签收记录表 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "signing_record_form", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "签收记录表")
|
||||
public class SigningRecordForm extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 采购清单ID
|
||||
*/
|
||||
@ApiModelProperty(value="采购清单ID")
|
||||
private String purchaseListId;
|
||||
|
||||
/**
|
||||
* (签收人)
|
||||
*/
|
||||
@ApiModelProperty(value="(签收人)")
|
||||
private String signatory;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ApiModelProperty(value="状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 总数量
|
||||
*/
|
||||
@ApiModelProperty(value="总数量")
|
||||
private String totalQuantity;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* signingRecordFormId
|
||||
*/
|
||||
@TableId(value = "signing_record_form_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="signingRecordFormId")
|
||||
private String signingRecordFormId;
|
||||
|
||||
|
||||
}
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
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 = "standard_material_application", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(标准物质领用/归还登记表)")
|
||||
public class StandardMaterialApplication extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (标准物质管理员ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质管理员ID)")
|
||||
private String administratorId;
|
||||
|
||||
/**
|
||||
* (领用日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(领用日期)")
|
||||
private String dateOfClaim;
|
||||
|
||||
/**
|
||||
* (归还日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(归还日期)")
|
||||
private LocalDateTime dateOfReturn;
|
||||
|
||||
/**
|
||||
* (用途及使用数量)
|
||||
*/
|
||||
@ApiModelProperty(value="(用途及使用数量)")
|
||||
private LocalDateTime purposeAndQuantityOfUse;
|
||||
|
||||
/**
|
||||
* (领用人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(领用人ID)")
|
||||
private String recipientId;
|
||||
|
||||
/**
|
||||
* (标准物质编号)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质编号)")
|
||||
private String referenceMaterialNumber;
|
||||
|
||||
/**
|
||||
* (标准物质ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质ID)")
|
||||
private String referenceSubstanceId;
|
||||
|
||||
/**
|
||||
* (领用数量)
|
||||
*/
|
||||
@ApiModelProperty(value="(领用数量)")
|
||||
private Integer requisitionedQuantity;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (序号)
|
||||
*/
|
||||
@ApiModelProperty(value="(序号)")
|
||||
private String serialNumber;
|
||||
|
||||
/**
|
||||
* (规格)
|
||||
*/
|
||||
@ApiModelProperty(value="(规格)")
|
||||
private String specification;
|
||||
|
||||
/**
|
||||
* standardMaterialApplicationId
|
||||
*/
|
||||
@TableId(value = "standard_material_application_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="standardMaterialApplicationId")
|
||||
private String standardMaterialApplicationId;
|
||||
|
||||
/**
|
||||
* deliveryRegistrationFormId
|
||||
*/
|
||||
@ApiModelProperty(value="deliveryRegistrationFormId")
|
||||
private String deliveryRegistrationFormId;
|
||||
|
||||
/**
|
||||
* requisitionRecordId
|
||||
*/
|
||||
@ApiModelProperty(value="requisitionRecordId")
|
||||
private String requisitionRecordId;
|
||||
|
||||
/**
|
||||
* storageRegistrationFormId
|
||||
*/
|
||||
@ApiModelProperty(value="storageRegistrationFormId")
|
||||
private String storageRegistrationFormId;
|
||||
|
||||
/**
|
||||
* claimCode
|
||||
*/
|
||||
@ApiModelProperty(value="claimCode")
|
||||
private String claimCode;
|
||||
|
||||
|
||||
}
|
||||
+201
@@ -0,0 +1,201 @@
|
||||
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:05
|
||||
* @describe (标准物质停用/报废销毁/恢复/降级使用审批表) 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "standard_material_approval_form", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
public class StandardMaterialApprovalForm extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (经办人)
|
||||
*/
|
||||
@ApiModelProperty(value="(经办人)")
|
||||
private String agentId;
|
||||
|
||||
/**
|
||||
* (申请人)
|
||||
*/
|
||||
@ApiModelProperty(value="(申请人)")
|
||||
private String applicantId;
|
||||
|
||||
/**
|
||||
* (申请时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(申请时间)")
|
||||
private LocalDateTime applicationTime;
|
||||
|
||||
/**
|
||||
* (主任审批意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(主任审批意见)")
|
||||
private String approvalOpinion;
|
||||
|
||||
/**
|
||||
* (主任审批结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(主任审批结果)")
|
||||
private String approvalResult;
|
||||
|
||||
/**
|
||||
* (主任审批时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(主任审批时间)")
|
||||
private String approvalTime;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (标准物质管理员审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质管理员审核意见)")
|
||||
private String auditOpinionOfManager;
|
||||
|
||||
/**
|
||||
* (技术负责人审核意见)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核意见)")
|
||||
private String auditOpinionOfTechnical;
|
||||
|
||||
/**
|
||||
* (标准物质管理员审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质管理员审核结果)")
|
||||
private String auditResultOfManager;
|
||||
|
||||
/**
|
||||
* (技术负责人审核结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核结果)")
|
||||
private String auditResultOfTechnical;
|
||||
|
||||
/**
|
||||
* (标准物质管理员审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质管理员审核时间)")
|
||||
private String auditTimeOfManager;
|
||||
|
||||
/**
|
||||
* (技术负责人审核时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人审核时间)")
|
||||
private String auditTimeOfTechnical;
|
||||
|
||||
/**
|
||||
* (批号)
|
||||
*/
|
||||
@ApiModelProperty(value="(批号)")
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* (提交状态)
|
||||
*/
|
||||
@ApiModelProperty(value="(提交状态)")
|
||||
private Integer commitStatus;
|
||||
|
||||
/**
|
||||
* (主任id)
|
||||
*/
|
||||
@ApiModelProperty(value="(主任id)")
|
||||
private String directorId;
|
||||
|
||||
/**
|
||||
* (定值结果)
|
||||
*/
|
||||
@ApiModelProperty(value="(定值结果)")
|
||||
private String fixedResult;
|
||||
|
||||
/**
|
||||
* (制造商)
|
||||
*/
|
||||
@ApiModelProperty(value="(制造商)")
|
||||
private String manufacturerId;
|
||||
|
||||
/**
|
||||
* (编号)
|
||||
*/
|
||||
@ApiModelProperty(value="(编号)")
|
||||
private String number;
|
||||
|
||||
/**
|
||||
* (处理时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(处理时间)")
|
||||
private LocalDateTime processingTime;
|
||||
|
||||
/**
|
||||
* (购置时间)
|
||||
*/
|
||||
@ApiModelProperty(value="(购置时间)")
|
||||
private LocalDateTime purchaseTime;
|
||||
|
||||
/**
|
||||
* (数量)
|
||||
*/
|
||||
@ApiModelProperty(value="(数量)")
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* (申请原因)
|
||||
*/
|
||||
@ApiModelProperty(value="(申请原因)")
|
||||
private String reasonForApplication;
|
||||
|
||||
/**
|
||||
* (标准物质id)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质id)")
|
||||
private String referenceMaterialId;
|
||||
|
||||
/**
|
||||
* (标准物质管理员ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质管理员ID)")
|
||||
private String managerId;
|
||||
|
||||
/**
|
||||
* (备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(备注)")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* (规格)
|
||||
*/
|
||||
@ApiModelProperty(value="(规格)")
|
||||
private String specification;
|
||||
|
||||
/**
|
||||
* (技术负责人id)
|
||||
*/
|
||||
@ApiModelProperty(value="(技术负责人id)")
|
||||
private String technicalDirectorId;
|
||||
|
||||
/**
|
||||
* standardMaterialApprovalFormId
|
||||
*/
|
||||
@TableId(value = "standard_material_approval_form_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="standardMaterialApprovalFormId")
|
||||
private String standardMaterialApprovalFormId;
|
||||
|
||||
|
||||
}
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
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:05
|
||||
* @describe (标准储备溶液配制及使用记录表) 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "standard_reserve_solution", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(标准储备溶液配制及使用记录表)")
|
||||
public class StandardReserveSolution extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (配置浓度(mg/mL))
|
||||
*/
|
||||
@ApiModelProperty(value="(配置浓度(mg/mL))")
|
||||
private Double configurationConcentration;
|
||||
|
||||
/**
|
||||
* (配置日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(配置日期)")
|
||||
private LocalDateTime configurationDate;
|
||||
|
||||
/**
|
||||
* (定容体积(mL))
|
||||
*/
|
||||
@ApiModelProperty(value="(定容体积(mL))")
|
||||
private Double constantVolume;
|
||||
|
||||
/**
|
||||
* (使用日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(使用日期)")
|
||||
private LocalDateTime dateOfUse;
|
||||
|
||||
/**
|
||||
* (配制人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(配制人ID)")
|
||||
private String dispenserId;
|
||||
|
||||
/**
|
||||
* (使用次序)
|
||||
*/
|
||||
@ApiModelProperty(value="(使用次序)")
|
||||
private Integer orderofuse;
|
||||
|
||||
/**
|
||||
* (使用数量(mL))
|
||||
*/
|
||||
@ApiModelProperty(value="(使用数量(mL))")
|
||||
private String quantityUsed;
|
||||
|
||||
/**
|
||||
* (标准物质ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质ID)")
|
||||
private String referenceMaterialId;
|
||||
|
||||
/**
|
||||
* (标准物质编号)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质编号)")
|
||||
private String referenceMaterialNumber;
|
||||
|
||||
/**
|
||||
* (标准物质称取量)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准物质称取量)")
|
||||
private Double referenceMaterialScale;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(备注)")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* (溶液名称)
|
||||
*/
|
||||
@ApiModelProperty(value="(溶液名称)")
|
||||
private String solutionName;
|
||||
|
||||
/**
|
||||
* (溶液编号)
|
||||
*/
|
||||
@ApiModelProperty(value="(溶液编号)")
|
||||
private String solutionNumbering;
|
||||
|
||||
/**
|
||||
* (使用溶剂)
|
||||
*/
|
||||
@ApiModelProperty(value="(使用溶剂)")
|
||||
private String useOfSolvent;
|
||||
|
||||
/**
|
||||
* (使用人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(使用人ID)")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* (有效期限)
|
||||
*/
|
||||
@ApiModelProperty(value="(有效期限)")
|
||||
private LocalDateTime validityPeriod;
|
||||
|
||||
/**
|
||||
* standardReserveSolutionId
|
||||
*/
|
||||
@TableId(value = "standard_reserve_solution_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="standardReserveSolutionId")
|
||||
private String standardReserveSolutionId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
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 = "standard_solution_curve", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(标准工作曲线溶液配置记录表)")
|
||||
public class StandardSolutionCurve extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (配制人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="(配制人ID)")
|
||||
private String dispenserId;
|
||||
|
||||
/**
|
||||
* (序号)
|
||||
*/
|
||||
@ApiModelProperty(value="(序号)")
|
||||
private String serialnNumber;
|
||||
|
||||
/**
|
||||
* (溶液名称)
|
||||
*/
|
||||
@ApiModelProperty(value="(溶液名称)")
|
||||
private String solutionName;
|
||||
|
||||
/**
|
||||
* (标准储备溶液浓度)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准储备溶液浓度)")
|
||||
private String solutionConcentration;
|
||||
|
||||
/**
|
||||
* (标准储备溶液浓度编号)
|
||||
*/
|
||||
@ApiModelProperty(value="(标准储备溶液浓度编号)")
|
||||
private String concentrationNumbering;
|
||||
|
||||
/**
|
||||
* (逐级溶液浓度)
|
||||
*/
|
||||
@ApiModelProperty(value="(逐级溶液浓度)")
|
||||
private String stepSolutionConcentration;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (工作曲线溶液配置日期)
|
||||
*/
|
||||
@ApiModelProperty(value="(工作曲线溶液配置日期)")
|
||||
private LocalDateTime configurationDate;
|
||||
|
||||
/**
|
||||
* standardSolutionCurveId
|
||||
*/
|
||||
@TableId(value = "standard_solution_curve_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="standardSolutionCurveId")
|
||||
private String standardSolutionCurveId;
|
||||
|
||||
/**
|
||||
* storageRegistrationFormId
|
||||
*/
|
||||
@ApiModelProperty(value="storageRegistrationFormId")
|
||||
private String storageRegistrationFormId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
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 reagentConsumableNumber;
|
||||
|
||||
/**
|
||||
* (试剂耗材类型)
|
||||
*/
|
||||
@ApiModelProperty(value="(试剂耗材类型)")
|
||||
private String reagentConsumableType;
|
||||
|
||||
/**
|
||||
* (备注)
|
||||
*/
|
||||
@ApiModelProperty(value="(备注)")
|
||||
private String remarks;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (存储期限)
|
||||
*/
|
||||
@ApiModelProperty(value="(存储期限)")
|
||||
private LocalDateTime storageLife;
|
||||
|
||||
/**
|
||||
* storageRegistrationFormId
|
||||
*/
|
||||
@TableId(value = "storage_registration_form_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="storageRegistrationFormId")
|
||||
private String storageRegistrationFormId;
|
||||
|
||||
/**
|
||||
* signedBatchListId
|
||||
*/
|
||||
@ApiModelProperty(value="signedBatchListId")
|
||||
private String signedBatchListId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
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:05
|
||||
* @describe (服务商/供应商信息) 实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "supplier_information", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(服务商/供应商信息)")
|
||||
public class SupplierInformation extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (合格状态)
|
||||
*/
|
||||
@ApiModelProperty(value="(合格状态)")
|
||||
private String acceptableCondition;
|
||||
|
||||
/**
|
||||
* (联系人电话)
|
||||
*/
|
||||
@ApiModelProperty(value="(联系人电话)")
|
||||
private String contactNumber;
|
||||
|
||||
/**
|
||||
* (联系人名称)
|
||||
*/
|
||||
@ApiModelProperty(value="(联系人名称)")
|
||||
private String contactPersonName;
|
||||
|
||||
/**
|
||||
* (供应人姓名)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应人姓名)")
|
||||
private String nameOfSupplier;
|
||||
|
||||
/**
|
||||
* (供应人照片)路径
|
||||
*/
|
||||
@ApiModelProperty(value="(供应人照片)路径")
|
||||
private String photographOfSupplier;
|
||||
|
||||
/**
|
||||
* (资质文件)路径
|
||||
*/
|
||||
@ApiModelProperty(value="(资质文件)路径")
|
||||
private String qualificationDocument;
|
||||
|
||||
/**
|
||||
* (供应范围)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应范围)")
|
||||
private String scopeOfSupply;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* (供应商编码)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商编码)")
|
||||
private String supplierCoding;
|
||||
|
||||
/**
|
||||
* (供应人身份证号)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应人身份证号)")
|
||||
private String supplierIdnumber;
|
||||
|
||||
/**
|
||||
* (供应商名称)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应商名称)")
|
||||
private String supplierName;
|
||||
|
||||
/**
|
||||
* (供应人电话)
|
||||
*/
|
||||
@ApiModelProperty(value="(供应人电话)")
|
||||
private String supplierTelephone;
|
||||
|
||||
/**
|
||||
* supplierInformationId
|
||||
*/
|
||||
@TableId(value = "supplier_information_id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="supplierInformationId")
|
||||
private String supplierInformationId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
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> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.AcceptanceRecordForm;
|
||||
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 AcceptanceRecordFormMapper extends BaseMapper<AcceptanceRecordForm> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.AfterSaleSituation;
|
||||
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 AfterSaleSituationMapper extends BaseMapper<AfterSaleSituation> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.ApplicationForUse;
|
||||
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 ApplicationForUseMapper extends BaseMapper<ApplicationForUse> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.BatchDetails;
|
||||
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 BatchDetailsMapper extends BaseMapper<BatchDetails> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.Blacklist;
|
||||
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 BlacklistMapper extends BaseMapper<Blacklist> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.CatalogueDetails;
|
||||
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 CatalogueDetailsMapper extends BaseMapper<CatalogueDetails> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.CentralizedRequest;
|
||||
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 CentralizedRequestMapper extends BaseMapper<CentralizedRequest> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.CheckContent;
|
||||
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 CheckContentMapper extends BaseMapper<CheckContent> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.ComplianceCheck;
|
||||
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 ComplianceCheckMapper extends BaseMapper<ComplianceCheck> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
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
@@ -0,0 +1,17 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.DecentralizeDetails;
|
||||
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 DecentralizeDetailsMapper extends BaseMapper<DecentralizeDetails> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.DecentralizedRequest;
|
||||
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 DecentralizedRequestMapper extends BaseMapper<DecentralizedRequest> {
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user