diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/classplan/ClassPlanDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/classplan/ClassPlanDTO.java index fcd5e4f..bbcd835 100644 --- a/src/main/java/cn/com/tenlion/pojo/dtos/classplan/ClassPlanDTO.java +++ b/src/main/java/cn/com/tenlion/pojo/dtos/classplan/ClassPlanDTO.java @@ -28,8 +28,12 @@ public class ClassPlanDTO { private String planType; @ApiModelProperty(name = "projectCatalogId", value = "培训项目") private String projectCatalogId; + @ApiModelProperty(name = "projectCatalogName", value = "培训项目名称") + private String projectCatalogName; @ApiModelProperty(name = "workerCatalog", value = "培训工种") private String workerCatalog; + @ApiModelProperty(name = "workerCatalogName", value = "培训工种名称") + private String workerCatalogName; @ApiModelProperty(name = "planPersonNum", value = "计划人数") @CheckNumberAnnotation(name = "计划人数") private Integer planPersonNum; @@ -191,4 +195,20 @@ public class ClassPlanDTO { public void setReportReason(String reportReason) { this.reportReason = reportReason; } + + public String getProjectCatalogName() { + return projectCatalogName == null ? "" : projectCatalogName; + } + + public void setProjectCatalogName(String projectCatalogName) { + this.projectCatalogName = projectCatalogName; + } + + public String getWorkerCatalogName() { + return workerCatalogName == null ? "" : workerCatalogName; + } + + public void setWorkerCatalogName(String workerCatalogName) { + this.workerCatalogName = workerCatalogName; + } } diff --git a/src/main/java/cn/com/tenlion/pojo/dtos/teacher/TeacherDTO.java b/src/main/java/cn/com/tenlion/pojo/dtos/teacher/TeacherDTO.java index 17dcfd3..3637179 100644 --- a/src/main/java/cn/com/tenlion/pojo/dtos/teacher/TeacherDTO.java +++ b/src/main/java/cn/com/tenlion/pojo/dtos/teacher/TeacherDTO.java @@ -28,10 +28,14 @@ public class TeacherDTO { private String idCardNumber; @ApiModelProperty(name = "politicalStatus", value = "政治面貌") private String politicalStatus; - @ApiModelProperty(name = "gender", value = "性别") + @ApiModelProperty(name = "gender", value = "性别ID") private String gender; - @ApiModelProperty(name = "education", value = "学历") + @ApiModelProperty(name = "genderName", value = "性别") + private String genderName; + @ApiModelProperty(name = "education", value = "学历ID") private String education; + @ApiModelProperty(name = "educationName", value = "学历") + private String educationName; @ApiModelProperty(name = "nation", value = "民族") private String nation; @ApiModelProperty(name = "graduateSchool", value = "毕业学校") @@ -152,4 +156,20 @@ public class TeacherDTO { public void setPlaceOfWork(String placeOfWork) { this.placeOfWork = placeOfWork; } + + public String getGenderName() { + return genderName == null ? "" : genderName; + } + + public void setGenderName(String genderName) { + this.genderName = genderName; + } + + public String getEducationName() { + return educationName == null ? "" : educationName; + } + + public void setEducationName(String educationName) { + this.educationName = educationName; + } } diff --git a/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java b/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java index 2c77d06..d5bbaa8 100644 --- a/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/classplan/impl/ClassPlanServiceImpl.java @@ -3,16 +3,20 @@ package cn.com.tenlion.service.classplan.impl; import cn.com.tenlion.dao.classplan.IClassPlanDao; import cn.com.tenlion.pojo.bos.classplan.ClassPlanBO; import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO; +import cn.com.tenlion.pojo.dtos.worktype.WorkTypeDTO; import cn.com.tenlion.pojo.pos.classplan.ClassPlanPO; import cn.com.tenlion.pojo.vos.classplan.ClassPlanVO; import cn.com.tenlion.pojo.vos.examcheck.ExamCheckVO; import cn.com.tenlion.service.classplan.IClassPlanService; import cn.com.tenlion.service.examcheck.IExamCheckService; +import cn.com.tenlion.service.worktype.IWorkTypeService; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import ink.wgink.common.base.DefaultBaseService; +import ink.wgink.module.dictionary.pojo.dtos.DataDTO; +import ink.wgink.module.dictionary.service.IDataService; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.util.UUIDUtil; @@ -39,6 +43,10 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl @Autowired private IExamCheckService examCheckService; + @Autowired + private IDataService dataService; + @Autowired + private IWorkTypeService workTypeService; @Override public void save(ClassPlanVO classPlanVO) { @@ -217,6 +225,15 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl public SuccessResultList> listPage(ListPage page) { PageHelper.startPage(page.getPage(), page.getRows()); List classPlanDTOs = list(page.getParams()); + for(ClassPlanDTO item : classPlanDTOs){ + //处理培训项目 + DataDTO dataDTO = dataService.get(item.getProjectCatalogId()); + item.setProjectCatalogName(dataDTO.getDataName()); + //处理工种类型 + WorkTypeDTO workTypeDTO = workTypeService.get(item.getWorkerCatalog()); + item.setWorkerCatalogName(workTypeDTO.getWorkTypeName()); + + } PageInfo pageInfo = new PageInfo<>(classPlanDTOs); return new SuccessResultList<>(classPlanDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); } diff --git a/src/main/java/cn/com/tenlion/service/service/impl/TeacherServiceImpl.java b/src/main/java/cn/com/tenlion/service/service/impl/TeacherServiceImpl.java index 2a4f05a..b0f4f8d 100644 --- a/src/main/java/cn/com/tenlion/service/service/impl/TeacherServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/service/impl/TeacherServiceImpl.java @@ -11,6 +11,8 @@ import com.github.pagehelper.PageInfo; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.RemoveException; import ink.wgink.exceptions.SearchException; +import ink.wgink.module.dictionary.pojo.dtos.DataDTO; +import ink.wgink.module.dictionary.service.IDataService; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.bos.UserInfoBO; import ink.wgink.pojo.result.SuccessResult; @@ -39,11 +41,21 @@ public class TeacherServiceImpl extends DefaultBaseService implements ITeacherSe private ITeacherDao teacherDao; @Autowired private ITrainingInstitutionUserService trainingInstitutionUserService; + @Autowired + private IDataService dataService; @Override public SuccessResultList> listPage(ListPage page) throws SearchException { PageHelper.startPage(page.getPage(), page.getRows()); List dtos = teacherDao.list(page.getParams()); + for (TeacherDTO item : dtos){ + //处理性别 + DataDTO gender = dataService.get(item.getGender()); + item.setGenderName(gender.getDataName()); + //处理学历 + DataDTO education = dataService.get(item.getEducation()); + item.setEducationName(education.getDataName()); + } PageInfo pageInfo = new PageInfo<>(dtos); return new SuccessResultList<>(dtos, pageInfo.getPageNum(), pageInfo.getTotal()); } diff --git a/src/main/resources/static/route/classplan/list.html b/src/main/resources/static/route/classplan/list.html index d316075..208bc05 100644 --- a/src/main/resources/static/route/classplan/list.html +++ b/src/main/resources/static/route/classplan/list.html @@ -114,6 +114,9 @@ if(row['reportType'] === '1'){ return '报备待审'; } + if(row['reportType'] === '2'){ + return '审核通过'; + } return dom; } }, @@ -135,7 +138,22 @@ return rowData; } }, - {field: 'planType', width: 180, title: '培训类型1初训2复训3换证', align:'center', + {field: 'planType', width: 120, title: '培训类型', align:'center', + templet: function(row) { + var rowData = row[this.field]; + if(rowData == '1'){ + return '初训'; + } + if(rowData == '1'){ + return '复训'; + } + if(rowData == '1'){ + return '换证'; + } + return '-'; + } + }, + {field: 'projectCatalogName', width: 180, title: '培训项目', align:'center', templet: function(row) { var rowData = row[this.field]; if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { @@ -144,7 +162,7 @@ return rowData; } }, - {field: 'projectCatalogId', width: 180, title: '培训项目', align:'center', + {field: 'workerCatalogName', width: 180, title: '培训工种', align:'center', templet: function(row) { var rowData = row[this.field]; if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { @@ -153,52 +171,7 @@ return rowData; } }, - {field: 'workerCatalog', width: 180, title: '培训工种', align:'center', - templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { - return '-'; - } - return rowData; - } - }, - {field: 'planPersonNum', width: 180, title: '计划人数', align:'center', - templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { - return '-'; - } - return rowData; - } - }, - {field: 'planStartTime', width: 180, title: '培训开始时间', align:'center', - templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { - return '-'; - } - return rowData; - } - }, - {field: 'planEndTime', width: 180, title: '培训结束时间', align:'center', - templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { - return '-'; - } - return rowData; - } - }, - {field: 'signUpStartTime', width: 180, title: '报名时间开始', align:'center', - templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { - return '-'; - } - return rowData; - } - }, - {field: 'signUpEndTime', width: 180, title: '报名时间截止', align:'center', + {field: 'planPersonNum', width: 120, title: '计划人数', align:'center', templet: function(row) { var rowData = row[this.field]; if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { @@ -207,6 +180,7 @@ return rowData; } }, + {field: 'planAddress', width: 180, title: '培训地点', align:'center', templet: function(row) { var rowData = row[this.field]; @@ -234,6 +208,20 @@ return rowData; } }, + {width: 330, title: '培训时间', align:'center', + templet: function(row) { + var start = row['planStartTime']; + var end = row['planEndTime']; + return start + ' ~ ' + end; + } + }, + {width: 330, title: '报名时间', align:'center', + templet: function(row) { + var start = row['signUpStartTime']; + var end = row['signUpEndTime']; + return start + ' ~ ' + end; + } + }, ] ], page: true, diff --git a/src/main/resources/static/route/classplan/save.html b/src/main/resources/static/route/classplan/save.html index 7698eb1..2507929 100644 --- a/src/main/resources/static/route/classplan/save.html +++ b/src/main/resources/static/route/classplan/save.html @@ -159,11 +159,11 @@ - + + - @@ -173,6 +173,14 @@ + @@ -189,14 +197,6 @@ 面授 {{# } }} - {{# } }} @@ -205,7 +205,7 @@
-
选择确认课程选择讲师 课程名称 课程类型 授课方式选择讲师
+ + {{item.lessonName}} - -