提交代码
parent
a0a16fa72d
commit
deef604213
|
@ -9,7 +9,7 @@ ruoyi:
|
|||
# 实例演示开关
|
||||
demoEnabled: true
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
profile: /data/uploadPath
|
||||
profile: D:/data/uploadPath
|
||||
# 获取ip地址开关
|
||||
addressEnabled: false
|
||||
# 验证码类型 math 数字计算 char 字符验证
|
||||
|
|
|
@ -21,11 +21,12 @@
|
|||
<image-preview :src="scope.row.mainImage" :width="50" :height="50"/>
|
||||
</template>
|
||||
</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">
|
||||
<dict-tag :options="dict.type.train_nature_yjyl" :value="scope.row.trainNature"/>
|
||||
</template>
|
||||
</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="beginDate" width="100">
|
||||
<template slot-scope="scope">
|
||||
|
@ -83,6 +84,9 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</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-input type="number" v-model="form.trainParticipants" placeholder="请输入参与人数" />
|
||||
</el-form-item>
|
||||
|
@ -169,7 +173,11 @@
|
|||
{ required: true, message: "请上传演练主图", trigger: "blur" }
|
||||
],
|
||||
trainNature: [
|
||||
{ required: true, message: "请选择演练类型", trigger: "blur" }
|
||||
{ required: false, message: "请选择演练类型", trigger: "blur" }
|
||||
],
|
||||
trainTitle: [
|
||||
{ required: true, message: "请输入培训标题", trigger: "blur" },
|
||||
{ maxlength: 20, message: '培训标题最多20个字符',trigger: 'blur' }
|
||||
],
|
||||
trainParticipants: [
|
||||
{ required: true, message: "请输入参与人数", trigger: "blur" }
|
||||
|
@ -234,11 +242,14 @@
|
|||
this.form = {
|
||||
id: null,
|
||||
projectId: null,
|
||||
deptId: null,
|
||||
deptName: null,
|
||||
deptType: null,
|
||||
jobType: null,
|
||||
userId: null,
|
||||
projectName: null,
|
||||
mainImage: null,
|
||||
trainType: null,
|
||||
trainNature: null,
|
||||
trainTitle: null,
|
||||
trainParticipants: null,
|
||||
beginDate: null,
|
||||
endDate: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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-option
|
||||
v-for="dict in dict.type.train_nature_yjyl"
|
||||
|
@ -19,6 +19,14 @@
|
|||
/>
|
||||
</el-select>
|
||||
</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-select v-model="queryParams.projectDeptId" placeholder="请选择责任主体" clearable>
|
||||
<el-option
|
||||
|
@ -105,6 +113,7 @@
|
|||
<dict-tag :options="dict.type.train_nature_yjyl" :value="scope.row.trainNature"/>
|
||||
</template>
|
||||
</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="beginDate" width="120">
|
||||
<template slot-scope="scope">
|
||||
|
@ -174,6 +183,9 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</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-input type="number" v-model="form.trainParticipants" placeholder="请输入工作参与者" />
|
||||
</el-form-item>
|
||||
|
@ -251,6 +263,7 @@ export default {
|
|||
trainType: 1,
|
||||
trainNature: null,
|
||||
isDel: null,
|
||||
trainTitle: null,
|
||||
projectDeptId: null
|
||||
},
|
||||
depts: null,
|
||||
|
@ -258,6 +271,23 @@ export default {
|
|||
form: {},
|
||||
// 表单校验
|
||||
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,
|
||||
trainType: null,
|
||||
trainNature: null,
|
||||
trainTitle: null,
|
||||
trainParticipants: null,
|
||||
beginDate: null,
|
||||
endDate: null,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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-option
|
||||
v-for="dict in dict.type.train_nature_zxpx"
|
||||
|
@ -19,6 +19,14 @@
|
|||
/>
|
||||
</el-select>
|
||||
</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-select v-model="queryParams.projectDeptId" placeholder="请选择责任主体" clearable>
|
||||
<el-option
|
||||
|
@ -100,11 +108,12 @@
|
|||
<image-preview :src="scope.row.mainImage" :width="50" :height="50"/>
|
||||
</template>
|
||||
</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">
|
||||
<dict-tag :options="dict.type.train_nature_zxpx" :value="scope.row.trainNature"/>
|
||||
</template>
|
||||
</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="beginDate" width="120">
|
||||
<template slot-scope="scope">
|
||||
|
@ -164,7 +173,7 @@
|
|||
<el-form-item label="培训主图" prop="mainImage">
|
||||
<image-upload v-model="form.mainImage" :limit="1"/>
|
||||
</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-option
|
||||
v-for="dict in dict.type.train_nature_zxpx"
|
||||
|
@ -174,6 +183,9 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</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-input type="number" v-model="form.trainParticipants" placeholder="请输入工作参与者" />
|
||||
</el-form-item>
|
||||
|
@ -251,6 +263,7 @@ export default {
|
|||
trainType: 0,
|
||||
trainNature: null,
|
||||
isDel: null,
|
||||
trainTitle: null,
|
||||
projectDeptId: null
|
||||
},
|
||||
depts:null,
|
||||
|
@ -258,6 +271,23 @@ export default {
|
|||
form: {},
|
||||
// 表单校验
|
||||
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,
|
||||
trainType: null,
|
||||
trainNature: null,
|
||||
trainTitle: null,
|
||||
trainParticipants: null,
|
||||
beginDate: null,
|
||||
endDate: null,
|
||||
|
|
|
@ -21,11 +21,12 @@
|
|||
<image-preview :src="scope.row.mainImage" :width="50" :height="50"/>
|
||||
</template>
|
||||
</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">
|
||||
<dict-tag :options="dict.type.train_nature_zxpx" :value="scope.row.trainNature"/>
|
||||
</template>
|
||||
</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="beginDate" width="100">
|
||||
<template slot-scope="scope">
|
||||
|
@ -73,7 +74,7 @@
|
|||
<el-form-item label="培训主图" prop="mainImage">
|
||||
<image-upload v-model="form.mainImage" :limit="1"/>
|
||||
</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-option
|
||||
v-for="dict in dict.type.train_nature_zxpx"
|
||||
|
@ -83,6 +84,9 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</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-input type="number" v-model="form.trainParticipants" placeholder="请输入参与人数" />
|
||||
</el-form-item>
|
||||
|
@ -169,7 +173,11 @@
|
|||
{ required: true, message: "请上传培训主图", trigger: "blur" }
|
||||
],
|
||||
trainNature: [
|
||||
{ required: true, message: "请选择培训类型", trigger: "blur" }
|
||||
{ required: false, message: "请选择培训类型", trigger: "blur" }
|
||||
],
|
||||
trainTitle: [
|
||||
{ required: true, message: "请输入培训标题", trigger: "blur" },
|
||||
{ maxlength: 20, message: '培训标题最多20个字符',trigger: 'blur' }
|
||||
],
|
||||
trainParticipants: [
|
||||
{ required: true, message: "请输入参与人数", trigger: "blur" }
|
||||
|
@ -234,11 +242,14 @@
|
|||
this.form = {
|
||||
id: null,
|
||||
projectId: null,
|
||||
deptId: null,
|
||||
deptName: null,
|
||||
deptType: null,
|
||||
jobType: null,
|
||||
userId: null,
|
||||
projectName: null,
|
||||
mainImage: null,
|
||||
trainType: null,
|
||||
trainNature: null,
|
||||
trainTitle: null,
|
||||
trainParticipants: null,
|
||||
beginDate: null,
|
||||
endDate: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
</div>
|
||||
<div class="ssp-block">
|
||||
<div class="spp-block-title">
|
||||
安全隐患
|
||||
隐患类型
|
||||
</div>
|
||||
<div class="ssp-block-input">
|
||||
<input type="text" placeholder="请选择安全隐患类型" readonly id="input0" onclick="inputClick(0)" v-model="form.projectType">
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
</div>
|
||||
<div class="ssp-block">
|
||||
<div class="spp-block-title">
|
||||
安全隐患
|
||||
隐患类型
|
||||
</div>
|
||||
<div class="ssp-block-input">
|
||||
<input type="text" placeholder="请选择安全隐患类型" readonly id="input0" onclick="inputClick(0)" v-model="form.projectType">
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
</div>
|
||||
<div class="ssp-block">
|
||||
<div class="spp-block-title">
|
||||
质量隐患
|
||||
隐患类型
|
||||
</div>
|
||||
<div class="ssp-block-input">
|
||||
<input type="text" placeholder="请选择质量隐患类型" readonly id="input0" onclick="inputClick(0)" v-model="form.projectType">
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
</div>
|
||||
<div class="ssp-block">
|
||||
<div class="spp-block-title">
|
||||
质量隐患
|
||||
隐患类型
|
||||
</div>
|
||||
<div class="ssp-block-input">
|
||||
<input type="text" placeholder="请选择质量隐患类型" readonly id="input0" onclick="inputClick(0)" v-model="form.projectType">
|
||||
|
|
|
@ -30,9 +30,9 @@ public class BgWorkTrainController extends BaseController {
|
|||
public TableDataInfo getWorkTrainList(String trainType,String deptId){
|
||||
WorkTrain workTrain = new WorkTrain();
|
||||
workTrain.setTrainType(trainType);
|
||||
if(StringUtils.isNotBlank(deptId)){
|
||||
if(StringUtils.isNotBlank(deptId) && !"0".equals(deptId)){
|
||||
workTrain.setDeptId(Convert.toLong(deptId));
|
||||
}
|
||||
return getDataTable(workTrainService.selectBgscreenWorkTrainList(workTrain));
|
||||
return getDataTable(workTrainService.selectBgscreenWorkTrainListv2(workTrain));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,10 @@ public class WorkTrain extends BaseEntity
|
|||
@Excel(name = "工作类型")
|
||||
private String trainType;
|
||||
|
||||
/** 工作标题 */
|
||||
@Excel(name = "工作标题")
|
||||
private String trainTitle;
|
||||
|
||||
/** 工作性质 */
|
||||
@Excel(name = "工作性质")
|
||||
private String trainNature;
|
||||
|
@ -218,6 +222,14 @@ public class WorkTrain extends BaseEntity
|
|||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getTrainTitle() {
|
||||
return trainTitle;
|
||||
}
|
||||
|
||||
public void setTrainTitle(String trainTitle) {
|
||||
this.trainTitle = trainTitle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
@ -226,6 +238,7 @@ public class WorkTrain extends BaseEntity
|
|||
.append("projectName", getProjectName())
|
||||
.append("mainImage", getMainImage())
|
||||
.append("trainType", getTrainType())
|
||||
.append("trainTitle", getTrainTitle())
|
||||
.append("trainNature", getTrainNature())
|
||||
.append("trainParticipants", getTrainParticipants())
|
||||
.append("beginDate", getBeginDate())
|
||||
|
|
|
@ -36,6 +36,14 @@ public interface WorkTrainMapper
|
|||
*/
|
||||
public List<WorkTrain> selectBgscreenWorkTrainList(WorkTrain workTrain);
|
||||
|
||||
/**
|
||||
* 查询演练培训列表
|
||||
*
|
||||
* @param workTrain 演练培训
|
||||
* @return 演练培训集合
|
||||
*/
|
||||
public List<WorkTrain> selectBgscreenWorkTrainListv2(WorkTrain workTrain);
|
||||
|
||||
/**
|
||||
* 新增演练培训
|
||||
*
|
||||
|
|
|
@ -35,6 +35,14 @@ public interface IWorkTrainService
|
|||
*/
|
||||
public List<WorkTrain> selectBgscreenWorkTrainList(WorkTrain workTrain);
|
||||
|
||||
/**
|
||||
* 查询演练培训列表
|
||||
*
|
||||
* @param workTrain 演练培训
|
||||
* @return 演练培训集合
|
||||
*/
|
||||
public List<WorkTrain> selectBgscreenWorkTrainListv2(WorkTrain workTrain);
|
||||
|
||||
/**
|
||||
* 新增演练培训
|
||||
*
|
||||
|
|
|
@ -62,6 +62,17 @@ public class WorkTrainServiceImpl implements IWorkTrainService
|
|||
return workTrainMapper.selectBgscreenWorkTrainList(workTrain);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询演练培训列表
|
||||
*
|
||||
* @param workTrain 演练培训
|
||||
* @return 演练培训集合
|
||||
*/
|
||||
@Override
|
||||
public List<WorkTrain> selectBgscreenWorkTrainListv2(WorkTrain workTrain) {
|
||||
return workTrainMapper.selectBgscreenWorkTrainListv2(workTrain);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增演练培训
|
||||
*
|
||||
|
|
|
@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="projectName" column="project_name" />
|
||||
<result property="mainImage" column="main_image" />
|
||||
<result property="trainType" column="train_type" />
|
||||
<result property="trainTitle" column="train_title" />
|
||||
<result property="trainNature" column="train_nature" />
|
||||
<result property="trainParticipants" column="train_participants" />
|
||||
<result property="beginDate" column="begin_date" />
|
||||
|
@ -37,11 +38,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<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>
|
||||
|
||||
<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
|
||||
WHEN (
|
||||
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="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="trainTitle != null and trainTitle != ''"> and train_title = #{trainTitle}</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="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 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
|
||||
left join work_train_dept wtd on wtd.train_id = wt.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
|
||||
</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 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
|
||||
|
@ -118,6 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="projectName != null">project_name,</if>
|
||||
<if test="mainImage != null">main_image,</if>
|
||||
<if test="trainType != null">train_type,</if>
|
||||
<if test="trainTitle != null">train_title,</if>
|
||||
<if test="trainNature != null">train_nature,</if>
|
||||
<if test="trainParticipants != null">train_participants,</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="mainImage != null">#{mainImage},</if>
|
||||
<if test="trainType != null">#{trainType},</if>
|
||||
<if test="trainTitle != null">#{trainTitle},</if>
|
||||
<if test="trainNature != null">#{trainNature},</if>
|
||||
<if test="trainParticipants != null">#{trainParticipants},</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="mainImage != null">main_image = #{mainImage},</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="trainParticipants != null">train_participants = #{trainParticipants},</if>
|
||||
<if test="beginDate != null">begin_date = #{beginDate},</if>
|
||||
|
|
Loading…
Reference in New Issue