提交代码

dev_xds
姜玉琦 2023-08-29 21:48:18 +08:00
parent 1446bc8d56
commit e70d2f8744
7 changed files with 38 additions and 7 deletions

View File

@ -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" },

View File

@ -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" },

View File

@ -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" },

View File

@ -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" },

View File

@ -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));
}
}

View File

@ -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());

View File

@ -37,7 +37,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unitPersonPhone != null and unitPersonPhone != ''"> and spui.unitPersonPhone = #{unitPersonPhone}</if>
<if test="createUser != null and createUser != ''"> and spui.createUser = #{createUser}</if>
<if test="createTime != null "> and spui.createTime = #{createTime}</if>
<if test="nowDept != null and nowDept != ''"> and spui.unitId != #{nowDept}</if>
<if test="nowDept != null and nowDept != ''">
<if test='nowRole == "2" or nowRole == "3" or nowRole == "4"'>
and spui.unitType != 11
</if>
<if test='nowRole != "2" and nowRole != "3" or nowRole != "4"'>
and spui.unitId != #{nowDept}
</if>
</if>
<if test="unitTypes != null ">
and spui.unitType in
<foreach item="type" collection="unitTypes" open="(" separator="," close=")">