| | |
| | | insReport.setWriteUserId(getLook.selectPowerByMethodAndUserId(null).get("userId"));//提交人 |
| | | insReport.setWriteTime(LocalDateTime.now());//提交时间 |
| | | //获取提交人的签名地址 |
| | | String signatureUrl = userMapper.selectById(insReport.getWriteUserId()).getSignatureUrl(); |
| | | String signatureUrl; |
| | | try { |
| | | signatureUrl = userMapper.selectById(insReport.getWriteUserId()).getSignatureUrl(); |
| | | }catch (Exception e){ |
| | | throw new ErrorException("找不到编制人的签名"); |
| | | } |
| | | //系统生成报告地址 |
| | | String url = insReport.getUrl(); |
| | | //手动上传报告地址 |
| | |
| | | return insReportMapper.updateById(insReport); |
| | | } |
| | | //获取审核人的签名地址 |
| | | String signatureUrl = userMapper.selectById(insReport.getExamineUserId()).getSignatureUrl(); |
| | | String signatureUrl; |
| | | try { |
| | | signatureUrl = userMapper.selectById(insReport.getExamineUserId()).getSignatureUrl(); |
| | | }catch (Exception e){ |
| | | throw new ErrorException("找不到审核人的签名"); |
| | | } |
| | | //系统生成报告地址 |
| | | String url = insReport.getUrl(); |
| | | //手动上传报告地址 |
| | |
| | | insReport.setState(0);//提交状态改为待提交 |
| | | return insReportMapper.updateById(insReport); |
| | | } |
| | | //获取审核人的签名地址 |
| | | String signatureUrl = userMapper.selectById(insReport.getRatifyUserId()).getSignatureUrl(); |
| | | //获取批准人的签名地址 |
| | | String signatureUrl; |
| | | try { |
| | | signatureUrl = userMapper.selectById(insReport.getRatifyUserId()).getSignatureUrl(); |
| | | }catch (Exception e){ |
| | | throw new ErrorException("找不到批准人的签名"); |
| | | } |
| | | String sealUrl; |
| | | try { |
| | | String laboratory = insOrderMapper.selectById(insReport.getInsOrderId()).getLaboratory(); |
| | | sealUrl = insReportMapper.getLaboratoryByName(laboratory); |
| | | }catch (Exception e){ |
| | | throw new ErrorException("找不到报告章印"); |
| | | } |
| | | //系统生成报告地址 |
| | | String url = insReport.getUrl(); |
| | | //手动上传报告地址 |
| | | String urlS = insReport.getUrlS(); |
| | | wordInsertUrl(new HashMap<String, Object>(){{ |
| | | put("ratifyUrl", Pictures.ofLocal(imgUrl+"/"+signatureUrl).create()); |
| | | put("seal1", Pictures.ofLocal(imgUrl+"/"+sealUrl).create()); |
| | | put("seal2", Pictures.ofLocal(imgUrl+"/"+sealUrl).create()); |
| | | }}, (urlS==null?url:urlS).replace("/word", wordUrl)); |
| | | wordToPdf((urlS == null ? url : urlS).replace("/word", wordUrl)); |
| | | InsOrder insOrder = new InsOrder(); |