|
|
|
@ -9,6 +9,7 @@ import com.hxhq.business.domain.*; |
|
|
|
import com.hxhq.business.dto.mjy.FfjlDetailDto; |
|
|
|
import com.hxhq.business.dto.mjy.FfjlListDto; |
|
|
|
import com.hxhq.business.enums.archive.ArchiveLogTypeEnum; |
|
|
|
import com.hxhq.business.enums.study.StudyTypeEnum; |
|
|
|
import com.hxhq.business.enums.zykgl.*; |
|
|
|
import com.hxhq.business.enums.zykgl.JlztEnum; |
|
|
|
import com.hxhq.business.form.mjy.*; |
|
|
|
@ -26,7 +27,6 @@ import org.springframework.stereotype.Service; |
|
|
|
import com.hxhq.business.mapper.MjyFfjlMapper; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
|
|
|
|
/** |
|
|
|
* 发放记录-发放记录Service业务层处理 |
|
|
|
@ -44,6 +44,8 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
private IStudyMjyService studyMjyService; |
|
|
|
@Autowired |
|
|
|
private IArchiveLogService archiveLogService; |
|
|
|
@Autowired |
|
|
|
private INoticeService noticeService; |
|
|
|
|
|
|
|
//region 发放记录 |
|
|
|
|
|
|
|
@ -64,8 +66,8 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
/** |
|
|
|
* 列表 |
|
|
|
* |
|
|
|
* @param form 发放记录发放记录 |
|
|
|
* @return 发放记录发放记录 |
|
|
|
* @param form 发放记录 |
|
|
|
* @return 发放记录 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<FfjlListDto> queryList(FfjlSearchForm form) { |
|
|
|
@ -120,10 +122,10 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
} |
|
|
|
MjyFfjl mjyFfjlOld = this.getById(form.getId()); |
|
|
|
if (mjyFfjlOld == null) { |
|
|
|
throw new ServiceException("发放记录不存在或已删除"); |
|
|
|
throw new ServiceException("发放回收记录不存在或已删除"); |
|
|
|
} |
|
|
|
if (!mjyFfjlOld.getJlzt().equals(JlztEnum.wsd.getValue())) { |
|
|
|
throw new ServiceException("发放记录【" + mjyFfjlOld.getMc() + "】不是未锁定状态,不能加签"); |
|
|
|
throw new ServiceException("发放回收记录【" + mjyFfjlOld.getMc() + "】不是未锁定状态,不能加签"); |
|
|
|
} |
|
|
|
//稽查轨迹 |
|
|
|
mjyFfjlJcgjService.saveJcgj(mjyFfjlOld.getId(), JcgjlxEnum.bcsm.getValue(), "补充说明", JcmcysEnum.orange.getValue(), null, qmr,form.getRemark()); |
|
|
|
@ -145,13 +147,13 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
} |
|
|
|
MjyFfjl mjyFfjlOld = this.getById(form.getId()); |
|
|
|
if (mjyFfjlOld == null) { |
|
|
|
throw new ServiceException("发放记录不存在或已删除"); |
|
|
|
throw new ServiceException("发放回收记录不存在或已删除"); |
|
|
|
} |
|
|
|
if (!mjyFfjlOld.getJlzt().equals(JlztEnum.gd.getValue())) { |
|
|
|
throw new ServiceException("发放记录【" + mjyFfjlOld.getMc() + "】不是归档状态,不能借阅"); |
|
|
|
throw new ServiceException("发放回收记录【" + mjyFfjlOld.getMc() + "】不是归档状态,不能借阅"); |
|
|
|
} |
|
|
|
if (!mjyFfjlOld.getJyzt().equals(JyztEnum.wjy.getValue())) { |
|
|
|
throw new ServiceException("发放记录【" + mjyFfjlOld.getMc() + "】不是未借阅状态,不能借阅"); |
|
|
|
throw new ServiceException("发放回收记录【" + mjyFfjlOld.getMc() + "】不是未借阅状态,不能借阅"); |
|
|
|
} |
|
|
|
//申请借阅后,借阅状态更新为待借阅,等待档案员审核期间无法进行其他操作; |
|
|
|
mjyFfjlOld.setJyzt(JyztEnum.djy.getValue()); |
|
|
|
@ -197,10 +199,10 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
} |
|
|
|
MjyFfjl mjyFfjlOld = this.getById(form.getId()); |
|
|
|
if (mjyFfjlOld == null) { |
|
|
|
throw new ServiceException("发放记录发放记录不存在或已删除"); |
|
|
|
throw new ServiceException("发放回收记录不存在或已删除"); |
|
|
|
} |
|
|
|
if (!mjyFfjlOld.getJlzt().equals(JlztEnum.gd.getValue())) { |
|
|
|
throw new ServiceException("发放记录发放记录【" + mjyFfjlOld.getMc() + "】未归档,不能解档"); |
|
|
|
throw new ServiceException("发放回收记录【" + mjyFfjlOld.getMc() + "】未归档,不能解档"); |
|
|
|
} |
|
|
|
//申请解档后,状态更新为待解档,等待档案员审核期间无法进行其他操作; |
|
|
|
mjyFfjlOld.setJlzt(JlztEnum.djd.getValue()); |
|
|
|
@ -232,7 +234,7 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
if (mjyFfjlList.size() > 0) { |
|
|
|
for (MjyFfjl mjy : mjyFfjlList) { |
|
|
|
if (!mjy.getJlzt().equals(JlztEnum.ysd.getValue())) { |
|
|
|
throw new ServiceException("发放记录发放记录【" + mjy.getMc() + "】不是锁定状态,不能归档"); |
|
|
|
throw new ServiceException("发放回收记录【" + mjy.getMc() + "】不是锁定状态,不能归档"); |
|
|
|
} |
|
|
|
} |
|
|
|
for (MjyFfjl mjyFfjl : mjyFfjlList) { |
|
|
|
@ -265,10 +267,10 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
} |
|
|
|
MjyFfjl mjyFfjlOld = this.getById(form.getId()); |
|
|
|
if (mjyFfjlOld == null) { |
|
|
|
throw new ServiceException("发放记录发放记录不存在或已删除"); |
|
|
|
throw new ServiceException("发放回收记录不存在或已删除"); |
|
|
|
} |
|
|
|
if (!mjyFfjlOld.getJlzt().equals(JlztEnum.ysd.getValue())) { |
|
|
|
throw new ServiceException("发放记录发放记录【" + mjyFfjlOld.getMc() + "】不是锁定状态,不能归档"); |
|
|
|
throw new ServiceException("发放回收记录【" + mjyFfjlOld.getMc() + "】不是锁定状态,不能归档"); |
|
|
|
} |
|
|
|
//申请归档,档案员可在档案管理中进行确认归档审核;申请后状态更新成待归档; |
|
|
|
mjyFfjlOld.setJlzt(JlztEnum.dgd.getValue()); |
|
|
|
@ -276,7 +278,6 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
this.updateById(mjyFfjlOld); |
|
|
|
//稽查轨迹 |
|
|
|
mjyFfjlJcgjService.saveJcgj(mjyFfjlOld.getId(), JcgjlxEnum.lc.getValue(), "申请归档", JcmcysEnum.green.getValue(), null, qmr,form.getRemark()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -300,7 +301,7 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
List<MjyFfjl> mjyFfjlList = this.list(queryWrapper); |
|
|
|
List<MjyFfjlJcgj> mjyFfjlJcgjList = new ArrayList<>(); |
|
|
|
if (mjyFfjlList.size() <= 0) { |
|
|
|
throw new ServiceException("发放记录发放记录不是未锁定状态,不能锁定"); |
|
|
|
throw new ServiceException("发放回收记录不是未锁定状态,不能锁定"); |
|
|
|
} |
|
|
|
for (MjyFfjl mjyFfjl : mjyFfjlList) { |
|
|
|
//锁定 |
|
|
|
@ -329,10 +330,10 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
} |
|
|
|
MjyFfjl mjyFfjlOld = this.getById(form.getId()); |
|
|
|
if (mjyFfjlOld == null) { |
|
|
|
throw new ServiceException("发放记录发放记录不存在或已删除"); |
|
|
|
throw new ServiceException("发放回收记录不存在或已删除"); |
|
|
|
} |
|
|
|
if (!mjyFfjlOld.getJlzt().equals(JlztEnum.wsd.getValue())) { |
|
|
|
throw new ServiceException("发放记录发放记录【" + mjyFfjlOld.getMc() + "】不是未锁定状态,不能锁定"); |
|
|
|
throw new ServiceException("发放回收记录【" + mjyFfjlOld.getMc() + "】不是未锁定状态,不能锁定"); |
|
|
|
} |
|
|
|
mjyFfjlOld.setJlzt(JlztEnum.ysd.getValue()); |
|
|
|
this.updateById(mjyFfjlOld); |
|
|
|
@ -358,10 +359,10 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
} |
|
|
|
MjyFfjl mjyFfjlOld = this.getById(form.getId()); |
|
|
|
if (mjyFfjlOld == null) { |
|
|
|
throw new ServiceException("发放记录发放记录不存在或已删除"); |
|
|
|
throw new ServiceException("发放回收记录不存在或已删除"); |
|
|
|
} |
|
|
|
if (!mjyFfjlOld.getJlzt().equals(JlztEnum.ysd.getValue())) { |
|
|
|
throw new ServiceException("发放记录发放记录【" + mjyFfjlOld.getMc() + "】不是已锁定状态,不能解锁"); |
|
|
|
throw new ServiceException("发放回收记录【" + mjyFfjlOld.getMc() + "】不是已锁定状态,不能解锁"); |
|
|
|
} |
|
|
|
//点击解锁,状态更新为入库; |
|
|
|
mjyFfjlOld.setJlzt(JlztEnum.wsd.getValue()); |
|
|
|
@ -379,7 +380,7 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
public void gh(GhForm form, Mjy mjy, SysUser ghr1, SysUser ghr2, SysUser jsr1, SysUser jsr2) { |
|
|
|
MjyFfjl mjyFfjl = this.queryLastInfoByMjyId(mjy.getId()); |
|
|
|
if (mjyFfjl == null) { |
|
|
|
throw new ServiceException("发放记录不存在或已删除"); |
|
|
|
throw new ServiceException("发放回收记录不存在或已删除"); |
|
|
|
} |
|
|
|
//region 新增发放记录 |
|
|
|
|
|
|
|
@ -565,10 +566,10 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
} |
|
|
|
MjyFfjl mjyFfjlOld = this.getById(form.getId()); |
|
|
|
if (mjyFfjlOld == null) { |
|
|
|
throw new ServiceException("发放记录不存在或已删除"); |
|
|
|
throw new ServiceException("发放回收记录不存在或已删除"); |
|
|
|
} |
|
|
|
if (!mjyFfjlOld.getJlzt().equals(JlztEnum.dgd.getValue())) { |
|
|
|
throw new ServiceException("发放记录【" + mjyFfjlOld.getMc() + "】不是待归档状态,不能操作"); |
|
|
|
throw new ServiceException("发放回收记录【" + mjyFfjlOld.getMc() + "】不是待归档状态,不能操作"); |
|
|
|
} |
|
|
|
mjyFfjlOld.setJlzt(JlztEnum.gd.getValue()); |
|
|
|
this.updateById(mjyFfjlOld); |
|
|
|
@ -592,10 +593,10 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
} |
|
|
|
MjyFfjl mjyFfjlOld = this.getById(form.getId()); |
|
|
|
if (mjyFfjlOld == null) { |
|
|
|
throw new ServiceException("发放记录不存在或已删除"); |
|
|
|
throw new ServiceException("发放回收记录不存在或已删除"); |
|
|
|
} |
|
|
|
if (!mjyFfjlOld.getJlzt().equals(JlztEnum.dgd.getValue())) { |
|
|
|
throw new ServiceException("发放记录【" + mjyFfjlOld.getMc() + "】不是待归档状态,不能操作"); |
|
|
|
throw new ServiceException("发放回收记录【" + mjyFfjlOld.getMc() + "】不是待归档状态,不能操作"); |
|
|
|
} |
|
|
|
mjyFfjlOld.setJlzt(JlztEnum.ysd.getValue()); |
|
|
|
mjyFfjlOld.setDazt(DaztEnum.wgd.getValue()); |
|
|
|
@ -622,10 +623,10 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
} |
|
|
|
MjyFfjl mjyFfjlOld = this.getById(form.getId()); |
|
|
|
if (mjyFfjlOld == null) { |
|
|
|
throw new ServiceException("发放记录不存在或已删除"); |
|
|
|
throw new ServiceException("发放回收记录不存在或已删除"); |
|
|
|
} |
|
|
|
if (!mjyFfjlOld.getJlzt().equals(JlztEnum.djd.getValue())) { |
|
|
|
throw new ServiceException("发放记录【" + mjyFfjlOld.getMc() + "】不是待解档状态,不能操作"); |
|
|
|
throw new ServiceException("发放回收记录【" + mjyFfjlOld.getMc() + "】不是待解档状态,不能操作"); |
|
|
|
} |
|
|
|
mjyFfjlOld.setJlzt(JlztEnum.ysd.getValue()); |
|
|
|
mjyFfjlOld.setDazt(DaztEnum.wgd.getValue()); |
|
|
|
@ -650,10 +651,10 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
} |
|
|
|
MjyFfjl mjyFfjlOld = this.getById(form.getId()); |
|
|
|
if (mjyFfjlOld == null) { |
|
|
|
throw new ServiceException("发放记录不存在或已删除"); |
|
|
|
throw new ServiceException("发放回收记录不存在或已删除"); |
|
|
|
} |
|
|
|
if (!mjyFfjlOld.getJlzt().equals(JlztEnum.djd.getValue())) { |
|
|
|
throw new ServiceException("发放记录【" + mjyFfjlOld.getMc() + "】不是待解档状态,不能操作"); |
|
|
|
throw new ServiceException("发放回收记录【" + mjyFfjlOld.getMc() + "】不是待解档状态,不能操作"); |
|
|
|
} |
|
|
|
mjyFfjlOld.setJlzt(JlztEnum.gd.getValue()); |
|
|
|
this.updateById(mjyFfjlOld); |
|
|
|
@ -679,10 +680,10 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
} |
|
|
|
MjyFfjl mjyFfjlOld = this.getById(form.getId()); |
|
|
|
if (mjyFfjlOld == null) { |
|
|
|
throw new ServiceException("发放记录不存在或已删除"); |
|
|
|
throw new ServiceException("发放回收记录不存在或已删除"); |
|
|
|
} |
|
|
|
if (!mjyFfjlOld.getJyzt().equals(JyztEnum.djy.getValue())) { |
|
|
|
throw new ServiceException("发放记录【" + mjyFfjlOld.getMc() + "】不是待借阅状态,不能操作"); |
|
|
|
throw new ServiceException("发放回收记录【" + mjyFfjlOld.getMc() + "】不是待借阅状态,不能操作"); |
|
|
|
} |
|
|
|
mjyFfjlOld.setJyzt(JyztEnum.jyz.getValue()); |
|
|
|
mjyFfjlOld.setJyksrq(form.getJyksrq()); |
|
|
|
@ -711,10 +712,10 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
} |
|
|
|
MjyFfjl mjyFfjlOld = this.getById(form.getId()); |
|
|
|
if (mjyFfjlOld == null) { |
|
|
|
throw new ServiceException("发放记录不存在或已删除"); |
|
|
|
throw new ServiceException("发放回收记录不存在或已删除"); |
|
|
|
} |
|
|
|
if (!mjyFfjlOld.getJyzt().equals(JyztEnum.djy.getValue())) { |
|
|
|
throw new ServiceException("发放记录【" + mjyFfjlOld.getMc() + "】不是待借阅状态,不能操作"); |
|
|
|
throw new ServiceException("发放回收记录【" + mjyFfjlOld.getMc() + "】不是待借阅状态,不能操作"); |
|
|
|
} |
|
|
|
mjyFfjlOld.setJyzt(JyztEnum.wjy.getValue()); |
|
|
|
mjyFfjlOld.setJyksrq(form.getJyksrq()); |
|
|
|
@ -744,10 +745,10 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
} |
|
|
|
MjyFfjl mjyFfjlOld = this.getById(form.getId()); |
|
|
|
if (mjyFfjlOld == null) { |
|
|
|
throw new ServiceException("发放记录不存在或已删除"); |
|
|
|
throw new ServiceException("发放回收记录不存在或已删除"); |
|
|
|
} |
|
|
|
if (!mjyFfjlOld.getJyzt().equals(JyztEnum.jyz.getValue())) { |
|
|
|
throw new ServiceException("发放记录【" + mjyFfjlOld.getMc() + "】不是借阅中状态,不能操作"); |
|
|
|
throw new ServiceException("发放回收记录【" + mjyFfjlOld.getMc() + "】不是借阅中状态,不能操作"); |
|
|
|
} |
|
|
|
mjyFfjlOld.setJyzt(JyztEnum.wjy.getValue()); |
|
|
|
this.updateById(mjyFfjlOld); |
|
|
|
@ -772,4 +773,13 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl |
|
|
|
} |
|
|
|
sysUserService.checkPassword(user,qmrmm,needName); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取通知的跳转url |
|
|
|
* @param tab |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private String getUrlQz(String tab){ |
|
|
|
return "/resource/mjy/"+tab; |
|
|
|
} |
|
|
|
} |