Commit 06c32eac authored by 耿迪迪's avatar 耿迪迪

员工管理、培训计划、培训课程

parent e2897c3f
......@@ -61,6 +61,12 @@
<artifactId>digital-management-generator</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.1.1</version>
</dependency>
</dependencies>
<build>
......
package com.zehong.web.controller.baseinfo;
import com.zehong.common.annotation.Log;
import com.zehong.common.constant.UserConstants;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.baseinfo.TStaff;
import com.zehong.system.domain.form.TStaffForm;
import com.zehong.system.domain.vo.TStaffVo;
import com.zehong.system.domain.vo.UserCourseVo;
import com.zehong.system.service.ISysPostService;
import com.zehong.system.service.ISysRoleService;
import com.zehong.system.service.ISysUserService;
import com.zehong.system.service.baseinfo.ITStaffService;
import com.zehong.system.service.train.ITTrainCourseService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 员工信息管理Controller
*
* @author zehong
* @date 2022-06-17
*/
@RestController
@RequestMapping("/baseInfo/staff")
public class TStaffController extends BaseController
{
@Autowired
private ITStaffService tStaffService;
@Autowired
private ISysRoleService roleService;
@Autowired
private ISysPostService postService;
@Autowired
private ISysUserService userService;
@Autowired
private ITTrainCourseService tTrainCourseService;
/**
* 查询员工信息管理列表
*/
//@PreAuthorize("@ss.hasPermi('safetyManagement:staff:list')")
@GetMapping("/list")
public TableDataInfo list(TStaffForm tStaff)
{
startPage();
List<TStaffVo> list = tStaffService.selectTStaffList(tStaff);
return getDataTable(list);
}
@GetMapping("/allList")
public TableDataInfo allList(TStaffForm tStaff)
{
startPage();
List<TStaffVo> list = tStaffService.allList(tStaff);
return getDataTable(list);
}
/**
* 无分页查询
* @param tStaff
* @return
*/
@GetMapping("/TStaffList")
public TableDataInfo TStaffList(TStaffForm tStaff)
{
List<TStaffVo> list = tStaffService.selectTStaffList(tStaff);
return getDataTable(list);
}
/**
* 导出员工信息管理列表
*/
@Log(title = "员工信息管理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TStaffForm tStaff)
{
List<TStaffVo> list = tStaffService.selectTStaffList(tStaff);
ExcelUtil<TStaffVo> util = new ExcelUtil<TStaffVo>(TStaffVo.class);
return util.exportExcel(list, "员工信息管理数据");
}
/**
* 获取员工信息管理详细信息
*/
@GetMapping(value = {"/", "/{staffId}"})
public AjaxResult getInfo(@PathVariable(value = "staffId", required = false) Long staffId)
{
AjaxResult ajax = AjaxResult.success();
ajax.put("roles", roleService.selectRoleAll());
ajax.put("posts", postService.selectPostAll());
ajax.put("data", tStaffService.selectTStaffById(staffId));
return ajax;
}
/**
* 新增员工信息管理
*/
@Log(title = "员工信息管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TStaff tStaff)
{
SysUser user=new SysUser();
user.setPhonenumber(tStaff.getPhonenumber());
if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(tStaff.getUserName()))) {
return AjaxResult.error("新增用户'" + tStaff.getUserName() + "'失败,登录账号已存在");
} else if (StringUtils.isNotEmpty(tStaff.getPhonenumber())
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) {
return AjaxResult.error("新增用户'" + tStaff.getUserName() + "'失败,手机号码已存在");
}
//密码加密
tStaff.setPassword(SecurityUtils.encryptPassword(tStaff.getPassword()));
return toAjax(tStaffService.insertTStaff(tStaff));
}
/**
* 修改员工信息管理
*/
@Log(title = "员工信息管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TStaff tStaff)
{
return toAjax(tStaffService.updateTStaff(tStaff));
}
/**
* 删除员工信息管理
*/
@Log(title = "员工信息管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{staffIds}")
public AjaxResult remove(@PathVariable Long[] staffIds)
{
return toAjax(tStaffService.deleteTStaffByIds(staffIds));
}
@ApiOperation("用户课程列表")
@GetMapping("/userCourseList")
public TableDataInfo userCourseList(TStaffForm tStaff){
startPage();
List<UserCourseVo> list = tTrainCourseService.userCourseLists(tStaff);
return getDataTable(list);
}
}
......@@ -74,8 +74,8 @@ public class CommonController
// 上传文件路径
String filePath = DigitalManagementConfig.getUploadPath();
// 上传并返回新文件名称
String fileName = FileUploadUtils.upload(filePath, file);
String url = serverConfig.getUrl() + fileName;
String fileName = file.getOriginalFilename();
String url = serverConfig.getUrl() + FileUploadUtils.upload(filePath, file);
AjaxResult ajax = AjaxResult.success();
ajax.put("fileName", fileName);
ajax.put("url", url);
......
package com.zehong.web.controller.train;
import com.alibaba.fastjson.JSONObject;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.exception.CustomException;
import com.zehong.common.utils.StringUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.train.TBankSubject;
import com.zehong.system.service.train.ITBankSubjectService;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 题目Controller
*
* @author zehong
* @date 2022-12-15
*/
@RestController
@RequestMapping("/train/subject")
public class TBankSubjectController extends BaseController
{
@Autowired
private ITBankSubjectService tBankSubjectService;
/**
* 查询题库题目列表
*/
//@PreAuthorize("@ss.hasPermi('system:subject:list')")
@GetMapping("/list")
public TableDataInfo list(TBankSubject tBankSubject)
{
startPage();
List<TBankSubject> list = tBankSubjectService.selectTBankSubjectList(tBankSubject);
return getDataTable(list);
}
/**
* 导出题库题目列表
*/
//@PreAuthorize("@ss.hasPermi('system:subject:export')")
@Log(title = "题库题目", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TBankSubject tBankSubject)
{
List<TBankSubject> list = tBankSubjectService.selectTBankSubjectList(tBankSubject);
ExcelUtil<TBankSubject> util = new ExcelUtil<TBankSubject>(TBankSubject.class);
return util.exportExcel(list, "题库题目数据");
}
/**
* 获取题库题目详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:subject:query')")
@GetMapping(value = "/{subjectId}")
public AjaxResult getInfo(@PathVariable("subjectId") Long subjectId)
{
return AjaxResult.success(tBankSubjectService.selectTBankSubjectById(subjectId));
}
/**
* 新增题库题目
*/
//@PreAuthorize("@ss.hasPermi('system:subject:add')")
@Log(title = "题库题目", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TBankSubject tBankSubject)
{
return toAjax(tBankSubjectService.insertTBankSubject(tBankSubject));
}
/**
* 修改题库题目
*/
//@PreAuthorize("@ss.hasPermi('system:subject:edit')")
@Log(title = "题库题目", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TBankSubject tBankSubject)
{
return toAjax(tBankSubjectService.updateTBankSubject(tBankSubject));
}
/**
* 删除题库题目
*/
//@PreAuthorize("@ss.hasPermi('system:subject:remove')")
@Log(title = "题库题目", businessType = BusinessType.DELETE)
@DeleteMapping("/{subjectIds}")
public AjaxResult remove(@PathVariable Long[] subjectIds)
{
return toAjax(tBankSubjectService.deleteTBankSubjectByIds(subjectIds));
}
/**
* 导入题目信息管理列表
*/
@Log(title = "题库题目", businessType = BusinessType.IMPORT)
@PostMapping("/import")
public AjaxResult importDevice(MultipartFile file, boolean updateSupport, Long bankId) throws Exception
{
//装载流
XSSFWorkbook workbook = null;
int successNum = 0;
int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
try {
// workbook = new XSSFWorkbook(file.getInputStream());
//解析xls
workbook = new XSSFWorkbook(file.getInputStream());
}catch (IOException e) {
e.printStackTrace();
}
//最终添加数据 存储数组
List<TBankSubject> list = new ArrayList<>();
// 获取一个工作表,下标从0开始
XSSFSheet sheet = workbook.getSheetAt(0);
int lastRowNum = sheet.getLastRowNum();
// 通过循环,逐行取出表中每行数据
for(int i=0;i<=lastRowNum;i++){//跳过第一行和第二行
if(i<=1){
continue;
}
// 获取行
XSSFRow row = sheet.getRow(i);
TBankSubject excelEntity = new TBankSubject();
List jsonArray=new ArrayList();
try{
//判断题目 和答案不能为空
if (!StringUtils.isEmpty(row.getCell(0).toString())&&!StringUtils.isEmpty(row.getCell(9).toString())
&&!StringUtils.isEmpty(row.getCell(10).toString())){
successNum++;
/**题库id*/
excelEntity.setBankId(bankId);
/**题目*/
excelEntity.setTopicTitle(row.getCell(0).toString());
String s1= row.getCell(10).toString();
String s2 = StringUtils.substringBefore(s1, ".");
/**题目类型*/
excelEntity.setTopicType(Integer.valueOf(s2));
/**题目*/
for (int s=1;s<=8;s++){
JSONObject jsonObject=new JSONObject();
if (!StringUtils.isEmpty(row.getCell(s).toString())) {
jsonObject.put("value", row.getCell(s).toString());
jsonArray.add(jsonObject);
}
}
System.out.println(row.getCell(9).toString());
/**答案*/
excelEntity.setAnswer((row.getCell(9).toString()).replace(",",",") );
// if ("A".equals(row.getCell(9).toString())){
// excelEntity.setAnswer(0);
// }else if ("B".equals(row.getCell(9).toString())){
// excelEntity.setAnswer(1);
// }else if ("C".equals(row.getCell(9).toString())){
// excelEntity.setAnswer(2);
// }else if ("D".equals(row.getCell(9).toString())){
// excelEntity.setAnswer(3);
// }else if ("E".equals(row.getCell(9).toString())){
// excelEntity.setAnswer(4);
// }else if ("F".equals(row.getCell(9).toString())){
// excelEntity.setAnswer(5);
// }else if ("G".equals(row.getCell(9).toString())){
// excelEntity.setAnswer(6);
// }else if ("H".equals(row.getCell(9).toString())){
// excelEntity.setAnswer(7);
// }
excelEntity.setTopicOption(String.valueOf(jsonArray));
excelEntity.setDatetime(new Date());
list.add(excelEntity);
}
// else {
// failureNum++;
// String msg = "<br/>" + failureNum + "、题目 " + excelEntity.getTopicOption() + " 导入失败:";
// failureMsg.append(msg);
// }
}
catch (Exception e){
failureNum++;
String msg = "<br/>" + failureNum + "题目 " + excelEntity.getTopicOption() + " 导入失败:";
failureMsg.append(msg + e.getMessage());
}
}
if (failureNum > 0)
{
failureMsg.insert(0, "导入完成,共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new CustomException(failureMsg.toString());
}
else
{
successMsg.insert(0, "数据已全部导入成功!共 " + successNum + " 条");
}
if (list.size()!=0){
/**数据添加方法*/
tBankSubjectService.insertBank(list);
}
// String message = tBankSubjectService.importDevice(file, updateSupport);
return AjaxResult.success(successMsg.toString());
}
}
package com.zehong.web.controller.train;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.train.TTrainCourseBank;
import com.zehong.system.service.train.ITTrainCourseBankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* bankController
* 题库管理
* @author zehong
* @date 2022-12-14
*/
@RestController
@RequestMapping("/train/bank")
public class TTrainCourseBankController extends BaseController
{
@Autowired
private ITTrainCourseBankService tTrainCourseBankService;
/**
* 查询题库列表
*/
//@PreAuthorize("@ss.hasPermi('system:bank:list')")
@GetMapping("/list")
public TableDataInfo list(TTrainCourseBank tTrainCourseBank)
{
startPage();
List<TTrainCourseBank> list = tTrainCourseBankService.selectTTrainCourseBankList(tTrainCourseBank);
return getDataTable(list);
}
/**
* 导出题库列表
*/
//@PreAuthorize("@ss.hasPermi('system:bank:export')")
@Log(title = "bank", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TTrainCourseBank tTrainCourseBank)
{
List<TTrainCourseBank> list = tTrainCourseBankService.selectTTrainCourseBankList(tTrainCourseBank);
ExcelUtil<TTrainCourseBank> util = new ExcelUtil<TTrainCourseBank>(TTrainCourseBank.class);
return util.exportExcel(list, "bank数据");
}
/**
* 获取bank详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:bank:query')")
@GetMapping(value = "/{bankId}")
public AjaxResult getInfo(@PathVariable("bankId") Long bankId)
{
return AjaxResult.success(tTrainCourseBankService.selectTTrainCourseBankById(bankId));
}
/**
* 新增题库
*/
//@PreAuthorize("@ss.hasPermi('system:bank:add')")
@Log(title = "bank", businessType = BusinessType.INSERT)
@PostMapping
public int add(@RequestBody TTrainCourseBank tTrainCourseBank)
{
tTrainCourseBankService.insertTTrainCourseBank(tTrainCourseBank);
return Math.toIntExact(tTrainCourseBank.getBankId());
}
/**
* 修改bank
*/
//@PreAuthorize("@ss.hasPermi('system:bank:edit')")
@Log(title = "bank", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TTrainCourseBank tTrainCourseBank)
{
return toAjax(tTrainCourseBankService.updateTTrainCourseBank(tTrainCourseBank));
}
/**
* 删除bank
*/
//@PreAuthorize("@ss.hasPermi('system:bank:remove')")
@Log(title = "bank", businessType = BusinessType.DELETE)
@DeleteMapping("/{bankIds}")
public AjaxResult remove(@PathVariable Long[] bankIds)
{
return toAjax(tTrainCourseBankService.deleteTTrainCourseBankByIds(bankIds));
}
}
package com.zehong.web.controller.train;
import com.alibaba.fastjson.JSON;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.ServletUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.framework.web.service.TokenService;
import com.zehong.system.domain.train.StatisticsTrainCourse;
import com.zehong.system.domain.train.TNews;
import com.zehong.system.domain.train.TTrainCourse;
import com.zehong.system.domain.train.TTrainUserCourse;
import com.zehong.system.domain.vo.UserCourseVo;
import com.zehong.system.service.train.ITTrainCourseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 培训课程Controller
*
* @author zehong
* @date 2022-09-19
*/
@Api("课程管理")
@RestController
@RequestMapping("/train/course")
public class TTrainCourseController extends BaseController
{
@Autowired
private ITTrainCourseService tTrainCourseService;
@Autowired
private TokenService tokenService;
/**
* 查询培训课程列表
*/
@ApiOperation("课程列表")
@GetMapping("/list")
public TableDataInfo list(TTrainCourse tTrainCourse)
{
startPage();
tTrainCourse.setIsDel(0);
List<TTrainCourse> list = tTrainCourseService.selectTTrainCourseList(tTrainCourse);
return getDataTable(list);
}
@ApiOperation("用户课程列表")
@GetMapping("/userCourseList")
public TableDataInfo userCourseList(Integer type){
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
SysUser user = loginUser.getUser();
startPage();
List<UserCourseVo> list = tTrainCourseService.userCourseList(user.getUserId(),type);
return getDataTable(list);
}
@ApiOperation("用户课程考试")
@GetMapping("/examination")
public AjaxResult examination(Long userCourseId, String answers){
String n="["+answers+']';
//字符串转换成二维数组
Integer[][] integers = JSON.parseObject(n, Integer[][].class);
Map<String,Object> map = tTrainCourseService.examination(userCourseId,integers);
return AjaxResult.success(map);
}
/**
* 导出培训课程列表
*/
//@PreAuthorize("@ss.hasPermi('system:course:export')")
@Log(title = "培训课程", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TTrainCourse tTrainCourse)
{
List<TTrainCourse> list = tTrainCourseService.selectTTrainCourseList(tTrainCourse);
ExcelUtil<TTrainCourse> util = new ExcelUtil<TTrainCourse>(TTrainCourse.class);
return util.exportExcel(list, "培训课程数据");
}
/**
* 获取培训课程详细信息
*/
@ApiOperation("课程详情")
@GetMapping(value = "/{courseId}")
public AjaxResult getInfo(@PathVariable("courseId") Long courseId)
{
return AjaxResult.success(tTrainCourseService.selectTTrainCourseById(courseId));
}
/**
* 获取培训课程详细信息
*/
@ApiOperation("用户课程详情")
@GetMapping(value = "/userCourse")
public AjaxResult getUserCourse(Long userCourseId)
{
return AjaxResult.success(tTrainCourseService.getUserCourse(userCourseId));
}
/**
* 获取培训课程详细信息
*/
@ApiOperation("课程发布")
@GetMapping("/release")
public AjaxResult release(Long courseId)
{
return toAjax(tTrainCourseService.selectTTrainCourseRelease (courseId));
}
/**
* 新增培训课程
*/
@ApiOperation("新增课程")
@Log(title = "培训课程", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TTrainCourse tTrainCourse)
{
return AjaxResult.success(tTrainCourseService.insertTTrainCourse(tTrainCourse));
}
/**
* 修改培训课程
*/
@ApiOperation("修改课程")
@Log(title = "培训课程", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TTrainCourse tTrainCourse)
{
return toAjax(tTrainCourseService.updateTTrainCourse(tTrainCourse));
}
/**
* 修改用户课程
*/
@ApiOperation("修改用户课程")
@Log(title = "修改用户课程", businessType = BusinessType.UPDATE)
@PutMapping("/editUserCourse")
public AjaxResult editUserCourse(@RequestBody TTrainUserCourse tTrainUserCourse)
{
return toAjax(tTrainCourseService.updateTTrainUserCourse(tTrainUserCourse));
}
/**
* 删除培训课程
*/
@ApiOperation("删除课程")
@Log(title = "培训课程", businessType = BusinessType.DELETE)
@DeleteMapping("/{courseId}")
public AjaxResult remove(@PathVariable Long courseId)
{
TTrainCourse tTrainCourse = new TTrainCourse();
tTrainCourse.setCourseId(courseId);
tTrainCourse.setIsDel(1);
return toAjax(tTrainCourseService.updateTTrainCourse(tTrainCourse));
}
/**
* 考试发布
* @param tTrainCourse
* @return
*/
@PostMapping(value = "testPublish")
public AjaxResult testPublish(@RequestBody TTrainCourse tTrainCourse){
return toAjax(tTrainCourseService.testPublish(tTrainCourse));
}
/**
* 考试统计接口
* @param statisticsTrainCourse 统计实体
* @return TableDataInfo
*/
@GetMapping(value = "/statisticsTrainCourse")
public TableDataInfo statisticsTrainCourse(StatisticsTrainCourse statisticsTrainCourse){
startPage();
List<StatisticsTrainCourse> statisticsTrainCourses = tTrainCourseService.statisticsTrainCourse(statisticsTrainCourse);
return getDataTable(statisticsTrainCourses);
}
/**
* 根据考试查询人员考试详情
* @param courseId 考试id
* @return List<TTrainUserCourse>
*/
@GetMapping(value = "testPersonDetailByCourseId")
public TableDataInfo testPersonDetailByCourseId(@RequestParam(value = "courseId") Long courseId){
startPage();
List<TTrainUserCourse> persons = tTrainCourseService.testPersonDetailByCourseId(courseId);
return getDataTable(persons);
}
/**
* 导出所有考试详细数据项
*/
@Log(title = "设备信息管理", businessType = BusinessType.EXPORT)
@GetMapping("/examDetails")
public AjaxResult examDetails(@RequestParam(value = "courseId") Long courseId)
{
List<TTrainUserCourse> persons = tTrainCourseService.examDetails(courseId);
ExcelUtil<TTrainUserCourse> util = new ExcelUtil<TTrainUserCourse>(TTrainUserCourse.class);
return util.exportExcel(persons, "考试详细数据");
}
/**
* 手机端 最新消息查询
*/
@GetMapping("/latestNews")
public TNews latestNews(Long recipientId){
//最新消息查询
return tTrainCourseService.selectLatestNews(recipientId);
}
/**
* 手机端 查询历史消息
* @param recipientId
* @return
*/
@GetMapping("/historicalMessages")
public List<TNews> historicalMessages(Long recipientId){
return tTrainCourseService.historicalMessages(recipientId);
}
/**
* 修改消息状态为已读
*/
@GetMapping("/updateReadStatus")
public AjaxResult updateReadStatus(Long newsId){
return toAjax(tTrainCourseService.updateReadStatus(newsId));
}
}
package com.zehong.web.controller.train;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.train.TTrainCourseTopic;
import com.zehong.system.domain.vo.BatchTopicVo;
import com.zehong.system.service.train.ITTrainCourseTopicService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 培训课程题库Controller
*
* @author zehong
* @date 2022-09-19
*/
@Api("课程题库")
@RestController
@RequestMapping("/train/topic")
public class TTrainCourseTopicController extends BaseController
{
@Autowired
private ITTrainCourseTopicService tTrainCourseTopicService;
/**
* 查询培训课程题库列表
*/
@ApiOperation("课程题库列表")
@GetMapping("/list")
public TableDataInfo list(TTrainCourseTopic tTrainCourseTopic)
{
startPage();
List<TTrainCourseTopic> list = tTrainCourseTopicService.selectTTrainCourseTopicList(tTrainCourseTopic);
return getDataTable(list);
}
@ApiOperation("课程题库列表(没答案)")
@GetMapping("/topiclist")
public AjaxResult CourseTopicList(Long courseId)
{
List<TTrainCourseTopic> list = tTrainCourseTopicService.selectCourseTopicList(courseId);
return AjaxResult.success(list);
}
/**
* 导出培训课程题库列表
*/
@Log(title = "培训课程题库", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TTrainCourseTopic tTrainCourseTopic)
{
List<TTrainCourseTopic> list = tTrainCourseTopicService.selectTTrainCourseTopicList(tTrainCourseTopic);
ExcelUtil<TTrainCourseTopic> util = new ExcelUtil<TTrainCourseTopic>(TTrainCourseTopic.class);
return util.exportExcel(list, "培训课程题库数据");
}
/**
* 获取培训课程题库详细信息
*/
@ApiOperation("课程题详情")
@GetMapping(value = "/{topicId}")
public AjaxResult getInfo(@PathVariable("topicId") Long topicId)
{
return AjaxResult.success(tTrainCourseTopicService.selectTTrainCourseTopicById(topicId));
}
/**
* 新增培训课程题库
*/
@ApiOperation("添加课程题")
@Log(title = "培训课程题库", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TTrainCourseTopic tTrainCourseTopic)
{
if(tTrainCourseTopic.getCourseId()==null||tTrainCourseTopic.getCourseId().equals("")){
return AjaxResult.error("课程id不可为空");
}
return toAjax(tTrainCourseTopicService.insertTTrainCourseTopic(tTrainCourseTopic));
}
/**
* 修改培训课程题库
*/
@ApiOperation("修改课程题")
@Log(title = "培训课程题库", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TTrainCourseTopic tTrainCourseTopic)
{
return toAjax(tTrainCourseTopicService.updateTTrainCourseTopic(tTrainCourseTopic));
}
/**
* 删除培训课程题库
*/
// @Log(title = "培训课程题库", businessType = BusinessType.DELETE)
// @DeleteMapping("/{topicIds}")
// public AjaxResult remove(@PathVariable Long[] topicIds)
// {
// return toAjax(tTrainCourseTopicService.deleteTTrainCourseTopicByIds(topicIds));
// }
/**
* 删除培训课程题库
*/
@ApiOperation("删除课程题")
@Log(title = "培训课程题库", businessType = BusinessType.DELETE)
@DeleteMapping("/{topicId}")
public AjaxResult deleteTopic(@PathVariable Long topicId)
{
return toAjax(tTrainCourseTopicService.deleteTTrainCourseTopicById(topicId));
}
/**
* 题库批量导入试题
* @param batchTopicVo 试题实体
* @return AjaxResult
*/
@PostMapping("/bachAddTopic")
public AjaxResult bachAddTopic(@RequestBody BatchTopicVo batchTopicVo){
return toAjax(tTrainCourseTopicService.bachAddTopic(batchTopicVo));
}
/**
* 培训课程管理批量导入试题
*/
@PostMapping("/addTTrainCourseTopic")
public AjaxResult addTTrainCourseTopic(@RequestBody BatchTopicVo batchTopicVo){
return toAjax(tTrainCourseTopicService.addTTrainCourseTopic(batchTopicVo));
}
}
package com.zehong.web.controller.train;
import com.alibaba.fastjson.JSON;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.train.TTrainPlan;
import com.zehong.system.domain.vo.PlanVo;
import com.zehong.system.service.train.ITTrainPlanService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 培训计划Controller
*
* @author zehong
* @date 2022-09-17
*/
@Api("培训计划")
@RestController
@RequestMapping("/train/plan")
public class TTrainPlanController extends BaseController
{
@Autowired
private ITTrainPlanService tTrainPlanService;
/**
* 查询培训计划列表
*/
@ApiOperation("培训计划列表")
@GetMapping("/list")
public AjaxResult list()
{
List<TTrainPlan> list = tTrainPlanService.selectTTrainPlanList(new TTrainPlan());
return AjaxResult.success(list);
}
@ApiOperation("培训计划下拉列表")
@GetMapping("/downList")
public AjaxResult downList()
{
List<TTrainPlan> list = tTrainPlanService.selectTTrainPlanDownList();
return AjaxResult.success(list);
}
/**
* 导出培训计划列表
*/
@Log(title = "培训计划", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TTrainPlan tTrainPlan)
{
List<TTrainPlan> list = tTrainPlanService.selectTTrainPlanList(tTrainPlan);
ExcelUtil<TTrainPlan> util = new ExcelUtil<TTrainPlan>(TTrainPlan.class);
return util.exportExcel(list, "培训计划数据");
}
/**
* 获取培训计划详细信息
*/
@GetMapping(value = "/{planId}")
public AjaxResult getInfo(@PathVariable("planId") Long planId)
{
return AjaxResult.success(tTrainPlanService.selectTTrainPlanById(planId));
}
/**
* 新增培训计划
*/
@ApiOperation("新增培训计划")
@Log(title = "培训计划", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody PlanVo planVo)
{
TTrainPlan tTrainPlan = new TTrainPlan();
tTrainPlan.setPlanName(planVo.getPlanName());
tTrainPlan.setPersonnelType(planVo.getPersonnelType());
List<Map<String,Object>> list = (List<Map<String,Object>>) JSON.parse(planVo.getPeopleList());
return AjaxResult.success(tTrainPlanService.insertTTrainPlan(tTrainPlan,list));
}
/**
* 修改培训计划
*/
@ApiOperation("编辑培训计划")
@Log(title = "培训计划", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody PlanVo planVo)
{
if(planVo.getPlanId()==null){
return AjaxResult.error("计划id不可为空");
}
TTrainPlan tTrainPlan = new TTrainPlan();
tTrainPlan.setPlanId(planVo.getPlanId());
tTrainPlan.setPlanName(planVo.getPlanName());
tTrainPlan.setPersonnelType(planVo.getPersonnelType());
List<Map<String,Object>> list = (List<Map<String,Object>>) JSON.parse(planVo.getPeopleList());
return toAjax(tTrainPlanService.updateTTrainPlan(tTrainPlan,list));
}
/**
* 删除培训计划
*/
@Log(title = "培训计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{planIds}")
public AjaxResult remove(@PathVariable Long[] planIds)
{
return toAjax(tTrainPlanService.deleteTTrainPlanByIds(planIds));
}
/**
* 删除培训计划
* @param planId
* @return
*/
@ApiOperation("删除培训计划")
@Log(title = "培训计划", businessType = BusinessType.DELETE)
@DeleteMapping("/deleteOne")
public AjaxResult deletePlan(Long planId)
{
return toAjax(tTrainPlanService.deleteTTrainPlanById(planId));
}
}
......@@ -6,9 +6,9 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://localhost:3306/digitalManagement?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: root@123
url: jdbc:mysql://36.138.180.82:3309/hebeidakong?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: hebeidakong
password: x7m3j5Smi2D7ncsR
# 从库数据源
slave:
# 从数据源开关/默认关闭
......
......@@ -119,6 +119,12 @@
<artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.7.12</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -23,6 +23,18 @@
<artifactId>digital-management-common</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel-core</artifactId>
<version>3.1.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package com.zehong.system.domain.baseinfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import java.util.Arrays;
import java.util.Date;
/**
* 员工信息管理对象 t_staff
*
* @author zehong
* @date 2022-06-17
*/
public class TStaff extends BaseEntity
{
private static final long serialVersionUID = 1L;
/**系统用户id*/
private Integer userId;
/** 员工id */
private Integer staffId;
/**用户账号*/
private String userName;
/**用户密码*/
private String password;
/** 姓名 */
@Excel(name = "姓名")
private String staffName;
/** 员工编号 */
@Excel(name = "员工编号")
private String staffCode;
/** 性别 */
@Excel(name = "性别")
private String sex;
/** 部门id */
@Excel(name = "部门id")
private Integer deptId;
/** 手机号码 */
@Excel(name = "手机号码")
private String phonenumber;
/** 岗位id */
@Excel(name = "岗位id")
private Integer postId;
/** 角色组 */
private Long[] roleIds;
/** 角色id */
@Excel(name = "角色id")
private Integer roleId;
/** 职称 */
@Excel(name = "职称")
private String positionalTitles;
/** 工种 */
@Excel(name = "工种")
private String profession;
/** 是否特殊作业人员 */
@Excel(name = "是否特殊作业人员")
private String specialOperators;
/** 证书路径 */
@Excel(name = "证书路径")
private String certificateUrl;
/** 证书名称 */
@Excel(name = "证书名称")
private String certificateName;
/** 证书有效日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "证书有效日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date effectiveDate;
/** 删除标志(0正常,1删除) */
@Excel(name = "删除标志", readConverterExp = "0=正常,1删除")
private String isDel;
public Long[] getRoleIds() {
return roleIds;
}
public void setRoleIds(Long[] roleIds) {
this.roleIds = roleIds;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public void setStaffId(Integer staffId) {
this.staffId = staffId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public void setStaffId(int staffId)
{
this.staffId = staffId;
}
public int getStaffId()
{
return staffId;
}
public void setStaffName(String staffName)
{
this.staffName = staffName;
}
public String getStaffName()
{
return staffName;
}
public void setStaffCode(String staffCode)
{
this.staffCode = staffCode;
}
public String getStaffCode()
{
return staffCode;
}
public void setSex(String sex)
{
this.sex = sex;
}
public String getSex()
{
return sex;
}
public void setDeptId(Integer deptId)
{
this.deptId = deptId;
}
public Integer getDeptId()
{
return deptId;
}
public void setPhonenumber(String phonenumber)
{
this.phonenumber = phonenumber;
}
public String getPhonenumber()
{
return phonenumber;
}
public void setPostId(Integer postId)
{
this.postId = postId;
}
public Integer getPostId()
{
return postId;
}
public void setRoleId(Integer roleId)
{
this.roleId = roleId;
}
public Integer getRoleId()
{
return roleId;
}
public void setPositionalTitles(String positionalTitles)
{
this.positionalTitles = positionalTitles;
}
public String getPositionalTitles()
{
return positionalTitles;
}
public void setProfession(String profession)
{
this.profession = profession;
}
public String getProfession()
{
return profession;
}
public void setSpecialOperators(String specialOperators)
{
this.specialOperators = specialOperators;
}
public String getSpecialOperators()
{
return specialOperators;
}
public void setCertificateUrl(String certificateUrl)
{
this.certificateUrl = certificateUrl;
}
public String getCertificateUrl()
{
return certificateUrl;
}
public void setCertificateName(String certificateName)
{
this.certificateName = certificateName;
}
public String getCertificateName()
{
return certificateName;
}
public void setEffectiveDate(Date effectiveDate)
{
this.effectiveDate = effectiveDate;
}
public Date getEffectiveDate()
{
return effectiveDate;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
@Override
public String toString() {
return "TStaff{" +
"userId=" + userId +
", staffId=" + staffId +
", userName='" + userName + '\'' +
", password='" + password + '\'' +
", staffName='" + staffName + '\'' +
", staffCode='" + staffCode + '\'' +
", sex='" + sex + '\'' +
", deptId=" + deptId +
", phonenumber='" + phonenumber + '\'' +
", postId=" + postId +
", roleIds=" + Arrays.toString(roleIds) +
", roleId=" + roleId +
", positionalTitles='" + positionalTitles + '\'' +
", profession='" + profession + '\'' +
", specialOperators='" + specialOperators + '\'' +
", certificateUrl='" + certificateUrl + '\'' +
", certificateName='" + certificateName + '\'' +
", effectiveDate=" + effectiveDate +
", isDel='" + isDel + '\'' +
'}';
}
}
package com.zehong.system.domain.form;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 员工信息管理对象 t_staff
*
* @author zehong
* @date 2022-06-17
*/
public class TStaffForm extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 姓名 */
@Excel(name = "姓名")
private String staffName;
/** 员工编号 */
@Excel(name = "员工编号")
private String staffCode;
/** 性别 */
@Excel(name = "性别")
private String sex;
/** 部门id */
@Excel(name = "部门id")
private Integer deptId;
/** 手机号码 */
@Excel(name = "手机号码")
private String phonenumber;
private Long userId;
private Long staffId;
private int dataKind;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public int getDataKind() {
return dataKind;
}
public void setDataKind(int dataKind) {
this.dataKind = dataKind;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public Long getStaffId() {
return staffId;
}
public void setStaffId(Long staffId) {
this.staffId = staffId;
}
public void setStaffName(String staffName)
{
this.staffName = staffName;
}
public String getStaffName()
{
return staffName;
}
public void setStaffCode(String staffCode)
{
this.staffCode = staffCode;
}
public String getStaffCode()
{
return staffCode;
}
public void setSex(String sex)
{
this.sex = sex;
}
public String getSex()
{
return sex;
}
public Integer getDeptId() {
return deptId;
}
public void setDeptId(Integer deptId) {
this.deptId = deptId;
}
public void setPhonenumber(String phonenumber)
{
this.phonenumber = phonenumber;
}
public String getPhonenumber()
{
return phonenumber;
}
@Override
public String toString() {
return "TStaffForm{" +
"staffName='" + staffName + '\'' +
", staffCode='" + staffCode + '\'' +
", sex='" + sex + '\'' +
", deptId=" + deptId +
", phonenumber='" + phonenumber + '\'' +
", userId=" + userId +
", staffId=" + staffId +
", dataKind=" + dataKind +
'}';
}
}
package com.zehong.system.domain.train;
public class StatisticsTrainCourse {
/**
* 课程id
*/
private Long courseId;
/**
* 课程名称
*/
private String courseName;
/**
* 发布时间
*/
private String releaseTime;
/**
* 考试类型
*/
private String dataKind;
/**
* 应考人数
*/
private String count;
/**
* 参考人数
*/
private String test;
/**
* 通过人数
*/
private String pass;
/**
* 通过率
*/
private String rate;
/**
* 发布开始时间
*/
private String releaseTimeBegin;
/**
* 发布结束时间
*/
private String releaseTimeEnd;
public Long getCourseId() {
return courseId;
}
public void setCourseId(Long courseId) {
this.courseId = courseId;
}
public String getCourseName() {
return courseName;
}
public void setCourseName(String courseName) {
this.courseName = courseName;
}
public String getReleaseTime() {
return releaseTime;
}
public void setReleaseTime(String releaseTime) {
this.releaseTime = releaseTime;
}
public String getDataKind() {
return dataKind;
}
public void setDataKind(String dataKind) {
this.dataKind = dataKind;
}
public String getCount() {
return count;
}
public void setCount(String count) {
this.count = count;
}
public String getTest() {
return test;
}
public void setTest(String test) {
this.test = test;
}
public String getPass() {
return pass;
}
public void setPass(String pass) {
this.pass = pass;
}
public String getRate() {
return rate;
}
public void setRate(String rate) {
this.rate = rate;
}
public String getReleaseTimeBegin() {
return releaseTimeBegin;
}
public void setReleaseTimeBegin(String releaseTimeBegin) {
this.releaseTimeBegin = releaseTimeBegin;
}
public String getReleaseTimeEnd() {
return releaseTimeEnd;
}
public void setReleaseTimeEnd(String releaseTimeEnd) {
this.releaseTimeEnd = releaseTimeEnd;
}
}
package com.zehong.system.domain.train;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* 题库题目对象 t_bank_subject
*
* @author zehong
* @date 2022-12-15
*/
public class TBankSubject extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 题目id */
private Long subjectId;
/** 所属题库id */
@Excel(name = "所属题库id")
private Long bankId;
/** 题目内容 */
@ExcelProperty(value = "题干(必填)")
private String topicTitle;
/** 题目选项(json) */
@Excel(name = "题目选项", readConverterExp = "j=son")
private String topicOption;
/** 答案 */
@Excel(name = "正确答案(必填)")
private String answer;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date datetime;
/** 题目类型 1单选 2多选 3判断 */
private Integer topicType;
public Integer getTopicType() {
return topicType;
}
public void setTopicType(Integer topicType) {
this.topicType = topicType;
}
public void setSubjectId(Long subjectId)
{
this.subjectId = subjectId;
}
public Long getSubjectId()
{
return subjectId;
}
public void setBankId(Long bankId)
{
this.bankId = bankId;
}
public Long getBankId()
{
return bankId;
}
public void setTopicTitle(String topicTitle)
{
this.topicTitle = topicTitle;
}
public String getTopicTitle()
{
return topicTitle;
}
public void setTopicOption(String topicOption)
{
this.topicOption = topicOption;
}
public String getTopicOption()
{
return topicOption;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getAnswer() {
return answer;
}
public void setAnswer(String answer) {
this.answer = answer;
}
public void setDatetime(Date datetime)
{
this.datetime = datetime;
}
public Date getDatetime()
{
return datetime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("subjectId", getSubjectId())
.append("bankId", getBankId())
.append("topicTitle", getTopicTitle())
.append("topicOption", getTopicOption())
.append("answer", getAnswer())
.append("datetime", getDatetime())
.toString();
}
}
package com.zehong.system.domain.train;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
/**
* 手机端消息封装类
*/
public class TNews {
private Integer newsId;
/**
* 所属模块 0培训课程 1试卷考试 2隐患台账
*/
private Integer module;
/**
* 消息内容
*/
private String messageContent;
/**
* 发布人id
*/
private Long publisherId;
/**
* 接收人id
*/
private Integer recipientId;
/**
* 发布时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date releaseTime;
/**
* 读取状态 0未读取 1读取
*/
private Integer readStatus;
private Long moduleId;
public Long getModuleId() {
return moduleId;
}
public void setModuleId(Long moduleId) {
this.moduleId = moduleId;
}
public Integer getNewsId() {
return newsId;
}
public void setNewsId(Integer newsId) {
this.newsId = newsId;
}
public Integer getModule() {
return module;
}
public void setModule(Integer module) {
this.module = module;
}
public String getMessageContent() {
return messageContent;
}
public void setMessageContent(String messageContent) {
this.messageContent = messageContent;
}
public Long getPublisherId() {
return publisherId;
}
public void setPublisherId(Long publisherId) {
this.publisherId = publisherId;
}
public Integer getRecipientId() {
return recipientId;
}
public void setRecipientId(Integer recipientId) {
this.recipientId = recipientId;
}
public Date getReleaseTime() {
return releaseTime;
}
public void setReleaseTime(Date releaseTime) {
this.releaseTime = releaseTime;
}
public Integer getReadStatus() {
return readStatus;
}
public void setReadStatus(Integer readStatus) {
this.readStatus = readStatus;
}
@Override
public String toString() {
return "TNews{" +
"newsId=" + newsId +
", module=" + module +
", messageContent='" + messageContent + '\'' +
", publisherId=" + publisherId +
", recipientId=" + recipientId +
", releaseTime=" + releaseTime +
", readStatus=" + readStatus +
'}';
}
}
package com.zehong.system.domain.train;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* 培训课程对象 t_train_course
*
* @author zehong
* @date 2022-09-19
*/
public class TTrainCourse extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 课程id */
private Long courseId;
/** 课程名称 */
@Excel(name = "课程名称")
private String courseName;
/** 课程类型(培训计划) */
@Excel(name = "课程类型", readConverterExp = "培=训计划")
private Long courseType;
private String planName;
/** 课程内容 */
@Excel(name = "课程内容")
private String courseConent;
/** 0未发布 1已发布 */
@Excel(name = "0未发布 1已发布")
private Integer status;
/** 发布时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date releaseTime;
/** 课程附件 */
@Excel(name = "课程附件")
private String enclosure;
/** 课程视频 */
@Excel(name = "课程视频")
private String video;
/** 答题合格分数*/
@Excel(name = "答题合格分数")
private Integer qualifiedNum;
/** 录入题数量 */
@Excel(name = "录入题数量")
private Integer topicNum;
/** 创建人 */
@Excel(name = "创建人")
private String createUser;
/** 0未删除 1已删除 */
@Excel(name = "0未删除 1已删除")
private Integer isDel;
/** 数据类型:0 培训,1 考试 */
@Excel(name = "数据类型:0 培训,1 考试")
private String dataKind;
/** 考试开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "考试开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date testStartTime;
/** 考试结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "考试结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date testEndTime;
/** 考试人员 */
@Excel(name = "考试人员")
private String testPersons;
/**
* 2023-10-09添加培训部门、主讲人
*/
/** 考试人员 */
@Excel(name = "培训部门id")
private String deptId;
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
@Excel(name = "培训部门名称")
private String deptName;
public String getDeptId() {
return deptId;
}
public void setDeptId(String deptId) {
this.deptId = deptId;
}
public String getZhujiang() {
return zhujiang;
}
public void setZhujiang(String zhujiang) {
this.zhujiang = zhujiang;
}
/** 考试人员 */
@Excel(name = "主讲人")
private String zhujiang;
private Integer personnelType;
private Integer duration;
/** 多选题分数*/
private Integer multipleChoiceScore;
/**单选题分数*/
private Integer singleChoiceScore;
/**判断题分数*/
private Integer judgmentScore;
/** 是否人脸认证:1是 2否 */
private String isVeriftyFace;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public Integer getMultipleChoiceScore() {
return multipleChoiceScore;
}
public void setMultipleChoiceScore(Integer multipleChoiceScore) {
this.multipleChoiceScore = multipleChoiceScore;
}
public Integer getSingleChoiceScore() {
return singleChoiceScore;
}
public void setSingleChoiceScore(Integer singleChoiceScore) {
this.singleChoiceScore = singleChoiceScore;
}
public Integer getJudgmentScore() {
return judgmentScore;
}
public void setJudgmentScore(Integer judgmentScore) {
this.judgmentScore = judgmentScore;
}
public Integer getDuration() {
return duration;
}
public void setDuration(Integer duration) {
this.duration = duration;
}
public String getPlanName() {
return planName;
}
public void setPlanName(String planName) {
this.planName = planName;
}
public Integer getPersonnelType() {
return personnelType;
}
public void setPersonnelType(Integer personnelType) {
this.personnelType = personnelType;
}
public void setCourseId(Long courseId)
{
this.courseId = courseId;
}
public Long getCourseId()
{
return courseId;
}
public void setCourseName(String courseName)
{
this.courseName = courseName;
}
public String getCourseName()
{
return courseName;
}
public void setCourseType(Long courseType)
{
this.courseType = courseType;
}
public Long getCourseType()
{
return courseType;
}
public void setCourseConent(String courseConent)
{
this.courseConent = courseConent;
}
public String getCourseConent()
{
return courseConent;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setReleaseTime(Date releaseTime)
{
this.releaseTime = releaseTime;
}
public Date getReleaseTime()
{
return releaseTime;
}
public void setEnclosure(String enclosure)
{
this.enclosure = enclosure;
}
public String getEnclosure()
{
return enclosure;
}
public void setVideo(String video)
{
this.video = video;
}
public String getVideo()
{
return video;
}
public void setQualifiedNum(Integer qualifiedNum)
{
this.qualifiedNum = qualifiedNum;
}
public Integer getQualifiedNum()
{
return qualifiedNum;
}
public void setTopicNum(Integer topicNum)
{
this.topicNum = topicNum;
}
public Integer getTopicNum()
{
return topicNum;
}
public void setCreateUser(String createUser)
{
this.createUser = createUser;
}
public String getCreateUser()
{
return createUser;
}
public void setIsDel(Integer isDel)
{
this.isDel = isDel;
}
public Integer getIsDel()
{
return isDel;
}
public void setDataKind(String dataKind)
{
this.dataKind = dataKind;
}
public String getDataKind()
{
return dataKind;
}
public void setTestStartTime(Date testStartTime)
{
this.testStartTime = testStartTime;
}
public Date getTestStartTime()
{
return testStartTime;
}
public void setTestEndTime(Date testEndTime)
{
this.testEndTime = testEndTime;
}
public Date getTestEndTime()
{
return testEndTime;
}
public void setTestPersons(String testPersons)
{
this.testPersons = testPersons;
}
public String getTestPersons()
{
return testPersons;
}
public String getIsVeriftyFace() {
return isVeriftyFace;
}
public void setIsVerfityFace(String isVeriftyFace) {
this.isVeriftyFace = isVeriftyFace;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("courseId", getCourseId())
.append("courseName", getCourseName())
.append("courseType", getCourseType())
.append("courseConent", getCourseConent())
.append("status", getStatus())
.append("releaseTime", getReleaseTime())
.append("enclosure", getEnclosure())
.append("video", getVideo())
.append("qualifiedNum", getQualifiedNum())
.append("topicNum", getTopicNum())
.append("createTime", getCreateTime())
.append("createUser", getCreateUser())
.append("isDel", getIsDel())
.append("dataKind", getDataKind())
.append("testStartTime", getTestStartTime())
.append("testEndTime", getTestEndTime())
.append("testPersons", getTestPersons())
.toString();
}
}
package com.zehong.system.domain.train;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* bank对象 t_train_course_bank
*
* @author zehong
* @date 2022-12-14
*/
public class TTrainCourseBank extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键id */
private Long bankId;
/** 所属部门 */
private Long deptId;
/** 题库名称 */
@Excel(name = "题库名称")
private String bankName;
/**下级题目数量*/
private String numberQuestions;
/** 是否删除 0未删除 1删除 */
private Integer isDel;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getNumberQuestions() {
return numberQuestions;
}
public void setNumberQuestions(String numberQuestions) {
this.numberQuestions = numberQuestions;
}
public void setBankId(Long bankId)
{
this.bankId = bankId;
}
public Long getBankId()
{
return bankId;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
public Long getDeptId()
{
return deptId;
}
public void setBankName(String bankName)
{
this.bankName = bankName;
}
public String getBankName()
{
return bankName;
}
public void setIsDel(Integer isDel)
{
this.isDel = isDel;
}
public Integer getIsDel()
{
return isDel;
}
@Override
public String toString() {
return "TTrainCourseBank{" +
"bankId=" + bankId +
", deptId=" + deptId +
", bankName='" + bankName + '\'' +
", numberQuestions='" + numberQuestions + '\'' +
", isDel=" + isDel +
'}';
}
}
package com.zehong.system.domain.train;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 培训课程题库对象 t_train_course_topic
*
* @author zehong
* @date 2022-09-19
*/
public class TTrainCourseTopic extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 题目id */
private Long topicId;
/** 所属课程id */
@Excel(name = "所属课程id")
private Long courseId;
/** 题目内容 */
@Excel(name = "题目内容")
private String topicTitle;
/** 题目选项(json) */
@Excel(name = "题目选项", readConverterExp = "j=son")
private String topicOption;
/** 答案 */
// @Excel(name = "答案")
// private Integer answer;
/** 答案 */
@Excel(name = "答案")
private String answer;
/** 题目类型 1单选 2多选 3判断 */
private Integer topicType;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public Integer getTopicType() {
return topicType;
}
public void setTopicType(Integer topicType) {
this.topicType = topicType;
}
public void setTopicId(Long topicId)
{
this.topicId = topicId;
}
public Long getTopicId()
{
return topicId;
}
public void setCourseId(Long courseId)
{
this.courseId = courseId;
}
public Long getCourseId()
{
return courseId;
}
public void setTopicTitle(String topicTitle)
{
this.topicTitle = topicTitle;
}
public String getTopicTitle()
{
return topicTitle;
}
public void setTopicOption(String topicOption)
{
this.topicOption = topicOption;
}
public String getTopicOption()
{
return topicOption;
}
public String getAnswer() {
return answer;
}
public void setAnswer(String answer) {
this.answer = answer;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("topicId", getTopicId())
.append("courseId", getCourseId())
.append("topicTitle", getTopicTitle())
.append("topicOption", getTopicOption())
.append("answer", getAnswer())
.append("createTime", getCreateTime())
.toString();
}
}
package com.zehong.system.domain.train;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import com.zehong.system.domain.vo.PlanPostVo;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.List;
/**
* 培训计划对象 t_train_plan
*
* @author zehong
* @date 2022-09-17
*/
public class TTrainPlan extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long planId;
/** 计划名称 */
@Excel(name = "计划名称")
private String planName;
private Integer personnelType;
/** 排序 */
@Excel(name = "排序")
private Integer sort;
/** 创建人 */
@Excel(name = "创建人")
private String createUser;
private List<PlanPostVo> postList;
public Integer getPersonnelType() {
return personnelType;
}
public void setPersonnelType(Integer personnelType) {
this.personnelType = personnelType;
}
public List<PlanPostVo> getPostList() {
return postList;
}
public void setPostList(List<PlanPostVo> postList) {
this.postList = postList;
}
public void setPlanId(Long planId)
{
this.planId = planId;
}
public Long getPlanId()
{
return planId;
}
public void setPlanName(String planName)
{
this.planName = planName;
}
public String getPlanName()
{
return planName;
}
public void setSort(Integer sort)
{
this.sort = sort;
}
public Integer getSort()
{
return sort;
}
public void setCreateUser(String createUser)
{
this.createUser = createUser;
}
public String getCreateUser()
{
return createUser;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("planId", getPlanId())
.append("planName", getPlanName())
.append("sort", getSort())
.append("createTime", getCreateTime())
.append("createUser", getCreateUser())
.toString();
}
}
package com.zehong.system.domain.train;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import java.util.Date;
/**
* 用户课程对象 t_train_user_course
*
* @author zehong
* @date 2022-09-19
*/
public class TTrainUserCourse extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 用户课程id */
private Long userCourseId;
/** 用户id */
private Long userId;
/** 课程id */
private Long courseId;
/**人员名称**/
@Excel(name = "考试人员")
private String staffName;
/** 创建人 */
private String createUser;
/**人员部门**/
@Excel(name = "所属部门")
private String deptName;
/** 最后一次考试时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "考试时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date examinationTime;
/** 最后一次考试结果(答对数量) */
@Excel(name = "得分")
private Integer examinationResult;
/** 0未学习 1未通过 2已通过 */
private Integer state;
/** 0未学习 1未通过 2已通过 */
@Excel(name = "考试结果")
private String states;
private Integer personnelType;
private Integer finishDuration;
private Integer trainState;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getStates() {
return states;
}
public void setStates(String states) {
this.states = states;
}
public Integer getFinishDuration() {
return finishDuration;
}
public void setFinishDuration(Integer finishDuration) {
this.finishDuration = finishDuration;
}
public Integer getTrainState() {
return trainState;
}
public void setTrainState(Integer trainState) {
this.trainState = trainState;
}
public Integer getPersonnelType() {
return personnelType;
}
public void setPersonnelType(Integer personnelType) {
this.personnelType = personnelType;
}
public void setUserCourseId(Long userCourseId)
{
this.userCourseId = userCourseId;
}
public Long getUserCourseId()
{
return userCourseId;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setCourseId(Long courseId)
{
this.courseId = courseId;
}
public Long getCourseId()
{
return courseId;
}
public void setState(Integer state)
{
this.state = state;
}
public Integer getState()
{
return state;
}
public void setExaminationTime(Date examinationTime)
{
this.examinationTime = examinationTime;
}
public Date getExaminationTime()
{
return examinationTime;
}
public void setExaminationResult(Integer examinationResult)
{
this.examinationResult = examinationResult;
}
public Integer getExaminationResult()
{
return examinationResult;
}
public void setCreateUser(String createUser)
{
this.createUser = createUser;
}
public String getCreateUser()
{
return createUser;
}
public String getStaffName() {
return staffName;
}
public void setStaffName(String staffName) {
this.staffName = staffName;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
@Override
public String toString() {
return "TTrainUserCourse{" +
"userCourseId=" + userCourseId +
", userId=" + userId +
", courseId=" + courseId +
", staffName='" + staffName + '\'' +
", createUser='" + createUser + '\'' +
", deptName='" + deptName + '\'' +
", examinationTime=" + examinationTime +
", examinationResult=" + examinationResult +
", state=" + state +
", states='" + states + '\'' +
", personnelType=" + personnelType +
", finishDuration=" + finishDuration +
", trainState=" + trainState +
'}';
}
}
package com.zehong.system.domain.vo;
import java.util.List;
/**
* @author geng
* 批量导入试题
*/
public class BatchTopicVo {
/**
* 所属考试id
*/
private Long courseId;
private List<TopicInfos> topicInfos;
public Long getCourseId() {
return courseId;
}
public void setCourseId(Long courseId) {
this.courseId = courseId;
}
public List<TopicInfos> getTopicInfos() {
return topicInfos;
}
public void setTopicInfos(List<TopicInfos> topicInfos) {
this.topicInfos = topicInfos;
}
/**
* @author geng
* 题库批量导入试题实体
*/
public static class TopicInfos{
/**
* 题库id
*/
private Long bankId;
/**
* 随机抽取题数量
*/
private int quan;
public Long getBankId() {
return bankId;
}
public void setBankId(Long bankId) {
this.bankId = bankId;
}
public int getQuan() {
return quan;
}
public void setQuan(int quan) {
this.quan = quan;
}
}
}
package com.zehong.system.domain.vo;
public class PlanPostVo {
private Long postId;
private String postName;
private boolean ischeck;
public Long getPostId() {
return postId;
}
public void setPostId(Long postId) {
this.postId = postId;
}
public String getPostName() {
return postName;
}
public void setPostName(String postName) {
this.postName = postName;
}
public boolean isIscheck() {
return ischeck;
}
public void setIscheck(boolean ischeck) {
this.ischeck = ischeck;
}
}
package com.zehong.system.domain.vo;
public class PlanVo {
private Long planId;
private String planName;
private Integer personnelType;
private Long[] postIds;
private String peopleList;
public Long getPlanId() {
return planId;
}
public void setPlanId(Long planId) {
this.planId = planId;
}
public String getPlanName() {
return planName;
}
public void setPlanName(String planName) {
this.planName = planName;
}
public Integer getPersonnelType() {
return personnelType;
}
public void setPersonnelType(Integer personnelType) {
this.personnelType = personnelType;
}
public Long[] getPostIds() {
return postIds;
}
public void setPostIds(Long[] postIds) {
this.postIds = postIds;
}
public String getPeopleList() {
return peopleList;
}
public void setPeopleList(String peopleList) {
this.peopleList = peopleList;
}
}
package com.zehong.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.core.domain.BaseEntity;
import java.util.Date;
/**
* 员工信息管理对象 t_staff
*
* @author zehong
* @date 2022-06-17
*/
public class TStaffVo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 员工id */
private Integer staffId;
/** 姓名 */
private String staffName;
/** 员工编号 */
private String staffCode;
/** 性别 */
private String sex;
/** 部门id */
private Integer deptId;
private String deptName;
/** 手机号码 */
private String phonenumber;
/** 岗位id */
private Integer postId;
private String postName;
/** 角色id */
private Integer roleId;
private String roleName;
/** 职称 */
private String positionalTitles;
/** 工种 */
private String profession;
/** 是否特殊作业人员 */
private String specialOperators;
/** 证书路径 */
private String certificateUrl;
/** 证书名称 */
private String certificateName;
/** 证书有效日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date effectiveDate;
/** 删除标志(0正常,1删除) */
private String isDel;
public Integer getStaffId() {
return staffId;
}
public void setStaffId(Integer staffId) {
this.staffId = staffId;
}
public String getStaffName() {
return staffName;
}
public void setStaffName(String staffName) {
this.staffName = staffName;
}
public String getStaffCode() {
return staffCode;
}
public void setStaffCode(String staffCode) {
this.staffCode = staffCode;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public Integer getDeptId() {
return deptId;
}
public void setDeptId(Integer deptId) {
this.deptId = deptId;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public String getPhonenumber() {
return phonenumber;
}
public void setPhonenumber(String phonenumber) {
this.phonenumber = phonenumber;
}
public Integer getPostId() {
return postId;
}
public void setPostId(Integer postId) {
this.postId = postId;
}
public String getPostName() {
return postName;
}
public void setPostName(String postName) {
this.postName = postName;
}
public Integer getRoleId() {
return roleId;
}
public void setRoleId(Integer roleId) {
this.roleId = roleId;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public String getPositionalTitles() {
return positionalTitles;
}
public void setPositionalTitles(String positionalTitles) {
this.positionalTitles = positionalTitles;
}
public String getProfession() {
return profession;
}
public void setProfession(String profession) {
this.profession = profession;
}
public String getSpecialOperators() {
return specialOperators;
}
public void setSpecialOperators(String specialOperators) {
this.specialOperators = specialOperators;
}
public String getCertificateUrl() {
return certificateUrl;
}
public void setCertificateUrl(String certificateUrl) {
this.certificateUrl = certificateUrl;
}
public String getCertificateName() {
return certificateName;
}
public void setCertificateName(String certificateName) {
this.certificateName = certificateName;
}
public Date getEffectiveDate() {
return effectiveDate;
}
public void setEffectiveDate(Date effectiveDate) {
this.effectiveDate = effectiveDate;
}
public String getIsDel() {
return isDel;
}
public void setIsDel(String isDel) {
this.isDel = isDel;
}
}
package com.zehong.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
public class UserCourseVo {
private Long userCourseId;
private Long courseId;
private String courseName;
private String courseType;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date releaseTime;
private Integer topicNum;
private Integer qualifiedNum;
private Integer state;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date examinationTime;
private Integer examinationResult;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String dataKind;
private Integer personnelType;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date testStartTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date testEndTime;
private Integer trainState;
/**总分*/
private Integer totalScore;
/**多选题分数*/
private Integer multipleChoiceScore;
/**判断题分数*/
private Integer judgmentScore;
/**单选题分数*/
private Integer singleChoiceScore;
/** 已完成时长*/
private Integer finishDuration;
private Integer isVeriftyFace;
public Long getUserCourseId() {
return userCourseId;
}
public void setUserCourseId(Long userCourseId) {
this.userCourseId = userCourseId;
}
public Long getCourseId() {
return courseId;
}
public void setCourseId(Long courseId) {
this.courseId = courseId;
}
public String getCourseName() {
return courseName;
}
public void setCourseName(String courseName) {
this.courseName = courseName;
}
public String getCourseType() {
return courseType;
}
public void setCourseType(String courseType) {
this.courseType = courseType;
}
public Date getReleaseTime() {
return releaseTime;
}
public void setReleaseTime(Date releaseTime) {
this.releaseTime = releaseTime;
}
public Integer getTopicNum() {
return topicNum;
}
public void setTopicNum(Integer topicNum) {
this.topicNum = topicNum;
}
public Integer getQualifiedNum() {
return qualifiedNum;
}
public void setQualifiedNum(Integer qualifiedNum) {
this.qualifiedNum = qualifiedNum;
}
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
public Date getExaminationTime() {
return examinationTime;
}
public void setExaminationTime(Date examinationTime) {
this.examinationTime = examinationTime;
}
public Integer getExaminationResult() {
return examinationResult;
}
public void setExaminationResult(Integer examinationResult) {
this.examinationResult = examinationResult;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getDataKind() {
return dataKind;
}
public void setDataKind(String dataKind) {
this.dataKind = dataKind;
}
public Integer getPersonnelType() {
return personnelType;
}
public void setPersonnelType(Integer personnelType) {
this.personnelType = personnelType;
}
public Date getTestStartTime() {
return testStartTime;
}
public void setTestStartTime(Date testStartTime) {
this.testStartTime = testStartTime;
}
public Date getTestEndTime() {
return testEndTime;
}
public void setTestEndTime(Date testEndTime) {
this.testEndTime = testEndTime;
}
public Integer getTrainState() {
return trainState;
}
public void setTrainState(Integer trainState) {
this.trainState = trainState;
}
public Integer getTotalScore() {
return totalScore;
}
public void setTotalScore(Integer totalScore) {
this.totalScore = totalScore;
}
public Integer getMultipleChoiceScore() {
return multipleChoiceScore;
}
public void setMultipleChoiceScore(Integer multipleChoiceScore) {
this.multipleChoiceScore = multipleChoiceScore;
}
public Integer getJudgmentScore() {
return judgmentScore;
}
public void setJudgmentScore(Integer judgmentScore) {
this.judgmentScore = judgmentScore;
}
public Integer getSingleChoiceScore() {
return singleChoiceScore;
}
public void setSingleChoiceScore(Integer singleChoiceScore) {
this.singleChoiceScore = singleChoiceScore;
}
public Integer getFinishDuration() {
return finishDuration;
}
public void setFinishDuration(Integer finishDuration) {
this.finishDuration = finishDuration;
}
public Integer getIsVeriftyFace() {
return isVeriftyFace;
}
public void setIsVeriftyFace(Integer isVeriftyFace) {
this.isVeriftyFace = isVeriftyFace;
}
}
package com.zehong.system.mapper.baseinfo;
import com.zehong.system.domain.baseinfo.TStaff;
import com.zehong.system.domain.form.TStaffForm;
import com.zehong.system.domain.vo.TStaffVo;
import java.util.List;
/**
* 员工信息管理Mapper接口
*
* @author zehong
* @date 2022-06-17
*/
public interface TStaffMapper
{
/**
* 获取员工编号
*
* @return 员工编号
*/
public String getStaffCode();
/**
* 查询员工信息管理
*
* @param staffId 员工信息管理ID
* @return 员工信息管理
*/
public TStaffVo selectTStaffById(Long staffId);
/**
* 查询员工信息管理列表
*
* @param tStaff 员工信息管理
* @return 员工信息管理集合
*/
public List<TStaffVo> selectTStaffList(TStaffForm tStaff);
public List<TStaffVo> allList(TStaffForm tStaff);
/**
* 新增员工信息管理
*
* @param tStaff 员工信息管理
* @return 结果
*/
public int insertTStaff(TStaff tStaff);
/**
* 修改员工信息管理
*
* @param tStaff 员工信息管理
* @return 结果
*/
public int updateTStaff(TStaff tStaff);
/**
* 删除员工信息管理
*
* @param staffId 员工信息管理ID
* @return 结果
*/
public int deleteTStaffById(Long staffId);
/**
* 批量删除员工信息管理
*
* @param staffIds 需要删除的数据ID
* @return 结果
*/
public int deleteTStaffByIds(Long[] staffIds);
}
package com.zehong.system.mapper.train;
import com.zehong.system.domain.train.TBankSubject;
import java.util.List;
/**
* 题库题目Mapper接口
*
* @author zehong
* @date 2022-12-15
*/
public interface TBankSubjectMapper
{
/**
* 查询题库题目
*
* @param subjectId 题库题目ID
* @return 题库题目
*/
public TBankSubject selectTBankSubjectById(Long subjectId);
/**
* 查询题库题目列表
*
* @param tBankSubject 题库题目
* @return 题库题目集合
*/
public List<TBankSubject> selectTBankSubjectList(TBankSubject tBankSubject);
/**
* 新增题库题目
*
* @param tBankSubject 题库题目
* @return 结果
*/
public int insertTBankSubject(TBankSubject tBankSubject);
/**
* 修改题库题目
*
* @param tBankSubject 题库题目
* @return 结果
*/
public int updateTBankSubject(TBankSubject tBankSubject);
/**
* 删除题库题目
*
* @param subjectId 题库题目ID
* @return 结果
*/
public int deleteTBankSubjectById(Long subjectId);
/**
* 批量删除题库题目
*
* @param subjectIds 需要删除的数据ID
* @return 结果
*/
public int deleteTBankSubjectByIds(Long[] subjectIds);
/**
* Excel导入
* @param list
*/
void insertBank(List<TBankSubject> list);
}
package com.zehong.system.mapper.train;
import com.zehong.system.domain.train.TTrainCourseBank;
import java.util.List;
/**
* bankMapper接口
*
* @author zehong
* @date 2022-12-14
*/
public interface TTrainCourseBankMapper
{
/**
* 查询bank
*
* @param bankId bankID
* @return bank
*/
public TTrainCourseBank selectTTrainCourseBankById(Long bankId);
/**
* 查询bank列表
*
* @param tTrainCourseBank bank
* @return bank集合
*/
public List<TTrainCourseBank> selectTTrainCourseBankList(TTrainCourseBank tTrainCourseBank);
/**
* 新增bank
*
* @param tTrainCourseBank bank
* @return 结果
*/
public int insertTTrainCourseBank(TTrainCourseBank tTrainCourseBank);
/**
* 修改bank
*
* @param tTrainCourseBank bank
* @return 结果
*/
public int updateTTrainCourseBank(TTrainCourseBank tTrainCourseBank);
/**
* 删除bank
*
* @param bankId bankID
* @return 结果
*/
public int deleteTTrainCourseBankById(Long bankId);
/**
* 批量删除bank
*
* @param bankIds 需要删除的数据ID
* @return 结果
*/
public int deleteTTrainCourseBankByIds(Long[] bankIds);
}
package com.zehong.system.mapper.train;
import com.zehong.system.domain.form.TStaffForm;
import com.zehong.system.domain.train.StatisticsTrainCourse;
import com.zehong.system.domain.train.TNews;
import com.zehong.system.domain.train.TTrainCourse;
import com.zehong.system.domain.vo.UserCourseVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 培训课程Mapper接口
*
* @author zehong
* @date 2022-09-19
*/
public interface TTrainCourseMapper
{
/**
* 查询培训课程
*
* @param courseId 培训课程ID
* @return 培训课程
*/
public TTrainCourse selectTTrainCourseById(Long courseId);
/**
* 查询培训课程列表
*
* @param tTrainCourse 培训课程
* @return 培训课程集合
*/
public List<TTrainCourse> selectTTrainCourseList(TTrainCourse tTrainCourse);
/**
* 新增培训课程
*
* @param tTrainCourse 培训课程
* @return 结果
*/
public int insertTTrainCourse(TTrainCourse tTrainCourse);
/**
* 修改培训课程
*
* @param tTrainCourse 培训课程
* @return 结果
*/
public int updateTTrainCourse(TTrainCourse tTrainCourse);
/**
* 删除培训课程
*
* @param courseId 培训课程ID
* @return 结果
*/
public int deleteTTrainCourseById(Long courseId);
/**
* 批量删除培训课程
*
* @param courseIds 需要删除的数据ID
* @return 结果
*/
public int deleteTTrainCourseByIds(Long[] courseIds);
/**
* 批量新增用户课程
* @param courseId
* @param userIds
* @return
*/
public int insertUserCourse(@Param("courseId") Long courseId, @Param("userIds") List<String> userIds, @Param("personnelType") Integer personnelType);
/**
* 用户课程表
* @param userId
* @return
*/
public List<UserCourseVo> userCourseList(@Param("userId") Long userId, @Param("type") Integer type, @Param("personnelType") Integer personnelType);
/**
* 考试统计接口
* @param statisticsTrainCourse 统计实体
* @return List<StatisticsTrainCourse>
*/
List<StatisticsTrainCourse> statisticsTrainCourse(StatisticsTrainCourse statisticsTrainCourse);
List<UserCourseVo> userCourseLists(TStaffForm tStaff);
/**
* 消息添加
* @param tNews
*/
void insertNews(TNews tNews);
/**
* 手机端 最新消息查询
* @param recipientId
* @return
*/
TNews selectLatestNews(Long recipientId);
/**
* 手机端 查询历史消息
* @param recipientId
* @return
*/
List<TNews> historicalMessages(Long recipientId);
/**
* 修改消息状态为已读
* @param newsId
* @return
*/
int updateReadStatus(Long newsId);
/**
* 查询接收人姓名
*/
String selectRecipient(Long userid);
}
package com.zehong.system.mapper.train;
import com.zehong.system.domain.train.TTrainCourseTopic;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 培训课程题库Mapper接口
*
* @author zehong
* @date 2022-09-19
*/
public interface TTrainCourseTopicMapper
{
/**
* 查询培训课程题库
*
* @param topicId 培训课程题库ID
* @return 培训课程题库
*/
public TTrainCourseTopic selectTTrainCourseTopicById(Long topicId);
/**
* 查询培训课程题库列表
*
* @param tTrainCourseTopic 培训课程题库
* @return 培训课程题库集合
*/
public List<TTrainCourseTopic> selectTTrainCourseTopicList(TTrainCourseTopic tTrainCourseTopic);
public List<TTrainCourseTopic> selectCourseTopicList(@Param("courseId") Long courseId);
/**
* 新增培训课程题库
*
* @param tTrainCourseTopic 培训课程题库
* @return 结果
*/
public int insertTTrainCourseTopic(TTrainCourseTopic tTrainCourseTopic);
/**
* 修改培训课程题库
*
* @param tTrainCourseTopic 培训课程题库
* @return 结果
*/
public int updateTTrainCourseTopic(TTrainCourseTopic tTrainCourseTopic);
/**
* 删除培训课程题库
*
* @param topicId 培训课程题库ID
* @return 结果
*/
public int deleteTTrainCourseTopicById(Long topicId);
/**
* 批量删除培训课程题库
*
* @param topicIds 需要删除的数据ID
* @return 结果
*/
public int deleteTTrainCourseTopicByIds(Long[] topicIds);
/**
* 批量新增
* @param topics 试题试题
* @return
*/
int batchInsertTTrainCourseTopic(List<TTrainCourseTopic> topics);
}
package com.zehong.system.mapper.train;
import com.zehong.system.domain.train.TTrainPlan;
import com.zehong.system.domain.vo.PlanPostVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 培训计划Mapper接口
*
* @author zehong
* @date 2022-09-17
*/
public interface TTrainPlanMapper
{
/**
* 查询培训计划
*
* @param planId 培训计划ID
* @return 培训计划
*/
public TTrainPlan selectTTrainPlanById(Long planId);
/**
* 查询培训计划列表
*
* @param tTrainPlan 培训计划
* @return 培训计划集合
*/
public List<TTrainPlan> selectTTrainPlanList(TTrainPlan tTrainPlan);
/**
* 查询培训计划包含的岗位信息
* @param planId
* @return
*/
public List<PlanPostVo> selectTrainPostByPlanId(Long planId);
/**
* 新增培训计划
*
* @param tTrainPlan 培训计划
* @return 结果
*/
public int insertTTrainPlan(TTrainPlan tTrainPlan);
/**
* 批量添加 培训计划
* @param planId
* @param postIds
* @return
*/
public int insetsPlanPost(@Param("planId") Long planId, @Param("list") List<Map<String, Object>> list);
/**
* 删除计划职位
* @param planId
* @return
*/
public int deletePlanPost(@Param("planId") Long planId);
/**
* 修改培训计划
*
* @param tTrainPlan 培训计划
* @return 结果
*/
public int updateTTrainPlan(TTrainPlan tTrainPlan);
/**
* 删除培训计划
*
* @param planId 培训计划ID
* @return 结果
*/
public int deleteTTrainPlanById(Long planId);
/**
* 批量删除培训计划
*
* @param planIds 需要删除的数据ID
* @return 结果
*/
public int deleteTTrainPlanByIds(Long[] planIds);
/**
* 查询该计划涉及所有人id
* @param planId
* @return
*/
public List<String> selectAlluserByplanId(Long planId);
}
package com.zehong.system.mapper.train;
import com.zehong.system.domain.train.TTrainUserCourse;
import java.util.List;
/**
* 用户课程Mapper接口
*
* @author zehong
* @date 2022-09-19
*/
public interface TTrainUserCourseMapper
{
/**
* 查询用户课程
*
* @param userCourseId 用户课程ID
* @return 用户课程
*/
public TTrainUserCourse selectTTrainUserCourseById(Long userCourseId);
/**
* 查询用户课程列表
*
* @param tTrainUserCourse 用户课程
* @return 用户课程集合
*/
public List<TTrainUserCourse> selectTTrainUserCourseList(TTrainUserCourse tTrainUserCourse);
/**
* 新增用户课程
*
* @param tTrainUserCourse 用户课程
* @return 结果
*/
public int insertTTrainUserCourse(TTrainUserCourse tTrainUserCourse);
/**
* 修改用户课程
*
* @param tTrainUserCourse 用户课程
* @return 结果
*/
public int updateTTrainUserCourse(TTrainUserCourse tTrainUserCourse);
/**
* 删除用户课程
*
* @param userCourseId 用户课程ID
* @return 结果
*/
public int deleteTTrainUserCourseById(Long userCourseId);
/**
* 批量删除用户课程
*
* @param userCourseIds 需要删除的数据ID
* @return 结果
*/
public int deleteTTrainUserCourseByIds(Long[] userCourseIds);
/**
* 根据考试查询人员考试详情
* @param courseId 考试id
* @return List<TTrainUserCourse>
*/
List<TTrainUserCourse> testPersonDetailByCourseId(Long courseId);
/**
* 导出所有考试详细数据项
* @param courseId
* @return
*/
List<TTrainUserCourse> examDetails(Long courseId);
}
package com.zehong.system.service.baseinfo;
import com.zehong.system.domain.baseinfo.TStaff;
import com.zehong.system.domain.form.TStaffForm;
import com.zehong.system.domain.vo.TStaffVo;
import java.util.List;
/**
* 员工信息管理Service接口
*
* @author zehong
* @date 2022-06-17
*/
public interface ITStaffService
{
/**
* 查询员工信息管理
*
* @param staffId 员工信息管理ID
* @return 员工信息管理
*/
public TStaffVo selectTStaffById(Long staffId);
/**
* 查询员工信息管理列表
*
* @param tStaff 员工信息管理
* @return 员工信息管理集合
*/
public List<TStaffVo> selectTStaffList(TStaffForm tStaff);
public List<TStaffVo> allList(TStaffForm tStaff);
/**
* 新增员工信息管理
*
* @param tStaff 员工信息管理
* @return 结果
*/
public int insertTStaff(TStaff tStaff);
/**
* 修改员工信息管理
*
* @param tStaff 员工信息管理
* @return 结果
*/
public int updateTStaff(TStaff tStaff);
/**
* 批量删除员工信息管理
*
* @param staffIds 需要删除的员工信息管理ID
* @return 结果
*/
public int deleteTStaffByIds(Long[] staffIds);
/**
* 删除员工信息管理信息
*
* @param staffId 员工信息管理ID
* @return 结果
*/
public int deleteTStaffById(Long staffId);
}
package com.zehong.system.service.impl.baseinfo;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.SysUserRole;
import com.zehong.system.domain.baseinfo.TStaff;
import com.zehong.system.domain.form.TStaffForm;
import com.zehong.system.domain.vo.TStaffVo;
import com.zehong.system.mapper.SysUserRoleMapper;
import com.zehong.system.mapper.baseinfo.TStaffMapper;
import com.zehong.system.service.baseinfo.ITStaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* 员工信息管理Service业务层处理
*
* @author zehong
* @date 2022-06-17
*/
@Service
public class TStaffServiceImpl implements ITStaffService
{
@Autowired
private TStaffMapper tStaffMapper;
@Autowired
private SysUserRoleMapper userRoleMapper;
/**
* 查询员工信息管理
*
* @param staffId 员工信息管理ID
* @return 员工信息管理
*/
@Override
public TStaffVo selectTStaffById(Long staffId)
{
return tStaffMapper.selectTStaffById(staffId);
}
/**
* 查询员工信息管理列表
*
* @param tStaff 员工信息管理
* @return 员工信息管理
*/
@Override
public List<TStaffVo> selectTStaffList(TStaffForm tStaff)
{
return tStaffMapper.selectTStaffList(tStaff);
}
@Override
public List<TStaffVo> allList(TStaffForm tStaff)
{
return tStaffMapper.allList(tStaff);
}
/**
* 新增员工信息管理
*
* @param tStaff 员工信息管理
* @return 结果
*/
@Override
public int insertTStaff(TStaff tStaff)
{
String staffCode = tStaffMapper.getStaffCode();
tStaff.setStaffCode(staffCode);
tStaff.setCreateTime(DateUtils.getNowDate());
tStaffMapper.insertTStaff(tStaff);
// 新增用户与角色管理
insertUserRole(tStaff);
return tStaff.getStaffId();
}
/**
* 修改员工信息管理
*
* @param tStaff 员工信息管理
* @return 结果
*/
@Override
public int updateTStaff(TStaff tStaff)
{
// 删除用户与角色关联
userRoleMapper.deleteUserRoleByUserId(Long.valueOf(tStaff.getStaffId()));
// 新增用户与角色管理
insertUserRole(tStaff);
tStaff.setUpdateTime(DateUtils.getNowDate());
return tStaffMapper.updateTStaff(tStaff);
}
/**
* 批量删除员工信息管理
*
* @param staffIds 需要删除的员工信息管理ID
* @return 结果
*/
@Override
public int deleteTStaffByIds(Long[] staffIds)
{
return tStaffMapper.deleteTStaffByIds(staffIds);
}
/**
* 删除员工信息管理信息
*
* @param staffId 员工信息管理ID
* @return 结果
*/
@Override
public int deleteTStaffById(Long staffId)
{
return tStaffMapper.deleteTStaffById(staffId);
}
/**
* 新增用户角色信息
*
* @param user 用户对象
*/
public void insertUserRole(TStaff user)
{
Long[] roles = user.getRoleIds();
if (StringUtils.isNotNull(roles))
{
// 新增用户与角色管理
List<SysUserRole> list = new ArrayList<SysUserRole>();
for (Long roleId : roles)
{
SysUserRole ur = new SysUserRole();
ur.setUserId(Long.valueOf(user.getStaffId()));
ur.setRoleId(roleId);
list.add(ur);
}
if (list.size() > 0)
{
userRoleMapper.batchUserRole(list);
}
}
}
}
package com.zehong.system.service.impl.train;
import com.zehong.common.exception.CustomException;
import com.zehong.system.domain.train.TBankSubject;
import com.zehong.system.mapper.train.TBankSubjectMapper;
import com.zehong.system.service.train.ITBankSubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.util.List;
/**
* 题库题目Service业务层处理
*
* @author zehong
* @date 2022-12-15
*/
@Service
public class TBankSubjectServiceImpl implements ITBankSubjectService
{
@Autowired
private TBankSubjectMapper tBankSubjectMapper;
/**
* 查询题库题目
*
* @param subjectId 题库题目ID
* @return 题库题目
*/
@Override
public TBankSubject selectTBankSubjectById(Long subjectId)
{
return tBankSubjectMapper.selectTBankSubjectById(subjectId);
}
/**
* 查询题库题目列表
*
* @param tBankSubject 题库题目
* @return 题库题目
*/
@Override
public List<TBankSubject> selectTBankSubjectList(TBankSubject tBankSubject)
{
return tBankSubjectMapper.selectTBankSubjectList(tBankSubject);
}
/**
* 新增题库题目
*
* @param tBankSubject 题库题目
* @return 结果
*/
@Override
public int insertTBankSubject(TBankSubject tBankSubject)
{
return tBankSubjectMapper.insertTBankSubject(tBankSubject);
}
/**
* 修改题库题目
*
* @param tBankSubject 题库题目
* @return 结果
*/
@Override
public int updateTBankSubject(TBankSubject tBankSubject)
{
return tBankSubjectMapper.updateTBankSubject(tBankSubject);
}
/**
* 批量删除题库题目
*
* @param subjectIds 需要删除的题库题目ID
* @return 结果
*/
@Override
public int deleteTBankSubjectByIds(Long[] subjectIds)
{
return tBankSubjectMapper.deleteTBankSubjectByIds(subjectIds);
}
/**
* 删除题库题目信息
*
* @param subjectId 题库题目ID
* @return 结果
*/
@Override
public int deleteTBankSubjectById(Long subjectId)
{
return tBankSubjectMapper.deleteTBankSubjectById(subjectId);
}
/**
* 题目信息导入
* @param
* @param updateSupport
* @return
*/
@Override
public String importDevice(MultipartFile file, boolean updateSupport) throws IOException {
int successNum = 0;
int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
//文件输入流
// InputStream in=file.getInputStream();
//调用方法进行读取
//吧service直接注入进来为了后面能使用
//因为在listener中不能注入service所以在这个serviceiimpl中,通过listener使service注入进去,为了在listener中能够使用service中的发方法save/
// for (TBankSubject device : userList)
// {
// try
// {
// System.out.println(device);
// }
// catch (Exception e)
// {
// failureNum++;
// String msg = "<br/>" + failureNum + "、设备 " + device.getTopicOption() + "题目" + " 导入失败:";
// failureMsg.append(msg + e.getMessage());
//
// }
// }
if (failureNum > 0)
{
failureMsg.insert(0, "导入完成,共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new CustomException(failureMsg.toString());
}
else
{
successMsg.insert(0, "数据已全部导入成功!共 " + successNum + " 条");
}
return successMsg.toString();
}
/**
* Excel导入
* @param list
*/
@Override
public void insertBank(List<TBankSubject> list) {
tBankSubjectMapper.insertBank(list);
}
}
package com.zehong.system.service.impl.train;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.train.TTrainCourseBank;
import com.zehong.system.mapper.train.TTrainCourseBankMapper;
import com.zehong.system.service.train.ITTrainCourseBankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* bankService业务层处理
*
* @author zehong
* @date 2022-12-14
*/
@Service
public class TTrainCourseBankServiceImpl implements ITTrainCourseBankService
{
@Autowired
private TTrainCourseBankMapper tTrainCourseBankMapper;
/**
* 查询bank
*
* @param bankId bankID
* @return bank
*/
@Override
public TTrainCourseBank selectTTrainCourseBankById(Long bankId)
{
return tTrainCourseBankMapper.selectTTrainCourseBankById(bankId);
}
/**
* 查询bank列表
*
* @param tTrainCourseBank bank
* @return bank
*/
@Override
public List<TTrainCourseBank> selectTTrainCourseBankList(TTrainCourseBank tTrainCourseBank)
{
return tTrainCourseBankMapper.selectTTrainCourseBankList(tTrainCourseBank);
}
/**
* 新增bank
*
* @param tTrainCourseBank bank
* @return 结果
*/
@Override
public int insertTTrainCourseBank(TTrainCourseBank tTrainCourseBank)
{
tTrainCourseBank.setCreateTime(DateUtils.getNowDate());
return tTrainCourseBankMapper.insertTTrainCourseBank(tTrainCourseBank);
}
/**
* 修改bank
*
* @param tTrainCourseBank bank
* @return 结果
*/
@Override
public int updateTTrainCourseBank(TTrainCourseBank tTrainCourseBank)
{
tTrainCourseBank.setUpdateTime(DateUtils.getNowDate());
return tTrainCourseBankMapper.updateTTrainCourseBank(tTrainCourseBank);
}
/**
* 批量删除bank
*
* @param bankIds 需要删除的bankID
* @return 结果
*/
@Override
public int deleteTTrainCourseBankByIds(Long[] bankIds)
{
return tTrainCourseBankMapper.deleteTTrainCourseBankByIds(bankIds);
}
/**
* 删除bank信息
*
* @param bankId bankID
* @return 结果
*/
@Override
public int deleteTTrainCourseBankById(Long bankId)
{
return tTrainCourseBankMapper.deleteTTrainCourseBankById(bankId);
}
}
package com.zehong.system.service.impl.train;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.train.TTrainPlan;
import com.zehong.system.domain.vo.PlanPostVo;
import com.zehong.system.mapper.train.TTrainPlanMapper;
import com.zehong.system.service.train.ITTrainPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
* 培训计划Service业务层处理
*
* @author zehong
* @date 2022-09-17
*/
@Service
public class TTrainPlanServiceImpl implements ITTrainPlanService
{
@Autowired
private TTrainPlanMapper tTrainPlanMapper;
/**
* 查询培训计划
*
* @param planId 培训计划ID
* @return 培训计划
*/
@Override
public TTrainPlan selectTTrainPlanById(Long planId)
{
return tTrainPlanMapper.selectTTrainPlanById(planId);
}
/**
* 查询培训计划列表
*
* @param tTrainPlan 培训计划
* @return 培训计划
*/
@Override
public List<TTrainPlan> selectTTrainPlanList(TTrainPlan tTrainPlan)
{
List<TTrainPlan> list = tTrainPlanMapper.selectTTrainPlanList(tTrainPlan);
for(TTrainPlan t : list){
List<PlanPostVo> mapList = tTrainPlanMapper.selectTrainPostByPlanId(t.getPlanId());
t.setPostList(mapList);
}
return list;
}
public List<TTrainPlan> selectTTrainPlanDownList(){
return tTrainPlanMapper.selectTTrainPlanList(null);
}
/**
* 新增培训计划
*
* @param tTrainPlan 培训计划
* @return 结果
*/
@Override
@Transactional
public Long insertTTrainPlan(TTrainPlan tTrainPlan, List<Map<String,Object>> list)
{
tTrainPlan.setCreateTime(DateUtils.getNowDate());
int a = tTrainPlanMapper.insertTTrainPlan(tTrainPlan);
tTrainPlanMapper.insetsPlanPost(tTrainPlan.getPlanId(),list);
return tTrainPlan.getPlanId();
}
/**
* 修改培训计划
*
* @param tTrainPlan 培训计划
* @return 结果
*/
@Override
@Transactional
public int updateTTrainPlan(TTrainPlan tTrainPlan, List<Map<String,Object>> list)
{
int a = tTrainPlanMapper.updateTTrainPlan(tTrainPlan);
tTrainPlanMapper.deletePlanPost(tTrainPlan.getPlanId());
tTrainPlanMapper.insetsPlanPost(tTrainPlan.getPlanId(),list);
return a;
}
/**
* 批量删除培训计划
*
* @param planIds 需要删除的培训计划ID
* @return 结果
*/
@Override
public int deleteTTrainPlanByIds(Long[] planIds)
{
return tTrainPlanMapper.deleteTTrainPlanByIds(planIds);
}
/**
* 删除培训计划信息
*
* @param planId 培训计划ID
* @return 结果
*/
@Override
public int deleteTTrainPlanById(Long planId)
{
int a = tTrainPlanMapper.deleteTTrainPlanById(planId);
tTrainPlanMapper.deletePlanPost(planId);
return a;
}
}
......@@ -39,7 +39,7 @@
"clipboard": "2.0.6",
"core-js": "^3.19.1",
"echarts": "4.9.0",
"element-ui": "2.15.0",
"element-ui": "^2.15.10",
"file-saver": "2.0.4",
"fuse.js": "6.4.3",
"highlight.js": "9.18.5",
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -189,3 +189,12 @@ aside {
.multiselect--active {
z-index: 1000 !important;
}
.flex{
display: flex;
}
.all-flex-h {
display: flex;
flex-direction: column;
}
This diff is collapsed.
This diff is collapsed.
......@@ -14,5 +14,6 @@ const getters = {
topbarRouters:state => state.permission.topbarRouters,
defaultRoutes:state => state.permission.defaultRoutes,
sidebarRouters:state => state.permission.sidebarRouters,
courseOptions:state=> state.edu.courseOptions,
}
export default getters
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment