|
|
@ -8,12 +8,13 @@ import com.hnac.hzims.common.logs.utils.StringUtils; |
|
|
|
import com.hnac.hzims.safeproduct.constants.SafeProductConstant; |
|
|
|
import com.hnac.hzims.safeproduct.constants.SafeProductConstant; |
|
|
|
import com.hnac.hzims.safeproduct.entity.RehearsalPlanEntity; |
|
|
|
import com.hnac.hzims.safeproduct.entity.RehearsalPlanEntity; |
|
|
|
import com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity; |
|
|
|
import com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity; |
|
|
|
|
|
|
|
import com.hnac.hzims.safeproduct.enums.RehearsalMethodEnum; |
|
|
|
import com.hnac.hzims.safeproduct.enums.RehearsalStatusEnum; |
|
|
|
import com.hnac.hzims.safeproduct.enums.RehearsalStatusEnum; |
|
|
|
import com.hnac.hzims.safeproduct.mapper.RehearsalPlanMapper; |
|
|
|
import com.hnac.hzims.safeproduct.mapper.RehearsalPlanMapper; |
|
|
|
import com.hnac.hzims.safeproduct.mapper.RehearsalRecordMapper; |
|
|
|
import com.hnac.hzims.safeproduct.mapper.RehearsalRecordMapper; |
|
|
|
import com.hnac.hzims.safeproduct.service.IRehearsalRecordService; |
|
|
|
import com.hnac.hzims.safeproduct.service.IRehearsalRecordService; |
|
|
|
import com.hnac.hzims.safeproduct.utils.BaseUtil; |
|
|
|
import com.hnac.hzims.safeproduct.utils.BaseUtil; |
|
|
|
import com.hnac.hzims.safeproduct.vo.RehearsalDetailVO; |
|
|
|
import com.hnac.hzims.safeproduct.vo.RehearsalRecordDetailVO; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -129,9 +130,18 @@ public class RehearsalRecordServiceImpl extends ServiceImpl<RehearsalRecordMappe |
|
|
|
* 演练记录表导出 |
|
|
|
* 演练记录表导出 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void exportRecordDetailData(Long id, HttpServletResponse response) { |
|
|
|
public void exportRehearsalRecordData(Long id, HttpServletResponse response) { |
|
|
|
RehearsalDetailVO rehearsalDetailVO = this.getRecordDetailVOById(id); |
|
|
|
RehearsalRecordDetailVO rehearsalRecordDetailVO = this.getRecordDetailVOById(id); |
|
|
|
Map<String, Object> params = BaseUtil.obj2Map(rehearsalDetailVO); |
|
|
|
// 演练方式字段
|
|
|
|
|
|
|
|
String rehearsalMethod = rehearsalRecordDetailVO.getRehearsalMethod(); |
|
|
|
|
|
|
|
if (rehearsalMethod.equals(RehearsalMethodEnum.MIXED.getValue())) { |
|
|
|
|
|
|
|
rehearsalRecordDetailVO.setRehearsalMethod(RehearsalMethodEnum.MIXED.getDesc()); |
|
|
|
|
|
|
|
} else if (rehearsalMethod.equals(RehearsalMethodEnum.ONLINE.getValue())) { |
|
|
|
|
|
|
|
rehearsalRecordDetailVO.setRehearsalMethod(RehearsalMethodEnum.ONLINE.getDesc()); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
rehearsalRecordDetailVO.setRehearsalMethod(RehearsalMethodEnum.OFFLINE.getDesc()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Map<String, Object> params = BaseUtil.obj2Map(rehearsalRecordDetailVO); |
|
|
|
String templateFile = "template/演练记录表" + SafeProductConstant.DOCX_SUFFIX; |
|
|
|
String templateFile = "template/演练记录表" + SafeProductConstant.DOCX_SUFFIX; |
|
|
|
String wordPath = savePath + "/演练记录表" + SafeProductConstant.DOCX_SUFFIX; |
|
|
|
String wordPath = savePath + "/演练记录表" + SafeProductConstant.DOCX_SUFFIX; |
|
|
|
String pdfPath = savePath + "/演练记录表" + SafeProductConstant.PDF_SUFFIX; |
|
|
|
String pdfPath = savePath + "/演练记录表" + SafeProductConstant.PDF_SUFFIX; |
|
|
@ -142,7 +152,7 @@ public class RehearsalRecordServiceImpl extends ServiceImpl<RehearsalRecordMappe |
|
|
|
* 查询演练记录表详情 |
|
|
|
* 查询演练记录表详情 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public RehearsalDetailVO getRecordDetailVOById(Long id) { |
|
|
|
public RehearsalRecordDetailVO getRecordDetailVOById(Long id) { |
|
|
|
return baseMapper.getRecordDetailVOById(id); |
|
|
|
return baseMapper.getRecordDetailVOById(id); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|