From f610db2b0df8517c76a0f4ee4fdb33eed4a672ce Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Thu, 22 Jan 2026 14:44:26 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A[=E6=A1=A3=E6=A1=88=E7=AE=A1?= =?UTF-8?q?=E7=90=86]=E7=BB=99=E8=8D=AF=E5=88=B6=E5=89=82=E6=A1=A3?= =?UTF-8?q?=E6=A1=88=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/hxhq/business/domain/Gyzj.java | 10 ++ .../com/hxhq/business/enums/zykgl/DaztEnum.java | 51 ++++++++ .../com/hxhq/business/enums/zykgl/daztEnum.java | 51 -------- .../com/hxhq/business/form/gyzj/ArchiveForm.java | 24 ++-- .../business/service/impl/GyzjServiceImpl.java | 136 ++++++++++++++++++++- 5 files changed, 203 insertions(+), 69 deletions(-) create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/DaztEnum.java delete mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/daztEnum.java diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Gyzj.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Gyzj.java index 6f6dfa3..2fd6451 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Gyzj.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Gyzj.java @@ -76,6 +76,8 @@ public class Gyzj extends MpBaseEntity /** 存储状态:1:取出;3:存储*/ private Integer cczt; + /** 档案状态:1:未归档;3:已归档*/ + private Integer dazt; /** 关联暂存柜id */ @TableField(updateStrategy = FieldStrategy.IGNORED) @@ -249,6 +251,14 @@ public class Gyzj extends MpBaseEntity @TableField(updateStrategy = FieldStrategy.IGNORED) private String qmr2McEn; + public Integer getDazt() { + return dazt; + } + + public void setDazt(Integer dazt) { + this.dazt = dazt; + } + public Integer getCczt() { return cczt; } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/DaztEnum.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/DaztEnum.java new file mode 100644 index 0000000..a72c1c5 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/DaztEnum.java @@ -0,0 +1,51 @@ +package com.hxhq.business.enums.zykgl; + +/** + * 档案状态:1:未归档;3:已归档 + * @author tanfei + */ +public enum DaztEnum { + + /** + * 未归档 + */ + wgd(1, "未归档"), + + /** + * 已归档 + */ + ygd(3, "已归档"); + + private int value; + private String text; + + DaztEnum(int value, String text) { + this.value = value; + this.text = text; + } + + public int getValue() { + return value; + } + + public void setValue(int value) { + this.value = value; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + public static DaztEnum getEnumByValue(int type) { + for (DaztEnum bt : values()) { + if (bt.value == type) { + return bt; + } + } + return null; + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/daztEnum.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/daztEnum.java deleted file mode 100644 index bffdcf6..0000000 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/daztEnum.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.hxhq.business.enums.zykgl; - -/** - * 档案状态:1:未归档;3:已归档 - * @author tanfei - */ -public enum daztEnum { - - /** - * 未归档 - */ - wgd(1, "未归档"), - - /** - * 已归档 - */ - ygd(3, "已归档"); - - private int value; - private String text; - - daztEnum(int value, String text) { - this.value = value; - this.text = text; - } - - public int getValue() { - return value; - } - - public void setValue(int value) { - this.value = value; - } - - public String getText() { - return text; - } - - public void setText(String text) { - this.text = text; - } - - public static daztEnum getEnumByValue(int type) { - for (daztEnum bt : values()) { - if (bt.value == type) { - return bt; - } - } - return null; - } -} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gyzj/ArchiveForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gyzj/ArchiveForm.java index a60a358..f057d50 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gyzj/ArchiveForm.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gyzj/ArchiveForm.java @@ -22,13 +22,13 @@ public class ArchiveForm { /** 签名人密码 */ private String qmrmm; - /** 日期开始 */ + /** 借阅日期开始 */ @JsonFormat(pattern = "yyyy-MM-dd") - private Date startDate; + private Date jyksrq; - /** 日期结束 */ + /** 借阅日期结束 */ @JsonFormat(pattern = "yyyy-MM-dd") - private Date endDate; + private Date jyjsrq; public Long getId() { return id; @@ -62,19 +62,19 @@ public class ArchiveForm { this.qmrmm = qmrmm; } - public Date getStartDate() { - return startDate; + public Date getJyksrq() { + return jyksrq; } - public void setStartDate(Date startDate) { - this.startDate = startDate; + public void setJyksrq(Date jyksrq) { + this.jyksrq = jyksrq; } - public Date getEndDate() { - return endDate; + public Date getJyjsrq() { + return jyjsrq; } - public void setEndDate(Date endDate) { - this.endDate = endDate; + public void setJyjsrq(Date jyjsrq) { + this.jyjsrq = jyjsrq; } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java index 04688fc..784ca69 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java @@ -12,10 +12,8 @@ import com.hxhq.business.dto.gyzj.ListDto; import com.hxhq.business.enums.zykgl.*; import com.hxhq.business.form.gyzj.*; import com.hxhq.business.service.*; -import com.hxhq.business.utils.JctUtil; import com.hxhq.business.utils.ObjectCompareUtil; import com.hxhq.common.core.exception.ServiceException; -import com.hxhq.common.core.text.Convert; import com.hxhq.common.core.utils.DateUtils; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.security.utils.SecurityUtils; @@ -29,7 +27,6 @@ import com.hxhq.business.mapper.GyzjMapper; import com.hxhq.business.domain.Gyzj; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.bind.annotation.RequestBody; /** * 给药制剂Service业务层处理 @@ -226,6 +223,7 @@ public class GyzjServiceImpl extends ServiceImpl implements IG for (Gyzj gyzj : gyzjList) { //申请归档,档案员可在档案管理中进行确认归档审核;申请后状态更新成待归档; gyzj.setZjzt(ZjztEnum.dgd.getValue()); + gyzj.setDazt(DaztEnum.ygd.getValue()); //稽查轨迹 gyzjJcgjList.add(gyzjJcgjService.getJcgj(gyzj.getId(), JcgjlxEnum.lc.getValue(), "申请归档", JcmcysEnum.orange.getValue(),null, qmr, form.getRemark())); } @@ -257,6 +255,7 @@ public class GyzjServiceImpl extends ServiceImpl implements IG } //申请归档,档案员可在档案管理中进行确认归档审核;申请后状态更新成待归档; gyzjOld.setZjzt(ZjztEnum.dgd.getValue()); + gyzjOld.setDazt(DaztEnum.ygd.getValue()); this.updateById(gyzjOld); //稽查轨迹 gyzjJcgjService.saveJcgj(gyzjOld.getId(), JcgjlxEnum.lc.getValue(), "申请归档", JcmcysEnum.orange.getValue(),null, qmr, form.getRemark()); @@ -669,7 +668,7 @@ public class GyzjServiceImpl extends ServiceImpl implements IG } Date now = new Date(); - //region 发放记录,试验物资 todo + //region 发放记录,试验物资 gyzjFfjlService.ff(form,gyzjOld, lqr1, lqr2, ffr1, ffr2, now); //endregion @@ -741,7 +740,7 @@ public class GyzjServiceImpl extends ServiceImpl implements IG .filter(p -> p.getId().equals(gyzj.getId())) .collect(Collectors.toList()); if (plffItemFilter.size() > 0) { - //发放 todo + //发放记录,试验物资 gyzjFfjlService.ff(plffItemFilter.get(0), gyzj, lqr1, lqr2, ffr1, ffr2, now); //稽查轨迹 Map formData = new LinkedHashMap<>(); @@ -1278,7 +1277,7 @@ public class GyzjServiceImpl extends ServiceImpl implements IG public List queryArchiveList(SearchForm form){ QueryWrapper queryWrapper = Wrappers.query(); queryWrapper.eq("t.del_flag", "0"); - queryWrapper.eq("t.`dazt`", daztEnum.ygd.getValue()); + queryWrapper.eq("t.`dazt`", DaztEnum.ygd.getValue()); if (form.getJyzt() != null && form.getJyzt().intValue() > 0) { queryWrapper.eq("t.jyzt", form.getJyzt()); } @@ -1306,6 +1305,23 @@ public class GyzjServiceImpl extends ServiceImpl implements IG */ @Override public void tygd(ArchiveForm form){ + SysUser qmr=SecurityUtils.getLoginUser().getSysUser(); + //验证签名人密码 + checkPassword(qmr,form.getQmrmm(),false); + if (form.getId() == null || form.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + Gyzj gyzjOld = this.getById(form.getId()); + if (gyzjOld == null) { + throw new ServiceException("给药制剂不存在或已删除"); + } + if (!gyzjOld.getZjzt().equals(ZjztEnum.ysd.getValue())) { + throw new ServiceException("给药制剂【" + gyzjOld.getMc() + "】不是待归档状态,不能操作"); + } + gyzjOld.setZjzt(ZjztEnum.gd.getValue()); + this.updateById(gyzjOld); + //稽查轨迹 + gyzjJcgjService.saveJcgj(gyzjOld.getId(), JcgjlxEnum.lc.getValue(), "同意归档", JcmcysEnum.green.getValue(), null, qmr, form.getRemark()); } @@ -1314,6 +1330,24 @@ public class GyzjServiceImpl extends ServiceImpl implements IG */ @Override public void jjgd(ArchiveForm form){ + SysUser qmr=SecurityUtils.getLoginUser().getSysUser(); + //验证签名人密码 + checkPassword(qmr,form.getQmrmm(),false); + if (form.getId() == null || form.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + Gyzj gyzjOld = this.getById(form.getId()); + if (gyzjOld == null) { + throw new ServiceException("给药制剂不存在或已删除"); + } + if (!gyzjOld.getZjzt().equals(ZjztEnum.ysd.getValue())) { + throw new ServiceException("给药制剂【" + gyzjOld.getMc() + "】不是待归档状态,不能操作"); + } + gyzjOld.setZjzt(ZjztEnum.ysd.getValue()); + gyzjOld.setDazt(DaztEnum.wgd.getValue()); + this.updateById(gyzjOld); + //稽查轨迹 + gyzjJcgjService.saveJcgj(gyzjOld.getId(), JcgjlxEnum.lc.getValue(), "拒绝归档", JcmcysEnum.green.getValue(), null, qmr, form.getRemark()); } @@ -1322,6 +1356,24 @@ public class GyzjServiceImpl extends ServiceImpl implements IG */ @Override public void tyjd(ArchiveForm form){ + SysUser qmr=SecurityUtils.getLoginUser().getSysUser(); + //验证签名人密码 + checkPassword(qmr,form.getQmrmm(),false); + if (form.getId() == null || form.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + Gyzj gyzjOld = this.getById(form.getId()); + if (gyzjOld == null) { + throw new ServiceException("给药制剂不存在或已删除"); + } + if (!gyzjOld.getZjzt().equals(ZjztEnum.djd.getValue())) { + throw new ServiceException("给药制剂【" + gyzjOld.getMc() + "】不是待解档状态,不能操作"); + } + gyzjOld.setZjzt(ZjztEnum.ysd.getValue()); + gyzjOld.setDazt(DaztEnum.wgd.getValue()); + this.updateById(gyzjOld); + //稽查轨迹 + gyzjJcgjService.saveJcgj(gyzjOld.getId(), JcgjlxEnum.lc.getValue(), "同意解档", JcmcysEnum.green.getValue(), null, qmr, form.getRemark()); } @@ -1330,6 +1382,23 @@ public class GyzjServiceImpl extends ServiceImpl implements IG */ @Override public void jjjd(ArchiveForm form){ + SysUser qmr=SecurityUtils.getLoginUser().getSysUser(); + //验证签名人密码 + checkPassword(qmr,form.getQmrmm(),false); + if (form.getId() == null || form.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + Gyzj gyzjOld = this.getById(form.getId()); + if (gyzjOld == null) { + throw new ServiceException("给药制剂不存在或已删除"); + } + if (!gyzjOld.getZjzt().equals(ZjztEnum.djd.getValue())) { + throw new ServiceException("给药制剂【" + gyzjOld.getMc() + "】不是待解档状态,不能操作"); + } + gyzjOld.setZjzt(ZjztEnum.gd.getValue()); + this.updateById(gyzjOld); + //稽查轨迹 + gyzjJcgjService.saveJcgj(gyzjOld.getId(), JcgjlxEnum.lc.getValue(), "拒绝解档", JcmcysEnum.green.getValue(), null, qmr, form.getRemark()); } @@ -1338,6 +1407,25 @@ public class GyzjServiceImpl extends ServiceImpl implements IG */ @Override public void tyjy(ArchiveForm form){ + SysUser qmr=SecurityUtils.getLoginUser().getSysUser(); + //验证签名人密码 + checkPassword(qmr,form.getQmrmm(),false); + if (form.getId() == null || form.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + Gyzj gyzjOld = this.getById(form.getId()); + if (gyzjOld == null) { + throw new ServiceException("给药制剂不存在或已删除"); + } + if (!gyzjOld.getJyzt().equals(JyztEnum.djy.getValue())) { + throw new ServiceException("给药制剂【" + gyzjOld.getMc() + "】不是待借阅状态,不能操作"); + } + gyzjOld.setJyzt(JyztEnum.jyz.getValue()); + gyzjOld.setJyksrq(form.getJyksrq()); + gyzjOld.setJyjsrq(form.getJyjsrq()); + this.updateById(gyzjOld); + //稽查轨迹 + gyzjJcgjService.saveJcgj(gyzjOld.getId(), JcgjlxEnum.lc.getValue(), "同意借阅", JcmcysEnum.green.getValue(), null, qmr, form.getRemark()); } @@ -1346,6 +1434,25 @@ public class GyzjServiceImpl extends ServiceImpl implements IG */ @Override public void jjjy(ArchiveForm form){ + SysUser qmr=SecurityUtils.getLoginUser().getSysUser(); + //验证签名人密码 + checkPassword(qmr,form.getQmrmm(),false); + if (form.getId() == null || form.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + Gyzj gyzjOld = this.getById(form.getId()); + if (gyzjOld == null) { + throw new ServiceException("给药制剂不存在或已删除"); + } + if (!gyzjOld.getJyzt().equals(JyztEnum.djy.getValue())) { + throw new ServiceException("给药制剂【" + gyzjOld.getMc() + "】不是待借阅状态,不能操作"); + } + gyzjOld.setJyzt(JyztEnum.wjy.getValue()); + gyzjOld.setJyksrq(form.getJyksrq()); + gyzjOld.setJyjsrq(form.getJyjsrq()); + this.updateById(gyzjOld); + //稽查轨迹 + gyzjJcgjService.saveJcgj(gyzjOld.getId(), JcgjlxEnum.lc.getValue(), "拒绝借阅", JcmcysEnum.green.getValue(), null, qmr, form.getRemark()); } @@ -1354,6 +1461,23 @@ public class GyzjServiceImpl extends ServiceImpl implements IG */ @Override public void qrgh(ArchiveForm form){ + SysUser qmr=SecurityUtils.getLoginUser().getSysUser(); + //验证签名人密码 + checkPassword(qmr,form.getQmrmm(),false); + if (form.getId() == null || form.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + Gyzj gyzjOld = this.getById(form.getId()); + if (gyzjOld == null) { + throw new ServiceException("给药制剂不存在或已删除"); + } + if (!gyzjOld.getJyzt().equals(JyztEnum.jyz.getValue())) { + throw new ServiceException("给药制剂【" + gyzjOld.getMc() + "】不是借阅中状态,不能操作"); + } + gyzjOld.setJyzt(JyztEnum.wjy.getValue()); + this.updateById(gyzjOld); + //稽查轨迹 + gyzjJcgjService.saveJcgj(gyzjOld.getId(), JcgjlxEnum.lc.getValue(), "确认归还", JcmcysEnum.green.getValue(), null, qmr, form.getRemark()); }