Bladeren bron

病理附件审核人信息显示

陈长荣 2 maanden geleden
bovenliggende
commit
cd03742cd6

+ 49 - 0
jfcloud-gene-biz/src/main/java/com/github/jfcloud/gene/sample/service/biz/SamplePathologicalServiceImpl.java

@@ -15,11 +15,14 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.jfcloud.gene.cache.UserIdNameCache;
+import com.github.jfcloud.gene.common.constant.StrConstant;
 import com.github.jfcloud.gene.common.constant.WhetherEnum;
 import com.github.jfcloud.gene.common.util.CustomIdGenerator;
+import com.github.jfcloud.gene.constants.GeneStatusEnum;
 import com.github.jfcloud.gene.file.entity.FileInfo;
 import com.github.jfcloud.gene.file.service.FileInfoService;
 import com.github.jfcloud.gene.file.vo.FileVo;
+import com.github.jfcloud.gene.flow.entity.FlowAudit;
 import com.github.jfcloud.gene.flow.service.FlowAuditService;
 import com.github.jfcloud.gene.sample.entity.PathologicalPreExperiment;
 import com.github.jfcloud.gene.sample.entity.SampleInfo;
@@ -42,6 +45,7 @@ import org.springframework.stereotype.Service;
 import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Objects;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.stream.Collectors;
@@ -213,6 +217,51 @@ public class SamplePathologicalServiceImpl extends ServiceImpl<SamplePathologica
             pathologicalObj.put("prePeopleName", joinName);
         }
 
+        //课题负责人
+        if (Objects.nonNull(pathologicalVo.getSubjectLeaderId())) {
+            String subjectLeaderSign = userIdNameCache.getSignBase64(pathologicalVo.getSubjectLeaderId());
+            dataMap.put("subjectLeaderSign", subjectLeaderSign);
+        }
+
+        //查询审核记录
+        List<FlowAudit> flowAudits = flowAuditService.auditList(sampleId,"sample." + sampleInfo.getType(), true);
+        //项目管理部审核
+        flowAudits.stream()
+                .filter(audit -> GeneStatusEnum.PROJECT_MANAGEMENT.getStatus().equals(audit.getFlowStatus()) && StrConstant.YES.equals(audit.getAuditResult()))
+                .findFirst()
+                .ifPresent(audit -> {
+                    dataMap.put("projectManagementDateStr", DateUtil.format(audit.getCreateTime(), DatePattern.CHINESE_DATE_PATTERN));
+                    String base64 = wordDataService.getBase64(audit.getCreateSign());
+                    if (StrUtil.isNotBlank(base64)) {
+                        dataMap.put("projectManagementSign", base64);
+                    }
+                    //审核内容
+                    JSONObject auditObj = new JSONObject();
+                    if (StrUtil.isNotBlank(audit.getAdditionalData())) {
+                        auditObj = JSON.parseObject(audit.getAdditionalData());
+                    }
+                    auditObj.put("remarks", audit.getRemarks());
+                    dataMap.put("projectManagementAudit", auditObj);
+                });
+        //部门负责人审核
+        flowAudits.stream()
+                .filter(audit -> GeneStatusEnum.DEPART_LEADER.getStatus().equals(audit.getFlowStatus()) && StrConstant.YES.equals(audit.getAuditResult()))
+                .findFirst()
+                .ifPresent(audit -> {
+                    dataMap.put("departLeaderDateStr", DateUtil.format(audit.getCreateTime(), DatePattern.CHINESE_DATE_PATTERN));
+                    String base64 = wordDataService.getBase64(audit.getCreateSign());
+                    if (StrUtil.isNotBlank(base64)) {
+                        dataMap.put("departLeaderSign", base64);
+                    }
+                    //审核内容
+                    JSONObject auditObj = new JSONObject();
+                    if (StrUtil.isNotBlank(audit.getAdditionalData())) {
+                        auditObj = JSON.parseObject(audit.getAdditionalData());
+                    }
+                    auditObj.put("remarks", audit.getRemarks());
+                    dataMap.put("departLeaderAudit", auditObj);
+                });
+
         String modelName = "animalPathological.ftl";
         fileInfoService.uploadFileWithFileName(modelName, fileName, sampleInfo.getId(), sampleInfo.getStatus(), dataMap);
     }

+ 152 - 7
jfcloud-gene-biz/src/main/resources/ftlTemplate/animalPathological.ftl

@@ -3141,7 +3141,23 @@
 											<w:szCs w:val="21"/>
 											<w:lang w:eastAsia="zh-CN"/>
 										</w:rPr>
-										<w:t xml:space="preserve">                             </w:t>
+										<#if subjectLeaderSign??>
+											<w:t xml:space="preserve">  </w:t>
+											<w:pict>
+												<v:shape o:spt="75" alt="" type="#_x0000_t75"
+														 style="height:18pt; width:36pt;" filled="f"
+														 o:preferrelative="t" stroked="f" coordsize="21600,21600">
+													<v:path/>
+													<v:fill on="f" focussize="0,0"/>
+													<v:stroke on="f"/>
+													<v:imagedata r:id="rIdSubjectLeaderSign" o:title=""/>
+													<o:lock v:ext="edit" aspectratio="t"/>
+												</v:shape>
+											</w:pict>
+											<w:t xml:space="preserve">  </w:t>
+										<#else >
+											<w:t xml:space="preserve">                             </w:t>
+										</#if>
 									</w:r>
 									<w:r>
 										<w:rPr>
@@ -3165,6 +3181,27 @@
 										</w:rPr>
 										<w:t>):</w:t>
 									</w:r>
+									<#if projectManagementSign??>
+										<w:r>
+											<w:rPr>
+												<w:spacing w:val="7"/>
+												<w:lang w:eastAsia="zh-CN"/>
+											</w:rPr>
+											<w:t xml:space="preserve">  </w:t>
+											<w:pict>
+												<v:shape o:spt="75" alt="" type="#_x0000_t75"
+														 style="height:18pt; width:36pt;" filled="f"
+														 o:preferrelative="t" stroked="f" coordsize="21600,21600">
+													<v:path/>
+													<v:fill on="f" focussize="0,0"/>
+													<v:stroke on="f"/>
+													<v:imagedata r:id="rIdProjectManagementSign" o:title=""/>
+													<o:lock v:ext="edit" aspectratio="t"/>
+												</v:shape>
+											</w:pict>
+											<w:t xml:space="preserve">  </w:t>
+										</w:r>
+									</#if>
 								</w:p>
 							</w:tc>
 						</w:tr>
@@ -3399,11 +3436,24 @@
 									</w:pPr>
 									<w:r>
 										<w:rPr>
-											<w:spacing w:val="2"/>
+											<w:rFonts w:hint="default"/>
 											<w:lang w:eastAsia="zh-CN"/>
 										</w:rPr>
-										<w:t>情况说明:</w:t>
+										<#if departLeaderAudit?? >
+											<w:t>情况说明:${departLeaderAudit.remarks!}</w:t>
+										<#else >
+											<w:t>情况说明:</w:t>
+										</#if>
 									</w:r>
+									<#if projectManagementAudit?? && projectManagementAudit.remarks??>
+									<w:r>
+										<w:rPr>
+											<w:rFonts w:hint="default"/>
+											<w:lang w:eastAsia="zh-CN"/>
+										</w:rPr>
+										<w:t xml:space="preserve">  ${projectManagementAudit.remarks!}</w:t>
+									</w:r>
+									</#if>
 								</w:p>
 								<w:p w14:paraId="6F1FCBE7" w14:textId="77777777" w:rsidR="00203E36" w:rsidRDefault="00000000">
 									<w:pPr>
@@ -3438,7 +3488,23 @@
 											<w:spacing w:val="7"/>
 											<w:lang w:eastAsia="zh-CN"/>
 										</w:rPr>
-										<w:t xml:space="preserve">            </w:t>
+										<#if departLeaderSign??>
+											<w:t xml:space="preserve">  </w:t>
+											<w:pict>
+												<v:shape o:spt="75" alt="" type="#_x0000_t75"
+														 style="height:18pt; width:36pt;" filled="f"
+														 o:preferrelative="t" stroked="f" coordsize="21600,21600">
+													<v:path/>
+													<v:fill on="f" focussize="0,0"/>
+													<v:stroke on="f"/>
+													<v:imagedata r:id="rIdDepartLeaderSign" o:title=""/>
+													<o:lock v:ext="edit" aspectratio="t"/>
+												</v:shape>
+											</w:pict>
+											<w:t xml:space="preserve">  </w:t>
+										<#else >
+											<w:t xml:space="preserve">            </w:t>
+										</#if>
 									</w:r>
 									<w:r>
 										<w:rPr>
@@ -3458,6 +3524,27 @@
 										</w:rPr>
 										<w:t>):</w:t>
 									</w:r>
+									<#if projectManagementSign??>
+										<w:r>
+											<w:rPr>
+												<w:spacing w:val="7"/>
+												<w:lang w:eastAsia="zh-CN"/>
+											</w:rPr>
+											<w:t xml:space="preserve">  </w:t>
+											<w:pict>
+												<v:shape o:spt="75" alt="" type="#_x0000_t75"
+														 style="height:18pt; width:36pt;" filled="f"
+														 o:preferrelative="t" stroked="f" coordsize="21600,21600">
+													<v:path/>
+													<v:fill on="f" focussize="0,0"/>
+													<v:stroke on="f"/>
+													<v:imagedata r:id="rIdProjectManagementSign" o:title=""/>
+													<o:lock v:ext="edit" aspectratio="t"/>
+												</v:shape>
+											</w:pict>
+											<w:t xml:space="preserve">  </w:t>
+										</w:r>
+									</#if>
 								</w:p>
 							</w:tc>
 						</w:tr>
@@ -3672,11 +3759,24 @@
 									</w:pPr>
 									<w:r>
 										<w:rPr>
-											<w:spacing w:val="3"/>
+											<w:rFonts w:hint="default"/>
 											<w:lang w:eastAsia="zh-CN"/>
 										</w:rPr>
-										<w:t>缺失情况及处理办法:</w:t>
+										<#if departLeaderAudit?? >
+											<w:t>缺失情况及处理办法:${departLeaderAudit.processMethod!}</w:t>
+										<#else >
+											<w:t>缺失情况及处理办法:</w:t>
+										</#if>
 									</w:r>
+									<#if projectManagementAudit?? && projectManagementAudit.processMethod??>
+										<w:r>
+											<w:rPr>
+												<w:rFonts w:hint="default"/>
+												<w:lang w:eastAsia="zh-CN"/>
+											</w:rPr>
+											<w:t xml:space="preserve">  ${projectManagementAudit.processMethod!}</w:t>
+										</w:r>
+									</#if>
 								</w:p>
 								<w:p w14:paraId="12892070" w14:textId="77777777" w:rsidR="00203E36" w:rsidRDefault="00000000">
 									<w:pPr>
@@ -3711,7 +3811,23 @@
 											<w:spacing w:val="7"/>
 											<w:lang w:eastAsia="zh-CN"/>
 										</w:rPr>
-										<w:t xml:space="preserve">            </w:t>
+										<#if departLeaderSign??>
+											<w:t xml:space="preserve">  </w:t>
+											<w:pict>
+												<v:shape o:spt="75" alt="" type="#_x0000_t75"
+														 style="height:18pt; width:36pt;" filled="f"
+														 o:preferrelative="t" stroked="f" coordsize="21600,21600">
+													<v:path/>
+													<v:fill on="f" focussize="0,0"/>
+													<v:stroke on="f"/>
+													<v:imagedata r:id="rIdDepartLeaderSign" o:title=""/>
+													<o:lock v:ext="edit" aspectratio="t"/>
+												</v:shape>
+											</w:pict>
+											<w:t xml:space="preserve">  </w:t>
+										<#else >
+											<w:t xml:space="preserve">            </w:t>
+										</#if>
 									</w:r>
 									<w:r>
 										<w:rPr>
@@ -3731,6 +3847,27 @@
 										</w:rPr>
 										<w:t>):</w:t>
 									</w:r>
+									<#if projectManagementSign??>
+									<w:r>
+										<w:rPr>
+											<w:spacing w:val="7"/>
+											<w:lang w:eastAsia="zh-CN"/>
+										</w:rPr>
+											<w:t xml:space="preserve">  </w:t>
+											<w:pict>
+												<v:shape o:spt="75" alt="" type="#_x0000_t75"
+														 style="height:18pt; width:36pt;" filled="f"
+														 o:preferrelative="t" stroked="f" coordsize="21600,21600">
+													<v:path/>
+													<v:fill on="f" focussize="0,0"/>
+													<v:stroke on="f"/>
+													<v:imagedata r:id="rIdProjectManagementSign" o:title=""/>
+													<o:lock v:ext="edit" aspectratio="t"/>
+												</v:shape>
+											</w:pict>
+											<w:t xml:space="preserve">  </w:t>
+									</w:r>
+									</#if>
 								</w:p>
 							</w:tc>
 						</w:tr>
@@ -7760,6 +7897,9 @@
 				<#if projectManagementSign??>
 					<Relationship Id="rIdProjectManagementSign" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/projectManagementSign.png"/>
 				</#if>
+				<#if subjectLeaderSign??>
+					<Relationship Id="rIdSubjectLeaderSign" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="media/subjectLeaderSign.png"/>
+				</#if>
 			</Relationships>
 		</pkg:xmlData>
 	</pkg:part>
@@ -9707,4 +9847,9 @@ EomkH/L/ARAZ2D4kH01ZAAAAAElFTkSuQmCC</pkg:binaryData>
 			<pkg:binaryData>${projectManagementSign}</pkg:binaryData>
 		</pkg:part>
 	</#if>
+	<#if subjectLeaderSign??>
+		<pkg:part pkg:name="/word/media/subjectLeaderSign.png" pkg:contentType="image/png">
+			<pkg:binaryData>${subjectLeaderSign}</pkg:binaryData>
+		</pkg:part>
+	</#if>
 </pkg:package>