提交代码
parent
136ed49630
commit
64b66015aa
|
@ -4,6 +4,7 @@ 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.ruoyi.common.utils.DictUtils;
|
||||
import com.yanzhu.jh.project.domain.SurProjectChecking;
|
||||
import com.yanzhu.jh.project.service.ISurProjectCheckingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -100,4 +101,13 @@ public class ProjectCheckingController extends BaseController {
|
|||
public AjaxResult findStatisticsByProjectId(Long projectId){
|
||||
return success(surProjectCheckingService.findStatisticsByProjectId(projectId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字段类型数据
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/queryDictType")
|
||||
public AjaxResult queryDictType(String type){
|
||||
return success(DictUtils.getDictCache(type));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,8 @@ package com.ruoyi.web.project.controller;
|
|||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.enums.PublicStateEnum;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
import com.ruoyi.common.utils.DictUtils;
|
||||
import com.yanzhu.jh.project.domain.SurProjectCheckDetection;
|
||||
import com.yanzhu.jh.project.service.ISurProjectCheckDetectionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -23,9 +21,6 @@ import org.springframework.web.bind.annotation.*;
|
|||
@RequestMapping("/wechat/projectDetection")
|
||||
public class ProjectDetectionController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ISysDictDataService sysDictDataService;
|
||||
|
||||
@Autowired
|
||||
private ISurProjectCheckDetectionService surProjectCheckDetectionService;
|
||||
|
||||
|
@ -103,10 +98,7 @@ public class ProjectDetectionController extends BaseController {
|
|||
*/
|
||||
@GetMapping("/queryType")
|
||||
public AjaxResult queryType(){
|
||||
SysDictData dictData = new SysDictData();
|
||||
dictData.setDictType("check_detection_check_type");
|
||||
dictData.setStatus(PublicStateEnum.OK.getCode());
|
||||
return success(sysDictDataService.selectDictDataList(dictData));
|
||||
return success(DictUtils.getDictCache("check_detection_check_type"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,10 +3,8 @@ package com.ruoyi.web.project.controller;
|
|||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.enums.PublicStateEnum;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
import com.ruoyi.common.utils.DictUtils;
|
||||
import com.yanzhu.jh.project.domain.SurProjectInsurance;
|
||||
import com.yanzhu.jh.project.service.ISurProjectInsuranceService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -23,9 +21,6 @@ import org.springframework.web.bind.annotation.*;
|
|||
@RequestMapping("/wechat/projectInsurance")
|
||||
public class ProjectInsuranceController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ISysDictDataService sysDictDataService;
|
||||
|
||||
@Autowired
|
||||
private ISurProjectInsuranceService surProjectInsuranceService;
|
||||
|
||||
|
@ -89,9 +84,6 @@ public class ProjectInsuranceController extends BaseController {
|
|||
*/
|
||||
@GetMapping("/queryInsuranceType")
|
||||
public AjaxResult queryInsuranceType(){
|
||||
SysDictData dictData = new SysDictData();
|
||||
dictData.setDictType("sur_project_insurance_type");
|
||||
dictData.setStatus(PublicStateEnum.OK.getCode());
|
||||
return success(sysDictDataService.selectDictDataList(dictData));
|
||||
return success(DictUtils.getDictCache("sur_project_insurance_type"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,8 @@ package com.ruoyi.web.project.controller;
|
|||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.enums.PublicStateEnum;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
import com.ruoyi.common.utils.DictUtils;
|
||||
import com.yanzhu.jh.project.domain.SurProjectMeasure;
|
||||
import com.yanzhu.jh.project.service.ISurProjectMeasureService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -23,9 +21,6 @@ import org.springframework.web.bind.annotation.*;
|
|||
@RequestMapping("/wechat/projectMeasure")
|
||||
public class ProjectMeasureController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ISysDictDataService sysDictDataService;
|
||||
|
||||
@Autowired
|
||||
private ISurProjectMeasureService surProjectMeasureService;
|
||||
|
||||
|
@ -103,10 +98,7 @@ public class ProjectMeasureController extends BaseController {
|
|||
*/
|
||||
@GetMapping("/queryDictType")
|
||||
public AjaxResult queryDictType(String type){
|
||||
SysDictData dictData = new SysDictData();
|
||||
dictData.setDictType(type);
|
||||
dictData.setStatus(PublicStateEnum.OK.getCode());
|
||||
return success(sysDictDataService.selectDictDataList(dictData));
|
||||
return success(DictUtils.getDictCache(type));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,10 +3,8 @@ package com.ruoyi.web.project.controller;
|
|||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.enums.PublicStateEnum;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
import com.ruoyi.common.utils.DictUtils;
|
||||
import com.yanzhu.jh.trouble.domain.SmzSspAuditinfo;
|
||||
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
|
||||
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodifyDraft;
|
||||
|
@ -30,9 +28,6 @@ import java.util.List;
|
|||
@RequestMapping("/wechat/projectProblemmodify")
|
||||
public class ProjectProblemmodifyController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ISysDictDataService sysDictDataService;
|
||||
|
||||
@Autowired
|
||||
private ISmzSspAuditinfoService smzSspAuditinfoService;
|
||||
|
||||
|
@ -166,10 +161,7 @@ public class ProjectProblemmodifyController extends BaseController {
|
|||
*/
|
||||
@GetMapping("/queryDangerType")
|
||||
public AjaxResult queryDangerType(@RequestParam String type){
|
||||
SysDictData dictData = new SysDictData();
|
||||
dictData.setDictType(type);
|
||||
dictData.setStatus(PublicStateEnum.OK.getCode());
|
||||
return success(sysDictDataService.selectDictDataList(dictData));
|
||||
return success(DictUtils.getDictCache(type));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,10 +3,8 @@ package com.ruoyi.web.project.controller;
|
|||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.enums.PublicStateEnum;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
import com.ruoyi.common.utils.DictUtils;
|
||||
import com.yanzhu.jh.project.domain.SurProjectWorkSpecial;
|
||||
import com.yanzhu.jh.project.service.ISurProjectWorkSpecialService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -23,9 +21,6 @@ import org.springframework.web.bind.annotation.*;
|
|||
@RequestMapping("/wechat/projectSpecial")
|
||||
public class ProjectSpecialController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ISysDictDataService sysDictDataService;
|
||||
|
||||
@Autowired
|
||||
private ISurProjectWorkSpecialService surProjectWorkSpecialService;
|
||||
|
||||
|
@ -79,10 +74,7 @@ public class ProjectSpecialController extends BaseController {
|
|||
*/
|
||||
@GetMapping("/querySpecialType")
|
||||
public AjaxResult querySpecialType(){
|
||||
SysDictData dictData = new SysDictData();
|
||||
dictData.setDictType("project_special_type");
|
||||
dictData.setStatus(PublicStateEnum.OK.getCode());
|
||||
return success(sysDictDataService.selectDictDataList(dictData));
|
||||
return success(DictUtils.getDictCache("project_special_type"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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.ruoyi.common.utils.DictUtils;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
import com.yanzhu.jh.project.domain.SurProjectUnitInfo;
|
||||
import com.yanzhu.jh.project.service.ISurProjectUnitInfoService;
|
||||
import com.yanzhu.jh.work.domain.WorkTrain;
|
||||
|
@ -22,6 +24,9 @@ import org.springframework.web.bind.annotation.*;
|
|||
@RequestMapping("/wechat/projectTrain")
|
||||
public class ProjectTrainController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ISysDictDataService sysDictDataService;
|
||||
|
||||
@Autowired
|
||||
private IWorkTrainService workTrainService;
|
||||
|
||||
|
@ -111,4 +116,13 @@ public class ProjectTrainController extends BaseController {
|
|||
public AjaxResult selectGroupCountByProjectId(Long projectId){
|
||||
return success(workTrainService.findGroupCountByProjectId(projectId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询演训类型
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/queryTrainDataType")
|
||||
public AjaxResult queryTrainDataType(){
|
||||
return success(DictUtils.getDictCache("work_train_data_type"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,8 @@ package com.ruoyi.web.project.controller;
|
|||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.enums.PublicStateEnum;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
import com.ruoyi.common.utils.DictUtils;
|
||||
import com.yanzhu.jh.project.domain.SurProjectStandard;
|
||||
import com.yanzhu.jh.project.service.ISurProjectStandardService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -23,9 +21,6 @@ import org.springframework.web.bind.annotation.*;
|
|||
@RequestMapping("/wechat/projectStandard")
|
||||
public class WcProjectStandardController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ISysDictDataService sysDictDataService;
|
||||
|
||||
@Autowired
|
||||
private ISurProjectStandardService surProjectStandardService;
|
||||
|
||||
|
@ -79,10 +74,7 @@ public class WcProjectStandardController extends BaseController {
|
|||
*/
|
||||
@GetMapping("/queryStandardType")
|
||||
public AjaxResult queryStandardType(){
|
||||
SysDictData dictData = new SysDictData();
|
||||
dictData.setDictType("prj_standard_type");
|
||||
dictData.setStatus(PublicStateEnum.OK.getCode());
|
||||
return success(sysDictDataService.selectDictDataList(dictData));
|
||||
return success(DictUtils.getDictCache("prj_standard_type"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -131,6 +131,8 @@ public class SurProjectChecking extends BaseEntity
|
|||
|
||||
private String projectName;
|
||||
private String deptName;
|
||||
private String dataTypeLvl1Name;
|
||||
private String dataTypeLvl2Name;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
|
@ -346,6 +348,22 @@ public class SurProjectChecking extends BaseEntity
|
|||
this.approveStatus = approveStatus;
|
||||
}
|
||||
|
||||
public String getDataTypeLvl1Name() {
|
||||
return dataTypeLvl1Name;
|
||||
}
|
||||
|
||||
public void setDataTypeLvl1Name(String dataTypeLvl1Name) {
|
||||
this.dataTypeLvl1Name = dataTypeLvl1Name;
|
||||
}
|
||||
|
||||
public String getDataTypeLvl2Name() {
|
||||
return dataTypeLvl2Name;
|
||||
}
|
||||
|
||||
public void setDataTypeLvl2Name(String dataTypeLvl2Name) {
|
||||
this.dataTypeLvl2Name = dataTypeLvl2Name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
|
@ -89,6 +89,7 @@ public class WorkTrain extends BaseEntity
|
|||
private String trainNatureName;
|
||||
private String vDel;
|
||||
private Long deptId;//子公司查询使用
|
||||
private String dataTypeName;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
|
@ -253,6 +254,14 @@ public class WorkTrain extends BaseEntity
|
|||
this.trainFile = trainFile;
|
||||
}
|
||||
|
||||
public String getDataTypeName() {
|
||||
return dataTypeName;
|
||||
}
|
||||
|
||||
public void setDataTypeName(String dataTypeName) {
|
||||
this.dataTypeName = dataTypeName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
|
@ -36,18 +36,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="approveStatus" column="approve_status" />
|
||||
<result property="dataTypeLvl1" column="data_type_lvl1" />
|
||||
<result property="dataTypeLvl2" column="data_type_lvl2" />
|
||||
<result property="dataTypeLvl1Name" column="data_type_lvl1_name" />
|
||||
<result property="dataTypeLvl2Name" column="data_type_lvl2_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSurProjectCheckingVo">
|
||||
select spc.id, spc.project_id, spc.dept_id, spc.group_dept_id, spc.check_type, spc.main_image, spc.image_urls, spc.working_position_type, spc.check_working_position, spc.checking_num, spc.check_result, spc.intro, spc.quality_user, spc.quality_user_name, spc.supervise_user, spc.supervise_user_name, spc.group_dept_user, spc.group_dept_user_name, spc.checking_date, spc.checking_files, spc.is_del, spc.create_by, spc.create_time, spc.update_by, spc.update_time, spc.remark, spc.approve_status, spc.data_type_lvl1, spc.data_type_lvl2, sp.projectName, sd.dept_name from sur_project_checking spc
|
||||
select spc.id, spc.project_id, spc.dept_id, spc.group_dept_id, spc.check_type, spc.main_image, spc.image_urls, spc.working_position_type, spc.check_working_position, spc.checking_num, spc.check_result, spc.intro, spc.quality_user, spc.quality_user_name, spc.supervise_user, spc.supervise_user_name, spc.group_dept_user, spc.group_dept_user_name, spc.checking_date, spc.checking_files, spc.is_del, spc.create_by, spc.create_time, spc.update_by, spc.update_time, spc.remark, spc.approve_status, spc.data_type_lvl1, spc.data_type_lvl2, sp.projectName, sd.dept_name, sdd1.dict_label as data_type_lvl1_name, sdd2.dict_label as data_type_lvl2_name from sur_project_checking spc
|
||||
left join sur_project sp on spc.project_id = sp.id
|
||||
left join sys_dept sd on sd.dept_id = spc.dept_id
|
||||
left join sys_dict_data sdd1 on sdd1.dict_type='project_checking_data_type_lvl1' and sdd1.dict_value = spc.data_type_lvl1
|
||||
left join sys_dict_data sdd2 on sdd2.dict_type='project_checking_data_type_lvl2' and sdd2.dict_value = spc.data_type_lvl2
|
||||
</sql>
|
||||
|
||||
<select id="selectSurProjectCheckingList" parameterType="SurProjectChecking" resultMap="SurProjectCheckingResult">
|
||||
select spc.id, spc.project_id, spc.dept_id, spc.group_dept_id, spc.check_type, spc.main_image, spc.image_urls, spc.working_position_type, spc.check_working_position, spc.checking_num, spc.check_result, spc.intro, spc.quality_user, spc.quality_user_name, spc.supervise_user, spc.supervise_user_name, spc.group_dept_user, spc.group_dept_user_name, spc.checking_date, spc.checking_files, spc.is_del, spc.create_by, spc.create_time, spc.update_by, spc.update_time, spc.remark, spc.approve_status, spc.data_type_lvl1, spc.data_type_lvl2, sp.projectName, sd.dept_name from sur_project_checking spc
|
||||
select spc.id, spc.project_id, spc.dept_id, spc.group_dept_id, spc.check_type, spc.main_image, spc.image_urls, spc.working_position_type, spc.check_working_position, spc.checking_num, spc.check_result, spc.intro, spc.quality_user, spc.quality_user_name, spc.supervise_user, spc.supervise_user_name, spc.group_dept_user, spc.group_dept_user_name, spc.checking_date, spc.checking_files, spc.is_del, spc.create_by, spc.create_time, spc.update_by, spc.update_time, spc.remark, spc.approve_status, spc.data_type_lvl1, spc.data_type_lvl2, sp.projectName, sd.dept_name, sdd1.dict_label as data_type_lvl1_name, sdd2.dict_label as data_type_lvl2_name from sur_project_checking spc
|
||||
left join sur_project sp on spc.project_id = sp.id
|
||||
left join sys_dept sd on sd.dept_id = spc.dept_id
|
||||
left join sys_dict_data sdd1 on sdd1.dict_type='project_checking_data_type_lvl1' and sdd1.dict_value = spc.data_type_lvl1
|
||||
left join sys_dict_data sdd2 on sdd2.dict_type='project_checking_data_type_lvl2' and sdd2.dict_value = spc.data_type_lvl2
|
||||
<where>
|
||||
and spc.is_del=0
|
||||
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
|
||||
|
@ -201,9 +207,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<select id="selectSurProjectCheckingById" parameterType="Long" resultMap="SurProjectCheckingResult">
|
||||
select spc.id, spc.project_id, spc.dept_id, spc.group_dept_id, spc.check_type, spc.main_image, spc.image_urls, spc.working_position_type, spc.check_working_position, spc.checking_num, spc.check_result, spc.intro, spc.quality_user, spc.quality_user_name, spc.supervise_user, spc.supervise_user_name, spc.group_dept_user, spc.group_dept_user_name, spc.checking_date, spc.checking_files, spc.is_del, spc.create_by, spc.create_time, spc.update_by, spc.update_time, spc.remark, spc.approve_status, spc.data_type_lvl1, spc.data_type_lvl2, sp.projectName, sd.dept_name from sur_project_checking spc
|
||||
select spc.id, spc.project_id, spc.dept_id, spc.group_dept_id, spc.check_type, spc.main_image, spc.image_urls, spc.working_position_type, spc.check_working_position, spc.checking_num, spc.check_result, spc.intro, spc.quality_user, spc.quality_user_name, spc.supervise_user, spc.supervise_user_name, spc.group_dept_user, spc.group_dept_user_name, spc.checking_date, spc.checking_files, spc.is_del, spc.create_by, spc.create_time, spc.update_by, spc.update_time, spc.remark, spc.approve_status, spc.data_type_lvl1, spc.data_type_lvl2, sp.projectName, sd.dept_name, sdd1.dict_label as data_type_lvl1_name, sdd2.dict_label as data_type_lvl2_name from sur_project_checking spc
|
||||
left join sur_project sp on spc.project_id = sp.id
|
||||
left join sys_dept sd on sd.dept_id = spc.dept_id
|
||||
left join sys_dict_data sdd1 on sdd1.dict_type='project_checking_data_type_lvl1' and sdd1.dict_value = spc.data_type_lvl1
|
||||
left join sys_dict_data sdd2 on sdd2.dict_type='project_checking_data_type_lvl2' and sdd2.dict_value = spc.data_type_lvl2
|
||||
where spc.id = #{id}
|
||||
</select>
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="vDel" column="v_del" />
|
||||
<result property="trainNatureName" column="train_nature_name" />
|
||||
<result property="dataType" column="data_type" />
|
||||
<result property="dataTypeName" column="data_type_name" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="WorkTrainWorkTrainDeptResult" type="WorkTrain" extends="WorkTrainResult">
|
||||
|
@ -44,11 +45,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</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_title, wt.train_nature, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.train_file, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, wt.data_type, 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.train_file, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, wt.data_type, sdd.dict_label as data_type_name, 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
|
||||
left join sur_project sp on sp.id = wt.project_id
|
||||
left join sys_dict_data sdd on sdd.dict_type='work_train_data_type' and sdd.dict_value=wt.data_type
|
||||
<!--监理单位/总包公司/分包单位-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
||||
<!--普通用户查询项目人员-->
|
||||
|
@ -124,17 +126,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</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_title, a.train_nature, a.train_participants, a.begin_date, a.end_date, a.train_content, a.train_file, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.data_type,
|
||||
select a.id, a.project_id, a.project_name, a.main_image, a.train_type, a.train_title, a.train_nature, a.train_participants, a.begin_date, a.end_date, a.train_content, a.train_file, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.data_type,sdd.dict_label as data_type_name,
|
||||
b.train_id as sub_train_id, b.dept_id as sub_dept_id, b.is_main as sub_is_main
|
||||
from work_train a
|
||||
left join sys_dict_data sdd on sdd.dict_type='work_train_data_type' and sdd.dict_value=a.data_type
|
||||
left join work_train_dept b on b.train_id = a.id and b.is_main ='N'
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectById" parameterType="Long" resultMap="WorkTrainWorkTrainDeptResult">
|
||||
select a.id, a.project_id, a.project_name, a.main_image, a.train_type, a.train_title, a.train_nature, a.train_participants, a.begin_date, a.end_date, a.train_content, a.train_file, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.data_type,
|
||||
select a.id, a.project_id, a.project_name, a.main_image, a.train_type, a.train_title, a.train_nature, a.train_participants, a.begin_date, a.end_date, a.train_content, a.train_file, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.data_type,sdd.dict_label as data_type_name,
|
||||
b.train_id as sub_train_id, b.dept_id as sub_dept_id, b.is_main as sub_is_main, d.dept_name as sub_dept_name
|
||||
from work_train a
|
||||
left join sys_dict_data sdd on sdd.dict_type='work_train_data_type' and sdd.dict_value=a.data_type
|
||||
left join work_train_dept b on b.train_id = a.id
|
||||
left join sys_dept d on b.dept_id = d.dept_id
|
||||
where a.id = #{id}
|
||||
|
|
Loading…
Reference in New Issue