parent
cc3d35b8ed
commit
782b953af6
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,41 @@ |
|||||||
|
package digital.laboratory.platform.reagent.controller; |
||||||
|
|
||||||
|
import digital.laboratory.platform.common.core.util.R; |
||||||
|
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
||||||
|
import digital.laboratory.platform.reagent.entity.AngleMark; |
||||||
|
import digital.laboratory.platform.reagent.service.AngleMarkService; |
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.security.oauth2.provider.OAuth2Authentication; |
||||||
|
import org.springframework.stereotype.Controller; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||||
|
import org.springframework.web.bind.annotation.RestController; |
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest; |
||||||
|
import javax.servlet.http.HttpServletResponse; |
||||||
|
import java.security.Principal; |
||||||
|
|
||||||
|
@RestController |
||||||
|
@RequestMapping("/angleMark") |
||||||
|
@Api(value = "angleMark", tags = "获取角标接口") |
||||||
|
public class AngleMarkController { |
||||||
|
|
||||||
|
@Autowired |
||||||
|
private AngleMarkService angleMarkService; |
||||||
|
|
||||||
|
|
||||||
|
@GetMapping |
||||||
|
@ApiOperation(value = "获取全局角标", notes = "获取全局角标") |
||||||
|
public R<AngleMark> getAngleMark( HttpServletRequest httpServletRequest) { |
||||||
|
|
||||||
|
Principal principal = httpServletRequest.getUserPrincipal(); |
||||||
|
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
||||||
|
AngleMark mark = angleMarkService.getMark(dlpUser); |
||||||
|
|
||||||
|
return R.ok(mark); |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -1,163 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.controller; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||||
import digital.laboratory.platform.common.core.util.R; |
|
||||||
import digital.laboratory.platform.common.log.annotation.SysLog; |
|
||||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
|
||||||
import digital.laboratory.platform.reagent.entity.CabinetForm; |
|
||||||
import digital.laboratory.platform.reagent.service.CabinetFormService; |
|
||||||
import digital.laboratory.platform.reagent.vo.CabinetFormVO; |
|
||||||
import org.springframework.security.access.prepost.PreAuthorize; |
|
||||||
import io.swagger.annotations.Api; |
|
||||||
import io.swagger.annotations.ApiOperation; |
|
||||||
import lombok.RequiredArgsConstructor; |
|
||||||
import org.springframework.security.oauth2.provider.OAuth2Authentication; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest; |
|
||||||
import javax.servlet.http.HttpServletResponse; |
|
||||||
import java.io.IOException; |
|
||||||
import java.security.Principal; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author Zhang Xiaolong created at 2023-03-22 |
|
||||||
* @describe 前端控制器 |
|
||||||
* <p> |
|
||||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 |
|
||||||
* 这里写什么: |
|
||||||
* 为前端提供数据, 接受前端的数据 |
|
||||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 |
|
||||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 |
|
||||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequiredArgsConstructor |
|
||||||
@RequestMapping("/cabinet_form") |
|
||||||
@Api(value = "cabinet_form", tags = "柜子管理") |
|
||||||
public class CabinetFormController { |
|
||||||
|
|
||||||
private final CabinetFormService cabinetFormService; |
|
||||||
|
|
||||||
/** |
|
||||||
* 通过id查询 |
|
||||||
* |
|
||||||
* @param cabinetFormId id |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "通过id查询柜子信息", notes = "通过id查询柜子信息") |
|
||||||
@GetMapping() |
|
||||||
// @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_get')" )
|
|
||||||
|
|
||||||
public R<CabinetFormVO> getById(String cabinetFormId, HttpServletRequest theHttpServletRequest) { |
|
||||||
|
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
|
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
CabinetFormVO formById = cabinetFormService.getFormById(cabinetFormId); |
|
||||||
|
|
||||||
return R.ok(formById); |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 分页查询 |
|
||||||
* |
|
||||||
* @param page 分页对象 |
|
||||||
* @param cabinetForm |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "分页查询", notes = "分页查询") |
|
||||||
@GetMapping("/page") |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_cabinet_form_get')") |
|
||||||
public R<IPage<CabinetForm>> getCabinetFormPage(Page<CabinetForm> page, CabinetForm cabinetForm, HttpServletRequest theHttpServletRequest) { |
|
||||||
|
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
|
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
IPage<CabinetForm> cabinetFormSList = cabinetFormService.page(page, Wrappers.<CabinetForm>query() |
|
||||||
.orderByDesc("create_time") |
|
||||||
); |
|
||||||
return R.ok(cabinetFormSList); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 新增 |
|
||||||
* |
|
||||||
* @param cabinetForm |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "新增柜子信息", notes = "新增柜子信息") |
|
||||||
@SysLog("新增柜子信息") |
|
||||||
@PostMapping |
|
||||||
// @PreAuthorize("@pms.hasPermission('reagent_cabinet_form_add')" )
|
|
||||||
public R<CabinetForm> postAddObject(@RequestBody CabinetForm cabinetForm, HttpServletRequest theHttpServletRequest) { |
|
||||||
|
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
|
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
CabinetForm form = cabinetFormService.addById(cabinetForm); |
|
||||||
|
|
||||||
if (form != null) { |
|
||||||
return R.ok(cabinetForm, "保存成功"); |
|
||||||
} else { |
|
||||||
return R.failed(cabinetForm, "保存失败"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 修改 |
|
||||||
* |
|
||||||
* @param cabinetForm |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "修改柜子信息", notes = "新增柜子信息") |
|
||||||
@SysLog("新增柜子信息") |
|
||||||
@PutMapping |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_cabinet_form_edit')") |
|
||||||
public R<CabinetForm> putUpdateById(@RequestBody CabinetForm cabinetForm, HttpServletRequest theHttpServletRequest) { |
|
||||||
|
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
|
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
CabinetForm form = cabinetFormService.editById(cabinetForm); |
|
||||||
|
|
||||||
if (form != null) { |
|
||||||
return R.ok(cabinetForm, "保存成功"); |
|
||||||
} else { |
|
||||||
return R.failed(cabinetForm, "保存失败"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 通过id删除 |
|
||||||
* |
|
||||||
* @param cabinetFormId id |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "通过id删除柜子信息", notes = "通过id删除柜子信息") |
|
||||||
@SysLog("通过id删除柜子信息") |
|
||||||
@DeleteMapping("/{cabinetFormId}") |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_cabinet_form_del')") |
|
||||||
public R<String> deleteById(@PathVariable String cabinetFormId, HttpServletRequest theHttpServletRequest) { |
|
||||||
|
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
|
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
if (cabinetFormService.delById(cabinetFormId)) { |
|
||||||
return R.ok("删除成功"); |
|
||||||
} else { |
|
||||||
return R.failed("删除失败"); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,151 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.controller; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||||
import digital.laboratory.platform.common.core.util.R; |
|
||||||
import digital.laboratory.platform.common.log.annotation.SysLog; |
|
||||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
|
||||||
import digital.laboratory.platform.reagent.entity.DeactivationApplication; |
|
||||||
import digital.laboratory.platform.reagent.service.DeactivationApplicationService; |
|
||||||
import org.springframework.security.access.prepost.PreAuthorize; |
|
||||||
import io.swagger.annotations.Api; |
|
||||||
import io.swagger.annotations.ApiOperation; |
|
||||||
import lombok.RequiredArgsConstructor; |
|
||||||
import org.springframework.security.oauth2.provider.OAuth2Authentication; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest; |
|
||||||
import javax.servlet.http.HttpServletResponse; |
|
||||||
import java.io.IOException; |
|
||||||
import java.security.Principal; |
|
||||||
|
|
||||||
/** |
|
||||||
* (标准物质到期停用申请表) |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (标准物质到期停用申请表) 前端控制器 |
|
||||||
* |
|
||||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 |
|
||||||
* 这里写什么: |
|
||||||
* 为前端提供数据, 接受前端的数据 |
|
||||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 |
|
||||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 |
|
||||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequiredArgsConstructor |
|
||||||
@RequestMapping("/deactivation_application" ) |
|
||||||
@Api(value = "deactivation_application", tags = "(标准物质到期停用申请表)管理") |
|
||||||
public class DeactivationApplicationController { |
|
||||||
|
|
||||||
private final DeactivationApplicationService deactivationApplicationService; |
|
||||||
|
|
||||||
/** |
|
||||||
* 通过id查询(标准物质到期停用申请表) |
|
||||||
* @param deactivationApplicationId id |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "通过id查询", notes = "通过id查询") |
|
||||||
@GetMapping("/{deactivationApplicationId}" ) |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_deactivation_application_get')" ) |
|
||||||
public R<DeactivationApplication> getById(@PathVariable("deactivationApplicationId" ) String deactivationApplicationId, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
DeactivationApplication deactivationApplication = deactivationApplicationService.getById(deactivationApplicationId); |
|
||||||
return R.ok(deactivationApplication); |
|
||||||
//return R.ok(deactivationApplicationService.getById(deactivationApplicationId));
|
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 分页查询 |
|
||||||
* @param page 分页对象 |
|
||||||
* @param deactivationApplication (标准物质到期停用申请表) |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "分页查询", notes = "分页查询") |
|
||||||
@GetMapping("/page" ) |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_deactivation_application_get')" ) |
|
||||||
public R<IPage<DeactivationApplication>> getDeactivationApplicationPage(Page<DeactivationApplication> page, DeactivationApplication deactivationApplication, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
IPage<DeactivationApplication> deactivationApplicationSList = deactivationApplicationService.page(page, Wrappers.<DeactivationApplication>query() |
|
||||||
.eq("create_by", dlpUser.getId()) |
|
||||||
.orderByDesc("create_time") |
|
||||||
); |
|
||||||
return R.ok(deactivationApplicationSList); |
|
||||||
// return R.ok(deactivationApplicationService.page(page, Wrappers.query(deactivationApplication)));
|
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 新增(标准物质到期停用申请表) |
|
||||||
* @param deactivationApplication (标准物质到期停用申请表) |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "新增(标准物质到期停用申请表)", notes = "新增(标准物质到期停用申请表)") |
|
||||||
@SysLog("新增(标准物质到期停用申请表)" ) |
|
||||||
@PostMapping |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_deactivation_application_add')" ) |
|
||||||
public R<DeactivationApplication> postAddObject(@RequestBody DeactivationApplication deactivationApplication, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
deactivationApplication.setApplicantId(IdWorker.get32UUID().toUpperCase()); |
|
||||||
if (deactivationApplicationService.save(deactivationApplication)) { |
|
||||||
return R.ok(deactivationApplication, "对象创建成功"); |
|
||||||
} |
|
||||||
else { |
|
||||||
return R.failed(deactivationApplication, "对象创建失败"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 修改(标准物质到期停用申请表) |
|
||||||
* @param deactivationApplication (标准物质到期停用申请表) |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "修改(标准物质到期停用申请表)", notes = "修改(标准物质到期停用申请表)") |
|
||||||
@SysLog("修改(标准物质到期停用申请表)" ) |
|
||||||
@PutMapping |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_deactivation_application_edit')" ) |
|
||||||
public R<DeactivationApplication> putUpdateById(@RequestBody DeactivationApplication deactivationApplication, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
if (deactivationApplicationService.updateById(deactivationApplication)) { |
|
||||||
return R.ok(deactivationApplication, "保存对象成功"); |
|
||||||
} |
|
||||||
else { |
|
||||||
return R.failed(deactivationApplication, "保存对象失败"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 通过id删除(标准物质到期停用申请表) |
|
||||||
* @param deactivationApplicationId id |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "通过id删除(标准物质到期停用申请表)", notes = "通过id删除(标准物质到期停用申请表)") |
|
||||||
@SysLog("通过id删除(标准物质到期停用申请表)" ) |
|
||||||
@DeleteMapping("/{deactivationApplicationId}" ) |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_deactivation_application_del')" ) |
|
||||||
public R<DeactivationApplication> deleteById(@PathVariable String deactivationApplicationId, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
DeactivationApplication oldDeactivationApplication = deactivationApplicationService.getById(deactivationApplicationId); |
|
||||||
|
|
||||||
if (deactivationApplicationService.removeById(deactivationApplicationId)) { |
|
||||||
return R.ok(oldDeactivationApplication, "对象删除成功"); |
|
||||||
} |
|
||||||
else { |
|
||||||
return R.failed(oldDeactivationApplication, "对象删除失败"); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,151 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.controller; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||||
import digital.laboratory.platform.common.core.util.R; |
|
||||||
import digital.laboratory.platform.common.log.annotation.SysLog; |
|
||||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
|
||||||
import digital.laboratory.platform.reagent.entity.DisqualificationForm; |
|
||||||
import digital.laboratory.platform.reagent.service.DisqualificationFormService; |
|
||||||
import org.springframework.security.access.prepost.PreAuthorize; |
|
||||||
import io.swagger.annotations.Api; |
|
||||||
import io.swagger.annotations.ApiOperation; |
|
||||||
import lombok.RequiredArgsConstructor; |
|
||||||
import org.springframework.security.oauth2.provider.OAuth2Authentication; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest; |
|
||||||
import javax.servlet.http.HttpServletResponse; |
|
||||||
import java.io.IOException; |
|
||||||
import java.security.Principal; |
|
||||||
|
|
||||||
/** |
|
||||||
* |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-23 |
|
||||||
* @describe 前端控制器 |
|
||||||
* |
|
||||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 |
|
||||||
* 这里写什么: |
|
||||||
* 为前端提供数据, 接受前端的数据 |
|
||||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 |
|
||||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 |
|
||||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequiredArgsConstructor |
|
||||||
@RequestMapping("/disqualification_form" ) |
|
||||||
@Api(value = "disqualification_form", tags = "管理") |
|
||||||
public class DisqualificationFormController { |
|
||||||
|
|
||||||
private final DisqualificationFormService disqualificationFormService; |
|
||||||
|
|
||||||
/** |
|
||||||
* 通过id查询 |
|
||||||
* @param disqualificationFormId id |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "通过id查询", notes = "通过id查询") |
|
||||||
@GetMapping("/{disqualificationFormId}" ) |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_disqualification_form_get')" ) |
|
||||||
public R<DisqualificationForm> getById(@PathVariable("disqualificationFormId" ) String disqualificationFormId, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
DisqualificationForm disqualificationForm = disqualificationFormService.getById(disqualificationFormId); |
|
||||||
return R.ok(disqualificationForm); |
|
||||||
//return R.ok(disqualificationFormService.getById(disqualificationFormId));
|
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 分页查询 |
|
||||||
* @param page 分页对象 |
|
||||||
* @param disqualificationForm |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "分页查询", notes = "分页查询") |
|
||||||
@GetMapping("/page" ) |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_disqualification_form_get')" ) |
|
||||||
public R<IPage<DisqualificationForm>> getDisqualificationFormPage(Page<DisqualificationForm> page, DisqualificationForm disqualificationForm, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
IPage<DisqualificationForm> disqualificationFormSList = disqualificationFormService.page(page, Wrappers.<DisqualificationForm>query() |
|
||||||
.eq("create_by", dlpUser.getId()) |
|
||||||
.orderByDesc("create_time") |
|
||||||
); |
|
||||||
return R.ok(disqualificationFormSList); |
|
||||||
// return R.ok(disqualificationFormService.page(page, Wrappers.query(disqualificationForm)));
|
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 新增 |
|
||||||
* @param disqualificationForm |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "新增", notes = "新增") |
|
||||||
@SysLog("新增" ) |
|
||||||
@PostMapping |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_disqualification_form_add')" ) |
|
||||||
public R<DisqualificationForm> postAddObject(@RequestBody DisqualificationForm disqualificationForm, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
disqualificationForm.setDisqualificationFormId(IdWorker.get32UUID().toUpperCase()); |
|
||||||
if (disqualificationFormService.save(disqualificationForm)) { |
|
||||||
return R.ok(disqualificationForm, "对象创建成功"); |
|
||||||
} |
|
||||||
else { |
|
||||||
return R.failed(disqualificationForm, "对象创建失败"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 修改 |
|
||||||
* @param disqualificationForm |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "修改", notes = "修改") |
|
||||||
@SysLog("修改" ) |
|
||||||
@PutMapping |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_disqualification_form_edit')" ) |
|
||||||
public R<DisqualificationForm> putUpdateById(@RequestBody DisqualificationForm disqualificationForm, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
if (disqualificationFormService.updateById(disqualificationForm)) { |
|
||||||
return R.ok(disqualificationForm, "保存对象成功"); |
|
||||||
} |
|
||||||
else { |
|
||||||
return R.failed(disqualificationForm, "保存对象失败"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 通过id删除 |
|
||||||
* @param disqualificationFormId id |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "通过id删除", notes = "通过id删除") |
|
||||||
@SysLog("通过id删除" ) |
|
||||||
@DeleteMapping("/{disqualificationFormId}" ) |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_disqualification_form_del')" ) |
|
||||||
public R<DisqualificationForm> deleteById(@PathVariable String disqualificationFormId, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
DisqualificationForm oldDisqualificationForm = disqualificationFormService.getById(disqualificationFormId); |
|
||||||
|
|
||||||
if (disqualificationFormService.removeById(disqualificationFormId)) { |
|
||||||
return R.ok(oldDisqualificationForm, "对象删除成功"); |
|
||||||
} |
|
||||||
else { |
|
||||||
return R.failed(oldDisqualificationForm, "对象删除失败"); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,151 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.controller; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||||
import digital.laboratory.platform.common.core.util.R; |
|
||||||
import digital.laboratory.platform.common.log.annotation.SysLog; |
|
||||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
|
||||||
import digital.laboratory.platform.reagent.entity.ExpirationReminder; |
|
||||||
import digital.laboratory.platform.reagent.service.ExpirationReminderService; |
|
||||||
import org.springframework.security.access.prepost.PreAuthorize; |
|
||||||
import io.swagger.annotations.Api; |
|
||||||
import io.swagger.annotations.ApiOperation; |
|
||||||
import lombok.RequiredArgsConstructor; |
|
||||||
import org.springframework.security.oauth2.provider.OAuth2Authentication; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest; |
|
||||||
import javax.servlet.http.HttpServletResponse; |
|
||||||
import java.io.IOException; |
|
||||||
import java.security.Principal; |
|
||||||
|
|
||||||
/** |
|
||||||
* (试剂耗材到期提醒) |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (试剂耗材到期提醒) 前端控制器 |
|
||||||
* |
|
||||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 |
|
||||||
* 这里写什么: |
|
||||||
* 为前端提供数据, 接受前端的数据 |
|
||||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 |
|
||||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 |
|
||||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequiredArgsConstructor |
|
||||||
@RequestMapping("/expiration_reminder" ) |
|
||||||
@Api(value = "expiration_reminder", tags = "(试剂耗材到期提醒)管理") |
|
||||||
public class ExpirationReminderController { |
|
||||||
|
|
||||||
private final ExpirationReminderService expirationReminderService; |
|
||||||
|
|
||||||
/** |
|
||||||
* 通过id查询(试剂耗材到期提醒) |
|
||||||
* @param expirationReminderId id |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "通过id查询", notes = "通过id查询") |
|
||||||
@GetMapping("/{expirationReminderId}" ) |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_expiration_reminder_get')" ) |
|
||||||
public R<ExpirationReminder> getById(@PathVariable("expirationReminderId" ) String expirationReminderId, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
ExpirationReminder expirationReminder = expirationReminderService.getById(expirationReminderId); |
|
||||||
return R.ok(expirationReminder); |
|
||||||
//return R.ok(expirationReminderService.getById(expirationReminderId));
|
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 分页查询 |
|
||||||
* @param page 分页对象 |
|
||||||
* @param expirationReminder (试剂耗材到期提醒) |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "分页查询", notes = "分页查询") |
|
||||||
@GetMapping("/page" ) |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_expiration_reminder_get')" ) |
|
||||||
public R<IPage<ExpirationReminder>> getExpirationReminderPage(Page<ExpirationReminder> page, ExpirationReminder expirationReminder, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
IPage<ExpirationReminder> expirationReminderSList = expirationReminderService.page(page, Wrappers.<ExpirationReminder>query() |
|
||||||
.eq("create_by", dlpUser.getId()) |
|
||||||
.orderByDesc("create_time") |
|
||||||
); |
|
||||||
return R.ok(expirationReminderSList); |
|
||||||
// return R.ok(expirationReminderService.page(page, Wrappers.query(expirationReminder)));
|
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 新增(试剂耗材到期提醒) |
|
||||||
* @param expirationReminder (试剂耗材到期提醒) |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "新增(试剂耗材到期提醒)", notes = "新增(试剂耗材到期提醒)") |
|
||||||
@SysLog("新增(试剂耗材到期提醒)" ) |
|
||||||
@PostMapping |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_expiration_reminder_add')" ) |
|
||||||
public R<ExpirationReminder> postAddObject(@RequestBody ExpirationReminder expirationReminder, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
expirationReminder.setExpirationReminderId(IdWorker.get32UUID().toUpperCase()); |
|
||||||
if (expirationReminderService.save(expirationReminder)) { |
|
||||||
return R.ok(expirationReminder, "对象创建成功"); |
|
||||||
} |
|
||||||
else { |
|
||||||
return R.failed(expirationReminder, "对象创建失败"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 修改(试剂耗材到期提醒) |
|
||||||
* @param expirationReminder (试剂耗材到期提醒) |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "修改(试剂耗材到期提醒)", notes = "修改(试剂耗材到期提醒)") |
|
||||||
@SysLog("修改(试剂耗材到期提醒)" ) |
|
||||||
@PutMapping |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_expiration_reminder_edit')" ) |
|
||||||
public R<ExpirationReminder> putUpdateById(@RequestBody ExpirationReminder expirationReminder, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
if (expirationReminderService.updateById(expirationReminder)) { |
|
||||||
return R.ok(expirationReminder, "保存对象成功"); |
|
||||||
} |
|
||||||
else { |
|
||||||
return R.failed(expirationReminder, "保存对象失败"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 通过id删除(试剂耗材到期提醒) |
|
||||||
* @param expirationReminderId id |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "通过id删除(试剂耗材到期提醒)", notes = "通过id删除(试剂耗材到期提醒)") |
|
||||||
@SysLog("通过id删除(试剂耗材到期提醒)" ) |
|
||||||
@DeleteMapping("/{expirationReminderId}" ) |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_expiration_reminder_del')" ) |
|
||||||
public R<ExpirationReminder> deleteById(@PathVariable String expirationReminderId, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
ExpirationReminder oldExpirationReminder = expirationReminderService.getById(expirationReminderId); |
|
||||||
|
|
||||||
if (expirationReminderService.removeById(expirationReminderId)) { |
|
||||||
return R.ok(oldExpirationReminder, "对象删除成功"); |
|
||||||
} |
|
||||||
else { |
|
||||||
return R.failed(oldExpirationReminder, "对象删除失败"); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,151 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.controller; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||||
import digital.laboratory.platform.common.core.util.R; |
|
||||||
import digital.laboratory.platform.common.log.annotation.SysLog; |
|
||||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
|
||||||
import digital.laboratory.platform.reagent.entity.LocationInformation; |
|
||||||
import digital.laboratory.platform.reagent.service.LocationInformationService; |
|
||||||
import org.springframework.security.access.prepost.PreAuthorize; |
|
||||||
import io.swagger.annotations.Api; |
|
||||||
import io.swagger.annotations.ApiOperation; |
|
||||||
import lombok.RequiredArgsConstructor; |
|
||||||
import org.springframework.security.oauth2.provider.OAuth2Authentication; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest; |
|
||||||
import javax.servlet.http.HttpServletResponse; |
|
||||||
import java.io.IOException; |
|
||||||
import java.security.Principal; |
|
||||||
|
|
||||||
/** |
|
||||||
* (位置信息) |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (位置信息) 前端控制器 |
|
||||||
* |
|
||||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 |
|
||||||
* 这里写什么: |
|
||||||
* 为前端提供数据, 接受前端的数据 |
|
||||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 |
|
||||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 |
|
||||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequiredArgsConstructor |
|
||||||
@RequestMapping("/location_information" ) |
|
||||||
@Api(value = "location_information", tags = "(位置信息)管理") |
|
||||||
public class LocationInformationController { |
|
||||||
|
|
||||||
private final LocationInformationService locationInformationService; |
|
||||||
|
|
||||||
/** |
|
||||||
* 通过id查询(位置信息) |
|
||||||
* @param locationInformationId id |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "通过id查询", notes = "通过id查询") |
|
||||||
@GetMapping("/{locationInformationId}" ) |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_location_information_get')" ) |
|
||||||
public R<LocationInformation> getById(@PathVariable("locationInformationId" ) String locationInformationId, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
LocationInformation locationInformation = locationInformationService.getById(locationInformationId); |
|
||||||
return R.ok(locationInformation); |
|
||||||
//return R.ok(locationInformationService.getById(locationInformationId));
|
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 分页查询 |
|
||||||
* @param page 分页对象 |
|
||||||
* @param locationInformation (位置信息) |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "分页查询", notes = "分页查询") |
|
||||||
@GetMapping("/page" ) |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_location_information_get')" ) |
|
||||||
public R<IPage<LocationInformation>> getLocationInformationPage(Page<LocationInformation> page, LocationInformation locationInformation, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
IPage<LocationInformation> locationInformationSList = locationInformationService.page(page, Wrappers.<LocationInformation>query() |
|
||||||
.eq("create_by", dlpUser.getId()) |
|
||||||
.orderByDesc("create_time") |
|
||||||
); |
|
||||||
return R.ok(locationInformationSList); |
|
||||||
// return R.ok(locationInformationService.page(page, Wrappers.query(locationInformation)));
|
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 新增(位置信息) |
|
||||||
* @param locationInformation (位置信息) |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "新增(位置信息)", notes = "新增(位置信息)") |
|
||||||
@SysLog("新增(位置信息)" ) |
|
||||||
@PostMapping |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_location_information_add')" ) |
|
||||||
public R<LocationInformation> postAddObject(@RequestBody LocationInformation locationInformation, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
locationInformation.setLocationInformationId(IdWorker.get32UUID().toUpperCase()); |
|
||||||
if (locationInformationService.save(locationInformation)) { |
|
||||||
return R.ok(locationInformation, "对象创建成功"); |
|
||||||
} |
|
||||||
else { |
|
||||||
return R.failed(locationInformation, "对象创建失败"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 修改(位置信息) |
|
||||||
* @param locationInformation (位置信息) |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "修改(位置信息)", notes = "修改(位置信息)") |
|
||||||
@SysLog("修改(位置信息)" ) |
|
||||||
@PutMapping |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_location_information_edit')" ) |
|
||||||
public R<LocationInformation> putUpdateById(@RequestBody LocationInformation locationInformation, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
if (locationInformationService.updateById(locationInformation)) { |
|
||||||
return R.ok(locationInformation, "保存对象成功"); |
|
||||||
} |
|
||||||
else { |
|
||||||
return R.failed(locationInformation, "保存对象失败"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 通过id删除(位置信息) |
|
||||||
* @param locationInformationId id |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "通过id删除(位置信息)", notes = "通过id删除(位置信息)") |
|
||||||
@SysLog("通过id删除(位置信息)" ) |
|
||||||
@DeleteMapping("/{locationInformationId}" ) |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_location_information_del')" ) |
|
||||||
public R<LocationInformation> deleteById(@PathVariable String locationInformationId, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
LocationInformation oldLocationInformation = locationInformationService.getById(locationInformationId); |
|
||||||
|
|
||||||
if (locationInformationService.removeById(locationInformationId)) { |
|
||||||
return R.ok(oldLocationInformation, "对象删除成功"); |
|
||||||
} |
|
||||||
else { |
|
||||||
return R.failed(oldLocationInformation, "对象删除失败"); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,151 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.controller; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||||
import digital.laboratory.platform.common.core.util.R; |
|
||||||
import digital.laboratory.platform.common.log.annotation.SysLog; |
|
||||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
|
||||||
import digital.laboratory.platform.reagent.entity.StorageRegistrationForm; |
|
||||||
import digital.laboratory.platform.reagent.service.StorageRegistrationFormService; |
|
||||||
import org.springframework.security.access.prepost.PreAuthorize; |
|
||||||
import io.swagger.annotations.Api; |
|
||||||
import io.swagger.annotations.ApiOperation; |
|
||||||
import lombok.RequiredArgsConstructor; |
|
||||||
import org.springframework.security.oauth2.provider.OAuth2Authentication; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest; |
|
||||||
import javax.servlet.http.HttpServletResponse; |
|
||||||
import java.io.IOException; |
|
||||||
import java.security.Principal; |
|
||||||
|
|
||||||
/** |
|
||||||
* (试剂耗材入库登记表) |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (试剂耗材入库登记表) 前端控制器 |
|
||||||
* |
|
||||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 |
|
||||||
* 这里写什么: |
|
||||||
* 为前端提供数据, 接受前端的数据 |
|
||||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 |
|
||||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 |
|
||||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequiredArgsConstructor |
|
||||||
@RequestMapping("/storage_registration_form" ) |
|
||||||
@Api(value = "storage_registration_form", tags = "(试剂耗材入库登记表)管理") |
|
||||||
public class StorageRegistrationFormController { |
|
||||||
|
|
||||||
private final StorageRegistrationFormService storageRegistrationFormService; |
|
||||||
|
|
||||||
/** |
|
||||||
* 通过id查询(试剂耗材入库登记表) |
|
||||||
* @param storageRegistrationFormId id |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "通过id查询", notes = "通过id查询") |
|
||||||
@GetMapping("/{storageRegistrationFormId}" ) |
|
||||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_get')" )
|
|
||||||
public R<StorageRegistrationForm> getById(@PathVariable("storageRegistrationFormId" ) String storageRegistrationFormId, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
StorageRegistrationForm storageRegistrationForm = storageRegistrationFormService.getById(storageRegistrationFormId); |
|
||||||
return R.ok(storageRegistrationForm); |
|
||||||
//return R.ok(storageRegistrationFormService.getById(storageRegistrationFormId));
|
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 分页查询 |
|
||||||
* @param page 分页对象 |
|
||||||
* @param storageRegistrationForm (试剂耗材入库登记表) |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "分页查询", notes = "分页查询") |
|
||||||
@GetMapping("/page" ) |
|
||||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_get')" )
|
|
||||||
public R<IPage<StorageRegistrationForm>> getStorageRegistrationFormPage(Page<StorageRegistrationForm> page, StorageRegistrationForm storageRegistrationForm, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
IPage<StorageRegistrationForm> storageRegistrationFormSList = storageRegistrationFormService.page(page, Wrappers.<StorageRegistrationForm>query() |
|
||||||
.eq("create_by", dlpUser.getId()) |
|
||||||
.orderByDesc("create_time") |
|
||||||
); |
|
||||||
return R.ok(storageRegistrationFormSList); |
|
||||||
// return R.ok(storageRegistrationFormService.page(page, Wrappers.query(storageRegistrationForm)));
|
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 新增(试剂耗材入库登记表) |
|
||||||
* @param storageRegistrationForm (试剂耗材入库登记表) |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "新增(试剂耗材入库登记表)", notes = "新增(试剂耗材入库登记表)") |
|
||||||
@SysLog("新增(试剂耗材入库登记表)" ) |
|
||||||
@PostMapping |
|
||||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_add')" )
|
|
||||||
public R<StorageRegistrationForm> postAddObject(@RequestBody StorageRegistrationForm storageRegistrationForm, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
storageRegistrationForm.setStorageRegistrationFormId(IdWorker.get32UUID().toUpperCase()); |
|
||||||
if (storageRegistrationFormService.save(storageRegistrationForm)) { |
|
||||||
return R.ok(storageRegistrationForm, "对象创建成功"); |
|
||||||
} |
|
||||||
else { |
|
||||||
return R.failed(storageRegistrationForm, "对象创建失败"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 修改(试剂耗材入库登记表) |
|
||||||
* @param storageRegistrationForm (试剂耗材入库登记表) |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "修改(试剂耗材入库登记表)", notes = "修改(试剂耗材入库登记表)") |
|
||||||
@SysLog("修改(试剂耗材入库登记表)" ) |
|
||||||
@PutMapping |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_edit')" ) |
|
||||||
public R<StorageRegistrationForm> putUpdateById(@RequestBody StorageRegistrationForm storageRegistrationForm, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
if (storageRegistrationFormService.updateById(storageRegistrationForm)) { |
|
||||||
return R.ok(storageRegistrationForm, "保存对象成功"); |
|
||||||
} |
|
||||||
else { |
|
||||||
return R.failed(storageRegistrationForm, "保存对象失败"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 通过id删除(试剂耗材入库登记表) |
|
||||||
* @param storageRegistrationFormId id |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "通过id删除(试剂耗材入库登记表)", notes = "通过id删除(试剂耗材入库登记表)") |
|
||||||
@SysLog("通过id删除(试剂耗材入库登记表)" ) |
|
||||||
@DeleteMapping("/{storageRegistrationFormId}" ) |
|
||||||
@PreAuthorize("@pms.hasPermission('reagent_storage_registration_form_del')" ) |
|
||||||
public R<StorageRegistrationForm> deleteById(@PathVariable String storageRegistrationFormId, HttpServletRequest theHttpServletRequest) { |
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
StorageRegistrationForm oldStorageRegistrationForm = storageRegistrationFormService.getById(storageRegistrationFormId); |
|
||||||
|
|
||||||
if (storageRegistrationFormService.removeById(storageRegistrationFormId)) { |
|
||||||
return R.ok(oldStorageRegistrationForm, "对象删除成功"); |
|
||||||
} |
|
||||||
else { |
|
||||||
return R.failed(oldStorageRegistrationForm, "对象删除失败"); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,165 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.controller; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
||||||
import digital.laboratory.platform.common.core.util.R; |
|
||||||
import digital.laboratory.platform.common.log.annotation.SysLog; |
|
||||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
|
||||||
import digital.laboratory.platform.reagent.entity.StorageRoomForm; |
|
||||||
import digital.laboratory.platform.reagent.service.StorageRoomFormService; |
|
||||||
import digital.laboratory.platform.reagent.vo.StorageRoomFormVO; |
|
||||||
import org.springframework.security.access.prepost.PreAuthorize; |
|
||||||
import io.swagger.annotations.Api; |
|
||||||
import io.swagger.annotations.ApiOperation; |
|
||||||
import lombok.RequiredArgsConstructor; |
|
||||||
import org.springframework.security.oauth2.provider.OAuth2Authentication; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest; |
|
||||||
import javax.servlet.http.HttpServletResponse; |
|
||||||
import java.io.IOException; |
|
||||||
import java.security.Principal; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author Zhang Xiaolong created at 2023-03-22 |
|
||||||
* @describe 前端控制器 |
|
||||||
* <p> |
|
||||||
* 这是与表示层的接口, 不应该接业务逻辑写在这里, 业务逻辑应该写在 service 中 |
|
||||||
* 这里写什么: |
|
||||||
* 为前端提供数据, 接受前端的数据 |
|
||||||
* 为前端提供的数据, 从 service 取得后, 可以做一些适当的加工, 这种加工不是业务层面的, 只能是数据格式上, 为方便前端处理 |
|
||||||
* 接受前端的数据, 每一个函数的参数可以先做一些整理后, 再调用 service 中的函数。这里对参数的整理, 应该只是格式上的, 而不能是业务上的 |
|
||||||
* 数据层在 mapper 中, 数据层不涉及业务, 只管技术上的 对象<->表 之间的转换 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequiredArgsConstructor |
|
||||||
@RequestMapping("/storage_room_form") |
|
||||||
@Api(value = "storage_room_form", tags = "仓库存储室管理") |
|
||||||
public class StorageRoomFormController { |
|
||||||
|
|
||||||
private final StorageRoomFormService storageRoomFormService; |
|
||||||
|
|
||||||
/** |
|
||||||
* 通过id查询 |
|
||||||
* |
|
||||||
* @param storageRoomFormId id |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "通过id查询存储室信息", notes = "通过id查询存储室") |
|
||||||
@GetMapping() |
|
||||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_get')" )
|
|
||||||
public R<StorageRoomFormVO> getById(String storageRoomFormId, HttpServletRequest theHttpServletRequest) { |
|
||||||
|
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
|
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
StorageRoomFormVO formById = storageRoomFormService.getFormById(storageRoomFormId); |
|
||||||
|
|
||||||
if (formById != null) { |
|
||||||
return R.ok(formById); |
|
||||||
} else { |
|
||||||
return R.failed("不存在该ID对应的存储室"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 分页查询 |
|
||||||
* |
|
||||||
* @param page 分页对象 |
|
||||||
* @param storageRoomForm |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "分页查询", notes = "分页查询") |
|
||||||
@GetMapping("/page") |
|
||||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_get')" )
|
|
||||||
public R<IPage<StorageRoomForm>> getStorageRoomFormPage(Page<StorageRoomForm> page, StorageRoomForm storageRoomForm, HttpServletRequest theHttpServletRequest) { |
|
||||||
|
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
|
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
IPage<StorageRoomForm> storageRoomFormSList = storageRoomFormService.page(page, Wrappers.<StorageRoomForm>query() |
|
||||||
.orderByDesc("create_time") |
|
||||||
); |
|
||||||
return R.ok(storageRoomFormSList); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* 新增 |
|
||||||
* |
|
||||||
* @param storageRoomForm |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "新增存储室信息", notes = "新增存储室信息") |
|
||||||
@SysLog("新增存储室信息") |
|
||||||
@PostMapping |
|
||||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_add')")
|
|
||||||
public R<StorageRoomForm> postAddObject(@RequestBody StorageRoomForm storageRoomForm, HttpServletRequest theHttpServletRequest) { |
|
||||||
|
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
|
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
StorageRoomForm roomForm = storageRoomFormService.addById(storageRoomForm); |
|
||||||
|
|
||||||
if (roomForm!=null) { |
|
||||||
return R.ok(storageRoomForm, "保存成功"); |
|
||||||
} else { |
|
||||||
return R.failed(storageRoomForm, "保存失败"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 修改 |
|
||||||
* |
|
||||||
* @param storageRoomForm |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "修改存储室信息", notes = "修改存储室信息") |
|
||||||
@SysLog("修改存储室信息") |
|
||||||
@PutMapping |
|
||||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_edit')")
|
|
||||||
public R<StorageRoomForm> putUpdateById(@RequestBody StorageRoomForm storageRoomForm, HttpServletRequest theHttpServletRequest) { |
|
||||||
|
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
|
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
StorageRoomForm roomForm = storageRoomFormService.editById(storageRoomForm); |
|
||||||
|
|
||||||
if (roomForm!=null) { |
|
||||||
return R.ok(storageRoomForm, "保存成功"); |
|
||||||
} else { |
|
||||||
return R.failed(storageRoomForm, "保存失败"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 通过id删除 |
|
||||||
* |
|
||||||
* @param storageRoomFormId id |
|
||||||
* @return R |
|
||||||
*/ |
|
||||||
@ApiOperation(value = "通过id删除", notes = "通过id删除") |
|
||||||
@SysLog("通过id删除") |
|
||||||
@DeleteMapping("/{storageRoomFormId}") |
|
||||||
// @PreAuthorize("@pms.hasPermission('reagent_storage_room_form_del')")
|
|
||||||
public R<String > deleteById(@PathVariable String storageRoomFormId, HttpServletRequest theHttpServletRequest) { |
|
||||||
|
|
||||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
|
||||||
|
|
||||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
|
||||||
|
|
||||||
if (storageRoomFormService.delById(storageRoomFormId)) { |
|
||||||
return R.ok("删除成功"); |
|
||||||
} else { |
|
||||||
return R.failed("删除失败"); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,48 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity; |
|
||||||
import io.swagger.annotations.ApiModel; |
|
||||||
import io.swagger.annotations.ApiModelProperty; |
|
||||||
import java.io.Serializable; |
|
||||||
import java.time.LocalDateTime; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.EqualsAndHashCode; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* (验收内容) |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 14:25:06 |
|
||||||
* @describe (验收内容) 实体类 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@TableName(value = "acceptance_content", autoResultMap = true) |
|
||||||
@EqualsAndHashCode(callSuper = true) |
|
||||||
@ApiModel(value = "(验收内容)") |
|
||||||
public class AcceptanceContent extends BaseEntity { |
|
||||||
|
|
||||||
/** |
|
||||||
* (验收记录表ID) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(验收记录表ID)") |
|
||||||
private String acceptanceRecordFormId; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* (不合格项目) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(不合格项目)") |
|
||||||
private String nonconformingItem; |
|
||||||
|
|
||||||
/** |
|
||||||
* acceptanceContentId |
|
||||||
*/ |
|
||||||
@TableId(value = "acceptance_content_id", type = IdType.ASSIGN_UUID) |
|
||||||
@ApiModelProperty(value="acceptanceContentId") |
|
||||||
private String acceptanceContentId; |
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -1,42 +1,45 @@ |
|||||||
package digital.laboratory.platform.reagent.entity; |
package digital.laboratory.platform.reagent.entity; |
||||||
|
|
||||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity; |
import digital.laboratory.platform.common.mybatis.base.BaseEntity; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
||||||
import lombok.Data; |
import lombok.Data; |
||||||
|
|
||||||
@Data |
@Data |
||||||
|
@ApiModel(value = "(角标管理)") |
||||||
|
|
||||||
public class AngleMark { |
public class AngleMark { |
||||||
|
|
||||||
@ApiModelProperty(value = "审核审批角标") |
@ApiModelProperty(value = "审核审批角标") |
||||||
private Integer reviewAndApproveMark; |
private Integer review = 0; |
||||||
|
|
||||||
@ApiModelProperty(value = "采购清单角标") |
@ApiModelProperty(value = "采购清单角标") |
||||||
private Integer purchaseListMark; |
private Integer PurchaseList = 0; |
||||||
|
|
||||||
@ApiModelProperty(value = "入库角标") |
@ApiModelProperty(value = "入库角标") |
||||||
private Integer warehousingMark; |
private Integer warehouse = 0; |
||||||
|
|
||||||
@ApiModelProperty(value = "标准储备溶液入库角标") |
@ApiModelProperty(value = "标准储备溶液入库角标") |
||||||
private Integer storageOfSolutionMark; |
private Integer storageOfSolutionMark = 0; |
||||||
|
|
||||||
@ApiModelProperty(value = "采购入库角标") |
@ApiModelProperty(value = "采购入库角标") |
||||||
private Integer purchaseWarehousingMark; |
private Integer purchaseWarehousingMark = 0; |
||||||
|
|
||||||
@ApiModelProperty(value = "归还任务角标") |
@ApiModelProperty(value = "归还任务角标") |
||||||
private Integer returnMark; |
private Integer returnMark = 0; |
||||||
|
|
||||||
@ApiModelProperty(value = "符合性检查角标") |
@ApiModelProperty(value = "符合性检查角标") |
||||||
private Integer complianceCheckMark; |
private Integer concordCheck = 0; |
||||||
|
|
||||||
@ApiModelProperty(value = "验收任务角标") |
@ApiModelProperty(value = "验收任务角标") |
||||||
private Integer acceptanceMark; |
private Integer checkAccept = 0; |
||||||
|
|
||||||
@ApiModelProperty(value = "期间核查记录角标") |
@ApiModelProperty(value = "期间核查记录角标") |
||||||
private Integer periodVerificationMark; |
private Integer checkPlanList = 0; |
||||||
|
|
||||||
@ApiModelProperty(value = "出库任务角标") |
@ApiModelProperty(value = "出库任务角标") |
||||||
private Integer deliveryMark; |
private Integer OutboundManagement = 0; |
||||||
|
|
||||||
@ApiModelProperty(value = "采购目录角标") |
@ApiModelProperty(value = "采购目录角标") |
||||||
private Integer purchaseCatalogueMark; |
private Integer gatherBuyCatalog = 0; |
||||||
} |
} |
||||||
|
@ -1,75 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity; |
|
||||||
import io.swagger.annotations.ApiModel; |
|
||||||
import io.swagger.annotations.ApiModelProperty; |
|
||||||
import java.io.Serializable; |
|
||||||
import java.time.LocalDateTime; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.EqualsAndHashCode; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-22 16:04:56 |
|
||||||
* @describe 实体类 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@TableName(value = "cabinet_form", autoResultMap = true) |
|
||||||
@EqualsAndHashCode(callSuper = true) |
|
||||||
@ApiModel(value = "柜子记录表") |
|
||||||
public class CabinetForm extends BaseEntity { |
|
||||||
|
|
||||||
/** |
|
||||||
* cabinetFormId |
|
||||||
*/ |
|
||||||
@TableId(value = "id", type = IdType.ASSIGN_UUID) |
|
||||||
@ApiModelProperty(value="柜子ID:创建时,不用传入,修改时,需传入柜子ID") |
|
||||||
private String id; |
|
||||||
|
|
||||||
/** |
|
||||||
* storageRoomFormId |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="存储室ID") |
|
||||||
private String storageRoomFormId; |
|
||||||
|
|
||||||
/** |
|
||||||
* name |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="柜子名称") |
|
||||||
private String name; |
|
||||||
|
|
||||||
/** |
|
||||||
* number |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="柜子编号") |
|
||||||
private String number; |
|
||||||
|
|
||||||
/** |
|
||||||
* specification |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="柜子规格:为数字类型") |
|
||||||
private Integer specification; |
|
||||||
|
|
||||||
/** |
|
||||||
* status |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="状态(0:未存满,1:已存满)") |
|
||||||
private Integer status; |
|
||||||
|
|
||||||
/** |
|
||||||
* picture |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="图片路径") |
|
||||||
private String picture; |
|
||||||
|
|
||||||
/** |
|
||||||
* type |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="柜子类型") |
|
||||||
private String type; |
|
||||||
} |
|
@ -1,63 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity; |
|
||||||
import io.swagger.annotations.ApiModel; |
|
||||||
import io.swagger.annotations.ApiModelProperty; |
|
||||||
import java.io.Serializable; |
|
||||||
import java.time.LocalDateTime; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.EqualsAndHashCode; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* (标准物质到期停用申请表) |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 14:25:04 |
|
||||||
* @describe (标准物质到期停用申请表) 实体类 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@TableName(value = "deactivation_application", autoResultMap = true) |
|
||||||
@EqualsAndHashCode(callSuper = true) |
|
||||||
@ApiModel(value = "(标准物质到期停用申请表)") |
|
||||||
public class DeactivationApplication extends BaseEntity { |
|
||||||
|
|
||||||
/** |
|
||||||
* (申请人ID) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(申请人ID)") |
|
||||||
private String applicantId; |
|
||||||
|
|
||||||
/** |
|
||||||
* (申请时间) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(申请时间)") |
|
||||||
private LocalDateTime applicationTime; |
|
||||||
|
|
||||||
/** |
|
||||||
* (标准物质ID) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(标准物质ID)") |
|
||||||
private String referenceMaterialId; |
|
||||||
|
|
||||||
/** |
|
||||||
* (标准物质编号) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(标准物质编号)") |
|
||||||
private String referenceMaterialNumber; |
|
||||||
|
|
||||||
/** |
|
||||||
* deactivationApplicationId |
|
||||||
*/ |
|
||||||
@TableId(value = "deactivation_application_id", type = IdType.ASSIGN_UUID) |
|
||||||
@ApiModelProperty(value="deactivationApplicationId") |
|
||||||
private String deactivationApplicationId; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -1,48 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity; |
|
||||||
import io.swagger.annotations.ApiModel; |
|
||||||
import io.swagger.annotations.ApiModelProperty; |
|
||||||
import java.io.Serializable; |
|
||||||
import java.time.LocalDateTime; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.EqualsAndHashCode; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-23 11:47:25 |
|
||||||
* @describe 实体类 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@TableName(value = "disqualification_form", autoResultMap = true) |
|
||||||
@EqualsAndHashCode(callSuper = true) |
|
||||||
@ApiModel(value = "") |
|
||||||
public class DisqualificationForm extends BaseEntity { |
|
||||||
|
|
||||||
/** |
|
||||||
* reagentConsumableId |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="reagentConsumableId") |
|
||||||
private String reagentConsumableId; |
|
||||||
|
|
||||||
/** |
|
||||||
* complianceCheckId |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="符合性检查记录表") |
|
||||||
private String complianceCheckId; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* disqualificationFormId |
|
||||||
*/ |
|
||||||
@TableId(value = "disqualification_form_id", type = IdType.ASSIGN_UUID) |
|
||||||
@ApiModelProperty(value="disqualificationFormId") |
|
||||||
private String disqualificationFormId; |
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -1,63 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity; |
|
||||||
import io.swagger.annotations.ApiModel; |
|
||||||
import io.swagger.annotations.ApiModelProperty; |
|
||||||
import java.io.Serializable; |
|
||||||
import java.time.LocalDateTime; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.EqualsAndHashCode; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* (试剂耗材到期提醒) |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 14:25:04 |
|
||||||
* @describe (试剂耗材到期提醒) 实体类 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@TableName(value = "expiration_reminder", autoResultMap = true) |
|
||||||
@EqualsAndHashCode(callSuper = true) |
|
||||||
@ApiModel(value = "(试剂耗材到期提醒)") |
|
||||||
public class ExpirationReminder extends BaseEntity { |
|
||||||
|
|
||||||
/** |
|
||||||
* (试剂耗材有效期/保质期) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(试剂耗材有效期/保质期)") |
|
||||||
private LocalDateTime expirationDate; |
|
||||||
|
|
||||||
/** |
|
||||||
* (试剂耗材到期提醒信息) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(试剂耗材到期提醒信息)") |
|
||||||
private LocalDateTime expirationMessage; |
|
||||||
|
|
||||||
/** |
|
||||||
* (试剂耗材ID) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(试剂耗材ID)") |
|
||||||
private String reagentConsumableId; |
|
||||||
|
|
||||||
/** |
|
||||||
* (试剂耗材编号) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(试剂耗材编号)") |
|
||||||
private String reagentConsumableNumber; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* expirationReminderId |
|
||||||
*/ |
|
||||||
@TableId(value = "expiration_reminder_id", type = IdType.ASSIGN_UUID) |
|
||||||
@ApiModelProperty(value="expirationReminderId") |
|
||||||
private String expirationReminderId; |
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -1,56 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity; |
|
||||||
import io.swagger.annotations.ApiModel; |
|
||||||
import io.swagger.annotations.ApiModelProperty; |
|
||||||
import java.io.Serializable; |
|
||||||
import java.time.LocalDateTime; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.EqualsAndHashCode; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-22 16:10:51 |
|
||||||
* @describe 实体类 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@TableName(value = "lattice_form", autoResultMap = true) |
|
||||||
@EqualsAndHashCode(callSuper = true) |
|
||||||
@ApiModel(value = "") |
|
||||||
public class LatticeForm extends BaseEntity { |
|
||||||
|
|
||||||
/** |
|
||||||
* number |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="格子编号") |
|
||||||
private String number; |
|
||||||
|
|
||||||
/** |
|
||||||
* status |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="状态(0:未存入,1:已存入)") |
|
||||||
private Integer status; |
|
||||||
|
|
||||||
/** |
|
||||||
* latticeFormId |
|
||||||
*/ |
|
||||||
@TableId(value = "id", type = IdType.ASSIGN_UUID) |
|
||||||
@ApiModelProperty(value="格子ID") |
|
||||||
private String id; |
|
||||||
|
|
||||||
/** |
|
||||||
* cabinetFormId |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="柜子ID") |
|
||||||
private String cabinetFormId; |
|
||||||
|
|
||||||
@ApiModelProperty(value="图片路径") |
|
||||||
private String picture; |
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -1,75 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity; |
|
||||||
import io.swagger.annotations.ApiModel; |
|
||||||
import io.swagger.annotations.ApiModelProperty; |
|
||||||
import java.io.Serializable; |
|
||||||
import java.time.LocalDateTime; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.EqualsAndHashCode; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* (位置信息) |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 14:25:06 |
|
||||||
* @describe (位置信息) 实体类 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@TableName(value = "location_information", autoResultMap = true) |
|
||||||
@EqualsAndHashCode(callSuper = true) |
|
||||||
@ApiModel(value = "(位置信息)") |
|
||||||
public class LocationInformation extends BaseEntity { |
|
||||||
|
|
||||||
/** |
|
||||||
* (柜子编号) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(柜子编号)") |
|
||||||
private String cabinetNumber; |
|
||||||
|
|
||||||
/** |
|
||||||
* (柜子类型) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(柜子类型)") |
|
||||||
private String cabinetType; |
|
||||||
|
|
||||||
/** |
|
||||||
* (格子编号) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(格子编号)") |
|
||||||
private String latticeNumber; |
|
||||||
|
|
||||||
/** |
|
||||||
* (试剂耗材入库登记表ID) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(试剂耗材入库登记表ID)") |
|
||||||
private String storageRegistrationFormId; |
|
||||||
|
|
||||||
/** |
|
||||||
* (存储室号) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(存储室号)") |
|
||||||
private String storageRoomNumber; |
|
||||||
|
|
||||||
/** |
|
||||||
* (存储室类型) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(存储室类型)") |
|
||||||
private String storageRoomType; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* locationInformationId |
|
||||||
*/ |
|
||||||
@TableId(value = "location_information_id", type = IdType.ASSIGN_UUID) |
|
||||||
@ApiModelProperty(value="locationInformationId") |
|
||||||
private String locationInformationId; |
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -1,67 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity; |
|
||||||
import io.swagger.annotations.ApiModel; |
|
||||||
import io.swagger.annotations.ApiModelProperty; |
|
||||||
import java.io.Serializable; |
|
||||||
import java.time.LocalDateTime; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.EqualsAndHashCode; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* (试剂耗材入库登记表) |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 14:25:07 |
|
||||||
* @describe (试剂耗材入库登记表) 实体类 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@TableName(value = "storage_registration_form", autoResultMap = true) |
|
||||||
@EqualsAndHashCode(callSuper = true) |
|
||||||
@ApiModel(value = "(试剂耗材入库登记表)") |
|
||||||
public class StorageRegistrationForm extends BaseEntity { |
|
||||||
|
|
||||||
/** |
|
||||||
* (入库日期) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(入库日期)") |
|
||||||
private LocalDateTime dateOfArrival; |
|
||||||
|
|
||||||
/** |
|
||||||
* (入库人) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(入库人)") |
|
||||||
private String depositorId; |
|
||||||
|
|
||||||
/** |
|
||||||
* (数量) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(数量)") |
|
||||||
private Integer quantity; |
|
||||||
|
|
||||||
/** |
|
||||||
* (试剂耗材ID) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(试剂耗材ID)") |
|
||||||
private String reagentConsumableId; |
|
||||||
|
|
||||||
/** |
|
||||||
* (备注) |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="(备注)") |
|
||||||
private String remarks; |
|
||||||
|
|
||||||
/** |
|
||||||
* storageRegistrationFormId |
|
||||||
*/ |
|
||||||
@TableId(value = "storage_registration_form_id", type = IdType.ASSIGN_UUID) |
|
||||||
@ApiModelProperty(value="storageRegistrationFormId") |
|
||||||
private String storageRegistrationFormId; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -1,58 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity; |
|
||||||
import io.swagger.annotations.ApiModel; |
|
||||||
import io.swagger.annotations.ApiModelProperty; |
|
||||||
import java.io.Serializable; |
|
||||||
import java.time.LocalDateTime; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.EqualsAndHashCode; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-22 16:03:35 |
|
||||||
* @describe 实体类 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@TableName(value = "storage_room_form", autoResultMap = true) |
|
||||||
@EqualsAndHashCode(callSuper = true) |
|
||||||
@ApiModel(value = "存储室记录表") |
|
||||||
public class StorageRoomForm extends BaseEntity { |
|
||||||
/** |
|
||||||
* 楼层 |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="楼层") |
|
||||||
private String floor; |
|
||||||
|
|
||||||
/** |
|
||||||
* humidity |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="房间位置") |
|
||||||
private String roomLocation; |
|
||||||
|
|
||||||
/** |
|
||||||
* picture |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="图片路径") |
|
||||||
private String picture; |
|
||||||
|
|
||||||
/** |
|
||||||
* name |
|
||||||
*/ |
|
||||||
@ApiModelProperty(value="存储室名称") |
|
||||||
private String name; |
|
||||||
|
|
||||||
/** |
|
||||||
* storageRoomFormId |
|
||||||
*/ |
|
||||||
@TableId(value = "id", type = IdType.ASSIGN_UUID) |
|
||||||
@ApiModelProperty(value="存储室ID,创建时,无需传入,修改时需传入存储室ID") |
|
||||||
private String id; |
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -1,17 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.mapper; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||||
import digital.laboratory.platform.reagent.entity.AcceptanceContent; |
|
||||||
import org.apache.ibatis.annotations.Mapper; |
|
||||||
import org.apache.ibatis.annotations.Param; |
|
||||||
|
|
||||||
/** |
|
||||||
* (验收内容) Mapper 接口 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (验收内容) Mapper 类 |
|
||||||
*/ |
|
||||||
@Mapper |
|
||||||
public interface AcceptanceContentMapper extends BaseMapper<AcceptanceContent> { |
|
||||||
|
|
||||||
} |
|
@ -1,17 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.mapper; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||||
import digital.laboratory.platform.reagent.entity.CabinetForm; |
|
||||||
import org.apache.ibatis.annotations.Mapper; |
|
||||||
import org.apache.ibatis.annotations.Param; |
|
||||||
|
|
||||||
/** |
|
||||||
* Mapper 接口 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-22 |
|
||||||
* @describe Mapper 类 |
|
||||||
*/ |
|
||||||
@Mapper |
|
||||||
public interface CabinetFormMapper extends BaseMapper<CabinetForm> { |
|
||||||
|
|
||||||
} |
|
@ -1,17 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.mapper; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||||
import digital.laboratory.platform.reagent.entity.DeactivationApplication; |
|
||||||
import org.apache.ibatis.annotations.Mapper; |
|
||||||
import org.apache.ibatis.annotations.Param; |
|
||||||
|
|
||||||
/** |
|
||||||
* (标准物质到期停用申请表) Mapper 接口 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (标准物质到期停用申请表) Mapper 类 |
|
||||||
*/ |
|
||||||
@Mapper |
|
||||||
public interface DeactivationApplicationMapper extends BaseMapper<DeactivationApplication> { |
|
||||||
|
|
||||||
} |
|
@ -1,17 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.mapper; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||||
import digital.laboratory.platform.reagent.entity.DisqualificationForm; |
|
||||||
import org.apache.ibatis.annotations.Mapper; |
|
||||||
import org.apache.ibatis.annotations.Param; |
|
||||||
|
|
||||||
/** |
|
||||||
* Mapper 接口 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-23 |
|
||||||
* @describe Mapper 类 |
|
||||||
*/ |
|
||||||
@Mapper |
|
||||||
public interface DisqualificationFormMapper extends BaseMapper<DisqualificationForm> { |
|
||||||
|
|
||||||
} |
|
@ -1,17 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.mapper; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||||
import digital.laboratory.platform.reagent.entity.ExpirationReminder; |
|
||||||
import org.apache.ibatis.annotations.Mapper; |
|
||||||
import org.apache.ibatis.annotations.Param; |
|
||||||
|
|
||||||
/** |
|
||||||
* (试剂耗材到期提醒) Mapper 接口 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (试剂耗材到期提醒) Mapper 类 |
|
||||||
*/ |
|
||||||
@Mapper |
|
||||||
public interface ExpirationReminderMapper extends BaseMapper<ExpirationReminder> { |
|
||||||
|
|
||||||
} |
|
@ -1,17 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.mapper; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||||
import digital.laboratory.platform.reagent.entity.LatticeForm; |
|
||||||
import org.apache.ibatis.annotations.Mapper; |
|
||||||
import org.apache.ibatis.annotations.Param; |
|
||||||
|
|
||||||
/** |
|
||||||
* Mapper 接口 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-22 |
|
||||||
* @describe Mapper 类 |
|
||||||
*/ |
|
||||||
@Mapper |
|
||||||
public interface LatticeFormMapper extends BaseMapper<LatticeForm> { |
|
||||||
|
|
||||||
} |
|
@ -1,17 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.mapper; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||||
import digital.laboratory.platform.reagent.entity.LocationInformation; |
|
||||||
import org.apache.ibatis.annotations.Mapper; |
|
||||||
import org.apache.ibatis.annotations.Param; |
|
||||||
|
|
||||||
/** |
|
||||||
* (位置信息) Mapper 接口 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (位置信息) Mapper 类 |
|
||||||
*/ |
|
||||||
@Mapper |
|
||||||
public interface LocationInformationMapper extends BaseMapper<LocationInformation> { |
|
||||||
|
|
||||||
} |
|
@ -1,25 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.mapper; |
|
||||||
|
|
||||||
import cn.hutool.db.Page; |
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||||
import digital.laboratory.platform.reagent.entity.StorageRegistrationForm; |
|
||||||
import digital.laboratory.platform.reagent.vo.StorageRegistrationFormVO; |
|
||||||
import org.apache.ibatis.annotations.Mapper; |
|
||||||
import org.apache.ibatis.annotations.Param; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* (试剂耗材入库登记表) Mapper 接口 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (试剂耗材入库登记表) Mapper 类 |
|
||||||
*/ |
|
||||||
@Mapper |
|
||||||
public interface StorageRegistrationFormMapper extends BaseMapper<StorageRegistrationForm> { |
|
||||||
|
|
||||||
List<StorageRegistrationFormVO> getStorageRegistrationFormVOList(QueryWrapper<StorageRegistrationForm> qw); |
|
||||||
|
|
||||||
} |
|
@ -1,17 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.mapper; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||||
import digital.laboratory.platform.reagent.entity.StorageRoomForm; |
|
||||||
import org.apache.ibatis.annotations.Mapper; |
|
||||||
import org.apache.ibatis.annotations.Param; |
|
||||||
|
|
||||||
/** |
|
||||||
* Mapper 接口 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-22 |
|
||||||
* @describe Mapper 类 |
|
||||||
*/ |
|
||||||
@Mapper |
|
||||||
public interface StorageRoomFormMapper extends BaseMapper<StorageRoomForm> { |
|
||||||
|
|
||||||
} |
|
@ -1,14 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||||
import digital.laboratory.platform.reagent.entity.AcceptanceContent; |
|
||||||
|
|
||||||
/** |
|
||||||
* (验收内容)服务类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (验收内容) 服务类 |
|
||||||
*/ |
|
||||||
public interface AcceptanceContentService extends IService<AcceptanceContent> { |
|
||||||
|
|
||||||
} |
|
@ -1,7 +1,9 @@ |
|||||||
package digital.laboratory.platform.reagent.service; |
package digital.laboratory.platform.reagent.service; |
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService; |
import com.baomidou.mybatisplus.extension.service.IService; |
||||||
|
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
||||||
import digital.laboratory.platform.reagent.entity.AngleMark; |
import digital.laboratory.platform.reagent.entity.AngleMark; |
||||||
|
|
||||||
public interface AngleMarkService extends IService<AngleMark> { |
public interface AngleMarkService extends IService<AngleMark> { |
||||||
|
AngleMark getMark(DLPUser dlpUser); |
||||||
} |
} |
||||||
|
@ -1,23 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||||
import digital.laboratory.platform.reagent.entity.CabinetForm; |
|
||||||
import digital.laboratory.platform.reagent.vo.CabinetFormVO; |
|
||||||
import org.springframework.transaction.annotation.Transactional; |
|
||||||
|
|
||||||
/** |
|
||||||
* 服务类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-22 |
|
||||||
* @describe 服务类 |
|
||||||
*/ |
|
||||||
public interface CabinetFormService extends IService<CabinetForm> { |
|
||||||
|
|
||||||
CabinetForm addById(CabinetForm cabinetForm); |
|
||||||
|
|
||||||
CabinetForm editById(CabinetForm cabinetForm); |
|
||||||
|
|
||||||
CabinetFormVO getFormById(String id); |
|
||||||
|
|
||||||
Boolean delById(String id); |
|
||||||
} |
|
@ -1,14 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||||
import digital.laboratory.platform.reagent.entity.DeactivationApplication; |
|
||||||
|
|
||||||
/** |
|
||||||
* (标准物质到期停用申请表)服务类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (标准物质到期停用申请表) 服务类 |
|
||||||
*/ |
|
||||||
public interface DeactivationApplicationService extends IService<DeactivationApplication> { |
|
||||||
|
|
||||||
} |
|
@ -1,14 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||||
import digital.laboratory.platform.reagent.entity.DisqualificationForm; |
|
||||||
|
|
||||||
/** |
|
||||||
* 服务类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-23 |
|
||||||
* @describe 服务类 |
|
||||||
*/ |
|
||||||
public interface DisqualificationFormService extends IService<DisqualificationForm> { |
|
||||||
|
|
||||||
} |
|
@ -1,14 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||||
import digital.laboratory.platform.reagent.entity.ExpirationReminder; |
|
||||||
|
|
||||||
/** |
|
||||||
* (试剂耗材到期提醒)服务类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (试剂耗材到期提醒) 服务类 |
|
||||||
*/ |
|
||||||
public interface ExpirationReminderService extends IService<ExpirationReminder> { |
|
||||||
|
|
||||||
} |
|
@ -1,16 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||||
import digital.laboratory.platform.reagent.entity.LatticeForm; |
|
||||||
import digital.laboratory.platform.reagent.vo.LocationVO; |
|
||||||
|
|
||||||
/** |
|
||||||
* 服务类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-22 |
|
||||||
* @describe 服务类 |
|
||||||
*/ |
|
||||||
public interface LatticeFormService extends IService<LatticeForm> { |
|
||||||
|
|
||||||
LocationVO getLocationById(String latticeFormId); |
|
||||||
} |
|
@ -1,14 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||||
import digital.laboratory.platform.reagent.entity.LocationInformation; |
|
||||||
|
|
||||||
/** |
|
||||||
* (位置信息)服务类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (位置信息) 服务类 |
|
||||||
*/ |
|
||||||
public interface LocationInformationService extends IService<LocationInformation> { |
|
||||||
|
|
||||||
} |
|
@ -1,23 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
|
||||||
import digital.laboratory.platform.reagent.dto.StorageRegistrationFormDTO; |
|
||||||
import digital.laboratory.platform.reagent.entity.StorageRegistrationForm; |
|
||||||
import digital.laboratory.platform.reagent.vo.StorageRegistrationFormVO; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* (试剂耗材入库登记表)服务类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (试剂耗材入库登记表) 服务类 |
|
||||||
*/ |
|
||||||
public interface StorageRegistrationFormService extends IService<StorageRegistrationForm> { |
|
||||||
|
|
||||||
//List<StorageRegistrationFormVO> getStorageRegistrationFormVOList (QueryWrapper<StorageRegistrationForm> qw);
|
|
||||||
//List<StorageRegistrationForm> editFormById(List<StorageRegistrationFormDTO> storageRegistrationFormDTOList, DLPUser dlpUser);
|
|
||||||
} |
|
@ -1,22 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService; |
|
||||||
import digital.laboratory.platform.reagent.entity.StorageRoomForm; |
|
||||||
import digital.laboratory.platform.reagent.vo.StorageRoomFormVO; |
|
||||||
|
|
||||||
/** |
|
||||||
* 服务类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-22 |
|
||||||
* @describe 服务类 |
|
||||||
*/ |
|
||||||
public interface StorageRoomFormService extends IService<StorageRoomForm> { |
|
||||||
|
|
||||||
StorageRoomForm addById(StorageRoomForm storageRoomForm); |
|
||||||
|
|
||||||
StorageRoomForm editById(StorageRoomForm storageRoomForm); |
|
||||||
|
|
||||||
StorageRoomFormVO getFormById(String id); |
|
||||||
|
|
||||||
Boolean delById(String id); |
|
||||||
} |
|
@ -1,18 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service.impl; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
||||||
import digital.laboratory.platform.reagent.entity.AcceptanceContent; |
|
||||||
import digital.laboratory.platform.reagent.mapper.AcceptanceContentMapper; |
|
||||||
import digital.laboratory.platform.reagent.service.AcceptanceContentService; |
|
||||||
import org.springframework.stereotype.Service; |
|
||||||
|
|
||||||
/** |
|
||||||
* (验收内容)服务实现类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (验收内容) 服务实现类 |
|
||||||
*/ |
|
||||||
@Service |
|
||||||
public class AcceptanceContentServiceImpl extends ServiceImpl<AcceptanceContentMapper, AcceptanceContent> implements AcceptanceContentService { |
|
||||||
|
|
||||||
} |
|
@ -1,34 +1,117 @@ |
|||||||
package digital.laboratory.platform.reagent.service.impl; |
package digital.laboratory.platform.reagent.service.impl; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||||
import digital.laboratory.platform.reagent.entity.AngleMark; |
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
||||||
|
import digital.laboratory.platform.reagent.entity.*; |
||||||
import digital.laboratory.platform.reagent.mapper.AngleMarkMapper; |
import digital.laboratory.platform.reagent.mapper.AngleMarkMapper; |
||||||
import digital.laboratory.platform.reagent.service.*; |
import digital.laboratory.platform.reagent.service.*; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
import org.springframework.stereotype.Service; |
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
@Service |
@Service |
||||||
|
|
||||||
public class AngleMarkServiceImpl extends ServiceImpl<AngleMarkMapper, AngleMark> implements AngleMarkService { |
public class AngleMarkServiceImpl extends ServiceImpl<AngleMarkMapper, AngleMark> implements AngleMarkService { |
||||||
|
|
||||||
|
@Autowired |
||||||
private ReviewAndApproveService reviewAndApproveService; |
private ReviewAndApproveService reviewAndApproveService; |
||||||
|
@Autowired |
||||||
private PurchaseListService purchaseListService; |
private PurchaseListService purchaseListService; |
||||||
|
@Autowired |
||||||
|
private AcceptanceRecordFormService acceptanceRecordFormService; |
||||||
|
@Autowired |
||||||
|
private ComplianceCheckService complianceCheckService; |
||||||
|
@Autowired |
||||||
|
private PeriodVerificationImplementationService periodVerificationImplementationService; |
||||||
|
@Autowired |
||||||
|
private DeliveryRegistrationFormService deliveryRegistrationFormService; |
||||||
|
@Autowired |
||||||
|
private PurchaseCatalogueService purchaseCatalogueService; |
||||||
|
@Autowired |
||||||
|
private StandardMaterialApplicationService standardMaterialApplicationService; |
||||||
|
@Autowired |
||||||
|
private WarehousingRecordFormService warehousingRecordFormService; |
||||||
|
@Autowired |
||||||
|
private StandardReserveSolutionService standardReserveSolutionService; |
||||||
|
|
||||||
private WarehousingContentService warehousingContentService; |
|
||||||
|
|
||||||
private AcceptanceRecordFormService acceptanceRecordFormService; |
@Override |
||||||
|
public AngleMark getMark(DLPUser dlpUser) { |
||||||
|
|
||||||
private ComplianceCheckService complianceCheckService; |
AngleMark angleMark = new AngleMark(); |
||||||
|
|
||||||
private PeriodVerificationImplementationService periodVerificationImplementationService; |
ReviewAndApprove reviewAndApproveList = reviewAndApproveService.getReviewAndApproveList(dlpUser); |
||||||
|
//审核审批角标
|
||||||
|
angleMark.setReview(reviewAndApproveList.getCentralizedRequestVOList().size() + |
||||||
|
reviewAndApproveList.getCheckScheduleVOList().size() + |
||||||
|
reviewAndApproveList.getEvaluationFormVOList().size() + |
||||||
|
reviewAndApproveList.getDecentralizedRequestVOList().size() + |
||||||
|
reviewAndApproveList.getInstructionBookList().size() + |
||||||
|
reviewAndApproveList.getPurchaseCatalogueVOList().size() + |
||||||
|
reviewAndApproveList.getAcceptanceRecordFormVOList().size() + |
||||||
|
reviewAndApproveList.getPeriodVerificationImplementationVOList().size() + |
||||||
|
reviewAndApproveList.getStandardMaterialApprovalFormList().size() + |
||||||
|
reviewAndApproveList.getComplianceCheckVOList().size() + |
||||||
|
reviewAndApproveList.getPurchasingPlanVOList().size()); |
||||||
|
|
||||||
private DeliveryRegistrationFormService deliveryRegistrationFormService; |
//验收任务角标
|
||||||
|
if (dlpUser.getPermissions().contains("reagent_acceptance_record_form_add")) { |
||||||
|
angleMark.setCheckAccept(acceptanceRecordFormService.list(Wrappers.<AcceptanceRecordForm>query() |
||||||
|
.eq("status", 0).or() |
||||||
|
.eq("status", -2).or() |
||||||
|
.eq("status", -3).or() |
||||||
|
.eq("status", -4)).size()); |
||||||
|
} |
||||||
|
//采购目录角标
|
||||||
|
if (dlpUser.getPermissions().contains("reagent_purchase_catalogue_commit")) { |
||||||
|
angleMark.setGatherBuyCatalog(purchaseCatalogueService.list(Wrappers.<PurchaseCatalogue>query() |
||||||
|
.eq("status", 3).or() |
||||||
|
.eq("status", -3)).size()); |
||||||
|
} |
||||||
|
//采购清单角标
|
||||||
|
if (dlpUser.getPermissions().contains("reagent_purchase_list_commit")) |
||||||
|
angleMark.setPurchaseList(purchaseListService.list(Wrappers.<PurchaseList>query() |
||||||
|
.eq("status", 0)).size()); |
||||||
|
|
||||||
private PurchaseCatalogueService purchaseCatalogueService; |
//采购入库任务角标
|
||||||
|
if (dlpUser.getPermissions().contains("reagent_warehousing_record_form_add")) { |
||||||
|
angleMark.setPurchaseWarehousingMark(warehousingRecordFormService.list(Wrappers.<WarehousingRecordForm>query() |
||||||
|
.eq("status", 0).or() |
||||||
|
.eq("status", 1)).size()); |
||||||
|
} |
||||||
|
//标准储备溶液入库角标
|
||||||
|
if (dlpUser.getPermissions().contains("reagent_standard_reserve_solution_warehousing")) { |
||||||
|
angleMark.setStorageOfSolutionMark(standardReserveSolutionService.list(Wrappers.<StandardReserveSolution>query() |
||||||
|
.eq("status", 0)).size()); |
||||||
|
} |
||||||
|
//标准物质归还角标
|
||||||
|
if (dlpUser.getPermissions().contains("reagent_standard_material_application_return")) { |
||||||
|
angleMark.setReturnMark(standardMaterialApplicationService.list(Wrappers.<StandardMaterialApplication>query() |
||||||
|
.eq("status", 0)).size()); |
||||||
|
} |
||||||
|
//符合性检查角标
|
||||||
|
if (dlpUser.getPermissions().contains("reagent_compliance_check_commit")) { |
||||||
|
angleMark.setConcordCheck(complianceCheckService.list(Wrappers.<ComplianceCheck>query() |
||||||
|
.eq("status", 0).or() |
||||||
|
.eq("status", -2).or() |
||||||
|
.eq("status", -3).or() |
||||||
|
.eq("status", -1)).size()); |
||||||
|
} |
||||||
|
//出库任务角标
|
||||||
|
if (dlpUser.getPermissions().contains("reagent_delivery_registration_form_commit")) { |
||||||
|
angleMark.setOutboundManagement(deliveryRegistrationFormService.list(Wrappers.<DeliveryRegistrationForm>query() |
||||||
|
.eq("status", 0)).size()); |
||||||
|
} |
||||||
|
//入库任务角标
|
||||||
|
angleMark.setWarehouse(angleMark.getReturnMark() + angleMark.getStorageOfSolutionMark() + angleMark.getPurchaseWarehousingMark()); |
||||||
|
|
||||||
|
//期间核查任务角标
|
||||||
|
if (dlpUser.getPermissions().contains("reagent_period_verification_implementation_commit")) { |
||||||
|
angleMark.setCheckPlanList(periodVerificationImplementationService.list(Wrappers.<PeriodVerificationImplementation>query() |
||||||
|
.eq("commit_status", 0).or() |
||||||
|
.eq("commit_status", -2)).size());} |
||||||
|
|
||||||
public AngleMark getMark() { |
return angleMark; |
||||||
return null; |
|
||||||
|
|
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,142 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service.impl; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
||||||
import digital.laboratory.platform.reagent.entity.CabinetForm; |
|
||||||
import digital.laboratory.platform.reagent.entity.LatticeForm; |
|
||||||
import digital.laboratory.platform.reagent.mapper.CabinetFormMapper; |
|
||||||
import digital.laboratory.platform.reagent.service.CabinetFormService; |
|
||||||
import digital.laboratory.platform.reagent.service.LatticeFormService; |
|
||||||
import digital.laboratory.platform.reagent.vo.CabinetFormVO; |
|
||||||
import lombok.RequiredArgsConstructor; |
|
||||||
import org.springframework.beans.BeanUtils; |
|
||||||
import org.springframework.stereotype.Service; |
|
||||||
import org.springframework.transaction.annotation.Transactional; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* 服务实现类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-22 |
|
||||||
* @describe 服务实现类 |
|
||||||
*/ |
|
||||||
@Service |
|
||||||
@RequiredArgsConstructor |
|
||||||
public class CabinetFormServiceImpl extends ServiceImpl<CabinetFormMapper, CabinetForm> implements CabinetFormService { |
|
||||||
|
|
||||||
private CabinetFormService cabinetFormService; |
|
||||||
|
|
||||||
private LatticeFormService latticeFormService; |
|
||||||
|
|
||||||
@Transactional |
|
||||||
@Override//新增柜子
|
|
||||||
public CabinetForm addById(CabinetForm cabinetForm){ |
|
||||||
|
|
||||||
CabinetForm form = new CabinetForm(); |
|
||||||
|
|
||||||
BeanUtils.copyProperties(cabinetForm,form); |
|
||||||
|
|
||||||
form.setId(IdWorker.get32UUID().toUpperCase()); |
|
||||||
|
|
||||||
for (int i = 0; i < cabinetForm.getSpecification(); i++) { |
|
||||||
|
|
||||||
LatticeForm latticeForm = new LatticeForm(); |
|
||||||
|
|
||||||
latticeForm.setCabinetFormId(form.getId()); |
|
||||||
latticeForm.setId(IdWorker.get32UUID().toUpperCase()); |
|
||||||
latticeForm.setNumber(form.getName()+"-"+(i+1)); |
|
||||||
|
|
||||||
latticeFormService.save(latticeForm); |
|
||||||
} |
|
||||||
|
|
||||||
if (cabinetFormService.save(form)){ |
|
||||||
return form; |
|
||||||
}else throw new RuntimeException(String.format("保存失败")); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
@Transactional//修改柜子信息
|
|
||||||
public CabinetForm editById(CabinetForm cabinetForm){ |
|
||||||
|
|
||||||
CabinetForm byId = cabinetFormService.getById(cabinetForm.getId()); |
|
||||||
|
|
||||||
LambdaQueryWrapper<LatticeForm> latticeFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
||||||
|
|
||||||
latticeFormLambdaQueryWrapper.eq(LatticeForm::getCabinetFormId,byId.getId()); |
|
||||||
|
|
||||||
List<LatticeForm> list = latticeFormService.list(latticeFormLambdaQueryWrapper); |
|
||||||
//判断柜子是否为空
|
|
||||||
for (LatticeForm latticeForm : list) { |
|
||||||
|
|
||||||
if (latticeForm.getStatus()==1){ |
|
||||||
throw new RuntimeException(String.format("当前柜子有物品存放,不允许修改")); |
|
||||||
} |
|
||||||
} |
|
||||||
latticeFormService.removeBatchByIds(list); |
|
||||||
|
|
||||||
BeanUtils.copyProperties(cabinetForm,byId); |
|
||||||
//重新录入格子信息
|
|
||||||
for (int i = 0; i < cabinetForm.getSpecification(); i++) { |
|
||||||
|
|
||||||
LatticeForm latticeForm = new LatticeForm(); |
|
||||||
|
|
||||||
latticeForm.setCabinetFormId(byId.getId()); |
|
||||||
latticeForm.setId(IdWorker.get32UUID().toUpperCase()); |
|
||||||
latticeForm.setNumber(byId.getName()+"-"+(i+1)); |
|
||||||
|
|
||||||
latticeFormService.save(latticeForm); |
|
||||||
} |
|
||||||
|
|
||||||
if (cabinetFormService.updateById(cabinetForm)){ |
|
||||||
return byId; |
|
||||||
}else throw new RuntimeException(String.format("保存失败")); |
|
||||||
} |
|
||||||
|
|
||||||
@Override//通过ID查询柜子信息
|
|
||||||
public CabinetFormVO getFormById(String id){ |
|
||||||
|
|
||||||
CabinetForm byId = cabinetFormService.getById(id); |
|
||||||
|
|
||||||
LambdaQueryWrapper<LatticeForm> latticeFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
||||||
|
|
||||||
latticeFormLambdaQueryWrapper.eq(LatticeForm::getCabinetFormId,id); |
|
||||||
|
|
||||||
List<LatticeForm> list = latticeFormService.list(latticeFormLambdaQueryWrapper); |
|
||||||
|
|
||||||
CabinetFormVO cabinetFormVO = new CabinetFormVO(); |
|
||||||
|
|
||||||
BeanUtils.copyProperties(byId,cabinetFormVO); |
|
||||||
|
|
||||||
cabinetFormVO.setLatticeFormList(list); |
|
||||||
|
|
||||||
return cabinetFormVO; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
@Transactional |
|
||||||
public Boolean delById(String id){ |
|
||||||
|
|
||||||
CabinetForm byId = cabinetFormService.getById(id); |
|
||||||
|
|
||||||
LambdaQueryWrapper<LatticeForm> latticeFormLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
||||||
|
|
||||||
latticeFormLambdaQueryWrapper.eq(LatticeForm::getCabinetFormId,id); |
|
||||||
|
|
||||||
List<LatticeForm> list = latticeFormService.list(latticeFormLambdaQueryWrapper); |
|
||||||
|
|
||||||
for (LatticeForm latticeForm : list) { |
|
||||||
|
|
||||||
if (latticeForm.getStatus()==1){ |
|
||||||
throw new RuntimeException(String.format("当前柜子有物品存放,不允许修改")); |
|
||||||
} |
|
||||||
} |
|
||||||
latticeFormService.removeBatchByIds(list); |
|
||||||
|
|
||||||
if (cabinetFormService.removeById(byId)){ |
|
||||||
return true; |
|
||||||
}else throw new RuntimeException(String.format("删除失败")); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,18 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service.impl; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
||||||
import digital.laboratory.platform.reagent.entity.DeactivationApplication; |
|
||||||
import digital.laboratory.platform.reagent.mapper.DeactivationApplicationMapper; |
|
||||||
import digital.laboratory.platform.reagent.service.DeactivationApplicationService; |
|
||||||
import org.springframework.stereotype.Service; |
|
||||||
|
|
||||||
/** |
|
||||||
* (标准物质到期停用申请表)服务实现类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (标准物质到期停用申请表) 服务实现类 |
|
||||||
*/ |
|
||||||
@Service |
|
||||||
public class DeactivationApplicationServiceImpl extends ServiceImpl<DeactivationApplicationMapper, DeactivationApplication> implements DeactivationApplicationService { |
|
||||||
|
|
||||||
} |
|
@ -1,18 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service.impl; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
||||||
import digital.laboratory.platform.reagent.entity.DisqualificationForm; |
|
||||||
import digital.laboratory.platform.reagent.mapper.DisqualificationFormMapper; |
|
||||||
import digital.laboratory.platform.reagent.service.DisqualificationFormService; |
|
||||||
import org.springframework.stereotype.Service; |
|
||||||
|
|
||||||
/** |
|
||||||
* 服务实现类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-23 |
|
||||||
* @describe 服务实现类 |
|
||||||
*/ |
|
||||||
@Service |
|
||||||
public class DisqualificationFormServiceImpl extends ServiceImpl<DisqualificationFormMapper, DisqualificationForm> implements DisqualificationFormService { |
|
||||||
|
|
||||||
} |
|
@ -1,18 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service.impl; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
||||||
import digital.laboratory.platform.reagent.entity.ExpirationReminder; |
|
||||||
import digital.laboratory.platform.reagent.mapper.ExpirationReminderMapper; |
|
||||||
import digital.laboratory.platform.reagent.service.ExpirationReminderService; |
|
||||||
import org.springframework.stereotype.Service; |
|
||||||
|
|
||||||
/** |
|
||||||
* (试剂耗材到期提醒)服务实现类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (试剂耗材到期提醒) 服务实现类 |
|
||||||
*/ |
|
||||||
@Service |
|
||||||
public class ExpirationReminderServiceImpl extends ServiceImpl<ExpirationReminderMapper, ExpirationReminder> implements ExpirationReminderService { |
|
||||||
|
|
||||||
} |
|
@ -1,51 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service.impl; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
||||||
import digital.laboratory.platform.reagent.entity.CabinetForm; |
|
||||||
import digital.laboratory.platform.reagent.entity.LatticeForm; |
|
||||||
import digital.laboratory.platform.reagent.entity.StorageRoomForm; |
|
||||||
import digital.laboratory.platform.reagent.mapper.LatticeFormMapper; |
|
||||||
import digital.laboratory.platform.reagent.service.CabinetFormService; |
|
||||||
import digital.laboratory.platform.reagent.service.LatticeFormService; |
|
||||||
import digital.laboratory.platform.reagent.service.StorageRoomFormService; |
|
||||||
import digital.laboratory.platform.reagent.vo.LocationVO; |
|
||||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||||
import org.springframework.stereotype.Service; |
|
||||||
|
|
||||||
/** |
|
||||||
* 服务实现类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-22 |
|
||||||
* @describe 服务实现类 |
|
||||||
*/ |
|
||||||
@Service |
|
||||||
public class LatticeFormServiceImpl extends ServiceImpl<LatticeFormMapper, LatticeForm> implements LatticeFormService { |
|
||||||
|
|
||||||
@Autowired |
|
||||||
private LatticeFormService latticeFormService; |
|
||||||
|
|
||||||
@Autowired |
|
||||||
private CabinetFormService cabinetFormService; |
|
||||||
|
|
||||||
@Autowired |
|
||||||
private StorageRoomFormService storageRoomFormService; |
|
||||||
@Override |
|
||||||
public LocationVO getLocationById(String latticeFormId){ |
|
||||||
|
|
||||||
LatticeForm latticeForm = latticeFormService.getById(latticeFormId); |
|
||||||
|
|
||||||
CabinetForm cabinetForm = cabinetFormService.getById(latticeForm.getCabinetFormId()); |
|
||||||
|
|
||||||
StorageRoomForm storageRoomForm = storageRoomFormService.getById(cabinetForm.getStorageRoomFormId()); |
|
||||||
|
|
||||||
LocationVO locationVO = new LocationVO(); |
|
||||||
|
|
||||||
locationVO.setLatticeFormNumber(latticeForm.getNumber()); |
|
||||||
locationVO.setCabinetFormType(cabinetForm.getType()); |
|
||||||
locationVO.setCabinetFormNumber(cabinetForm.getNumber()); |
|
||||||
locationVO.setStorageRoomFormName(storageRoomForm.getName()); |
|
||||||
|
|
||||||
return locationVO; |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,18 +0,0 @@ |
|||||||
package digital.laboratory.platform.reagent.service.impl; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
||||||
import digital.laboratory.platform.reagent.entity.LocationInformation; |
|
||||||
import digital.laboratory.platform.reagent.mapper.LocationInformationMapper; |
|
||||||
import digital.laboratory.platform.reagent.service.LocationInformationService; |
|
||||||
import org.springframework.stereotype.Service; |
|
||||||
|
|
||||||
/** |
|
||||||
* (位置信息)服务实现类 |
|
||||||
* |
|
||||||
* @author Zhang Xiaolong created at 2023-03-10 |
|
||||||
* @describe (位置信息) 服务实现类 |
|
||||||
*/ |
|
||||||
@Service |
|
||||||
public class LocationInformationServiceImpl extends ServiceImpl<LocationInformationMapper, LocationInformation> implements LocationInformationService { |
|
||||||
|
|
||||||
} |
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue