From e3232d0227ad0543e760c6ac854b054e6acda06e Mon Sep 17 00:00:00 2001 From: liwen Date: Mon, 15 Jan 2024 14:36:07 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E4=BC=9A=E8=AE=AE=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../safeproduct/vo/ConferenceRecordDetailVO.java | 52 ++++++++++++++++++++++ .../controller/ConferenceController.java | 12 ++++- .../safeproduct/mapper/ConferenceRecordMapper.java | 7 +++ .../safeproduct/mapper/ConferenceRecordMapper.xml | 12 +++++ .../service/IConferenceRecordService.java | 17 +++++++ .../service/impl/ConferenceRecordServiceImpl.java | 38 ++++++++++++++++ 6 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/ConferenceRecordDetailVO.java diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/ConferenceRecordDetailVO.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/ConferenceRecordDetailVO.java new file mode 100644 index 0000000..87880ad --- /dev/null +++ b/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; +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java index 2a09af6..8b1f328 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java +++ b/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.service.IConferencePlanService; import com.hnac.hzims.safeproduct.service.IConferenceRecordService; +import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -103,8 +104,8 @@ public class ConferenceController extends BladeController { @GetMapping("/recordDetail") @ApiOperation(value = "会议记录详情") @ApiOperationSupport(order = 9) - public R recordDetail(@RequestParam Long id) { - return R.data(conferenceRecordService.getById(id)); + public R recordDetail(@RequestParam Long id) { + return R.data(conferenceRecordService.getConferenceRecordDetailById(id)); } @GetMapping("/recordPage") @@ -130,4 +131,11 @@ public class ConferenceController extends BladeController { public void exportConferenceData(@ApiIgnore @RequestParam Map param, HttpServletResponse response) { conferencePlanService.exportConferenceData(param, response); } + + @GetMapping("/exportConferenceRecordData") + @ApiOperation(value = "会议记录表导出") + @ApiOperationSupport(order = 12) + public void exportConferenceRecordData(@RequestParam Long id, HttpServletResponse response) { + conferenceRecordService.exportConferenceRecordData(id, response); + } } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.java index eed6c2c..85d3c62 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.java +++ b/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.hnac.hzims.safeproduct.entity.ConferenceRecordEntity; +import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO; import org.apache.ibatis.annotations.Mapper; /** @@ -13,4 +14,10 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ConferenceRecordMapper extends BaseMapper { + /** + * 查询会议记录表详情 + * @param id 会议记录id + * @return 会议记录表VO类 + */ + ConferenceRecordDetailVO getConferenceRecordDetailById(Long id); } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml index ccb0eac..1de030a 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferenceRecordMapper.xml @@ -1,4 +1,16 @@ + \ No newline at end of file diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IConferenceRecordService.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IConferenceRecordService.java index b7b867d..a792243 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IConferenceRecordService.java +++ b/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.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 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 当月 * @return 存在则返回上一编号,否则返回null