From 1bc536c54fc1c2f25a4cff4b162cfa6979604fff Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 29 八月 2024 17:31:10 +0800
Subject: [PATCH] 企业微信对接+工时优化+设备查询项目树结构优化
---
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java | 35 +++++++++++++++++------------------
1 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
index 9800317..abf4187 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
@@ -21,6 +21,7 @@
import com.yuanchu.mom.mapper.UserMapper;
import com.yuanchu.mom.pojo.InsOrder;
import com.yuanchu.mom.pojo.InsReport;
+import com.yuanchu.mom.pojo.User;
import com.yuanchu.mom.service.InsReportService;
import com.yuanchu.mom.utils.QueryWrappers;
import com.yuanchu.mom.vo.Result;
@@ -81,7 +82,19 @@
map.put("head", PrintChina.printChina(ReportPageDto.class));
Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("pageInsReport");
if (map1.get("look") == 1) reportPageDto.setCreateUser(map1.get("userId"));
- map.put("body", insReportMapper.pageInsReport(page, QueryWrappers.queryWrappers(reportPageDto)));
+ User user = userMapper.selectById(map1.get("userId"));//褰撳墠鐧诲綍鐨勪汉
+ //鑾峰彇褰撳墠浜烘墍灞炲疄楠屽id
+ String departLimsId = user.getDepartLimsId();
+ String laboratory = null;
+ if (ObjectUtils.isNotEmpty(departLimsId) && !departLimsId.equals("")) {
+ String[] split = departLimsId.split(",");
+ //鏌ヨ瀵瑰簲鏋舵瀯鍚嶇О(閫氫俊瀹為獙瀹�,鐢靛姏瀹為獙瀹�,妫�娴嬪姙)
+ String departLims = insOrderMapper.seldepLimsId(Integer.parseInt(split[split.length - 1]));
+ if (departLims.contains("瀹為獙瀹�")) {
+ laboratory = departLims;
+ }
+ }
+ map.put("body", insReportMapper.pageInsReport(page, QueryWrappers.queryWrappers(reportPageDto),laboratory));
return map;
}
@@ -158,7 +171,7 @@
//鎵瑰噯
@Override
@Transactional(rollbackFor = Exception.class)
- public int ratifyReport(Integer id, Integer isRatify, String ratifyTell) {
+ public int ratifyReport(Integer id, Integer isRatify, String ratifyTell,String sealUrl) {
InsReport insReport = insReportMapper.selectById(id);
insReport.setIsRatify(isRatify);
if (ObjectUtils.isNotEmpty(ratifyTell)) {
@@ -179,14 +192,14 @@
throw new ErrorException("鎵句笉鍒版壒鍑嗕汉鐨勭鍚�");
}
//鑾峰彇鍦烘墍鐨勬姤鍛婁笓鐢ㄧ珷
- String sealUrl;
+ /* String sealUrl;
try {
String laboratory = insOrderMapper.selectById(insReport.getInsOrderId()).getLaboratory();
sealUrl = insReportMapper.getLaboratoryByName(laboratory);
} catch (Exception e) {
throw new ErrorException("鎵句笉鍒版姤鍛婁笓鐢ㄧ珷");
}
- if (sealUrl == null) throw new ErrorException("鎵句笉鍒版姤鍛婁笓鐢ㄧ珷");
+ if (sealUrl == null) throw new ErrorException("鎵句笉鍒版姤鍛婁笓鐢ㄧ珷");*/
//绯荤粺鐢熸垚鎶ュ憡鍦板潃
String url = insReport.getUrl();
//鎵嬪姩涓婁紶鎶ュ憡鍦板潃
@@ -198,20 +211,6 @@
put("seal2", Pictures.ofLocal(imgUrl + "/" + sealUrl).create());
}}, finalUrl);
wordToPdf(finalUrl, sealUrl);
-
- /* String replace = finalUrl.replace(".docx", ".pdf");
- CompletableFuture.supplyAsync(() -> {
- try {
- stamperCheckMarkPDF(replace,replace,sealUrl);
- return null;
- } catch (Exception e) {
- throw new ErrorException("楠戠紳绔犳彃鍏ュけ璐�");
- }
- }).thenAccept(res -> {
- }).exceptionally(e -> {
- e.printStackTrace();
- return null;
- });*/
InsOrder insOrder = new InsOrder();
insOrder.setId(insReportMapper.selectById(id).getInsOrderId());
--
Gitblit v1.9.3