Browse Source

feat:[档案管理][试剂档案管理]

master
HanLong 2 months ago
parent
commit
70de176a1b
7 changed files with 340 additions and 5 deletions
  1. +18
    -4
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspController.java
  2. +86
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjController.java
  3. +12
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Sj.java
  4. +11
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspSearchListForm.java
  5. +23
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/ISjService.java
  6. +4
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java
  7. +186
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java

+ 18
- 4
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GspController.java View File

@ -4,10 +4,12 @@ import java.util.List;
import com.hxhq.business.domain.*;
import com.hxhq.business.dto.gsp.GspListDto;
import com.hxhq.business.enums.zykgl.DaztEnum;
import com.hxhq.business.form.gsp.*;
import com.hxhq.business.form.gyzj.SearchForm;
import com.hxhq.business.service.IGspJcgjService;
import com.hxhq.business.service.IGspTzService;
import com.hxhq.common.core.constant.Constants;
import com.hxhq.common.security.annotation.RequiresPermissions;
import com.hxhq.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -60,6 +62,18 @@ public class GspController extends BaseController {
}
/**
* 供试品-档案列表
*/
@GetMapping("/archive/list")
@RequiresPermissions("business:archive:gsp:list")
public TableDataInfo archiveList(GspSearchListForm form) {
startPage();
form.setArchive(DaztEnum.ygd.getValue());
List<Gsp> list = gspService.queryList(form);
return getDataTable(list);
}
/**
* 稽查轨迹列表
*/
@GetMapping("/jcgjList")
@ -302,7 +316,7 @@ public class GspController extends BaseController {
* 同意归档
*/
@PostMapping("/gd/agree")
@RequiresPermissions("business:resource:gsp:gd")
@RequiresPermissions("business:archive:gsp:tygd")
public AjaxResult agreeGd(@RequestBody @Validated GspGdForm form)
{
form.setQmrId(SecurityUtils.getUserId());
@ -314,7 +328,7 @@ public class GspController extends BaseController {
* 拒绝归档
*/
@PostMapping("/gd/refuse")
@RequiresPermissions("business:resource:gsp:gd")
@RequiresPermissions("business:archive:gsp:jjgd")
public AjaxResult refuseGd(@RequestBody @Validated GspGdForm form)
{
form.setQmrId(SecurityUtils.getUserId());
@ -326,7 +340,7 @@ public class GspController extends BaseController {
* 同意解档
*/
@PostMapping("/jd/agree")
@RequiresPermissions("business:resource:gsp:gd")
@RequiresPermissions("business:archive:gsp:tyjd")
public AjaxResult agreeJd(@RequestBody @Validated GspGdForm form)
{
form.setQmrId(SecurityUtils.getUserId());
@ -338,7 +352,7 @@ public class GspController extends BaseController {
* 拒绝解档
*/
@PostMapping("/jd/refuse")
@RequiresPermissions("business:resource:gsp:gd")
@RequiresPermissions("business:archive:gsp:jjjd")
public AjaxResult refuseJd(@RequestBody @Validated GspGdForm form)
{
form.setQmrId(SecurityUtils.getUserId());

+ 86
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/SjController.java View File

@ -9,6 +9,8 @@ import com.hxhq.business.dto.gsp.GspListDto;
import com.hxhq.business.dto.sj.SjListDto;
import com.hxhq.business.enums.zykgl.JyztEnum;
import com.hxhq.business.enums.zykgl.ZjztEnum;
import com.hxhq.business.form.gsp.GspGdForm;
import com.hxhq.business.form.gsp.GspJyForm;
import com.hxhq.business.form.gsp.GspSearchListForm;
import com.hxhq.business.form.mjy.GdForm;
import com.hxhq.business.form.sj.*;
@ -290,4 +292,88 @@ public class SjController extends BaseController
sjService.gd(form);
return AjaxResult.success("操作成功");
}
/**
* 同意归档
*/
@PostMapping("/gd/agree")
@RequiresPermissions("business:resource:gsp:gd")
public AjaxResult agreeGd(@RequestBody @Validated GspGdForm form)
{
form.setQmrId(SecurityUtils.getUserId());
sjService.agreeGd(form);
return AjaxResult.success("操作成功");
}
/**
* 拒绝归档
*/
@PostMapping("/gd/refuse")
@RequiresPermissions("business:resource:gsp:gd")
public AjaxResult refuseGd(@RequestBody @Validated GspGdForm form)
{
form.setQmrId(SecurityUtils.getUserId());
sjService.refuseGd(form);
return AjaxResult.success("操作成功");
}
/**
* 同意解档
*/
@PostMapping("/jd/agree")
@RequiresPermissions("business:resource:gsp:gd")
public AjaxResult agreeJd(@RequestBody @Validated GspGdForm form)
{
form.setQmrId(SecurityUtils.getUserId());
sjService.agreeJd(form);
return AjaxResult.success("操作成功");
}
/**
* 拒绝解档
*/
@PostMapping("/jd/refuse")
@RequiresPermissions("business:resource:gsp:gd")
public AjaxResult refuseJd(@RequestBody @Validated GspGdForm form)
{
form.setQmrId(SecurityUtils.getUserId());
sjService.refuseJd(form);
return AjaxResult.success("操作成功");
}
/**
* 同意借阅
*/
@PostMapping("/jy/agree")
@RequiresPermissions("business:resource:gsp:gd")
public AjaxResult agreeJy(@RequestBody @Validated GspJyForm form)
{
form.setQmrId(SecurityUtils.getUserId());
sjService.agreeJy(form);
return AjaxResult.success("操作成功");
}
/**
* 拒绝借阅
*/
@PostMapping("/jy/refuse")
@RequiresPermissions("business:resource:gsp:gd")
public AjaxResult refuseJy(@RequestBody @Validated GspJyForm form)
{
form.setQmrId(SecurityUtils.getUserId());
sjService.refuseJy(form);
return AjaxResult.success("操作成功");
}
/**
* 档案确认归还
*/
@PostMapping("/gh/archive")
@RequiresPermissions("business:resource:gsp:gd")
public AjaxResult archiveGh(@RequestBody @Validated GspGdForm form)
{
form.setQmrId(SecurityUtils.getUserId());
sjService.archiveGh(form);
return AjaxResult.success("操作成功");
}
}

+ 12
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Sj.java View File

@ -99,6 +99,18 @@ public class Sj extends MpBaseEntity
@JsonFormat(pattern = "yyyy-MM-dd")
private Date jyjsrq;
/** 归档申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date gdsqsj;
public Date getGdsqsj() {
return gdsqsj;
}
public void setGdsqsj(Date gdsqsj) {
this.gdsqsj = gdsqsj;
}
public Long getStudyId() {
return studyId;
}

+ 11
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspSearchListForm.java View File

@ -39,6 +39,17 @@ public class GspSearchListForm {
/** 试验id */
private Long studyId;
/** 是否是档案 1-是 */
private Integer archive;
public Integer getArchive() {
return archive;
}
public void setArchive(Integer archive) {
this.archive = archive;
}
public String getLy() {
return ly;
}

+ 23
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/ISjService.java View File

@ -7,6 +7,8 @@ import com.hxhq.business.domain.StudyFormFill;
import com.hxhq.business.domain.Template;
import com.hxhq.business.dto.gsp.GspListDto;
import com.hxhq.business.dto.sj.SjListDto;
import com.hxhq.business.form.gsp.GspGdForm;
import com.hxhq.business.form.gsp.GspJyForm;
import com.hxhq.business.form.gsp.GspSearchListForm;
import com.hxhq.business.form.mjy.GdForm;
import com.hxhq.business.form.sj.*;
@ -75,4 +77,25 @@ public interface ISjService extends IService
/** 表单生成试剂逻辑处理 */
void genResource(StudyFormFill studyFormFill, Template template);
/** 同意归档 */
void agreeGd(GspGdForm form);
/** 拒绝归档 */
void refuseGd(GspGdForm form);
/** 同意解档 */
void agreeJd(GspGdForm form);
/** 拒绝解档 */
void refuseJd(GspGdForm form);
/** 同意借阅 */
void agreeJy(GspJyForm form);
/** 拒绝借阅 */
void refuseJy(GspJyForm form);
/** 档案确认归还 */
void archiveGh(GspGdForm form);
}

+ 4
- 1
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java View File

@ -81,6 +81,9 @@ public class GspServiceImpl extends ServiceImpl implements IGspS
if(form.getZjzt() != null) {
queryWrapper.eq(Gsp::getZjzt, form.getZjzt());
}
if(form.getArchive() != null && form.getArchive() == DaztEnum.ygd.getValue()) {
queryWrapper.in(Gsp::getZjzt, ZjztEnum.dgd.getValue(), ZjztEnum.gd.getValue(), ZjztEnum.djd.getValue());
}
return this.list(queryWrapper);
}
@ -1159,7 +1162,7 @@ public class GspServiceImpl extends ServiceImpl implements IGspS
if (gsp == null) {
throw new SecurityException("供试品不存在或已删除");
}
if (!gsp.getZjzt().equals(ZjztEnum.gd.getValue())) {
if (!gsp.getZjzt().equals(ZjztEnum.djd.getValue())) {
throw new SecurityException("供试品【" + gsp.getMc() + "】不是待解档状态,不能操作");
}
gsp.setDasqrMc(gsp.getDasqrMcOld());

+ 186
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java View File

@ -18,6 +18,8 @@ import com.hxhq.business.enums.zykgl.JcgjlxEnum;
import com.hxhq.business.enums.zykgl.JcmcysEnum;
import com.hxhq.business.enums.zykgl.JyztEnum;
import com.hxhq.business.enums.zykgl.ZjztEnum;
import com.hxhq.business.form.gsp.GspGdForm;
import com.hxhq.business.form.gsp.GspJyForm;
import com.hxhq.business.form.gsp.GspSearchListForm;
import com.hxhq.business.form.mjy.GdForm;
import com.hxhq.business.form.sj.*;
@ -761,4 +763,188 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi
}
@Override
public void agreeGd(GspGdForm form) {
SysUser qmr = sysUserService.selectUserById(form.getQmrId());
sysUserService.checkPassword(qmr, form.getQmrmm(), false);
if (form.getId() == null || form.getId().longValue() < 0) {
throw new SecurityException("参数id不正确");
}
Sj sj = this.getById(form.getId());
if (sj == null) {
throw new SecurityException("试剂不存在或已删除");
}
if (!sj.getZjzt().equals(ZjztEnum.dgd.getValue())) {
throw new SecurityException("试剂【" + sj.getMc() + "】不是待归档状态,不能操作");
}
sj.setZjzt(ZjztEnum.gd.getValue());
this.updateById(sj);
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注", form.getRemark());
Map<String, String> formDataEn = new LinkedHashMap<>();
formDataEn.put("Comment", form.getRemark());
sjJcgjService.saveJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "同意归档", "Approve Archiving",
JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn));
}
@Override
public void refuseGd(GspGdForm form) {
SysUser qmr = sysUserService.selectUserById(form.getQmrId());
sysUserService.checkPassword(qmr, form.getQmrmm(), false);
if (form.getId() == null || form.getId().longValue() < 0) {
throw new SecurityException("参数id不正确");
}
Sj sj = this.getById(form.getId());
if (sj == null) {
throw new SecurityException("试剂不存在或已删除");
}
if (!sj.getZjzt().equals(ZjztEnum.dgd.getValue())) {
throw new SecurityException("试剂【" + sj.getMc() + "】不是待归档状态,不能操作");
}
sj.setZjzt(ZjztEnum.ysd.getValue());
this.updateById(sj);
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注", form.getRemark());
Map<String, String> formDataEn = new LinkedHashMap<>();
formDataEn.put("Comment", form.getRemark());
sjJcgjService.saveJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "拒绝归档", "Reject Archiving",
JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn));
}
@Override
public void agreeJd(GspGdForm form) {
SysUser qmr = sysUserService.selectUserById(form.getQmrId());
sysUserService.checkPassword(qmr, form.getQmrmm(), false);
if (form.getId() == null || form.getId().longValue() < 0) {
throw new SecurityException("参数id不正确");
}
Sj sj = this.getById(form.getId());
if (sj == null) {
throw new SecurityException("试剂不存在或已删除");
}
if (!sj.getZjzt().equals(ZjztEnum.djd.getValue())) {
throw new SecurityException("试剂【" + sj.getMc() + "】不是待解档状态,不能操作");
}
sj.setZjzt(ZjztEnum.ysd.getValue());
this.updateById(sj);
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注", form.getRemark());
Map<String, String> formDataEn = new LinkedHashMap<>();
formDataEn.put("Comment", form.getRemark());
sjJcgjService.saveJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "同意解档", "Approve De-archiving",
JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn));
}
@Override
public void refuseJd(GspGdForm form) {
SysUser qmr = sysUserService.selectUserById(form.getQmrId());
sysUserService.checkPassword(qmr, form.getQmrmm(), false);
if (form.getId() == null || form.getId().longValue() < 0) {
throw new SecurityException("参数id不正确");
}
Sj sj = this.getById(form.getId());
if (sj == null) {
throw new SecurityException("试剂不存在或已删除");
}
if (!sj.getZjzt().equals(ZjztEnum.djd.getValue())) {
throw new SecurityException("试剂【" + sj.getMc() + "】不是待解档状态,不能操作");
}
sj.setZjzt(ZjztEnum.gd.getValue());
this.updateById(sj);
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注", form.getRemark());
Map<String, String> formDataEn = new LinkedHashMap<>();
formDataEn.put("Comment", form.getRemark());
sjJcgjService.saveJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "拒绝解档", "Reject De-archiving",
JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn));
}
@Override
public void agreeJy(GspJyForm form) {
SysUser qmr = sysUserService.selectUserById(form.getQmrId());
sysUserService.checkPassword(qmr, form.getQmrmm(), false);
if (form.getId() == null || form.getId().longValue() < 0) {
throw new SecurityException("参数id不正确");
}
Sj sj = this.getById(form.getId());
if (sj == null) {
throw new SecurityException("试剂不存在或已删除");
}
if (!sj.getJyzt().equals(JyztEnum.djy.getValue())) {
throw new SecurityException("试剂【" + sj.getMc() + "】不是待借阅状态,不能操作");
}
sj.setJyzt(JyztEnum.jyz.getValue());
sj.setJyksrq(form.getStartDate());
sj.setJyjsrq(form.getEndDate());
this.updateById(sj);
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注", form.getRemark());
Map<String, String> formDataEn = new LinkedHashMap<>();
formDataEn.put("Comment", form.getRemark());
sjJcgjService.saveJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "同意借阅", "Approve Check-out",
JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn));
}
@Override
public void refuseJy(GspJyForm form) {
SysUser qmr = sysUserService.selectUserById(form.getQmrId());
sysUserService.checkPassword(qmr, form.getQmrmm(), false);
if (form.getId() == null || form.getId().longValue() < 0) {
throw new SecurityException("参数id不正确");
}
Sj sj = this.getById(form.getId());
if (sj == null) {
throw new SecurityException("试剂不存在或已删除");
}
if (!sj.getJyzt().equals(JyztEnum.djy.getValue())) {
throw new SecurityException("试剂【" + sj.getMc() + "】不是待借阅状态,不能操作");
}
sj.setJyzt(JyztEnum.wjy.getValue());
this.updateById(sj);
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注", form.getRemark());
Map<String, String> formDataEn = new LinkedHashMap<>();
formDataEn.put("Comment", form.getRemark());
sjJcgjService.saveJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "拒绝借阅", "Reject Check-out",
JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn));
}
@Override
public void archiveGh(GspGdForm form) {
SysUser qmr = sysUserService.selectUserById(form.getQmrId());
sysUserService.checkPassword(qmr, form.getQmrmm(), false);
if (form.getId() == null || form.getId().longValue() < 0) {
throw new SecurityException("参数id不正确");
}
Sj sj = this.getById(form.getId());
if (sj == null) {
throw new SecurityException("试剂不存在或已删除");
}
if (!sj.getJyzt().equals(JyztEnum.jyz.getValue())) {
throw new SecurityException("试剂【" + sj.getMc() + "】不是借阅中状态,不能操作");
}
sj.setJyzt(JyztEnum.wjy.getValue());
this.updateById(sj);
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注", form.getRemark());
Map<String, String> formDataEn = new LinkedHashMap<>();
formDataEn.put("Comment", form.getRemark());
sjJcgjService.saveJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "确认归还", "Check-out End Confirmation",
JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn));
}
}

Loading…
Cancel
Save