Browse Source

增加:会议记录、演练记录、培训记录

zhongwei
ty 8 months ago
parent
commit
6ce757c8de
  1. 49
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/ConferenceRecordVO.java
  2. 54
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/RehearsalRecordlVO.java
  3. 51
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TrainRecordVO.java
  4. 5
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java
  5. 5
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/RehearsalController.java
  6. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java
  7. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IConferenceRecordService.java
  8. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IRehearsalRecordService.java
  9. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITrainRecordService.java
  10. 26
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferenceRecordServiceImpl.java
  11. 27
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalRecordServiceImpl.java
  12. 22
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainRecordServiceImpl.java
  13. 4
      hzims-service/safeproduct/src/main/resources/db/3.0.0.sql.1

49
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/ConferenceRecordVO.java

@ -0,0 +1,49 @@
package com.hnac.hzims.safeproduct.vo;
import cn.afterturn.easypoi.entity.ImageEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* @author liwen
* @date 2024-01-15
*/
@Data
@ApiModel(value = "会议记录表VO类")
public class ConferenceRecordVO {
@ApiModelProperty("编码")
private String code;
@ApiModelProperty("单位")
private String unit;
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty("会议计划开始时间")
private Date scheduledStartTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@ApiModelProperty("会议实际开始时间")
private Date actualStartTime;
@ApiModelProperty("会议地点")
private String location;
@ApiModelProperty("主持人")
private String host;
@ApiModelProperty("会议方式")
private String conferenceMethod;
@ApiModelProperty("会议主题")
private String theme;
@ApiModelProperty("会议状态")
private String conferenceStatus;
}

54
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/RehearsalRecordlVO.java

@ -0,0 +1,54 @@
package com.hnac.hzims.safeproduct.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @author liwen
* @date 2024-01-15
*/
@Data
@ApiModel(value = "演练记录表VO类")
public class RehearsalRecordlVO {
@ApiModelProperty("编码")
private String code;
@ApiModelProperty("单位")
private String unit;
@ApiModelProperty("演练科目")
private String subject;
@ApiModelProperty("计划演练时间")
private String planTime;
@ApiModelProperty("参演人员")
private String peopleName;
@ApiModelProperty("参演人员")
private String peopleNum;
@ApiModelProperty("演练地点")
private String location;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@ApiModelProperty("演练实际开始时间")
private Date actualStartTime;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
@ApiModelProperty("演练实际结束时间")
private Date actualEndTime;
@ApiModelProperty("演练状态")
private String rehearsalStatus;
}

51
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TrainRecordVO.java

@ -0,0 +1,51 @@
package com.hnac.hzims.safeproduct.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author liwen
* @date 2024-01-15
*/
@Data
@ApiModel(value = "培训记录表VO类")
public class TrainRecordVO {
@JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty("计划培训时间")
private Date scheduledStartTime;
@ApiModelProperty("单位")
private String unit;
@ApiModelProperty("培训地点")
private String location;
@ApiModelProperty("培训方式")
private String trainMethod;
@ApiModelProperty("培训讲师")
private String teacher;
@ApiModelProperty("培训课程")
private String lesson;
@ApiModelProperty("实际培训结束时间")
private Date actualEndTime;
@ApiModelProperty("关联考试:0-否,1-是")
private Integer isTest;
@ApiModelProperty("培训状态")
private String trainStatus;
}

5
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java

@ -7,6 +7,7 @@ import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity;
import com.hnac.hzims.safeproduct.service.IConferencePlanService;
import com.hnac.hzims.safeproduct.service.IConferenceRecordService;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -115,8 +116,8 @@ public class ConferenceController extends BladeController {
})
@ApiOperation(value = "会议记录分页")
@ApiOperationSupport(order = 10)
public R<IPage<ConferenceRecordEntity>> recordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<ConferenceRecordEntity> page = conferenceRecordService.recordPage(param, query);
public R<IPage<ConferenceRecordVO>> recordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<ConferenceRecordVO> page = conferenceRecordService.recordPage(param, query);
return R.data(page);
}

5
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/RehearsalController.java

@ -8,6 +8,7 @@ import com.hnac.hzims.safeproduct.service.IRehearsalPlanService;
import com.hnac.hzims.safeproduct.service.IRehearsalRecordService;
import com.hnac.hzims.safeproduct.vo.RehearsalRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.RehearsalMonthVO;
import com.hnac.hzims.safeproduct.vo.RehearsalRecordlVO;
import com.hnac.hzims.safeproduct.vo.RehearsalYearVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@ -117,8 +118,8 @@ public class RehearsalController extends BladeController {
})
@ApiOperation(value = "演练记录分页")
@ApiOperationSupport(order = 10)
public R<IPage<RehearsalRecordEntity>> rehearsalRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<RehearsalRecordEntity> page = rehearsalRecordService.rehearsalRecordPage(param, query);
public R<IPage<RehearsalRecordlVO>> rehearsalRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<RehearsalRecordlVO> page = rehearsalRecordService.rehearsalRecordPage(param, query);
return R.data(page);
}

4
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java

@ -127,8 +127,8 @@ public class TrainController extends BladeController {
})
@ApiOperation(value = "培训记录分页")
@ApiOperationSupport(order = 10)
public R<IPage<TrainRecordEntity>> trainRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<TrainRecordEntity> page = trainRecordService.trainRecordPage(param, query);
public R<IPage<TrainRecordVO>> trainRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<TrainRecordVO> page = trainRecordService.trainRecordPage(param, query);
return R.data(page);
}

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IConferenceRecordService.java

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordVO;
import org.springblade.core.mp.support.Query;
import javax.servlet.http.HttpServletResponse;
@ -51,5 +52,5 @@ public interface IConferenceRecordService extends IService<ConferenceRecordEntit
* @param query 分页类
* @return 会议记录数据
*/
IPage<ConferenceRecordEntity> recordPage(Map<String, Object> param, Query query);
IPage<ConferenceRecordVO> recordPage(Map<String, Object> param, Query query);
}

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IRehearsalRecordService.java

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity;
import com.hnac.hzims.safeproduct.vo.RehearsalRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.RehearsalRecordlVO;
import org.springblade.core.mp.support.Query;
import javax.servlet.http.HttpServletResponse;
@ -58,5 +59,5 @@ public interface IRehearsalRecordService extends IService<RehearsalRecordEntity>
* @param query 分页类
* @return 演练记录数据
*/
IPage<RehearsalRecordEntity> rehearsalRecordPage(Map<String, Object> param, Query query);
IPage<RehearsalRecordlVO> rehearsalRecordPage(Map<String, Object> param, Query query);
}

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ITrainRecordService.java

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.safeproduct.dto.TrainRecordDTO;
import com.hnac.hzims.safeproduct.entity.TrainRecordEntity;
import com.hnac.hzims.safeproduct.vo.TrainRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.TrainRecordVO;
import org.springblade.core.mp.support.Query;
import javax.servlet.http.HttpServletResponse;
@ -74,5 +75,5 @@ public interface ITrainRecordService extends IService<TrainRecordEntity> {
* @param query 分页类
* @return 培训记录数据
*/
IPage<TrainRecordEntity> trainRecordPage(Map<String, Object> param, Query query);
IPage<TrainRecordVO> trainRecordPage(Map<String, Object> param, Query query);
}

26
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferenceRecordServiceImpl.java

@ -5,6 +5,7 @@ import cn.hutool.core.date.DatePattern;
import com.alibaba.excel.util.CollectionUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.common.logs.utils.StringUtils;
import com.hnac.hzims.common.utils.Condition;
@ -19,16 +20,15 @@ import com.hnac.hzims.safeproduct.service.IConferenceRecordService;
import com.hnac.hzims.safeproduct.utils.BaseUtil;
import com.hnac.hzims.safeproduct.utils.TimeUtils;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordVO;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.BeanUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -153,7 +153,7 @@ public class ConferenceRecordServiceImpl extends ServiceImpl<ConferenceRecordMap
* 会议记录分页
*/
@Override
public IPage<ConferenceRecordEntity> recordPage(Map<String, Object> param, Query query) {
public IPage<ConferenceRecordVO> recordPage(Map<String, Object> param, Query query) {
QueryWrapper<ConferenceRecordEntity> queryWrapper = new QueryWrapper<>();
String conferencePlanId = String.valueOf(param.get("conferencePlanId"));
String startTime = String.valueOf(param.get("actualStartTime"));
@ -168,7 +168,23 @@ public class ConferenceRecordServiceImpl extends ServiceImpl<ConferenceRecordMap
queryWrapper.lambda().le(ConferenceRecordEntity::getActualEndTime, endTime);
}
queryWrapper.lambda().orderByDesc(ConferenceRecordEntity::getCreateTime);
return this.page(Condition.getPage(query), queryWrapper);
IPage<ConferenceRecordEntity> page = this.page(Condition.getPage(query), queryWrapper);
IPage<ConferenceRecordVO> res=new Page<>();
res.setSize(page.getSize());
res.setTotal(page.getTotal());
res.setPages(page.getPages());
List<ConferenceRecordEntity> records = page.getRecords();
List<ConferenceRecordVO> recordlVOS =new ArrayList<>();
for (ConferenceRecordEntity record : records) {
ConferenceRecordVO trainRecordVO = new ConferenceRecordVO();
Long planId = record.getConferencePlanId();
ConferencePlanEntity conferencePlanEntity = conferencePlanMapper.selectById(planId);
BeanUtil.copy(conferencePlanEntity,trainRecordVO);
trainRecordVO.setActualStartTime(record.getActualStartTime());
recordlVOS.add(trainRecordVO);
}
res.setRecords(recordlVOS);
return res;
}
/**

27
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalRecordServiceImpl.java

@ -5,6 +5,7 @@ import cn.hutool.core.date.DatePattern;
import com.alibaba.excel.util.CollectionUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.common.logs.utils.StringUtils;
import com.hnac.hzims.common.utils.Condition;
@ -19,8 +20,10 @@ import com.hnac.hzims.safeproduct.service.IRehearsalRecordService;
import com.hnac.hzims.safeproduct.utils.BaseUtil;
import com.hnac.hzims.safeproduct.utils.TimeUtils;
import com.hnac.hzims.safeproduct.vo.RehearsalRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.RehearsalRecordlVO;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.utils.BeanUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -193,7 +196,7 @@ public class RehearsalRecordServiceImpl extends ServiceImpl<RehearsalRecordMappe
* 演练记录分页
*/
@Override
public IPage<RehearsalRecordEntity> rehearsalRecordPage(Map<String, Object> param, Query query) {
public IPage<RehearsalRecordlVO> rehearsalRecordPage(Map<String, Object> param, Query query) {
QueryWrapper<RehearsalRecordEntity> queryWrapper = new QueryWrapper<>();
String rehearsalPlanId = String.valueOf(param.get("rehearsalPlanId"));
String actualStartTime = String.valueOf(param.get("actualStartTime"));
@ -208,6 +211,26 @@ public class RehearsalRecordServiceImpl extends ServiceImpl<RehearsalRecordMappe
queryWrapper.lambda().le(RehearsalRecordEntity::getActualEndTime, actualEndTime);
}
queryWrapper.lambda().orderByDesc(RehearsalRecordEntity::getCreateTime);
return this.page(Condition.getPage(query), queryWrapper);
IPage<RehearsalRecordEntity> rehearsalRecordList = this.page(Condition.getPage(query), queryWrapper);
IPage<RehearsalRecordlVO> res=new Page<>();
res.setSize(rehearsalRecordList.getSize());
res.setTotal(rehearsalRecordList.getTotal());
res.setPages(rehearsalRecordList.getPages());
List<RehearsalRecordEntity> records = rehearsalRecordList.getRecords();
List<RehearsalRecordlVO> recordlVOS =new ArrayList<>();
for (RehearsalRecordEntity record : records) {
RehearsalRecordlVO rehearsalRecordlVO = new RehearsalRecordlVO();
Long rehearsalPlanId1 = record.getRehearsalPlanId();
RehearsalPlanEntity rehearsalPlanEntity = rehearsalPlanMapper.selectById(rehearsalPlanId1);
BeanUtil.copy(rehearsalPlanEntity,rehearsalRecordlVO);
rehearsalRecordlVO.setPeopleName(record.getPeopleName());
int length = record.getPeopleName().split(",").length;
rehearsalRecordlVO.setPeopleNum(String.valueOf(length));
rehearsalRecordlVO.setActualStartTime(record.getActualStartTime());
rehearsalRecordlVO.setActualEndTime(record.getActualEndTime());
recordlVOS.add(rehearsalRecordlVO);
}
res.setRecords(recordlVOS);
return res;
}
}

22
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainRecordServiceImpl.java

@ -21,7 +21,9 @@ import com.hnac.hzims.safeproduct.service.ITrainRecordService;
import com.hnac.hzims.safeproduct.utils.BaseUtil;
import com.hnac.hzims.safeproduct.utils.TimeUtils;
import com.hnac.hzims.safeproduct.vo.TrainRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.TrainRecordVO;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.utils.BeanUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@ -188,9 +190,25 @@ public class TrainRecordServiceImpl extends ServiceImpl<TrainRecordMapper, Train
* 培训记录分页
*/
@Override
public IPage<TrainRecordEntity> trainRecordPage(Map<String, Object> param, Query query) {
public IPage<TrainRecordVO> trainRecordPage(Map<String, Object> param, Query query) {
IPage<TrainRecordEntity> page = new Page<>(query.getCurrent(), query.getSize());
return baseMapper.trainRecordPage(page, param);
IPage<TrainRecordEntity> trainRecordList = baseMapper.trainRecordPage(page, param);
IPage<TrainRecordVO> res=new Page<>();
res.setSize(trainRecordList.getSize());
res.setTotal(trainRecordList.getTotal());
res.setPages(trainRecordList.getPages());
List<TrainRecordEntity> records = trainRecordList.getRecords();
List<TrainRecordVO> recordlVOS =new ArrayList<>();
for (TrainRecordEntity record : records) {
TrainRecordVO trainRecordVO = new TrainRecordVO();
Long getTrainPlanId = record.getTrainPlanId();
TrainPlanEntity trainPlanEntity = trainPlanMapper.selectById(getTrainPlanId);
BeanUtil.copy(trainPlanEntity,trainRecordVO);
trainRecordVO.setActualEndTime(record.getActualEndTime());
recordlVOS.add(trainRecordVO);
}
res.setRecords(recordlVOS);
return res;
}
/**

4
hzims-service/safeproduct/src/main/resources/db/3.0.0.sql.1

@ -0,0 +1,4 @@
ALTER TABLE `hzims_test_score`
ADD COLUMN `user_id` bigint(20) NULL AFTER `is_deleted`,
ADD COLUMN `dept_name` varchar(255) NULL AFTER `user_id`,
ADD COLUMN `dept_id` bigint(20) NULL AFTER `dept_name`;
Loading…
Cancel
Save