- 问题描述
+ 隐患描述
diff --git a/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/WorkFileConller.java b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/BgWorkFileController.java
similarity index 94%
rename from yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/WorkFileConller.java
rename to yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/BgWorkFileController.java
index e27a7d4e..9316c630 100644
--- a/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/WorkFileConller.java
+++ b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/BgWorkFileController.java
@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
*/
@RestController
@RequestMapping("/bgscreen/workfile")
-public class WorkFileConller extends BaseController {
+public class BgWorkFileController extends BaseController {
@Autowired
IWorkFileService workFileService;
diff --git a/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/BgWorkTrainController.java b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/BgWorkTrainController.java
new file mode 100644
index 00000000..cb73253e
--- /dev/null
+++ b/yanzhu-bigscreen/src/main/java/com/yanzhu/jh/bigscreen/web/controller/BgWorkTrainController.java
@@ -0,0 +1,38 @@
+package com.yanzhu.jh.bigscreen.web.controller;
+
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.core.text.Convert;
+import com.ruoyi.common.utils.StringUtils;
+import com.yanzhu.jh.work.domain.WorkTrain;
+import com.yanzhu.jh.work.service.IWorkTrainService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 培训演训Conller
+ */
+@RestController
+@RequestMapping("/bgscreen/workTrain")
+public class BgWorkTrainController extends BaseController {
+
+ @Autowired
+ IWorkTrainService workTrainService;
+
+ /**
+ * 根据类型查询培训演训
+ * @param trainType
+ * @return
+ */
+ @GetMapping("/getWorkTrainList")
+ public TableDataInfo getWorkTrainList(String trainType,String deptId){
+ WorkTrain workTrain = new WorkTrain();
+ workTrain.setTrainType(trainType);
+ if(StringUtils.isNotBlank(deptId)){
+ workTrain.setDeptId(Convert.toLong(deptId));
+ }
+ return getDataTable(workTrainService.selectBgscreenWorkTrainList(workTrain));
+ }
+}
diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/work/domain/WorkTrain.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/work/domain/WorkTrain.java
index 4b562422..36fb71ac 100644
--- a/yanzhu-jh/src/main/java/com/yanzhu/jh/work/domain/WorkTrain.java
+++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/work/domain/WorkTrain.java
@@ -67,7 +67,9 @@ public class WorkTrain extends BaseEntity
private String trainDeptIds;
private String trainDeptNames;
+ private String trainNatureName;
private String vDel;
+ private Long deptId;//子公司查询使用
public void setId(Long id)
{
@@ -200,6 +202,22 @@ public class WorkTrain extends BaseEntity
this.trainDeptNames = trainDeptNames;
}
+ public String getTrainNatureName() {
+ return trainNatureName;
+ }
+
+ public void setTrainNatureName(String trainNatureName) {
+ this.trainNatureName = trainNatureName;
+ }
+
+ public Long getDeptId() {
+ return deptId;
+ }
+
+ public void setDeptId(Long deptId) {
+ this.deptId = deptId;
+ }
+
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/work/mapper/WorkTrainMapper.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/work/mapper/WorkTrainMapper.java
index 2a355ae7..1a8e286d 100644
--- a/yanzhu-jh/src/main/java/com/yanzhu/jh/work/mapper/WorkTrainMapper.java
+++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/work/mapper/WorkTrainMapper.java
@@ -28,6 +28,14 @@ public interface WorkTrainMapper
*/
public List selectWorkTrainList(WorkTrain workTrain);
+ /**
+ * 查询演练培训列表
+ *
+ * @param workTrain 演练培训
+ * @return 演练培训集合
+ */
+ public List selectBgscreenWorkTrainList(WorkTrain workTrain);
+
/**
* 新增演练培训
*
diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/work/service/IWorkTrainService.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/work/service/IWorkTrainService.java
index 79c4cd57..945bdfe9 100644
--- a/yanzhu-jh/src/main/java/com/yanzhu/jh/work/service/IWorkTrainService.java
+++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/work/service/IWorkTrainService.java
@@ -27,6 +27,14 @@ public interface IWorkTrainService
*/
public List selectWorkTrainList(WorkTrain workTrain);
+ /**
+ * 查询演练培训列表
+ *
+ * @param workTrain 演练培训
+ * @return 演练培训集合
+ */
+ public List selectBgscreenWorkTrainList(WorkTrain workTrain);
+
/**
* 新增演练培训
*
diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/work/service/impl/WorkTrainServiceImpl.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/work/service/impl/WorkTrainServiceImpl.java
index eec1701f..f19b569e 100644
--- a/yanzhu-jh/src/main/java/com/yanzhu/jh/work/service/impl/WorkTrainServiceImpl.java
+++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/work/service/impl/WorkTrainServiceImpl.java
@@ -48,6 +48,17 @@ public class WorkTrainServiceImpl implements IWorkTrainService
return workTrainMapper.selectWorkTrainList(workTrain);
}
+ /**
+ * 查询演练培训列表
+ *
+ * @param workTrain 演练培训
+ * @return 演练培训集合
+ */
+ @Override
+ public List selectBgscreenWorkTrainList(WorkTrain workTrain) {
+ return workTrainMapper.selectBgscreenWorkTrainList(workTrain);
+ }
+
/**
* 新增演练培训
*
diff --git a/yanzhu-jh/src/main/resources/mapper/work/WorkTrainMapper.xml b/yanzhu-jh/src/main/resources/mapper/work/WorkTrainMapper.xml
index 1f699d8a..df681dfc 100644
--- a/yanzhu-jh/src/main/resources/mapper/work/WorkTrainMapper.xml
+++ b/yanzhu-jh/src/main/resources/mapper/work/WorkTrainMapper.xml
@@ -22,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
@@ -62,7 +63,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and wt.is_del = #{isDel}
and ((wt.begin_date between #{params.beginMarksTime} and #{params.endMarksTime}) or (wt.end_date between #{params.beginMarksTime} and #{params.endMarksTime}) )
- group by wt.train_id
+ group by wt.id
+ order by wt.create_time desc
+
+
+