提交代码

dev_xds
姜玉琦 2023-08-13 22:10:35 +08:00
parent a0a16fa72d
commit deef604213
15 changed files with 178 additions and 31 deletions

View File

@ -9,7 +9,7 @@ ruoyi:
# 实例演示开关 # 实例演示开关
demoEnabled: true demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath # 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: /data/uploadPath profile: D:/data/uploadPath
# 获取ip地址开关 # 获取ip地址开关
addressEnabled: false addressEnabled: false
# 验证码类型 math 数字计算 char 字符验证 # 验证码类型 math 数字计算 char 字符验证

View File

@ -21,11 +21,12 @@
<image-preview :src="scope.row.mainImage" :width="50" :height="50"/> <image-preview :src="scope.row.mainImage" :width="50" :height="50"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="演练类型" align="center" prop="trainNature" width="130" show-overflow-tooltip> <el-table-column label="演练类型" align="center" prop="trainNature" width="130" show-overflow-tooltip v-if="false">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.train_nature_yjyl" :value="scope.row.trainNature"/> <dict-tag :options="dict.type.train_nature_yjyl" :value="scope.row.trainNature"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="培训标题" align="center" prop="trainTitle" width="120" show-overflow-tooltip/>
<el-table-column label="参与人数" align="center" prop="trainParticipants" width="90"/> <el-table-column label="参与人数" align="center" prop="trainParticipants" width="90"/>
<el-table-column label="开始时间" align="center" prop="beginDate" width="100"> <el-table-column label="开始时间" align="center" prop="beginDate" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
@ -83,6 +84,9 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="培训标题" prop="trainTitle">
<el-input type="number" v-model="form.trainTitle" placeholder="请输入培训标题" />
</el-form-item>
<el-form-item label="参与人数" prop="trainParticipants"> <el-form-item label="参与人数" prop="trainParticipants">
<el-input type="number" v-model="form.trainParticipants" placeholder="请输入参与人数" /> <el-input type="number" v-model="form.trainParticipants" placeholder="请输入参与人数" />
</el-form-item> </el-form-item>
@ -169,7 +173,11 @@
{ required: true, message: "请上传演练主图", trigger: "blur" } { required: true, message: "请上传演练主图", trigger: "blur" }
], ],
trainNature: [ trainNature: [
{ required: true, message: "请选择演练类型", trigger: "blur" } { required: false, message: "请选择演练类型", trigger: "blur" }
],
trainTitle: [
{ required: true, message: "请输入培训标题", trigger: "blur" },
{ maxlength: 20, message: '培训标题最多20个字符',trigger: 'blur' }
], ],
trainParticipants: [ trainParticipants: [
{ required: true, message: "请输入参与人数", trigger: "blur" } { required: true, message: "请输入参与人数", trigger: "blur" }
@ -234,11 +242,14 @@
this.form = { this.form = {
id: null, id: null,
projectId: null, projectId: null,
deptId: null, projectName: null,
deptName: null, mainImage: null,
deptType: null, trainType: null,
jobType: null, trainNature: null,
userId: null, trainTitle: null,
trainParticipants: null,
beginDate: null,
endDate: null,
isDel: null, isDel: null,
createBy: null, createBy: null,
createTime: null, createTime: null,

View File

@ -9,7 +9,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="演练类型" prop="trainNature"> <el-form-item label="演练类型" prop="trainNature" v-if="false">
<el-select v-model="queryParams.trainNature" @keyup.enter.native="handleQuery" placeholder="请选择演练类型" clearable> <el-select v-model="queryParams.trainNature" @keyup.enter.native="handleQuery" placeholder="请选择演练类型" clearable>
<el-option <el-option
v-for="dict in dict.type.train_nature_yjyl" v-for="dict in dict.type.train_nature_yjyl"
@ -19,6 +19,14 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="培训标题" prop="trainTitle">
<el-input
v-model="queryParams.trainTitle"
placeholder="请输入培训标题"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="责任主体" prop="projectDeptId" v-hasPermi="['project:project:zgs']"> <el-form-item label="责任主体" prop="projectDeptId" v-hasPermi="['project:project:zgs']">
<el-select v-model="queryParams.projectDeptId" placeholder="请选择责任主体" clearable> <el-select v-model="queryParams.projectDeptId" placeholder="请选择责任主体" clearable>
<el-option <el-option
@ -105,6 +113,7 @@
<dict-tag :options="dict.type.train_nature_yjyl" :value="scope.row.trainNature"/> <dict-tag :options="dict.type.train_nature_yjyl" :value="scope.row.trainNature"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="培训标题" align="center" prop="trainTitle" width="150" show-overflow-tooltip />
<el-table-column label="参与人数" align="center" prop="trainParticipants" /> <el-table-column label="参与人数" align="center" prop="trainParticipants" />
<el-table-column label="开始时间" align="center" prop="beginDate" width="120"> <el-table-column label="开始时间" align="center" prop="beginDate" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
@ -174,6 +183,9 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="培训标题">
<el-input placeholder="请输入培训标题" v-model="form.trainTitle" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="参与人数" prop="trainParticipants"> <el-form-item label="参与人数" prop="trainParticipants">
<el-input type="number" v-model="form.trainParticipants" placeholder="请输入工作参与者" /> <el-input type="number" v-model="form.trainParticipants" placeholder="请输入工作参与者" />
</el-form-item> </el-form-item>
@ -251,6 +263,7 @@ export default {
trainType: 1, trainType: 1,
trainNature: null, trainNature: null,
isDel: null, isDel: null,
trainTitle: null,
projectDeptId: null projectDeptId: null
}, },
depts: null, depts: null,
@ -258,7 +271,24 @@ export default {
form: {}, form: {},
// //
rules: { rules: {
} mainImage: [
{ required: true, message: "请上传演练主图", trigger: "blur" }
],
trainNature: [
{ required: false, message: "请选择演练类型", trigger: "blur" }
],
trainTitle: [
{ required: true, message: "请输入培训标题", trigger: "blur" },
{ maxlength: 20, message: '培训标题最多20个字符',trigger: 'blur' }
],
trainParticipants: [
{ required: true, message: "请输入参与人数", trigger: "blur" }
],
trainContent: [
{ required: true, message: "请输入演练内容", trigger: "blur" },
{ maxlength: 1000, message: '演练内容长度在最多1000个字符',trigger: 'blur' }
]
}
}; };
}, },
created() { created() {
@ -303,6 +333,7 @@ export default {
mainImage: null, mainImage: null,
trainType: null, trainType: null,
trainNature: null, trainNature: null,
trainTitle: null,
trainParticipants: null, trainParticipants: null,
beginDate: null, beginDate: null,
endDate: null, endDate: null,

View File

@ -9,7 +9,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="培训类型" prop="trainNature"> <el-form-item label="培训类型" prop="trainNature" v-if="false">
<el-select v-model="queryParams.trainNature" @keyup.enter.native="handleQuery" placeholder="请选择培训类型" clearable> <el-select v-model="queryParams.trainNature" @keyup.enter.native="handleQuery" placeholder="请选择培训类型" clearable>
<el-option <el-option
v-for="dict in dict.type.train_nature_zxpx" v-for="dict in dict.type.train_nature_zxpx"
@ -19,6 +19,14 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="培训标题" prop="trainTitle">
<el-input
v-model="queryParams.trainTitle"
placeholder="请输入培训标题"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="责任主体" prop="projectDeptId" v-hasPermi="['project:project:zgs']"> <el-form-item label="责任主体" prop="projectDeptId" v-hasPermi="['project:project:zgs']">
<el-select v-model="queryParams.projectDeptId" placeholder="请选择责任主体" clearable> <el-select v-model="queryParams.projectDeptId" placeholder="请选择责任主体" clearable>
<el-option <el-option
@ -100,11 +108,12 @@
<image-preview :src="scope.row.mainImage" :width="50" :height="50"/> <image-preview :src="scope.row.mainImage" :width="50" :height="50"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="培训类型" align="center" prop="trainNature"> <el-table-column label="培训类型" align="center" prop="trainNature" v-if="false">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.train_nature_zxpx" :value="scope.row.trainNature"/> <dict-tag :options="dict.type.train_nature_zxpx" :value="scope.row.trainNature"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="培训标题" align="center" prop="trainTitle" width="150" show-overflow-tooltip />
<el-table-column label="参与人数" align="center" prop="trainParticipants" /> <el-table-column label="参与人数" align="center" prop="trainParticipants" />
<el-table-column label="开始时间" align="center" prop="beginDate" width="120"> <el-table-column label="开始时间" align="center" prop="beginDate" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
@ -164,7 +173,7 @@
<el-form-item label="培训主图" prop="mainImage"> <el-form-item label="培训主图" prop="mainImage">
<image-upload v-model="form.mainImage" :limit="1"/> <image-upload v-model="form.mainImage" :limit="1"/>
</el-form-item> </el-form-item>
<el-form-item label="培训类型" prop="trainNature"> <el-form-item label="培训类型" prop="trainNature" v-if="false">
<el-select v-model="form.trainNature" filterable placeholder="请选择培训类型" style="width: 100%;"> <el-select v-model="form.trainNature" filterable placeholder="请选择培训类型" style="width: 100%;">
<el-option <el-option
v-for="dict in dict.type.train_nature_zxpx" v-for="dict in dict.type.train_nature_zxpx"
@ -174,6 +183,9 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="培训标题">
<el-input placeholder="请输入培训标题" v-model="form.trainTitle" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="参与人数" prop="trainParticipants"> <el-form-item label="参与人数" prop="trainParticipants">
<el-input type="number" v-model="form.trainParticipants" placeholder="请输入工作参与者" /> <el-input type="number" v-model="form.trainParticipants" placeholder="请输入工作参与者" />
</el-form-item> </el-form-item>
@ -251,6 +263,7 @@ export default {
trainType: 0, trainType: 0,
trainNature: null, trainNature: null,
isDel: null, isDel: null,
trainTitle: null,
projectDeptId: null projectDeptId: null
}, },
depts:null, depts:null,
@ -258,6 +271,23 @@ export default {
form: {}, form: {},
// //
rules: { rules: {
mainImage: [
{ required: true, message: "请上传培训主图", trigger: "blur" }
],
trainNature: [
{ required: false, message: "请选择培训类型", trigger: "blur" }
],
trainTitle: [
{ required: true, message: "请输入培训标题", trigger: "blur" },
{ maxlength: 20, message: '培训标题最多20个字符',trigger: 'blur' }
],
trainParticipants: [
{ required: true, message: "请输入参与人数", trigger: "blur" }
],
trainContent: [
{ required: true, message: "请输入培训内容", trigger: "blur" },
{ maxlength: 1000, message: '培训内容长度在最多1000个字符',trigger: 'blur' }
]
} }
}; };
}, },
@ -303,6 +333,7 @@ export default {
mainImage: null, mainImage: null,
trainType: null, trainType: null,
trainNature: null, trainNature: null,
trainTitle: null,
trainParticipants: null, trainParticipants: null,
beginDate: null, beginDate: null,
endDate: null, endDate: null,

View File

@ -21,11 +21,12 @@
<image-preview :src="scope.row.mainImage" :width="50" :height="50"/> <image-preview :src="scope.row.mainImage" :width="50" :height="50"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="培训类型" align="center" prop="trainNature" width="130" show-overflow-tooltip> <el-table-column label="培训类型" align="center" prop="trainNature" width="130" show-overflow-tooltip v-if="false">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.train_nature_zxpx" :value="scope.row.trainNature"/> <dict-tag :options="dict.type.train_nature_zxpx" :value="scope.row.trainNature"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="培训标题" align="center" prop="trainTitle" width="120" show-overflow-tooltip/>
<el-table-column label="参与人数" align="center" prop="trainParticipants" width="90"/> <el-table-column label="参与人数" align="center" prop="trainParticipants" width="90"/>
<el-table-column label="开始时间" align="center" prop="beginDate" width="100"> <el-table-column label="开始时间" align="center" prop="beginDate" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
@ -73,7 +74,7 @@
<el-form-item label="培训主图" prop="mainImage"> <el-form-item label="培训主图" prop="mainImage">
<image-upload v-model="form.mainImage" :limit="1"/> <image-upload v-model="form.mainImage" :limit="1"/>
</el-form-item> </el-form-item>
<el-form-item label="培训类型" prop="trainNature"> <el-form-item label="培训类型" prop="trainNature" v-if="false">
<el-select v-model="form.trainNature" placeholder="请选择培训类型" style="width: 100%;"> <el-select v-model="form.trainNature" placeholder="请选择培训类型" style="width: 100%;">
<el-option <el-option
v-for="dict in dict.type.train_nature_zxpx" v-for="dict in dict.type.train_nature_zxpx"
@ -83,8 +84,11 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="培训标题" prop="trainTitle">
<el-input type="number" v-model="form.trainTitle" placeholder="请输入培训标题" />
</el-form-item>
<el-form-item label="参与人数" prop="trainParticipants"> <el-form-item label="参与人数" prop="trainParticipants">
<el-input type="number" v-model="form.trainParticipants" placeholder="请输入参与人数" /> <el-input type="number" v-model="form.trainParticipants" placeholder="请输入参与人数" />
</el-form-item> </el-form-item>
<el-form-item label="培训日期" prop="daterangeMarksTime"> <el-form-item label="培训日期" prop="daterangeMarksTime">
<el-date-picker <el-date-picker
@ -169,7 +173,11 @@
{ required: true, message: "请上传培训主图", trigger: "blur" } { required: true, message: "请上传培训主图", trigger: "blur" }
], ],
trainNature: [ trainNature: [
{ required: true, message: "请选择培训类型", trigger: "blur" } { required: false, message: "请选择培训类型", trigger: "blur" }
],
trainTitle: [
{ required: true, message: "请输入培训标题", trigger: "blur" },
{ maxlength: 20, message: '培训标题最多20个字符',trigger: 'blur' }
], ],
trainParticipants: [ trainParticipants: [
{ required: true, message: "请输入参与人数", trigger: "blur" } { required: true, message: "请输入参与人数", trigger: "blur" }
@ -234,11 +242,14 @@
this.form = { this.form = {
id: null, id: null,
projectId: null, projectId: null,
deptId: null, projectName: null,
deptName: null, mainImage: null,
deptType: null, trainType: null,
jobType: null, trainNature: null,
userId: null, trainTitle: null,
trainParticipants: null,
beginDate: null,
endDate: null,
isDel: null, isDel: null,
createBy: null, createBy: null,
createTime: null, createTime: null,

View File

@ -105,7 +105,7 @@
</div> </div>
<div class="ssp-block"> <div class="ssp-block">
<div class="spp-block-title"> <div class="spp-block-title">
安全隐患 隐患类型
</div> </div>
<div class="ssp-block-input"> <div class="ssp-block-input">
<input type="text" placeholder="请选择安全隐患类型" readonly id="input0" onclick="inputClick(0)" v-model="form.projectType"> <input type="text" placeholder="请选择安全隐患类型" readonly id="input0" onclick="inputClick(0)" v-model="form.projectType">

View File

@ -99,7 +99,7 @@
</div> </div>
<div class="ssp-block"> <div class="ssp-block">
<div class="spp-block-title"> <div class="spp-block-title">
安全隐患 隐患类型
</div> </div>
<div class="ssp-block-input"> <div class="ssp-block-input">
<input type="text" placeholder="请选择安全隐患类型" readonly id="input0" onclick="inputClick(0)" v-model="form.projectType"> <input type="text" placeholder="请选择安全隐患类型" readonly id="input0" onclick="inputClick(0)" v-model="form.projectType">

View File

@ -105,7 +105,7 @@
</div> </div>
<div class="ssp-block"> <div class="ssp-block">
<div class="spp-block-title"> <div class="spp-block-title">
质量隐患 隐患类型
</div> </div>
<div class="ssp-block-input"> <div class="ssp-block-input">
<input type="text" placeholder="请选择质量隐患类型" readonly id="input0" onclick="inputClick(0)" v-model="form.projectType"> <input type="text" placeholder="请选择质量隐患类型" readonly id="input0" onclick="inputClick(0)" v-model="form.projectType">

View File

@ -99,7 +99,7 @@
</div> </div>
<div class="ssp-block"> <div class="ssp-block">
<div class="spp-block-title"> <div class="spp-block-title">
质量隐患 隐患类型
</div> </div>
<div class="ssp-block-input"> <div class="ssp-block-input">
<input type="text" placeholder="请选择质量隐患类型" readonly id="input0" onclick="inputClick(0)" v-model="form.projectType"> <input type="text" placeholder="请选择质量隐患类型" readonly id="input0" onclick="inputClick(0)" v-model="form.projectType">

View File

@ -30,9 +30,9 @@ public class BgWorkTrainController extends BaseController {
public TableDataInfo getWorkTrainList(String trainType,String deptId){ public TableDataInfo getWorkTrainList(String trainType,String deptId){
WorkTrain workTrain = new WorkTrain(); WorkTrain workTrain = new WorkTrain();
workTrain.setTrainType(trainType); workTrain.setTrainType(trainType);
if(StringUtils.isNotBlank(deptId)){ if(StringUtils.isNotBlank(deptId) && !"0".equals(deptId)){
workTrain.setDeptId(Convert.toLong(deptId)); workTrain.setDeptId(Convert.toLong(deptId));
} }
return getDataTable(workTrainService.selectBgscreenWorkTrainList(workTrain)); return getDataTable(workTrainService.selectBgscreenWorkTrainListv2(workTrain));
} }
} }

View File

@ -36,6 +36,10 @@ public class WorkTrain extends BaseEntity
@Excel(name = "工作类型") @Excel(name = "工作类型")
private String trainType; private String trainType;
/** 工作标题 */
@Excel(name = "工作标题")
private String trainTitle;
/** 工作性质 */ /** 工作性质 */
@Excel(name = "工作性质") @Excel(name = "工作性质")
private String trainNature; private String trainNature;
@ -218,6 +222,14 @@ public class WorkTrain extends BaseEntity
this.deptId = deptId; this.deptId = deptId;
} }
public String getTrainTitle() {
return trainTitle;
}
public void setTrainTitle(String trainTitle) {
this.trainTitle = trainTitle;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -226,6 +238,7 @@ public class WorkTrain extends BaseEntity
.append("projectName", getProjectName()) .append("projectName", getProjectName())
.append("mainImage", getMainImage()) .append("mainImage", getMainImage())
.append("trainType", getTrainType()) .append("trainType", getTrainType())
.append("trainTitle", getTrainTitle())
.append("trainNature", getTrainNature()) .append("trainNature", getTrainNature())
.append("trainParticipants", getTrainParticipants()) .append("trainParticipants", getTrainParticipants())
.append("beginDate", getBeginDate()) .append("beginDate", getBeginDate())

View File

@ -36,6 +36,14 @@ public interface WorkTrainMapper
*/ */
public List<WorkTrain> selectBgscreenWorkTrainList(WorkTrain workTrain); public List<WorkTrain> selectBgscreenWorkTrainList(WorkTrain workTrain);
/**
*
*
* @param workTrain
* @return
*/
public List<WorkTrain> selectBgscreenWorkTrainListv2(WorkTrain workTrain);
/** /**
* *
* *

View File

@ -35,6 +35,14 @@ public interface IWorkTrainService
*/ */
public List<WorkTrain> selectBgscreenWorkTrainList(WorkTrain workTrain); public List<WorkTrain> selectBgscreenWorkTrainList(WorkTrain workTrain);
/**
*
*
* @param workTrain
* @return
*/
public List<WorkTrain> selectBgscreenWorkTrainListv2(WorkTrain workTrain);
/** /**
* *
* *

View File

@ -62,6 +62,17 @@ public class WorkTrainServiceImpl implements IWorkTrainService
return workTrainMapper.selectBgscreenWorkTrainList(workTrain); return workTrainMapper.selectBgscreenWorkTrainList(workTrain);
} }
/**
*
*
* @param workTrain
* @return
*/
@Override
public List<WorkTrain> selectBgscreenWorkTrainListv2(WorkTrain workTrain) {
return workTrainMapper.selectBgscreenWorkTrainListv2(workTrain);
}
/** /**
* *
* *

View File

@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="projectName" column="project_name" /> <result property="projectName" column="project_name" />
<result property="mainImage" column="main_image" /> <result property="mainImage" column="main_image" />
<result property="trainType" column="train_type" /> <result property="trainType" column="train_type" />
<result property="trainTitle" column="train_title" />
<result property="trainNature" column="train_nature" /> <result property="trainNature" column="train_nature" />
<result property="trainParticipants" column="train_participants" /> <result property="trainParticipants" column="train_participants" />
<result property="beginDate" column="begin_date" /> <result property="beginDate" column="begin_date" />
@ -37,11 +38,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectWorkTrainVo"> <sql id="selectWorkTrainVo">
select id, project_id, project_name, main_image, train_type, train_nature, train_participants, begin_date, end_date, train_content, is_del, create_by, create_time, update_by, update_time, remark from work_train select id, project_id, project_name, main_image, train_type, train_title,train_nature, train_participants, begin_date, end_date, train_content, is_del, create_by, create_time, update_by, update_time, remark from work_train
</sql> </sql>
<select id="selectWorkTrainList" parameterType="WorkTrain" resultMap="WorkTrainResult"> <select id="selectWorkTrainList" parameterType="WorkTrain" resultMap="WorkTrainResult">
select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_nature, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames, select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_title, wt.train_nature, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames,
CASE CASE
WHEN ( WHEN (
wt.create_by = #{nowUserName} wt.create_by = #{nowUserName}
@ -64,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectId != null"> and wt.project_id = #{projectId}</if> <if test="projectId != null"> and wt.project_id = #{projectId}</if>
<if test="projectName != null and projectName != ''"> and wt.project_name like concat('%', #{projectName}, '%')</if> <if test="projectName != null and projectName != ''"> and wt.project_name like concat('%', #{projectName}, '%')</if>
<if test="trainType != null and trainType != ''"> and train_type = #{trainType}</if> <if test="trainType != null and trainType != ''"> and train_type = #{trainType}</if>
<if test="trainTitle != null and trainTitle != ''"> and train_title = #{trainTitle}</if>
<if test="trainNature != null and trainNature != ''"> and wt.train_nature = #{trainNature}</if> <if test="trainNature != null and trainNature != ''"> and wt.train_nature = #{trainNature}</if>
<if test="isDel != null "> and wt.is_del = #{isDel}</if> <if test="isDel != null "> and wt.is_del = #{isDel}</if>
<if test="params.beginMarksTime != null and params.beginMarksTime != '' and params.endMarksTime != null and params.endMarksTime != ''"> and ((wt.begin_date between #{params.beginMarksTime} and #{params.endMarksTime}) or (wt.end_date between #{params.beginMarksTime} and #{params.endMarksTime}) )</if> <if test="params.beginMarksTime != null and params.beginMarksTime != '' and params.endMarksTime != null and params.endMarksTime != ''"> and ((wt.begin_date between #{params.beginMarksTime} and #{params.endMarksTime}) or (wt.end_date between #{params.beginMarksTime} and #{params.endMarksTime}) )</if>
@ -83,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectBgscreenWorkTrainList" parameterType="WorkTrain" resultMap="WorkTrainResult"> <select id="selectBgscreenWorkTrainList" parameterType="WorkTrain" resultMap="WorkTrainResult">
select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_nature, sdd.dict_label as train_nature_name, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_title, wt.train_nature, sdd.dict_label as train_nature_name, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames
from work_train wt from work_train wt
left join work_train_dept wtd on wtd.train_id = wt.id left join work_train_dept wtd on wtd.train_id = wt.id
left join sys_dept sd on sd.dept_id = wtd.dept_id left join sys_dept sd on sd.dept_id = wtd.dept_id
@ -103,6 +105,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by wt.create_time desc order by wt.create_time desc
</select> </select>
<select id="selectBgscreenWorkTrainListv2" parameterType="WorkTrain" resultMap="WorkTrainResult">
select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_title, wt.train_nature, sdd.dict_label as train_nature_name, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames
from work_train wt
left join work_train_dept wtd on wtd.train_id = wt.id
left join sys_dept sd on sd.dept_id = wtd.dept_id
<if test='trainType != null and trainType == "0"'> left join sys_dict_data sdd on sdd.dict_type = 'train_nature_zxpx' and wt.train_nature = sdd.dict_value</if>
<if test='trainType != null and trainType == "1"'> left join sys_dict_data sdd on sdd.dict_type = 'train_nature_yjyl' and wt.train_nature = sdd.dict_value</if>
<where>
and wt.is_del=0
<if test="deptId != null"> and sp.deptId = #{deptId}</if>
<if test="trainType != null and trainType != ''"> and wt.train_type = #{trainType}</if>
<if test="projectId != null"> and wt.project_id = #{projectId}</if>
</where>
group by wt.id
order by wt.create_time desc
limit 2
</select>
<select id="selectWorkTrainById" parameterType="Long" resultMap="WorkTrainWorkTrainDeptResult"> <select id="selectWorkTrainById" parameterType="Long" resultMap="WorkTrainWorkTrainDeptResult">
select a.id, a.project_id, a.project_name, a.main_image, a.train_type, a.train_nature, a.train_participants, a.begin_date, a.end_date, a.train_content, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, select a.id, a.project_id, a.project_name, a.main_image, a.train_type, a.train_nature, a.train_participants, a.begin_date, a.end_date, a.train_content, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
b.train_id as sub_train_id, b.dept_id as sub_dept_id, b.is_main as sub_is_main b.train_id as sub_train_id, b.dept_id as sub_dept_id, b.is_main as sub_is_main
@ -118,6 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectName != null">project_name,</if> <if test="projectName != null">project_name,</if>
<if test="mainImage != null">main_image,</if> <if test="mainImage != null">main_image,</if>
<if test="trainType != null">train_type,</if> <if test="trainType != null">train_type,</if>
<if test="trainTitle != null">train_title,</if>
<if test="trainNature != null">train_nature,</if> <if test="trainNature != null">train_nature,</if>
<if test="trainParticipants != null">train_participants,</if> <if test="trainParticipants != null">train_participants,</if>
<if test="beginDate != null">begin_date,</if> <if test="beginDate != null">begin_date,</if>
@ -135,6 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectName != null">#{projectName},</if> <if test="projectName != null">#{projectName},</if>
<if test="mainImage != null">#{mainImage},</if> <if test="mainImage != null">#{mainImage},</if>
<if test="trainType != null">#{trainType},</if> <if test="trainType != null">#{trainType},</if>
<if test="trainTitle != null">#{trainTitle},</if>
<if test="trainNature != null">#{trainNature},</if> <if test="trainNature != null">#{trainNature},</if>
<if test="trainParticipants != null">#{trainParticipants},</if> <if test="trainParticipants != null">#{trainParticipants},</if>
<if test="beginDate != null">#{beginDate},</if> <if test="beginDate != null">#{beginDate},</if>
@ -156,6 +178,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectName != null">project_name = #{projectName},</if> <if test="projectName != null">project_name = #{projectName},</if>
<if test="mainImage != null">main_image = #{mainImage},</if> <if test="mainImage != null">main_image = #{mainImage},</if>
<if test="trainType != null">train_type = #{trainType},</if> <if test="trainType != null">train_type = #{trainType},</if>
<if test="trainTitle != null">train_title = #{trainTitle},</if>
<if test="trainNature != null">train_nature = #{trainNature},</if> <if test="trainNature != null">train_nature = #{trainNature},</if>
<if test="trainParticipants != null">train_participants = #{trainParticipants},</if> <if test="trainParticipants != null">train_participants = #{trainParticipants},</if>
<if test="beginDate != null">begin_date = #{beginDate},</if> <if test="beginDate != null">begin_date = #{beginDate},</if>