From e70d2f8744dc029e6b94cb69e47a606c8ace03b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?=
<7507756+jiang_yuqi@user.noreply.gitee.com>
Date: Tue, 29 Aug 2023 21:48:18 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../work/emergencyDrill/emergencyDrillDrawer.vue | 2 +-
ruoyi-ui/src/views/work/emergencyDrill/index.vue | 2 +-
ruoyi-ui/src/views/work/workTrain/index.vue | 2 +-
.../src/views/work/workTrain/workTrainDrawer.vue | 2 +-
.../project/controller/ProjectTrainController.java | 14 ++++++++++++++
.../jh/work/service/impl/WorkTrainServiceImpl.java | 14 ++++++++++++--
.../mapper/project/SurProjectUnitInfoMapper.xml | 9 ++++++++-
7 files changed, 38 insertions(+), 7 deletions(-)
diff --git a/ruoyi-ui/src/views/work/emergencyDrill/emergencyDrillDrawer.vue b/ruoyi-ui/src/views/work/emergencyDrill/emergencyDrillDrawer.vue
index 16558330..f0193094 100644
--- a/ruoyi-ui/src/views/work/emergencyDrill/emergencyDrillDrawer.vue
+++ b/ruoyi-ui/src/views/work/emergencyDrill/emergencyDrillDrawer.vue
@@ -313,7 +313,7 @@ export default {
beginDate: [{ required: true, message: "请选择演练时间", trigger: "blur" }],
trainTitle: [
{ required: true, message: "请输入演练标题", trigger: "blur" },
- { max: 20, message: "培训标题最多20个字符", trigger: "blur" },
+ { max: 30, message: "培训标题最多30个字符", trigger: "blur" },
],
trainParticipants: [
{ required: true, message: "请输入参与人数", trigger: "blur" },
diff --git a/ruoyi-ui/src/views/work/emergencyDrill/index.vue b/ruoyi-ui/src/views/work/emergencyDrill/index.vue
index 9e97600d..ee44c8cd 100644
--- a/ruoyi-ui/src/views/work/emergencyDrill/index.vue
+++ b/ruoyi-ui/src/views/work/emergencyDrill/index.vue
@@ -382,7 +382,7 @@ export default {
beginDate: [{ required: true, message: "请选择演练时间", trigger: "blur" }],
trainTitle: [
{ required: true, message: "请输入演练标题", trigger: "blur" },
- { max: 20, message: "培训标题最多20个字符", trigger: "blur" },
+ { max: 30, message: "培训标题最多30个字符", trigger: "blur" },
],
trainParticipants: [
{ required: true, message: "请输入参与人数", trigger: "blur" },
diff --git a/ruoyi-ui/src/views/work/workTrain/index.vue b/ruoyi-ui/src/views/work/workTrain/index.vue
index 6cc3e70b..9c170c4f 100644
--- a/ruoyi-ui/src/views/work/workTrain/index.vue
+++ b/ruoyi-ui/src/views/work/workTrain/index.vue
@@ -375,7 +375,7 @@ export default {
beginDate: [{ required: true, message: "请选择培训时间", trigger: "blur" }],
trainTitle: [
{ required: true, message: "请输入培训标题", trigger: "blur" },
- { max: 20, message: "培训标题最多20个字符", trigger: "blur" },
+ { max: 30, message: "培训标题最多30个字符", trigger: "blur" },
],
trainParticipants: [
{ required: true, message: "请输入参与人数", trigger: "blur" },
diff --git a/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue b/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue
index 14a68063..fa8d6e1f 100644
--- a/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue
+++ b/ruoyi-ui/src/views/work/workTrain/workTrainDrawer.vue
@@ -313,7 +313,7 @@ export default {
beginDate: [{ required: true, message: "请选择培训时间", trigger: "blur" }],
trainTitle: [
{ required: true, message: "请输入培训标题", trigger: "blur" },
- { max: 20, message: "培训标题最多20个字符", trigger: "blur" },
+ { max: 30, message: "培训标题最多30个字符", trigger: "blur" },
],
trainParticipants: [
{ required: true, message: "请输入参与人数", trigger: "blur" },
diff --git a/ruoyi-wechat/src/main/java/com/ruoyi/web/project/controller/ProjectTrainController.java b/ruoyi-wechat/src/main/java/com/ruoyi/web/project/controller/ProjectTrainController.java
index c2495973..e4a00888 100644
--- a/ruoyi-wechat/src/main/java/com/ruoyi/web/project/controller/ProjectTrainController.java
+++ b/ruoyi-wechat/src/main/java/com/ruoyi/web/project/controller/ProjectTrainController.java
@@ -4,6 +4,8 @@ import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
+import com.yanzhu.jh.project.domain.SurProjectUnitInfo;
+import com.yanzhu.jh.project.service.ISurProjectUnitInfoService;
import com.yanzhu.jh.work.domain.WorkTrain;
import com.yanzhu.jh.work.service.IWorkTrainService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -23,6 +25,9 @@ public class ProjectTrainController extends BaseController {
@Autowired
private IWorkTrainService workTrainService;
+ @Autowired
+ private ISurProjectUnitInfoService surProjectUnitInfoService;
+
/**
* 查询项目专项培训||应急演练列表
* @param workTrain
@@ -87,4 +92,13 @@ public class ProjectTrainController extends BaseController {
{
return toAjax(workTrainService.deleteWorkTrainById(id));
}
+
+ /**
+ * 查询项目部门列表
+ */
+ @GetMapping("/queryUnitList")
+ public AjaxResult queryUnitList(SurProjectUnitInfo surProjectUnitInfo)
+ {
+ return success(surProjectUnitInfoService.selectSurProjectUnitInfoList(surProjectUnitInfo));
+ }
}
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 aea18379..714c231b 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
@@ -104,7 +104,10 @@ public class WorkTrainServiceImpl implements IWorkTrainService
@Override
public int insertWorkTrain(WorkTrain workTrain)
{
- workTrain.setCreateBy(SecurityUtils.getUsername());
+ if(workTrain.getCreateBy()==null){
+ workTrain.setCreateBy(SecurityUtils.getUsername());
+ }
+ workTrain.setIsDel(Convert.toLong(PublicStateEnum.OK.getCode()));
workTrain.setCreateTime(DateUtils.getNowDate());
int rows = workTrainMapper.insertWorkTrain(workTrain);
insertWorkTrainDept(workTrain);
@@ -170,7 +173,14 @@ public class WorkTrainServiceImpl implements IWorkTrainService
workTrainDeptList = new ArrayList<>();
}
WorkTrainDept dept = new WorkTrainDept();
- SysDept sysDept = sysDeptMapper.selectDeptById(SecurityUtils.getDeptId());
+ Long deptid;
+ if(workTrain.getDeptId()!=null){
+ deptid = workTrain.getDeptId();
+ }else{
+ deptid = SecurityUtils.getDeptId();
+ }
+
+ SysDept sysDept = sysDeptMapper.selectDeptById(deptid);
if(DeptTypeEnum.JTGS.getCode().equals(sysDept.getTypeFlag()) || DeptTypeEnum.ZGS.getCode().equals(sysDept.getTypeFlag())){
SurProject surProject = surProjectMapper.selectSurProjectById(workTrain.getProjectId());
dept.setDeptId(surProject.getDeptId());
diff --git a/yanzhu-jh/src/main/resources/mapper/project/SurProjectUnitInfoMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SurProjectUnitInfoMapper.xml
index c177760f..26507513 100644
--- a/yanzhu-jh/src/main/resources/mapper/project/SurProjectUnitInfoMapper.xml
+++ b/yanzhu-jh/src/main/resources/mapper/project/SurProjectUnitInfoMapper.xml
@@ -37,7 +37,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and spui.unitPersonPhone = #{unitPersonPhone}
and spui.createUser = #{createUser}
and spui.createTime = #{createTime}
- and spui.unitId != #{nowDept}
+
+
+ and spui.unitType != 11
+
+
+ and spui.unitId != #{nowDept}
+
+
and spui.unitType in