diff --git a/hxhq-modules/hxhq-job/pom.xml b/hxhq-modules/hxhq-job/pom.xml
index 6a50aa8..f6b19da 100644
--- a/hxhq-modules/hxhq-job/pom.xml
+++ b/hxhq-modules/hxhq-job/pom.xml
@@ -70,7 +70,13 @@
com.hxhq
hxhq-common-swagger
-
+
+ com.hxhq
+ hxhq-modules-system
+ 3.6.6
+ compile
+
+
diff --git a/hxhq-modules/hxhq-job/src/main/java/com/hxhq/job/task/RyTask.java b/hxhq-modules/hxhq-job/src/main/java/com/hxhq/job/task/RyTask.java
index 755b267..935c99a 100644
--- a/hxhq-modules/hxhq-job/src/main/java/com/hxhq/job/task/RyTask.java
+++ b/hxhq-modules/hxhq-job/src/main/java/com/hxhq/job/task/RyTask.java
@@ -1,8 +1,17 @@
package com.hxhq.job.task;
+import com.hxhq.business.service.IGyzjFfjlService;
+import com.hxhq.business.service.IGyzjService;
+import com.hxhq.business.service.IMjyFfjlService;
+import com.hxhq.business.service.IMjyService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.hxhq.common.core.utils.StringUtils;
+import java.util.Date;
+
/**
* 定时任务调度测试
*
@@ -11,6 +20,17 @@ import com.hxhq.common.core.utils.StringUtils;
@Component("ryTask")
public class RyTask
{
+ protected Logger logger = LoggerFactory.getLogger(getClass());
+
+ @Autowired
+ private IGyzjService gyzjService;
+ @Autowired
+ private IGyzjFfjlService gyzjFfjlService;
+ @Autowired
+ private IMjyService mjyService;
+ @Autowired
+ private IMjyFfjlService mjyFfjlService;
+
public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i)
{
System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i));
@@ -25,4 +45,45 @@ public class RyTask
{
System.out.println("执行无参方法");
}
+
+
+ //region 麻精药
+
+ /**
+ * 麻精药借阅到期自动归还
+ */
+ public void autoJyExpireReturnMjy()
+ {
+ mjyService.autoJyExpireReturn();
+ }
+
+ /**
+ * 麻精药发放记录借阅到期自动归还
+ */
+ public void autoJyExpireReturnMjyFfjl()
+ {
+ mjyFfjlService.autoJyExpireReturn();
+ }
+
+ //endregion
+
+ //region 给药制剂
+
+ /**
+ * 给药制剂借阅到期自动归还
+ */
+ public void autoJyExpireReturnGyzj()
+ {
+ gyzjService.autoJyExpireReturn();
+ }
+
+ /**
+ * 给药制剂发放记录借阅到期自动归还
+ */
+ public void autoJyExpireReturnGyzjFfjl()
+ {
+ gyzjFfjlService.autoJyExpireReturn();
+ }
+
+ //endregion
}
diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGyzjFfjlService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGyzjFfjlService.java
index 04fc3da..84bc37f 100644
--- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGyzjFfjlService.java
+++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGyzjFfjlService.java
@@ -175,5 +175,10 @@ public interface IGyzjFfjlService extends IService {
*/
public void qrgh(ArchiveForm form);
+ /**
+ * 借阅到期自动归还
+ */
+ public void autoJyExpireReturn();
+
//endregion
}
diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGyzjService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGyzjService.java
index e32676e..e35912a 100644
--- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGyzjService.java
+++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGyzjService.java
@@ -267,6 +267,11 @@ public interface IGyzjService extends IService {
*/
public void qrgh(ArchiveForm form);
+ /**
+ * 借阅到期自动归还
+ */
+ public void autoJyExpireReturn();
+
//endregion
}
diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IMjyFfjlService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IMjyFfjlService.java
index c010e30..e89b6ae 100644
--- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IMjyFfjlService.java
+++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IMjyFfjlService.java
@@ -177,6 +177,11 @@ public interface IMjyFfjlService extends IService {
*/
public void qrgh(ArchiveForm form);
+ /**
+ * 借阅到期自动归还
+ */
+ public void autoJyExpireReturn();
+
//endregion
}
diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IMjyService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IMjyService.java
index 319680b..3c9b972 100644
--- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IMjyService.java
+++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IMjyService.java
@@ -252,6 +252,11 @@ public interface IMjyService extends IService {
*/
public void qrgh(ArchiveForm form);
+ /**
+ * 借阅到期自动归还
+ */
+ public void autoJyExpireReturn();
+
//endregion
}
diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjFfjlServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjFfjlServiceImpl.java
index f412a21..9b152e2 100644
--- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjFfjlServiceImpl.java
+++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjFfjlServiceImpl.java
@@ -537,13 +537,13 @@ public class GyzjFfjlServiceImpl extends ServiceImpl i
queryWrapper.and(p -> p.apply("t.ffrq>={0}", form.getStartDateCk()));
}
if (StringUtils.isNoneBlank(form.getEndDateCk())) {
- queryWrapper.apply("t.ffrq>={0}", form.getStartDateCk());
+ queryWrapper.apply("t.ffrq<={0}", form.getStartDateCk());
}
if (StringUtils.isNoneBlank(form.getStartDateRk())) {
queryWrapper.and(p -> p.apply("t.rkrq>={0}", form.getStartDateRk()));
}
if (StringUtils.isNoneBlank(form.getEndDateRk())) {
- queryWrapper.apply("t.ghrq>={0}", form.getEndDateRk());
+ queryWrapper.apply("t.ghrq<={0}", form.getEndDateRk());
}
if (StringUtils.isNoneBlank(form.getMdMc())) {
queryWrapper.and(p -> p.like("t.md_other", form.getMdMc())
@@ -767,8 +767,29 @@ public class GyzjFfjlServiceImpl extends ServiceImpl i
noticeService.save("发放回收记录【"+gyzjFfjlOld.getMc()+"】确认归还",gyzjFfjlOld.getGdsqrId(),getUrlQz("ffjlList"));
}
- //endregion
+ /**
+ * 借阅到期自动归还
+ */
+ @Override
+ public void autoJyExpireReturn(){
+ QueryWrapper queryWrapper = Wrappers.query();
+ queryWrapper.eq("jyzt",JyztEnum.jyz.getValue());
+ queryWrapper.apply("jyjsrq<{0}", DateUtils.getTime());
+ List gyzjFfjlList=this.list(queryWrapper);
+ List gyzjFfjlJcgjList=new ArrayList<>();
+ for(GyzjFfjl gyzjFfjl:gyzjFfjlList){
+ gyzjFfjl.setJlzt(JyztEnum.wjy.getValue());
+ //稽查轨迹
+ gyzjFfjlJcgjList.add(gyzjFfjlJcgjService.getJcgj(gyzjFfjl.getId(), JcgjlxEnum.lc.getValue(), "到期自动归还", JcmcysEnum.green.getValue(), null, null, null));
+ }
+ this.updateBatchById(gyzjFfjlList);
+ if(gyzjFfjlJcgjList.size()>0){
+ gyzjFfjlJcgjService.saveBatch(gyzjFfjlJcgjList);
+ }
+ }
+
+ //endregion
/**
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 dc6e15c..24428b1 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
@@ -1680,6 +1680,28 @@ public class GyzjServiceImpl extends ServiceImpl implements IG
noticeService.save("给药制剂【"+gyzjOld.getMc()+"】确认归还",gyzjOld.getGdsqrId(),getUrlQz("gyzjList"));
}
+
+ /**
+ * 借阅到期自动归还
+ */
+ @Override
+ public void autoJyExpireReturn(){
+ QueryWrapper queryWrapper = Wrappers.query();
+ queryWrapper.eq("jyzt",JyztEnum.jyz.getValue());
+ queryWrapper.apply("jyjsrq<{0}", DateUtils.getTime());
+ List gyzjList=this.list(queryWrapper);
+ List gyzjFfjlJcgjList=new ArrayList<>();
+ for(Gyzj gyzj:gyzjList){
+ gyzj.setJyzt(JyztEnum.wjy.getValue());
+ //稽查轨迹
+ gyzjFfjlJcgjList.add(gyzjJcgjService.getJcgj(gyzj.getId(), JcgjlxEnum.lc.getValue(), "到期自动归还", JcmcysEnum.green.getValue(), null, null, null));
+ }
+ this.updateBatchById(gyzjList);
+ if(gyzjFfjlJcgjList.size()>0){
+ gyzjJcgjService.saveBatch(gyzjFfjlJcgjList);
+ }
+ }
+
//endregion
/**
diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyFfjlServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyFfjlServiceImpl.java
index 8410757..544abe2 100644
--- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyFfjlServiceImpl.java
+++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyFfjlServiceImpl.java
@@ -762,6 +762,28 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl
noticeService.save("发放回收记录【"+mjyFfjlOld.getMc()+"】确认归还",mjyFfjlOld.getGdsqrId(),getUrlQz("ffjlList"));
}
+
+ /**
+ * 借阅到期自动归还
+ */
+ @Override
+ public void autoJyExpireReturn(){
+ QueryWrapper queryWrapper = Wrappers.query();
+ queryWrapper.eq("jyzt",JyztEnum.jyz.getValue());
+ queryWrapper.apply("jyjsrq<{0}", DateUtils.getTime());
+ List mjyFfjlList=this.list(queryWrapper);
+ List mjyFfjlJcgjList=new ArrayList<>();
+ for(MjyFfjl mjyFfjl:mjyFfjlList){
+ mjyFfjl.setJlzt(JyztEnum.wjy.getValue());
+ //稽查轨迹
+ mjyFfjlJcgjList.add(mjyFfjlJcgjService.getJcgj(mjyFfjl.getId(), JcgjlxEnum.lc.getValue(), "到期自动归还", JcmcysEnum.green.getValue(), null, null, null));
+ }
+ this.updateBatchById(mjyFfjlList);
+ if(mjyFfjlJcgjList.size()>0){
+ mjyFfjlJcgjService.saveBatch(mjyFfjlJcgjList);
+ }
+ }
+
//endregion
diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java
index dbdde97..109da53 100644
--- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java
+++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java
@@ -1586,6 +1586,28 @@ public class MjyServiceImpl extends ServiceImpl implements IMjyS
noticeService.save("麻精药【"+mjyOld.getMc()+"】确认归还",mjyOld.getGdsqrId(),getUrlQz("mjyList"));
}
+
+ /**
+ * 借阅到期自动归还
+ */
+ @Override
+ public void autoJyExpireReturn(){
+ QueryWrapper queryWrapper = Wrappers.query();
+ queryWrapper.eq("jyzt",JyztEnum.jyz.getValue());
+ queryWrapper.apply("jyjsrq<{0}", DateUtils.getTime());
+ List mjyList=this.list(queryWrapper);
+ List mjyFfjlJcgjList=new ArrayList<>();
+ for(Mjy mjy:mjyList){
+ mjy.setJyzt(JyztEnum.wjy.getValue());
+ //稽查轨迹
+ mjyFfjlJcgjList.add(mjyJcgjService.getJcgj(mjy.getId(), JcgjlxEnum.lc.getValue(), "到期自动归还", JcmcysEnum.green.getValue(), null, null, null));
+ }
+ this.updateBatchById(mjyList);
+ if(mjyFfjlJcgjList.size()>0){
+ mjyJcgjService.saveBatch(mjyFfjlJcgjList);
+ }
+ }
+
//endregion
/**
@@ -1602,8 +1624,6 @@ public class MjyServiceImpl extends ServiceImpl implements IMjyS
}
-
-
/**
* 获取通知的跳转url
* @param tab
diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/GyzjJcnrUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/GyzjJcnrUtil.java
index 6caf86c..511c533 100644
--- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/GyzjJcnrUtil.java
+++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/GyzjJcnrUtil.java
@@ -101,6 +101,8 @@ public class GyzjJcnrUtil {
mapLang.put("存储","Storage");
mapLang.put("取出","Take Out");
mapLang.put("给药制剂详情","Formulation Information");
+ mapLang.put("到期自动归还","到期自动归还");
+
mapLang.put("表单名称","Preset Name");
mapLang.put("锁定发放记录","Lock Record");
diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/MjyJcnrUtil.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/MjyJcnrUtil.java
index 15a8056..141065c 100644
--- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/MjyJcnrUtil.java
+++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/lang/MjyJcnrUtil.java
@@ -96,6 +96,7 @@ public class MjyJcnrUtil {
mapLang.put("存储","Storage");
mapLang.put("取出","Take Out");
mapLang.put("确认归还","Confirm Check-in");
+ mapLang.put("到期自动归还","到期自动归还");
mapLang.put("表单名称","Preset Name");
mapLang.put("锁定发放记录","Lock Record");