diff --git a/hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/RemoteUserService.java b/hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/RemoteUserService.java index 2cf6ad0..4a7e593 100644 --- a/hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/RemoteUserService.java +++ b/hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/RemoteUserService.java @@ -87,4 +87,28 @@ public interface RemoteUserService */ @PostMapping("/business/gyzjFfjl/autoGh") public void autoGhGyzjFfjl(); + + /** + * 自动归还试剂档案 + */ + @PostMapping("/business/sjArchive/autoGh") + public void autoGhSj(); + + /** + * 自动归还供试品档案 + */ + @PostMapping("/business/gspArchive/autoGh") + public void autoGhGsp(); + + /** + * 自动归还供试品发放记录档案 + */ + @PostMapping("/business/gspFfjlArchive/autoGh") + public void autoGhGspFfjl(); + + /** + * 自动归还供试品入库记录档案 + */ + @PostMapping("/business/gspRkjlArchive/autoGh") + public void autoGhGspRkjl(); } diff --git a/hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/factory/RemoteUserFallbackFactory.java b/hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/factory/RemoteUserFallbackFactory.java index 772ea49..03d2248 100644 --- a/hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/factory/RemoteUserFallbackFactory.java +++ b/hxhq-api/hxhq-api-system/src/main/java/com/hxhq/system/api/factory/RemoteUserFallbackFactory.java @@ -62,6 +62,26 @@ public class RemoteUserFallbackFactory implements FallbackFactory */ void saveInfo(ArchiveLogTypeEnum type, StudyTypeEnum studyType, Long targetId, String name, String sn, String leader, String operateType); + } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspFfjlJcgjService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspFfjlJcgjService.java index 3d00f95..897525c 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspFfjlJcgjService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspFfjlJcgjService.java @@ -3,6 +3,7 @@ package com.hxhq.business.service; import java.util.List; import com.hxhq.business.domain.GspFfjlJcgj; import com.baomidou.mybatisplus.extension.service.IService; +import com.hxhq.business.domain.GspJcgj; import com.hxhq.system.api.domain.SysUser; /** @@ -33,4 +34,18 @@ public interface IGspFfjlJcgjService extends IService * @param qmr 稽查人 */ public void saveJcgj(Long ffjlId, Integer jcgjlx, String jcmc, String jcmcEn, Integer jcmcys, String jcnr, String jcnrEn, SysUser qmr); + + /** + * 生成稽查轨迹 + * @param ffjlId 发放记录id + * @param jcgjlx 稽查轨迹类型:1:流程;3:编辑 + * @param jcmc 稽查名称 + * @param jcmcEn 稽查名称-英文 + * @param jcmcys 稽查名称颜色:1:蓝色;3:红色;5:绿色;7:橙色 + * @param jcnr 稽查内容 + * @param jcnrEn 稽查内容-英文 + * @param qmr 签名人信息 + * @return + */ + GspFfjlJcgj genJcgj(Long ffjlId, Integer jcgjlx, String jcmc, String jcmcEn, Integer jcmcys, String jcnr, String jcnrEn, SysUser qmr); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspFfjlService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspFfjlService.java index 00d3720..534a1d3 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspFfjlService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspFfjlService.java @@ -164,4 +164,9 @@ public interface IGspFfjlService extends IService * @param form */ void archiveGh(GspGdForm form); + + /** + * 借阅到期自动归还 + */ + public void autoJyExpireReturn(); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspJcgjService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspJcgjService.java index 28dc2ca..d8701fa 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspJcgjService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspJcgjService.java @@ -3,6 +3,7 @@ package com.hxhq.business.service; import java.util.List; import com.hxhq.business.domain.GspJcgj; import com.baomidou.mybatisplus.extension.service.IService; +import com.hxhq.business.domain.SjJcgj; import com.hxhq.system.api.domain.SysUser; /** @@ -33,4 +34,18 @@ public interface IGspJcgjService extends IService * @param qmr 签名人 */ public void saveJcgj(Long gspId, Integer jcgjlx, String jcmc, String jcmcEn, Integer jcmcys, String jcnr, String jcnrEn, SysUser qmr); + + /** + * 生成稽查轨迹 + * @param gspId 供试品id + * @param jcgjlx 稽查轨迹类型:1:流程;3:编辑 + * @param jcmc 稽查名称 + * @param jcmcEn 稽查名称-英文 + * @param jcmcys 稽查名称颜色:1:蓝色;3:红色;5:绿色;7:橙色 + * @param jcnr 稽查内容 + * @param jcnrEn 稽查内容-英文 + * @param qmr 签名人信息 + * @return + */ + GspJcgj genJcgj(Long gspId, Integer jcgjlx, String jcmc, String jcmcEn, Integer jcmcys, String jcnr, String jcnrEn, SysUser qmr); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspRkjlJcgjService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspRkjlJcgjService.java index a3da51f..b8d8cfe 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspRkjlJcgjService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspRkjlJcgjService.java @@ -1,6 +1,8 @@ package com.hxhq.business.service; import java.util.List; + +import com.hxhq.business.domain.GspJcgj; import com.hxhq.business.domain.GspRkjlJcgj; import com.baomidou.mybatisplus.extension.service.IService; import com.hxhq.system.api.domain.SysUser; @@ -33,4 +35,18 @@ public interface IGspRkjlJcgjService extends IService * @param qmr 签名人 */ public void saveJcgj(Long gspRkjlId, Integer jcgjlx, String jcmc, String jcmcEn, Integer jcmcys, String jcnr, String jcnrEn, SysUser qmr); + + /** + * 生成稽查轨迹 + * @param gspRkjlId 供试品入库id + * @param jcgjlx 稽查轨迹类型:1:流程;3:编辑 + * @param jcmc 稽查名称 + * @param jcmcEn 稽查名称-英文 + * @param jcmcys 稽查名称颜色:1:蓝色;3:红色;5:绿色;7:橙色 + * @param jcnr 稽查内容 + * @param jcnrEn 稽查内容-英文 + * @param qmr 签名人信息 + * @return + */ + GspRkjlJcgj genJcgj(Long gspRkjlId, Integer jcgjlx, String jcmc, String jcmcEn, Integer jcmcys, String jcnr, String jcnrEn, SysUser qmr); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspRkjlService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspRkjlService.java index c74dbfe..04cb2c5 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspRkjlService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspRkjlService.java @@ -117,4 +117,9 @@ public interface IGspRkjlService extends IService * @param form */ void archiveGh(GspGdForm form); + + /** + * 借阅到期自动归还 + */ + public void autoJyExpireReturn(); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspService.java index a2327cf..7c62f13 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGspService.java @@ -164,16 +164,29 @@ public interface IGspService extends IService */ void agreeJd(GspGdForm form); - /** 拒绝解档 */ + /** + * 拒绝解档 + */ void refuseJd(GspGdForm form); - /** 同意借阅 */ + /** + * 同意借阅 + */ void agreeJy(GspJyForm form); - /** 拒绝借阅 */ + /** + * 拒绝借阅 + */ void refuseJy(GspJyForm form); - /** 档案确认归还 */ + /** + * 档案确认归还 + */ void archiveGh(GspGdForm form); + /** + * 借阅到期自动归还 + */ + public void autoJyExpireReturn(); + } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/ISjService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/ISjService.java index a804a2b..426c68d 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/ISjService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/ISjService.java @@ -22,14 +22,25 @@ import com.hxhq.business.form.sj.*; public interface ISjService extends IService { /** - * 查询试剂库存列表 + * 查询试剂列表 * * @param form 试剂库存 - * @return 试剂库存集合 + * @return 试剂集合 */ public List queryList(SjSearchListForm form); + + /** + * 查询试剂列表 + * + * @param form 试剂库存 + * @return 试剂集合 + */ public List queryPublicList(SjSearchListForm form); + /** + * 通过编号获取试剂 + * @param bh 编号 + */ Sj getSjByBh(String bh); /** @@ -39,63 +50,129 @@ public interface ISjService extends IService */ SjListDto getInfo(Long id); - /** 修改库存 */ + /** + * 修改库存 + * @param form + */ void xgkc(SjXgkcForm form); - /** 处置 */ + /** + * 处置 + * @param form + */ void cz(CzSjForm form); - /** 批量处置 */ + /** + * 批量处置 + * @param form + */ void plcz(PlczSjForm form); - /** 锁定 */ + /** + * 锁定 + * @param form + */ void sd(SdSjForm form); - /** 批量锁定 */ + /** + * 批量锁定 + * @param form + */ void plsd(SdSjForm form); - /** 解锁 */ + /** + * 解锁 + * @param form + */ void js(JsSjForm form); - /** 借阅 */ + /** + * 借阅 + * @param form + */ void jy(JySjForm form); - /** 解档 */ + /** + * 解档 + * @param form + */ void jd(JdSjForm form); - /** 归档 */ + /** + * 归档 + * @param form + */ void gd(GdSjForm form); - /** 批量归档 */ + /** + * 批量归档 + * @param form + */ void plgd(GdSjForm form); - /** 编辑 */ + /** + * 编辑 + * @param form + */ void bj(SjBjForm form); - /** 试验物资列表 */ + /** + * 试验物资列表 + * @param form + */ List queryStudyList(GspSearchListForm form); - /** 表单生成试剂逻辑处理 */ + /** + * 表单生成试剂逻辑处理 + * @param studyFormFill + * @param template + */ void genResource(StudyFormFill studyFormFill, Template template); - /** 同意归档 */ + /** + * 同意归档 + * @param form + */ void agreeGd(GspGdForm form); - /** 拒绝归档 */ + /** + * 拒绝归档 + * @param form + */ void refuseGd(GspGdForm form); - /** 同意解档 */ + /** + * 同意解档 + * @param form + */ void agreeJd(GspGdForm form); - /** 拒绝解档 */ + /** + * 拒绝解档 + * @param form + */ void refuseJd(GspGdForm form); - /** 同意借阅 */ + /** + * 同意借阅 + * @param form + */ void agreeJy(GspJyForm form); - /** 拒绝借阅 */ + /** + * 拒绝借阅 + * @param form + */ void refuseJy(GspJyForm form); - /** 档案确认归还 */ + /** + * 档案确认归还 + * @param form + */ void archiveGh(GspGdForm form); + + /** + * 借阅到期自动归还 + */ + public void autoJyExpireReturn(); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspFfjlJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspFfjlJcgjServiceImpl.java index 1155b3d..9675e91 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspFfjlJcgjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspFfjlJcgjServiceImpl.java @@ -3,6 +3,7 @@ package com.hxhq.business.service.impl; import java.util.List; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.hxhq.business.domain.GspJcgj; import com.hxhq.business.domain.MjyFfjlJcgj; import com.hxhq.system.api.domain.SysUser; import org.springframework.stereotype.Service; @@ -53,4 +54,23 @@ public class GspFfjlJcgjServiceImpl extends ServiceImpl impl noticeService.save("供试品发放记录【"+gspFfjl.getMc()+"】确认归还",gspFfjl.getGdsqrId(),getUrlQz("ffjlList")); } + @Override + public void autoJyExpireReturn() { + QueryWrapper queryWrapper = Wrappers.query(); + queryWrapper.eq("jyzt",JyztEnum.jyz.getValue()); + queryWrapper.apply("jyjsrq<{0}", DateUtils.getTime()); + List gspFfjlList=this.list(queryWrapper); + List jcgjList=new ArrayList<>(); + for(GspFfjl gspFfjl:gspFfjlList){ + gspFfjl.setJyzt(JyztEnum.wjy.getValue()); + //稽查轨迹 + GspFfjlJcgj jcgj = gspFfjlJcgjService.genJcgj(gspFfjl.getId(), JcgjlxEnum.lc.getValue(), "到期自动归还", "Check-out End on Time", + JcmcysEnum.green.getValue(), null, null, null); + jcgjList.add(jcgj); + } + this.updateBatchById(gspFfjlList); + if(jcgjList.size()>0){ + gspFfjlJcgjService.saveBatch(jcgjList); + } + } + /** * 获取通知的跳转url * @param tab diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspJcgjServiceImpl.java index a1e6bc2..7944540 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspJcgjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspJcgjServiceImpl.java @@ -66,4 +66,23 @@ public class GspJcgjServiceImpl extends ServiceImpl impl this.save(gspJcgj); } + @Override + public GspJcgj genJcgj(Long gspId, Integer jcgjlx, String jcmc, String jcmcEn, Integer jcmcys, String jcnr, String jcnrEn, SysUser qmr) { + GspJcgj gspJcgj = new GspJcgj(); + gspJcgj.setGspId(gspId); + gspJcgj.setJcgjlx(jcgjlx); + gspJcgj.setJcmc(jcmc); + gspJcgj.setJcmcEn(jcmcEn); + gspJcgj.setJcmcys(jcmcys); + gspJcgj.setJcnr(jcnr); + gspJcgj.setJcnr(jcnrEn); + if(qmr != null) { + gspJcgj.setQmrId(qmr.getUserId()); + gspJcgj.setQmrMc(qmr.getNickName()); + gspJcgj.setQmrMcEn(qmr.getUserName()); + } + + return gspJcgj; + } + } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspRkjlJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspRkjlJcgjServiceImpl.java index b6a7c58..907197c 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspRkjlJcgjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspRkjlJcgjServiceImpl.java @@ -52,4 +52,23 @@ public class GspRkjlJcgjServiceImpl extends ServiceImpl impl noticeService.save("供试品入库记录【"+gspRkjl.getMc()+"】确认归还",gspRkjl.getGdsqrId(),getUrlQz("rkjlList")); } + @Override + public void autoJyExpireReturn() { + QueryWrapper queryWrapper = Wrappers.query(); + queryWrapper.eq("jyzt",JyztEnum.jyz.getValue()); + queryWrapper.apply("jyjsrq<{0}", DateUtils.getTime()); + List gspList=this.list(queryWrapper); + List jcgjList=new ArrayList<>(); + for(GspRkjl gspRkjl:gspList){ + gspRkjl.setJyzt(JyztEnum.wjy.getValue()); + //稽查轨迹 + GspRkjlJcgj jcgj = gspRkjlJcgjService.genJcgj(gspRkjl.getId(), JcgjlxEnum.lc.getValue(), "到期自动归还", "Check-out End on Time", + JcmcysEnum.green.getValue(), null, null, null); + jcgjList.add(jcgj); + } + this.updateBatchById(gspList); + if(jcgjList.size()>0){ + gspRkjlJcgjService.saveBatch(jcgjList); + } + } + /** * 获取通知的跳转url * @param tab diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java index 6811efc..c7a524b 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java @@ -1344,6 +1344,26 @@ public class GspServiceImpl extends ServiceImpl implements IGspS } + @Override + public void autoJyExpireReturn() { + QueryWrapper queryWrapper = Wrappers.query(); + queryWrapper.eq("jyzt",JyztEnum.jyz.getValue()); + queryWrapper.apply("jyjsrq<{0}", DateUtils.getTime()); + List gspList=this.list(queryWrapper); + List jcgjList=new ArrayList<>(); + for(Gsp gsp:gspList){ + gsp.setJyzt(JyztEnum.wjy.getValue()); + //稽查轨迹 + GspJcgj jcgj = gspJcgjService.genJcgj(gsp.getId(), JcgjlxEnum.lc.getValue(), "到期自动归还", "Check-out End on Time", + JcmcysEnum.green.getValue(), null, null, null); + jcgjList.add(jcgj); + } + this.updateBatchById(gspList); + if(jcgjList.size()>0){ + gspJcgjService.saveBatch(jcgjList); + } + } + /** * 获取通知的跳转url * @param tab diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjJcgjServiceImpl.java index c2c5fd6..9d3715a 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjJcgjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjJcgjServiceImpl.java @@ -74,9 +74,11 @@ public class SjJcgjServiceImpl extends ServiceImpl imple sjJcgj.setJcmcys(jcmcys); sjJcgj.setJcnr(jcnr); sjJcgj.setJcnrEn(jcnrEn); - sjJcgj.setQmrId(qmr.getUserId()); - sjJcgj.setQmrMc(qmr.getNickName()); - sjJcgj.setQmrMcEn(qmr.getUserName()); + if(qmr != null) { + sjJcgj.setQmrId(qmr.getUserId()); + sjJcgj.setQmrMc(qmr.getNickName()); + sjJcgj.setQmrMcEn(qmr.getUserName()); + } return sjJcgj; } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java index 1bd5a5c..87d85df 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java @@ -1062,6 +1062,26 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi } + @Override + public void autoJyExpireReturn() { + QueryWrapper queryWrapper = Wrappers.query(); + queryWrapper.eq("jyzt",JyztEnum.jyz.getValue()); + queryWrapper.apply("jyjsrq<{0}", DateUtils.getTime()); + List sjList=this.list(queryWrapper); + List jcgjList=new ArrayList<>(); + for(Sj sj:sjList){ + sj.setJyzt(JyztEnum.wjy.getValue()); + //稽查轨迹 + SjJcgj jcgj = sjJcgjService.genJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "到期自动归还", "Check-out End on Time", + JcmcysEnum.green.getValue(), null, null, null); + jcgjList.add(jcgj); + } + this.updateBatchById(sjList); + if(jcgjList.size()>0){ + sjJcgjService.saveBatch(jcgjList); + } + } + /** * 获取通知的跳转url *