|
|
|
@ -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)); |
|
|
|
} |
|
|
|
|
|
|
|
} |