| | |
| | | import com.ruoyi.process.mapper.InspectionOrderMapper; |
| | | import com.ruoyi.process.pojo.InspectionOrder; |
| | | import com.ruoyi.process.pojo.InspectionOrderDetail; |
| | | import com.ruoyi.process.pojo.ProcessReport; |
| | | import com.ruoyi.process.service.InspectionOrderDetailService; |
| | | import com.ruoyi.process.service.InspectionOrderService; |
| | | import com.ruoyi.process.service.ProcessReportService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import java.nio.file.Path; |
| | | import java.nio.file.Paths; |
| | | import java.nio.file.StandardCopyOption; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | |
| | | private InsReportService insReportService; |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | @Resource |
| | | private ProcessReportService processReportService; |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | inspectionOrderDetailService.saveBatch(inspectionOrder.getOrderDetailList()); |
| | | } |
| | | |
| | | //新增7.8报告结果 |
| | | ProcessReport processReport = new ProcessReport(); |
| | | processReport.setInspectionOrderId(inspectionOrder.getInsOrderId()); |
| | | processReport.setInsReportCode(inspectionOrder.getEntrustCode());//报告编号=委托编号 |
| | | //页数 |
| | | try { |
| | | com.aspose.words.Document doc = new com.aspose.words.Document(path); |
| | | processReport.setPages(doc.getPageCount()+""); |
| | | } catch (Exception e) { |
| | | } |
| | | processReport.setNumber("1");//发送份数默认1 |
| | | processReport.setSend(inspectionOrder.getCommissionUnit());//发往何处=委托单位 |
| | | processReport.setMethod(inspectionOrder.getSend()==1?"自取":"其他");//发送方式 |
| | | processReport.setSendTime(insReport.getRatifyTime().toLocalDate());//发送日期 |
| | | processReport.setSendUser(64);//发送人固定 |
| | | processReport.setSignatory(inspectionOrder.getCommissionUser());//签收人=委托人 |
| | | processReportService.save(processReport); |
| | | return true; |
| | | } |
| | | |
| | |
| | | } |
| | | inspectionOrderDetailService.saveBatch(InspectionOrder.getOrderDetailList()); |
| | | |
| | | //修改7.9报告结果 |
| | | ProcessReport processReport = processReportService.getOne(Wrappers.<ProcessReport>lambdaQuery().eq(ProcessReport::getInspectionOrderId, InspectionOrder.getInspectionOrderId())); |
| | | processReport.setInsReportCode(InspectionOrder.getEntrustCode());//报告编号=委托编号 |
| | | processReportService.updateById(processReport); |
| | | |
| | | return true; |
| | | } |
| | | |