From 85b7f73f316cf62bdd287a569f000af1ac04dc05 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Sat, 6 Jan 2024 14:42:29 +0800 Subject: [PATCH] =?UTF-8?q?#=E6=96=BD=E5=B7=A5=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../access/entity/OperConstructionEntity.java | 73 +++++ .../operational/access/vo/ConstructionVo.java | 38 +++ .../equipment/controller/EmInfoController.java | 1 + .../access/controller/ConstructionController.java | 84 ++++++ .../access/mapper/ConstructionMapper.java | 11 + .../access/mapper/ConstructionMapper.xml | 4 + .../access/service/ConstructionService.java | 19 ++ .../service/impl/ConstructionServiceImpl.java | 117 ++++++++ .../access/wrapper/ConstructionWrapper.java | 41 +++ .../com/hnac/hzims/operational/util/PdfUtils.java | 322 +++++++++++++++++++++ .../template/excel/constructio_template.xlsx | Bin 0 -> 17960 bytes .../workTicket/mapper/xml/WorkTicketInfoMapper.xml | 2 +- 12 files changed, 711 insertions(+), 1 deletion(-) create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/entity/OperConstructionEntity.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/vo/ConstructionVo.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/ConstructionMapper.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/ConstructionMapper.xml create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/ConstructionService.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/wrapper/ConstructionWrapper.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/util/PdfUtils.java create mode 100644 hzims-service/operational/src/main/resources/template/excel/constructio_template.xlsx diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/entity/OperConstructionEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/entity/OperConstructionEntity.java new file mode 100644 index 0000000..1467abe --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/entity/OperConstructionEntity.java @@ -0,0 +1,73 @@ +package com.hnac.hzims.operational.access.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * @author ysj + */ +@Data +@TableName("hzims_oper_construction") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "检修施工日志表") +public class OperConstructionEntity extends TenantEntity { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "施工编号") + private String code; + + @ApiModelProperty(value = "施工时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date constructionTime; + + @ApiModelProperty(value = "检修名称") + private String overhaulName; + + @ApiModelProperty(value = "施工地点") + private String constructionLocation; + + @ApiModelProperty(value = "检修负责人") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Long overhaulHead; + + @ApiModelProperty(value = "检修人员: 根据“,”分割") + private String overhaulPersonnel; + + @ApiModelProperty(value = "检修时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date overhaulTime; + + @ApiModelProperty(value = "今日工作完成情况描述") + private String completeWorkDesc; + + @ApiModelProperty(value = "明日工作计划描述") + private String planWorkDesc; + + @ApiModelProperty(value = "施工图片: 根据“,”分割") + private String constructionImg; + + @ApiModelProperty(value = "施工附件") + private String constructionAttachment; + + @ApiModelProperty(value = "记录人") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Long recorder; + + @ApiModelProperty(value = "审核人") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Long reviewer; + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/vo/ConstructionVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/vo/ConstructionVo.java new file mode 100644 index 0000000..aeaf0aa --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/access/vo/ConstructionVo.java @@ -0,0 +1,38 @@ +package com.hnac.hzims.operational.access.vo; + +import com.hnac.hzims.operational.access.entity.OperConstructionEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author ysj + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class ConstructionVo extends OperConstructionEntity { + + @ApiModelProperty(value = "开始时间") + private String startTime; + + @ApiModelProperty(value = "结束时间") + private String endTime; + + @ApiModelProperty(value = "创建人名称") + private String createUserName; + + @ApiModelProperty(value = "修改人名称") + private String updateUserName; + + @ApiModelProperty(value = "检修负责人名称") + private String overhaulHeadName; + + @ApiModelProperty(value = "记录人名称") + private String recorderName; + + @ApiModelProperty(value = "审核人名称") + private String reviewerName; + + @ApiModelProperty(value = "检修人员名称Name") + private String overhaulPersonnelName; +} diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java index e1346c1..6239612 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java @@ -66,6 +66,7 @@ public class EmInfoController extends BladeController { /** * 元件列表 分页 */ + @GetMapping("/partList") @ApiOperationSupport(order = 2) @ApiOperation(value = "元件分页", notes = "传入em_info,必须传gpid(上级设备ID)") diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java new file mode 100644 index 0000000..aa03b00 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java @@ -0,0 +1,84 @@ +package com.hnac.hzims.operational.access.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.common.logs.annotation.OperationAnnotation; +import com.hnac.hzims.common.logs.enums.BusinessType; +import com.hnac.hzims.common.logs.enums.OperatorType; +import com.hnac.hzims.operational.access.dto.AccessPlanV4DTO; +import com.hnac.hzims.operational.access.dto.OperAccessPlanDTO; +import com.hnac.hzims.operational.access.dto.OperAccessPlanFlowDTO; +import com.hnac.hzims.operational.access.dto.OperAccessPlanListDTO; +import com.hnac.hzims.operational.access.entity.OperConstructionEntity; +import com.hnac.hzims.operational.access.service.AccessPlanV4Service; +import com.hnac.hzims.operational.access.service.ConstructionService; +import com.hnac.hzims.operational.access.vo.ConstructionVo; +import com.hnac.hzims.operational.access.vo.OperAccessPlanVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.log.annotation.ApiLog; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + + +/** + * @author ysj + */ +@RestController +@AllArgsConstructor +@RequestMapping("/construction") +@Api(tags = "施工日志") +public class ConstructionController extends BladeController { + + + private final ConstructionService service; + + @PostMapping("/save") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "新增") + public R save(@RequestBody OperConstructionEntity entity) { + return R.status(service.save(entity)); + } + + @PostMapping("/remove") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "逻辑删除") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(service.deleteLogic(Func.toLongList(ids))); + } + + @PostMapping("/update") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "修改") + public R update(@Valid @RequestBody OperConstructionEntity entity) { + return R.status(service.updateById(entity)); + } + + @GetMapping("/list") + @ApiOperationSupport(order = 4) + @OperationAnnotation(moduleName = "检修管理",title = "检修计划",operatorType = OperatorType.MOBILE,businessType = + BusinessType.GENCODE, + action = "分页查询检修计划列表") + @ApiOperation(value = "分页 查询参数:code,name,gradeCode,manager,techLead,handleStatus,status") + public R> list(ConstructionVo construction, Query query) { + return R.data(service.pageCondition(Condition.getPage(query), construction)); + } + + @GetMapping("/preview") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "检修施工日志预览", notes = "检修施工日志预览") + public void preview(@RequestParam @ApiParam("检修施工记录Id") @NotNull @Valid Long id) { + service.preview(id); + } + + +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/ConstructionMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/ConstructionMapper.java new file mode 100644 index 0000000..e5dd121 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/ConstructionMapper.java @@ -0,0 +1,11 @@ +package com.hnac.hzims.operational.access.mapper; + +import com.hnac.hzims.operational.access.entity.OperConstructionEntity; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + +/** + * @author ysj + */ +public interface ConstructionMapper extends UserDataScopeBaseMapper { + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/ConstructionMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/ConstructionMapper.xml new file mode 100644 index 0000000..b1358be --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/ConstructionMapper.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/ConstructionService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/ConstructionService.java new file mode 100644 index 0000000..a70cedc --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/ConstructionService.java @@ -0,0 +1,19 @@ +package com.hnac.hzims.operational.access.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.operational.access.entity.OperConstructionEntity; +import com.hnac.hzims.operational.access.vo.ConstructionVo; +import org.springblade.core.mp.base.BaseService; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; + +/** + * @author ysj + */ +public interface ConstructionService extends BaseService { + + + IPage pageCondition(IPage page, ConstructionVo construction); + + void preview(Long id); +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java new file mode 100644 index 0000000..e291ccb --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/ConstructionServiceImpl.java @@ -0,0 +1,117 @@ +package com.hnac.hzims.operational.access.service.impl; + +import cn.afterturn.easypoi.excel.entity.TemplateExportParams; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.operational.access.entity.OperConstructionEntity; +import com.hnac.hzims.operational.access.mapper.ConstructionMapper; +import com.hnac.hzims.operational.access.service.ConstructionService; +import com.hnac.hzims.operational.access.vo.ConstructionVo; +import com.hnac.hzims.operational.access.wrapper.ConstructionWrapper; +import com.hnac.hzims.operational.util.ExcelUtil; +import com.hnac.hzims.operational.util.PdfUtils; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.usermodel.Workbook; +import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.tool.utils.DateUtil; +import org.springblade.core.tool.utils.ObjectUtil; +import org.springblade.core.tool.utils.StringUtil; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletResponse; +import java.util.HashMap; +import java.util.Map; + +/** + * @author ysj + */ +@Service +@Slf4j +@RequiredArgsConstructor +public class ConstructionServiceImpl extends BaseServiceImpl implements ConstructionService { + + + @Value("${hzims.operational.construction.save.xlsx}") + private String constructionSaveXlsxPath; + + @Value("${hzims.operational.construction.save.pdf}") + private String constructionSavePdfPath; + + /** + * 施工日志记录分页查询 + * @param page + * @param construction + * @return + */ + @Override + public IPage pageCondition(IPage page, ConstructionVo construction) { + QueryWrapper wrapper = Condition.getQueryWrapper(construction); + if(StringUtil.isNotBlank(construction.getStartTime())){ + wrapper.ge("CREATE_TIME",construction.getStartTime()); + } + if(StringUtil.isNotBlank(construction.getEndTime())){ + wrapper.le("CREATE_TIME",construction.getEndTime()); + } + IPage pages = super.page(page, wrapper); + pages.setRecords(ConstructionWrapper.build().listVO(pages.getRecords())); + return pages; + } + + /** + * 施工日志记录预览 + * @param id + */ + @Override + public void preview(Long id) { + ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + HttpServletResponse response = servletRequestAttributes.getResponse(); + //准备数据 + ConstructionVo construction = this.record(id); + Map params = new HashMap<>(); + try { + params = PdfUtils.objectToMap(construction); + }catch (Exception e) { + log.error("转换对象失败!"); + } + TemplateExportParams templateExportParams = new TemplateExportParams("template/constructio_template.xlsx", true); + Workbook workbook = null; + try { + workbook = ExcelUtil.getWorkbook(templateExportParams,params); + } catch (Exception e) { + e.printStackTrace(); + } + //上传xlsx至服务器 + String fileName = DateUtil.format(construction.getConstructionTime(),DateUtil.PATTERN_DATETIME) + "_" + construction.getOverhaulName() + "_施工日志" + PdfUtils.XLSX_SUFFIX; + try { + ExcelUtil.upload(workbook,constructionSaveXlsxPath,fileName); + } catch (Exception e) { + e.printStackTrace(); + } + //将docx文件转换为pdf并保存 + String pdfFileName = DateUtil.format(construction.getConstructionTime(),DateUtil.PATTERN_DATETIME) + "_" + construction.getOverhaulName() + "_施工日志" + PdfUtils.PDF_SUFFIX; + String xlsxFileName = DateUtil.format(construction.getConstructionTime(),DateUtil.PATTERN_DATETIME) + "_" + construction.getOverhaulName() + "_施工日志" + PdfUtils.XLSX_SUFFIX; + PdfUtils.convertPdf(constructionSaveXlsxPath, xlsxFileName, constructionSavePdfPath, pdfFileName); + String savePath = constructionSavePdfPath + pdfFileName; + // 设置response参数,可以打开下载页面 + PdfUtils.readPdf(response,savePath); + } + + /** + * 查询施工日志记录 + * @param id + * @return + */ + private ConstructionVo record(Long id) { + OperConstructionEntity entity = this.getById(id); + if(ObjectUtil.isEmpty(entity)){ + throw new ServiceException("施工日志记录不存在!"); + } + return ConstructionWrapper.build().entityVO(entity); + } +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/wrapper/ConstructionWrapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/wrapper/ConstructionWrapper.java new file mode 100644 index 0000000..93d1aba --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/wrapper/ConstructionWrapper.java @@ -0,0 +1,41 @@ +package com.hnac.hzims.operational.access.wrapper; + +import com.hnac.hzims.operational.access.constants.DictConstant; +import com.hnac.hzims.operational.access.entity.OperAccessPlanEntity; +import com.hnac.hzims.operational.access.entity.OperConstructionEntity; +import com.hnac.hzims.operational.access.vo.ConstructionVo; +import com.hnac.hzims.operational.access.vo.OperAccessPlanVO; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.system.cache.DictCache; +import org.springblade.system.user.cache.UserCache; +import org.springblade.system.user.entity.User; + +import java.util.Optional; + +/** + * @author ysj + */ +public class ConstructionWrapper extends BaseEntityWrapper { + + public static ConstructionWrapper build() { + return new ConstructionWrapper(); + } + + @Override + public ConstructionVo entityVO(OperConstructionEntity entity) { + ConstructionVo vo = BeanUtil.copy(entity, ConstructionVo.class); + User create = UserCache.getUser(entity.getCreateUser()); + User update = UserCache.getUser(entity.getUpdateUser()); + User head = UserCache.getUser(entity.getOverhaulHead()); + User recorder = UserCache.getUser(entity.getRecorder()); + User reviewer = UserCache.getUser(entity.getReviewer()); + vo.setCreateUserName(Optional.ofNullable(create).map(User :: getName).orElse(null)); + vo.setUpdateUserName(Optional.ofNullable(update).map(User :: getName).orElse(null)); + vo.setOverhaulHeadName(Optional.ofNullable(head).map(User :: getName).orElse(null)); + vo.setRecorderName(Optional.ofNullable(recorder).map(User :: getName).orElse(null)); + vo.setReviewerName(Optional.ofNullable(reviewer).map(User :: getName).orElse(null)); + return vo; + } + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/util/PdfUtils.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/util/PdfUtils.java new file mode 100644 index 0000000..89ce2ac --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/util/PdfUtils.java @@ -0,0 +1,322 @@ +package com.hnac.hzims.operational.util; + +import com.documents4j.api.DocumentType; +import com.documents4j.api.IConverter; +import com.documents4j.job.LocalConverter; +import com.hnac.hzims.ticket.annotation.DefaultValue; +import com.hnac.hzims.ticket.constants.TicketConstants; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.apache.poi.ss.usermodel.Workbook; +import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.tool.utils.DateUtil; +import org.springblade.core.tool.utils.ObjectUtil; +import org.springblade.core.tool.utils.StringUtil; + +import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.lang.reflect.Field; +import java.net.URLEncoder; +import java.time.LocalDateTime; +import java.util.*; + +/** + * @author hx + */ +@Slf4j +public class PdfUtils { + + /** 文件后缀名 **/ + public static String DOC_SUFFIX = ".doc"; + public static String DOCX_SUFFIX = ".docx"; + public static String XLS_SUFFIX = ".xls"; + public static String XLSX_SUFFIX = ".xlsx"; + public static String PDF_SUFFIX = ".pdf"; + + /*** + * 各文件转换为pdf + * @param templatePath 待转换的文件路径 + * @param templateFileName 待转换的文件名 + * @param savePath 转换为pdf后的文件路径 + * @param saveFileName 转换为pdf后的文件名称 + * @return + */ + public static void convertPdf(String templatePath, String templateFileName, String savePath, String saveFileName) { + String templateFilePath = templatePath + templateFileName; + String saveFilePath = savePath + saveFileName; + log.info("转换前的文件为:{};转换后的路径为:{}", templateFilePath, saveFilePath); + File templateFile = new File(templateFilePath); + File saveFile = new File(saveFilePath); + //获取文件类型 + String fileType = templateFileName.substring(templateFileName.lastIndexOf("."), templateFileName.length()); + InputStream inputStream = null; + OutputStream outputStream = null; + try { + try { + inputStream = new FileInputStream(templateFile); + outputStream = new FileOutputStream(saveFile); + //document4j 转换 pdf linux环境下不支持 + if (DOCX_SUFFIX.equals(fileType)) { + IConverter converter = LocalConverter.builder().build(); + converter.convert(inputStream).as(DocumentType.DOCX).to(outputStream).as(DocumentType.PDF).execute(); + converter.shutDown(); + } else if (DOC_SUFFIX.equals(fileType)) { + IConverter converter = LocalConverter.builder().build(); + converter.convert(inputStream).as(DocumentType.DOC).to(outputStream).as(DocumentType.PDF).execute(); + converter.shutDown(); + } else if (XLS_SUFFIX.equals(fileType)) { + IConverter converter = LocalConverter.builder().build(); + converter.convert(inputStream).as(DocumentType.XLS).to(outputStream).as(DocumentType.PDF).execute(); + converter.shutDown(); + } else if (XLSX_SUFFIX.equals(fileType)) { + //此方式行不通 + //converter.convert(inputStream).as(DocumentType.XLSX).to(outputStream).as(DocumentType.PDF).execute(); + Workbook wb = new Workbook(); + wb.loadFromFile(templateFilePath); + wb.saveToFile(saveFilePath, FileFormat.PDF); + } + } catch (Exception e) { + log.error("转换失败,错误信息为:{}", e.getMessage()); + throw new ServiceException(e.getMessage()); + } finally { + inputStream.close(); + outputStream.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + + + /** + * 对象转化为Map 并设置默认值 + * + * @param obj + * @return + * @throws Exception + */ + public static Map objectToMap(Object obj) { + Map result = new HashMap<>(); + if (ObjectUtil.isNotEmpty(obj) && null != obj.getClass()) { + Class clazz = obj.getClass(); + List fieldList = new ArrayList<>(); + while (clazz != null) { + fieldList.addAll(Arrays.asList(clazz.getDeclaredFields())); + clazz = clazz.getSuperclass(); + } + fieldList.forEach(field -> { + field.setAccessible(true); + DefaultValue defaultValue = field.getAnnotation(DefaultValue.class); + Object value; + try { + value = field.get(obj); + } catch (IllegalAccessException e) { + throw new ServiceException("获取属性性出错"); + } + //若为list则不处理 + if (value instanceof List) { + return; + } + //若为时间格式则进行格式化 + if (value instanceof LocalDateTime) { + value = DateUtil.format((LocalDateTime) value, TicketConstants.TICKET_DATE_PATTERN); + } + if (value instanceof Date) { + value = DateUtil.format((Date) value, TicketConstants.TICKET_DATE_PATTERN); + } + + //如果value为空直接跳出 + // if ((ObjectUtils.isEmpty(value) || value == "") && StringUtil.isNoneBlank(field.getName())){ + // return; + // } + + //属性上是否加入DefaultValue注解 若加入 则判断是否定义属性名以及值 若未定义则取原属性名及值 + if (ObjectUtil.isNotEmpty(defaultValue)) { + result.put(StringUtil.isNoneBlank(defaultValue.name()) ? defaultValue.name() : field.getName(), + ObjectUtil.isNotEmpty(defaultValue.value()) ? defaultValue.value() : value); + } else { + result.put(field.getName(), Optional.ofNullable(value).orElse(" ")); + + } + }); + } + return result; + } + + + /** + * 对象转化为Map 并设置默认值 + * + * @param obj + * @return + * @throws Exception + */ + public static Map objectToMap(Object obj, boolean isWordFlag) { + Map result = new HashMap<>(); + if (ObjectUtil.isNotEmpty(obj) && null != obj.getClass()) { + Class clazz = obj.getClass(); + List fieldList = new ArrayList<>(); + while (clazz != null) { + fieldList.addAll(Arrays.asList(clazz.getDeclaredFields())); + clazz = clazz.getSuperclass(); + } + fieldList.forEach(field -> { + field.setAccessible(true); + DefaultValue defaultValue = field.getAnnotation(DefaultValue.class); + Object value; + try { + value = field.get(obj); + } catch (IllegalAccessException e) { + throw new ServiceException("获取属性性出错"); + } + //若为list则不处理 + if (value instanceof List) { + return; + } + //若为时间格式则进行格式化 + if (value instanceof LocalDateTime) { + value = DateUtil.format((LocalDateTime) value, TicketConstants.TICKET_DATE_PATTERN); + } + if (value instanceof Date) { + value = DateUtil.format((Date) value, TicketConstants.TICKET_DATE_PATTERN); + } + + //如果value为空直接跳出 + // if ((ObjectUtils.isEmpty(value) || value == "") && StringUtil.isNoneBlank(field.getName())){ + // return; + // } + + //属性上是否加入DefaultValue注解 若加入 则判断是否定义属性名以及值 若未定义则取原属性名及值 + if (ObjectUtil.isNotEmpty(defaultValue)) { + result.put(StringUtil.isNoneBlank(defaultValue.name()) ? defaultValue.name() : field.getName(), + ObjectUtil.isNotEmpty(defaultValue.value()) ? defaultValue.value() : value); + } else { + if (isWordFlag) { + //如果导出word为null会出现{{ ,value设置"\u00A0" + result.put(field.getName(), Optional.ofNullable(value).orElse("\u00A0")); + } else { + result.put(field.getName(), Optional.ofNullable(value).orElse(" ")); + } + } + }); + } + return result; + } + + + /** + * 对象转化为Map 并设置默认值 + * + * @param obj + * @return + * @throws Exception + */ + public static Map objectToMapResult(Object obj, Map map) { + Map result = new HashMap<>(); + if (ObjectUtil.isNotEmpty(obj) && null != obj.getClass()) { + Class clazz = obj.getClass(); + List fieldList = new ArrayList<>(); + while (clazz != null) { + fieldList.addAll(Arrays.asList(clazz.getDeclaredFields())); + clazz = clazz.getSuperclass(); + } + fieldList.forEach(field -> { + field.setAccessible(true); + DefaultValue defaultValue = field.getAnnotation(DefaultValue.class); + Object value; + try { + value = field.get(obj); + } catch (IllegalAccessException e) { + throw new ServiceException("获取属性性出错"); + } + //若为list则不处理 + if (value instanceof List) { + return; + } + //若为时间格式则进行格式化 + if (value instanceof LocalDateTime) { + value = DateUtil.format((LocalDateTime) value, TicketConstants.TICKET_DATE_PATTERN); + } + if (value instanceof Date) { + value = DateUtil.format((Date) value, TicketConstants.TICKET_DATE_PATTERN); + } + + if (map.containsKey(field.getName())) { + return; + } + + //属性上是否加入DefaultValue注解 若加入 则判断是否定义属性名以及值 若未定义则取原属性名及值 + if (ObjectUtil.isNotEmpty(defaultValue)) { + result.put(StringUtil.isNoneBlank(defaultValue.name()) ? defaultValue.name() : field.getName(), + ObjectUtil.isNotEmpty(defaultValue.value()) ? defaultValue.value() : value); + } else { + //如果导出word为null会出现{{ ,value设置"\u00A0" + result.put(field.getName(), Optional.ofNullable(value).orElse("")); + } + }); + } + return result; + } + + + /** + * 读取本地pdf,这里设置的是预览 + */ + public static void readPdf(HttpServletResponse response, String filePath) { + response.reset(); + response.setContentType("application/pdf"); + FileInputStream fileInputStream = null; + OutputStream outputStream = null; + try { + File file = new File(filePath); + fileInputStream = new FileInputStream(file); + outputStream = response.getOutputStream(); + IOUtils.write(IOUtils.toByteArray(fileInputStream), outputStream); + response.setHeader("Content-Disposition", + "inline; filename= " + URLEncoder.encode(file.getName(), "UTF-8")); + outputStream.flush(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + fileInputStream.close(); + outputStream.close(); + + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + /** + * 读取本地pdf,这里设置的是导出 + */ + public static void exportPdf(HttpServletResponse response, String filePath) { + response.reset(); + response.setContentType("application/pdf"); + FileInputStream fileInputStream = null; + OutputStream outputStream = null; + try { + File file = new File(filePath); + fileInputStream = new FileInputStream(file); + outputStream = response.getOutputStream(); + IOUtils.write(IOUtils.toByteArray(fileInputStream), outputStream); + response.setHeader("Content-Disposition", "inline; filename= " + URLEncoder.encode(file.getName(), "UTF-8")); + outputStream.flush(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + fileInputStream.close(); + outputStream.close(); + + } catch (IOException e) { + e.printStackTrace(); + } + } + } +} diff --git a/hzims-service/operational/src/main/resources/template/excel/constructio_template.xlsx b/hzims-service/operational/src/main/resources/template/excel/constructio_template.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..201df42805f492e2385a2649a8550ffb620fe490 GIT binary patch literal 17960 zcmeIaWn5g#vOYWnC%C%>cXxMpcXtaO+}#Q85G1$Z z`{8YvHA7Rf`sr#})m0-W2@C=ScrC#)>wK^8|5G4eJ{Z{=%Gul6Inc_zkRiWRK>Q@L zgvDx+0RjMA-v9vceuvV@I(ssnimD zl1Sv-(7SW1l~t0Vf;sPE(P0QOeDb*48WAqa`oHGB5%makCcq&u(e6pd=BLn_SeWOm zs`||5T`Op^t|mUqdd2`6S-NC#NQeGz2O?Lbp5l|TA#3k*qKF8p$B_qJKNlU`RW+5o zLbh&ybV6-U3VMHsngC*D69%>~S}54lY%-~@8Q(nhPtjIo za2kw??AqaVj}vDmHisr2JnI`;EBwo2WJLk9PYcB{`{x7T=h?iYv)4&$S%1fV12;FF z?*)6F7wi%KioKz&z40sfp0Q&RU3BPy$Dk`YKiZ_5B8zhl`HWRzK}f?~2yVZiq%jeV z*|_ioxwHkr5%C0@Pfvvs{vb&|_hx?<=UM9Ga04?e5kVo7h6v+36;ZNK&R*!I;t`H@ zl7duWg@URD4KLU{l^?ll7w3VA1z|L)<>C0xR&QZ~#Dh<@`Z5sbu1jz1?xp&7ZL$27DD& zY)T$wJQoG)S2^F?*;+B9FVsuVzYkeEFTC;cazavxq?~f<21?N8Wv;O~D$!EGAO5o0 zdq23nuNmb{*|m8aWE;XL)Y9P`}>KKOuf9=EY@B%l|-{5v~aJ0341w21i zTJjqme9*DqbIy;1k<$!2|1O4G(sIECW=8CxG}76-A0rH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yA4?zeKyzq0*4vinoO zpYa911*{SN)ce1p4gQqyXAtmj30`QwB>X!h`2XJMl$Q>DY4rc3%>2Cz|4f?st?}z$ z*?yJ|7Ah{Z@jM-^sBt`dc7R7 z{hjxp2jHI@h*t@}%(wDCNcdwr@h294W|IFFc=NxS^IO!PQvOU}`z_`2WqAL+VLzq( kOi=v4OX+<<`X8kHOp23}1pT?FU;(fI6)&F*d0(~vKQm8&$N&HU literal 0 HcmV?d00001 diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketInfoMapper.xml b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketInfoMapper.xml index 9c57323..2dc2cc3 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketInfoMapper.xml +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketInfoMapper.xml @@ -91,7 +91,7 @@ (select count(*) from hzims_work_ticket_info i where flow_description = '作废' and i.id = info.id) as invalid, (select count(*) from hzims_ticket_info_evaluate e where evaluate = '合格!' and e.id = eval.id) as qualified from hzims_work_ticket_info info - LEFT JOIN hzims_ticket_info_evaluate eval ON info.id = eval.ticket_i + LEFT JOIN hzims_ticket_info_evaluate eval ON info.id = eval.ticket_id and info.em_code in