Browse Source

update: 会议管理

zhongwei
liwen 11 months ago
parent
commit
e3232d0227
  1. 52
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/ConferenceRecordDetailVO.java
  2. 12
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java
  3. 7
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.java
  4. 12
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml
  5. 17
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IConferenceRecordService.java
  6. 38
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferenceRecordServiceImpl.java

52
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/ConferenceRecordDetailVO.java

@ -0,0 +1,52 @@
package com.hnac.hzims.safeproduct.vo;
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 ConferenceRecordDetailVO {
@ApiModelProperty("会议实际开始时间")
private Date actualStartTime;
@ApiModelProperty("会议实际结束时间")
private Date actualEndTime;
@ApiModelProperty("单位")
private String unit;
@ApiModelProperty("会议地点")
private String location;
@ApiModelProperty("主持人")
private String host;
@ApiModelProperty("会议方式")
private String conferenceMethod;
@ApiModelProperty("会议主题")
private String theme;
@ApiModelProperty("记录人")
private String recorder;
@ApiModelProperty("参会人员")
private String peopleName;
@ApiModelProperty("会议内容")
private String content;
@ApiModelProperty("会议图片")
private String imgPath;
@ApiModelProperty("会议附件")
private String filePath;
}

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

@ -7,6 +7,7 @@ import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity;
import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity; import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity;
import com.hnac.hzims.safeproduct.service.IConferencePlanService; import com.hnac.hzims.safeproduct.service.IConferencePlanService;
import com.hnac.hzims.safeproduct.service.IConferenceRecordService; import com.hnac.hzims.safeproduct.service.IConferenceRecordService;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
@ -103,8 +104,8 @@ public class ConferenceController extends BladeController {
@GetMapping("/recordDetail") @GetMapping("/recordDetail")
@ApiOperation(value = "会议记录详情") @ApiOperation(value = "会议记录详情")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
public R<ConferenceRecordEntity> recordDetail(@RequestParam Long id) { public R<ConferenceRecordDetailVO> recordDetail(@RequestParam Long id) {
return R.data(conferenceRecordService.getById(id)); return R.data(conferenceRecordService.getConferenceRecordDetailById(id));
} }
@GetMapping("/recordPage") @GetMapping("/recordPage")
@ -130,4 +131,11 @@ public class ConferenceController extends BladeController {
public void exportConferenceData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) { public void exportConferenceData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) {
conferencePlanService.exportConferenceData(param, response); conferencePlanService.exportConferenceData(param, response);
} }
@GetMapping("/exportConferenceRecordData")
@ApiOperation(value = "会议记录表导出")
@ApiOperationSupport(order = 12)
public void exportConferenceRecordData(@RequestParam Long id, HttpServletResponse response) {
conferenceRecordService.exportConferenceRecordData(id, response);
}
} }

7
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.java

@ -2,6 +2,7 @@ package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity; import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
/** /**
@ -13,4 +14,10 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface ConferenceRecordMapper extends BaseMapper<ConferenceRecordEntity> { public interface ConferenceRecordMapper extends BaseMapper<ConferenceRecordEntity> {
/**
* 查询会议记录表详情
* @param id 会议记录id
* @return 会议记录表VO类
*/
ConferenceRecordDetailVO getConferenceRecordDetailById(Long id);
} }

12
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml

@ -1,4 +1,16 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.safeproduct.mapper.ConferenceRecordMapper"> <mapper namespace="com.hnac.hzims.safeproduct.mapper.ConferenceRecordMapper">
<select id="getConferenceRecordDetailById"
resultType="com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO">
SELECT
t1.actual_start_time, t1.actual_end_time, t2.unit, t2.location, t2.host, t2.conference_method, t2.theme,
t1.recorder, t1.people_name, t1.content, t1.img_path, t1.file_path
FROM
hzims_conference_record t1
ON hzims_conference_plan t2 ON t1.conference_plan_id = t2.id
WHERE
t1.is_deteled = 0
AND t1.id = #{id}
</select>
</mapper> </mapper>

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

@ -2,6 +2,9 @@ package com.hnac.hzims.safeproduct.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity; import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO;
import javax.servlet.http.HttpServletResponse;
/** /**
* 会议记录服务类 * 会议记录服务类
@ -24,4 +27,18 @@ public interface IConferenceRecordService extends IService<ConferenceRecordEntit
* @return true-成功false-失败 * @return true-成功false-失败
*/ */
boolean saveRecord(ConferenceRecordEntity conferenceRecord); boolean saveRecord(ConferenceRecordEntity conferenceRecord);
/**
* 会议记录表导出
* @param id 会议记录id
* @param response 响应类
*/
void exportConferenceRecordData(Long id, HttpServletResponse response);
/**
* 查询会议记录表详情
* @param id 会议记录id
* @return 会议记录表VO类
*/
ConferenceRecordDetailVO getConferenceRecordDetailById(Long id);
} }

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

@ -7,16 +7,21 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.safeproduct.constants.SafeProductConstant; import com.hnac.hzims.safeproduct.constants.SafeProductConstant;
import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity; import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity;
import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity; import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity;
import com.hnac.hzims.safeproduct.enums.ConferenceMethodEnum;
import com.hnac.hzims.safeproduct.enums.RehearsalStatusEnum; import com.hnac.hzims.safeproduct.enums.RehearsalStatusEnum;
import com.hnac.hzims.safeproduct.mapper.ConferencePlanMapper; import com.hnac.hzims.safeproduct.mapper.ConferencePlanMapper;
import com.hnac.hzims.safeproduct.mapper.ConferenceRecordMapper; import com.hnac.hzims.safeproduct.mapper.ConferenceRecordMapper;
import com.hnac.hzims.safeproduct.service.IConferenceRecordService; import com.hnac.hzims.safeproduct.service.IConferenceRecordService;
import com.hnac.hzims.safeproduct.utils.BaseUtil; import com.hnac.hzims.safeproduct.utils.BaseUtil;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -31,6 +36,9 @@ public class ConferenceRecordServiceImpl extends ServiceImpl<ConferenceRecordMap
@Resource @Resource
ConferencePlanMapper conferencePlanMapper; ConferencePlanMapper conferencePlanMapper;
@Value("${hzims.conference.savePath}")
private String savePath;
/** /**
* 删除关联会议记录 * 删除关联会议记录
*/ */
@ -72,6 +80,36 @@ public class ConferenceRecordServiceImpl extends ServiceImpl<ConferenceRecordMap
} }
/** /**
* 会议记录表导出
*/
@Override
public void exportConferenceRecordData(Long id, HttpServletResponse response) {
ConferenceRecordDetailVO conferenceRecordDetailVO = this.getConferenceRecordDetailById(id);
// 会议方式字段
String conferenceMethod = conferenceRecordDetailVO.getConferenceMethod();
if (conferenceMethod.equals(ConferenceMethodEnum.MIXED.getValue())) {
conferenceRecordDetailVO.setConferenceMethod(ConferenceMethodEnum.MIXED.getDesc());
} else if (conferenceMethod.equals(ConferenceMethodEnum.ONLINE.getValue())) {
conferenceRecordDetailVO.setConferenceMethod(ConferenceMethodEnum.ONLINE.getDesc());
} else {
conferenceRecordDetailVO.setConferenceMethod(ConferenceMethodEnum.OFFLINE.getDesc());
}
Map<String, Object> params = BaseUtil.obj2Map(conferenceRecordDetailVO);
String templateFile = "template/会议记录表" + SafeProductConstant.DOCX_SUFFIX;
String wordPath = savePath + "/会议记录表" + SafeProductConstant.DOCX_SUFFIX;
String pdfPath = savePath + "/会议记录表" + SafeProductConstant.PDF_SUFFIX;
BaseUtil.exportDocument(templateFile, params, wordPath, pdfPath, response);
}
/**
* 查询会议记录表详情
*/
@Override
public ConferenceRecordDetailVO getConferenceRecordDetailById(Long id) {
return baseMapper.getConferenceRecordDetailById(id);
}
/**
* 查询是否存在同月编号 * 查询是否存在同月编号
* @param currentMonth 当月 * @param currentMonth 当月
* @return 存在则返回上一编号否则返回null * @return 存在则返回上一编号否则返回null

Loading…
Cancel
Save