Commit 30a90fb2 authored by 竹天卫's avatar 竹天卫

检测报告导出 优化

parent 3faa344c
...@@ -5152,10 +5152,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -5152,10 +5152,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
// String id = Integer.parseInt(idStr) + ""; // String id = Integer.parseInt(idStr) + "";
methods.forEach(opt -> { methods.forEach(opt -> {
if (idStr.equals(opt.getNumber())) { if (idStr.equals(opt.getNumber())) {
String standard = StringUtils.isNoneBlank(opt.getStandard())?opt.getStandard():"";
if (StrUtil.isBlank(arg.getMethodName())) { if (StrUtil.isBlank(arg.getMethodName())) {
arg.setMethodName(opt.getStandard() + " " + opt.getName()); arg.setMethodName(standard+" " + opt.getName());
} else { } else {
arg.setMethodName(arg.getMethodName() + "~~~、" + opt.getStandard() + " " + opt.getName()); arg.setMethodName(arg.getMethodName() + "~~~、" + standard+" " + opt.getName());
} }
} }
}); });
...@@ -5202,6 +5203,12 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -5202,6 +5203,12 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
rts.setMethodNames(new ArrayList<>(source.size())); rts.setMethodNames(new ArrayList<>(source.size()));
rts.setTeamNames(new ArrayList<>(source.size())); rts.setTeamNames(new ArrayList<>(source.size()));
Set<Integer> equipmentIds = new HashSet<>(source.size()); Set<Integer> equipmentIds = new HashSet<>(source.size());
//依据先是GB、再是JC、最后TR的顺序。 ELSE
List<String> methodAllList= new ArrayList<>();
List<String> GBList= new ArrayList<>();
List<String> JCList= new ArrayList<>();
List<String> TRList= new ArrayList<>();
List<String> ELSEList= new ArrayList<>();
source.forEach(arg -> { source.forEach(arg -> {
if(arg.getEquipmentId() != null){ if(arg.getEquipmentId() != null){
equipmentIds.add(arg.getEquipmentId()); equipmentIds.add(arg.getEquipmentId());
...@@ -5219,13 +5226,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -5219,13 +5226,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
//关联检测依据 //关联检测依据
if (StrUtil.isNotBlank(arg.getMethodName())) { if (StrUtil.isNotBlank(arg.getMethodName())) {
String[] methodSplits = arg.getMethodName().split("~~~、"); String[] methodSplits = arg.getMethodName().split("~~~、");
//依据先是GB、再是JC、最后TR的顺序。 ELSE
List<String> GBList= new ArrayList<>();
List<String> JCList= new ArrayList<>();
List<String> TRList= new ArrayList<>();
List<String> ELSEList= new ArrayList<>();
for (String methodName : methodSplits) { for (String methodName : methodSplits) {
if(!rts.getMethodNames().contains(methodName)){ if(!methodAllList.contains(methodName)){
if(methodName.startsWith("GB")){ if(methodName.startsWith("GB")){
GBList.add(methodName); GBList.add(methodName);
}else if(methodName.startsWith("JC")){ }else if(methodName.startsWith("JC")){
...@@ -5235,15 +5237,9 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -5235,15 +5237,9 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}else{ }else{
ELSEList.add(methodName); ELSEList.add(methodName);
} }
rts.getMethodNames().add(methodName); methodAllList.add(methodName);
} }
} }
GBList.addAll(JCList);
GBList.addAll(TRList);
GBList.addAll(ELSEList);
rts.getMethodNames().clear();
rts.getMethodNames().addAll(GBList);
} }
//关联样品名 //关联样品名
if (StrUtil.isNotBlank(arg.getName())) { if (StrUtil.isNotBlank(arg.getName())) {
...@@ -5253,6 +5249,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -5253,6 +5249,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
} }
}); });
GBList.addAll(JCList);
GBList.addAll(TRList);
GBList.addAll(ELSEList);
rts.getMethodNames().addAll(GBList);
rts.setSampleNum(rts.getSampleNames().size()); rts.setSampleNum(rts.getSampleNames().size());
//关联仪器名字 去重 //关联仪器名字 去重
......
...@@ -3975,12 +3975,12 @@ ...@@ -3975,12 +3975,12 @@
<!--检测依据 15 --> <!--检测依据 15 -->
<#--插入第一个检测依据--> <#--插入第一个检测依据-->
<Row ss:AutoFitHeight="0" ss:Height="20"> <Row ss:AutoFitHeight="0" ss:Height="17.25">
<Cell ss:MergeDown="14" ss:StyleID="s166"><Data ss:Type="String">检测依据</Data><NamedCell <Cell ss:MergeDown="14" ss:StyleID="s166"><Data ss:Type="String">检测依据</Data><NamedCell
ss:Name="_FilterDatabase"/></Cell> ss:Name="_FilterDatabase"/></Cell>
<Cell ss:StyleID="s167"> <Cell ss:Index="2" ss:StyleID="s167"><ss:Data ss:Type="String"
<ss:Data ss:Type="String" xmlns="http://www.w3.org/TR/REC-html40"> xmlns="http://www.w3.org/TR/REC-html40">
<Font html:Face="楷体" x:Family="Modern">${firstMethodName}</Font> <Font html:Face="楷体" x:Family="Modern">${firstMethodName}</Font>
<Font> </Font> <Font> </Font>
</ss:Data><NamedCell ss:Name="_FilterDatabase"/></Cell> </ss:Data><NamedCell ss:Name="_FilterDatabase"/></Cell>
<Cell ss:Index="4" ss:StyleID="s168"><NamedCell ss:Name="_FilterDatabase"/></Cell> <Cell ss:Index="4" ss:StyleID="s168"><NamedCell ss:Name="_FilterDatabase"/></Cell>
...@@ -3995,8 +3995,9 @@ ...@@ -3995,8 +3995,9 @@
<Row ss:AutoFitHeight="0" ss:Height="17.25"> <Row ss:AutoFitHeight="0" ss:Height="17.25">
<Cell ss:Index="2" ss:StyleID="s167"><ss:Data ss:Type="String" <Cell ss:Index="2" ss:StyleID="s167"><ss:Data ss:Type="String"
xmlns="http://www.w3.org/TR/REC-html40"> xmlns="http://www.w3.org/TR/REC-html40">
<Font html:Face="楷体" x:Family="Modern">${item}</Font><Font></Font></ss:Data><NamedCell <Font html:Face="楷体" x:Family="Modern">${item}</Font>
ss:Name="_FilterDatabase"/></Cell> <Font> </Font>
</ss:Data><NamedCell ss:Name="_FilterDatabase"/></Cell>
<Cell ss:StyleID="s119"><NamedCell ss:Name="_FilterDatabase"/></Cell> <Cell ss:StyleID="s119"><NamedCell ss:Name="_FilterDatabase"/></Cell>
<Cell ss:StyleID="s169"><NamedCell ss:Name="_FilterDatabase"/></Cell> <Cell ss:StyleID="s169"><NamedCell ss:Name="_FilterDatabase"/></Cell>
<Cell ss:StyleID="s122"><NamedCell ss:Name="_FilterDatabase"/></Cell> <Cell ss:StyleID="s122"><NamedCell ss:Name="_FilterDatabase"/></Cell>
...@@ -4017,7 +4018,7 @@ ...@@ -4017,7 +4018,7 @@
</#list> </#list>
<#if methodNames?size lte 13> <#if methodNames?size lte 13>
<Row ss:AutoFitHeight="0" ss:Height="20"> <Row ss:AutoFitHeight="0" ss:Height="17.25">
<Cell ss:Index="2" ss:MergeAcross="2" ss:StyleID="m2194692801716"><Data <Cell ss:Index="2" ss:MergeAcross="2" ss:StyleID="m2194692801716"><Data
ss:Type="String">以下空白</Data><NamedCell ss:Name="_FilterDatabase"/></Cell> ss:Type="String">以下空白</Data><NamedCell ss:Name="_FilterDatabase"/></Cell>
<Cell ss:Index="9" ss:StyleID="s122"/> <Cell ss:Index="9" ss:StyleID="s122"/>
...@@ -4045,7 +4046,7 @@ ...@@ -4045,7 +4046,7 @@
<Cell ss:StyleID="s122"/> <Cell ss:StyleID="s122"/>
</Row> </Row>
</#list> </#list>
<Row ss:AutoFitHeight="0" ss:Height="18"> <Row ss:AutoFitHeight="0" ss:Height="17.25">
<Cell ss:Index="2" ss:StyleID="s182"><NamedCell ss:Name="_FilterDatabase"/></Cell> <Cell ss:Index="2" ss:StyleID="s182"><NamedCell ss:Name="_FilterDatabase"/></Cell>
<Cell ss:StyleID="s183"><NamedCell ss:Name="_FilterDatabase"/></Cell> <Cell ss:StyleID="s183"><NamedCell ss:Name="_FilterDatabase"/></Cell>
<Cell ss:StyleID="s184"><NamedCell ss:Name="_FilterDatabase"/></Cell> <Cell ss:StyleID="s184"><NamedCell ss:Name="_FilterDatabase"/></Cell>
...@@ -4070,7 +4071,7 @@ ...@@ -4070,7 +4071,7 @@
</#if> </#if>
<#--如果检测依据信息为空--> <#--如果检测依据信息为空-->
<#if ! methodNames??> <#if ! methodNames??>
<Row ss:AutoFitHeight="0" ss:Height="20"> <Row ss:AutoFitHeight="0" ss:Height="17.25">
<Cell ss:Index="2" ss:MergeAcross="2" ss:StyleID="m2194692801716"><Data <Cell ss:Index="2" ss:MergeAcross="2" ss:StyleID="m2194692801716"><Data
ss:Type="String">以下空白</Data><NamedCell ss:Name="_FilterDatabase"/></Cell> ss:Type="String">以下空白</Data><NamedCell ss:Name="_FilterDatabase"/></Cell>
<Cell ss:Index="9" ss:StyleID="s122"/> <Cell ss:Index="9" ss:StyleID="s122"/>
...@@ -4104,7 +4105,7 @@ ...@@ -4104,7 +4105,7 @@
<Row ss:AutoFitHeight="0" ss:Height="18" > <Row ss:AutoFitHeight="0" ss:Height="18" >
<Cell ss:MergeDown="8" ss:StyleID="s187"><Data ss:Type="String">主要仪器设备(编号)</Data><NamedCell <Cell ss:MergeDown="8" ss:StyleID="s187"><Data ss:Type="String">主要仪器设备(编号)</Data><NamedCell
ss:Name="_FilterDatabase"/></Cell> ss:Name="_FilterDatabase"/></Cell>
<Cell ss:StyleID="s167"> <Cell ss:Index="2" ss:StyleID="s167">
<ss:Data ss:Type="String" xmlns="http://www.w3.org/TR/REC-html40"> <ss:Data ss:Type="String" xmlns="http://www.w3.org/TR/REC-html40">
<Font html:Face="楷体" x:Family="Modern">${firstEquipment}</Font> <Font html:Face="楷体" x:Family="Modern">${firstEquipment}</Font>
<Font > </Font> <Font > </Font>
...@@ -4121,10 +4122,9 @@ ...@@ -4121,10 +4122,9 @@
<Row ss:AutoFitHeight="0" ss:Height="18" ss:StyleID="s173"> <Row ss:AutoFitHeight="0" ss:Height="18" ss:StyleID="s173">
<Cell ss:Index="2" ss:StyleID="s167"> <Cell ss:Index="2" ss:StyleID="s167">
<ss:Data ss:Type="String" xmlns="http://www.w3.org/TR/REC-html40"> <ss:Data ss:Type="String" xmlns="http://www.w3.org/TR/REC-html40">
<Font html:Size="12">${item}</Font> <Font html:Face="楷体" x:Family="Modern">${item}</Font>
<Font html:Face="Times New Roman" x:Family="Roman" html:Size="12"> </Font> <Font > </Font>
</ss:Data><NamedCell ss:Name="_FilterDatabase"/> </ss:Data><NamedCell ss:Name="_FilterDatabase"/></Cell>
</Cell>
<Cell ss:Index="4" ss:StyleID="s563"><NamedCell ss:Name="_FilterDatabase"/></Cell> <Cell ss:Index="4" ss:StyleID="s563"><NamedCell ss:Name="_FilterDatabase"/></Cell>
<Cell ss:Index="8" ss:StyleID="s173"><NamedCell ss:Name="_FilterDatabase"/></Cell> <Cell ss:Index="8" ss:StyleID="s173"><NamedCell ss:Name="_FilterDatabase"/></Cell>
<Cell ss:Index="11" ss:StyleID="s173"/> <Cell ss:Index="11" ss:StyleID="s173"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment