|
|
@ -12,10 +12,8 @@ import com.hxhq.business.dto.gyzj.ListDto; |
|
|
import com.hxhq.business.enums.zykgl.*; |
|
|
import com.hxhq.business.enums.zykgl.*; |
|
|
import com.hxhq.business.form.gyzj.*; |
|
|
import com.hxhq.business.form.gyzj.*; |
|
|
import com.hxhq.business.service.*; |
|
|
import com.hxhq.business.service.*; |
|
|
import com.hxhq.business.utils.JctUtil; |
|
|
|
|
|
import com.hxhq.business.utils.ObjectCompareUtil; |
|
|
import com.hxhq.business.utils.ObjectCompareUtil; |
|
|
import com.hxhq.common.core.exception.ServiceException; |
|
|
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.DateUtils; |
|
|
import com.hxhq.common.core.utils.StringUtils; |
|
|
import com.hxhq.common.core.utils.StringUtils; |
|
|
import com.hxhq.common.security.utils.SecurityUtils; |
|
|
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.hxhq.business.domain.Gyzj; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 给药制剂Service业务层处理 |
|
|
* 给药制剂Service业务层处理 |
|
|
@ -226,6 +223,7 @@ public class GyzjServiceImpl extends ServiceImpl implements IG |
|
|
for (Gyzj gyzj : gyzjList) { |
|
|
for (Gyzj gyzj : gyzjList) { |
|
|
//申请归档,档案员可在档案管理中进行确认归档审核;申请后状态更新成待归档; |
|
|
//申请归档,档案员可在档案管理中进行确认归档审核;申请后状态更新成待归档; |
|
|
gyzj.setZjzt(ZjztEnum.dgd.getValue()); |
|
|
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())); |
|
|
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.setZjzt(ZjztEnum.dgd.getValue()); |
|
|
|
|
|
gyzjOld.setDazt(DaztEnum.ygd.getValue()); |
|
|
this.updateById(gyzjOld); |
|
|
this.updateById(gyzjOld); |
|
|
//稽查轨迹 |
|
|
//稽查轨迹 |
|
|
gyzjJcgjService.saveJcgj(gyzjOld.getId(), JcgjlxEnum.lc.getValue(), "申请归档", JcmcysEnum.orange.getValue(),null, qmr, form.getRemark()); |
|
|
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(); |
|
|
Date now = new Date(); |
|
|
|
|
|
|
|
|
//region 发放记录,试验物资 todo |
|
|
|
|
|
|
|
|
//region 发放记录,试验物资 |
|
|
gyzjFfjlService.ff(form,gyzjOld, lqr1, lqr2, ffr1, ffr2, now); |
|
|
gyzjFfjlService.ff(form,gyzjOld, lqr1, lqr2, ffr1, ffr2, now); |
|
|
//endregion |
|
|
//endregion |
|
|
|
|
|
|
|
|
@ -741,7 +740,7 @@ public class GyzjServiceImpl extends ServiceImpl implements IG |
|
|
.filter(p -> p.getId().equals(gyzj.getId())) |
|
|
.filter(p -> p.getId().equals(gyzj.getId())) |
|
|
.collect(Collectors.toList()); |
|
|
.collect(Collectors.toList()); |
|
|
if (plffItemFilter.size() > 0) { |
|
|
if (plffItemFilter.size() > 0) { |
|
|
//发放 todo |
|
|
|
|
|
|
|
|
//发放记录,试验物资 |
|
|
gyzjFfjlService.ff(plffItemFilter.get(0), gyzj, lqr1, lqr2, ffr1, ffr2, now); |
|
|
gyzjFfjlService.ff(plffItemFilter.get(0), gyzj, lqr1, lqr2, ffr1, ffr2, now); |
|
|
//稽查轨迹 |
|
|
//稽查轨迹 |
|
|
Map<String, String> formData = new LinkedHashMap<>(); |
|
|
Map<String, String> formData = new LinkedHashMap<>(); |
|
|
@ -1278,7 +1277,7 @@ public class GyzjServiceImpl extends ServiceImpl implements IG |
|
|
public List<ListDto> queryArchiveList(SearchForm form){ |
|
|
public List<ListDto> queryArchiveList(SearchForm form){ |
|
|
QueryWrapper<Gyzj> queryWrapper = Wrappers.query(); |
|
|
QueryWrapper<Gyzj> queryWrapper = Wrappers.query(); |
|
|
queryWrapper.eq("t.del_flag", "0"); |
|
|
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) { |
|
|
if (form.getJyzt() != null && form.getJyzt().intValue() > 0) { |
|
|
queryWrapper.eq("t.jyzt", form.getJyzt()); |
|
|
queryWrapper.eq("t.jyzt", form.getJyzt()); |
|
|
} |
|
|
} |
|
|
@ -1306,6 +1305,23 @@ public class GyzjServiceImpl extends ServiceImpl implements IG |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public void tygd(ArchiveForm form){ |
|
|
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 |
|
|
@Override |
|
|
public void jjgd(ArchiveForm form){ |
|
|
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 |
|
|
@Override |
|
|
public void tyjd(ArchiveForm form){ |
|
|
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 |
|
|
@Override |
|
|
public void jjjd(ArchiveForm form){ |
|
|
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 |
|
|
@Override |
|
|
public void tyjy(ArchiveForm form){ |
|
|
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 |
|
|
@Override |
|
|
public void jjjy(ArchiveForm form){ |
|
|
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 |
|
|
@Override |
|
|
public void qrgh(ArchiveForm form){ |
|
|
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()); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|