|
|
|
|
@ -12,6 +12,7 @@ import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.apache.poi.xwpf.usermodel.XWPFDocument; |
|
|
|
|
import org.springblade.common.utils.ZipCompressUtil; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
|
import org.springblade.lims.entry.*; |
|
|
|
|
import org.springblade.lims.excel.ExamineTemplate2Excel; |
|
|
|
|
import org.springblade.lims.excel.PCR2Excel; |
|
|
|
|
@ -895,8 +896,8 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
response.setContentType("application/octet-stream"); |
|
|
|
|
response.setHeader("content-disposition", "attachment;filename=12344.docx"); |
|
|
|
|
doc.write(response.getOutputStream()); |
|
|
|
|
entrust.setEntrustStatus("6"); |
|
|
|
|
this.updateById(entrust); |
|
|
|
|
// entrust.setEntrustStatus("8");
|
|
|
|
|
// this.updateById(entrust);
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} finally { |
|
|
|
|
@ -971,14 +972,52 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
result1.put("experieDate", format3.format(taskBlueprint.getCreateTime())); |
|
|
|
|
result1.put("remark", entrust.getRemark()); |
|
|
|
|
result1.put("resultList1", ItemAndAllList); |
|
|
|
|
// 盖章图片
|
|
|
|
|
// 图片路劲
|
|
|
|
|
String path = sysClient.getParamValue("electronic_signature_real_path").getData(); |
|
|
|
|
// 编制人签名
|
|
|
|
|
if (StringUtil.isBlank(entrust.getOrganizationBy())) { |
|
|
|
|
User user = userClient.userInfoById(Long.parseLong(entrust.getOrganizationBy())).getData(); |
|
|
|
|
ImageEntity farView = new ImageEntity(); |
|
|
|
|
farView.setHeight(80);//设置高度
|
|
|
|
|
farView.setWidth(80);//设置宽度
|
|
|
|
|
farView.setHeight(50);//设置高度
|
|
|
|
|
farView.setWidth(90);//设置宽度
|
|
|
|
|
farView.setType(ImageEntity.Data);//类型
|
|
|
|
|
String path = sysClient.getParamValue("electronic_signature_real_path").getData(); |
|
|
|
|
String pictureName = sysClient.getParamValue("seal_picture_path").getData(); |
|
|
|
|
String s1 = path + pictureName; |
|
|
|
|
String s1 = path + user.getElectronicSignature(); |
|
|
|
|
FileInputStream fis = null; |
|
|
|
|
try { |
|
|
|
|
fis = new FileInputStream(new File(s1)); |
|
|
|
|
byte[] bytes = readInputStream(fis); |
|
|
|
|
farView.setData(bytes); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
result1.put("1", farView); |
|
|
|
|
} |
|
|
|
|
// 审核人签名
|
|
|
|
|
if (StringUtil.isBlank(entrust.getVerifyBy())) { |
|
|
|
|
User user = userClient.userInfoById(Long.parseLong(entrust.getVerifyBy())).getData(); |
|
|
|
|
ImageEntity farView = new ImageEntity(); |
|
|
|
|
farView.setHeight(50);//设置高度
|
|
|
|
|
farView.setWidth(90);//设置宽度
|
|
|
|
|
farView.setType(ImageEntity.Data);//类型
|
|
|
|
|
String s1 = path + user.getElectronicSignature(); |
|
|
|
|
FileInputStream fis = null; |
|
|
|
|
try { |
|
|
|
|
fis = new FileInputStream(new File(s1)); |
|
|
|
|
byte[] bytes = readInputStream(fis); |
|
|
|
|
farView.setData(bytes); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
result1.put("2", farView); |
|
|
|
|
} |
|
|
|
|
// 审批人签名
|
|
|
|
|
if (StringUtil.isBlank(entrust.getApprovalBy())) { |
|
|
|
|
User user = userClient.userInfoById(Long.parseLong(entrust.getApprovalBy())).getData(); |
|
|
|
|
ImageEntity farView = new ImageEntity(); |
|
|
|
|
farView.setHeight(50);//设置高度
|
|
|
|
|
farView.setWidth(90);//设置宽度
|
|
|
|
|
farView.setType(ImageEntity.Data);//类型
|
|
|
|
|
String s1 = path + user.getElectronicSignature(); |
|
|
|
|
FileInputStream fis = null; |
|
|
|
|
try { |
|
|
|
|
fis = new FileInputStream(new File(s1)); |
|
|
|
|
@ -987,7 +1026,24 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
result1.put("11", farView); |
|
|
|
|
result1.put("3", farView); |
|
|
|
|
} |
|
|
|
|
// 盖章图片
|
|
|
|
|
// ImageEntity farView = new ImageEntity();
|
|
|
|
|
// farView.setHeight(80);//设置高度
|
|
|
|
|
// farView.setWidth(80);//设置宽度
|
|
|
|
|
// farView.setType(ImageEntity.Data);//类型
|
|
|
|
|
// String pictureName = sysClient.getParamValue("seal_picture_path").getData();
|
|
|
|
|
// String s1 = path + pictureName;
|
|
|
|
|
// FileInputStream fis = null;
|
|
|
|
|
// try {
|
|
|
|
|
// fis = new FileInputStream(new File(s1));
|
|
|
|
|
// byte[] bytes = readInputStream(fis);
|
|
|
|
|
// farView.setData(bytes);
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// e.printStackTrace();
|
|
|
|
|
// }
|
|
|
|
|
// result1.put("11", farView);
|
|
|
|
|
return result1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|