Browse Source

委托单填报回显 进场日期和代表数量显示格式更改

DengLinLang 5 months ago
parent
commit
b579c576aa

+ 6 - 3
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -4430,8 +4430,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             htmlString = htmlString.replaceAll("placeholder", "placeholderxx");
             htmlString = htmlString.replaceAll("title", "titlexx");
             Document doc = Jsoup.parse(htmlString);
-            //通过html获取页面上的key值 返回key值对应的数据
-            setBasicFormData(doc, reData, sampleInfo, trialMaterialMobilization,null);
+
             if (dataIn.size() >= 1) {
                 Map<String, Object> mysqlData = dataIn.get(0);
                 for (String key : mysqlData.keySet()) {
@@ -4497,10 +4496,13 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     }
                 }
             }
+            //通过html获取页面上的key值 返回key值对应的数据
+            setBasicFormData(doc, reData, sampleInfo, trialMaterialMobilization,null);
         } catch (Exception e) {
             e.printStackTrace();
         }
 
+
         // 获取默认值
         QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
         queryWrapper.select("col_key", "sig_role_name");
@@ -4547,12 +4549,13 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             setFirstData(doc,"生产厂家",trialMaterialMobilization.getPlaceOfProduction(),reData);
         }
         String representativeCount = sampleInfo.getRepresentativeCount();
+        String calculationUnit = sampleInfo.getCalculationUnit();
         Date mobilizationDate = sampleInfo.getMobilizationDate();
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:ss:mm");
         String format = simpleDateFormat.format(mobilizationDate);
         setFirstData(doc,"批号",sampleInfo.getBatchNumber(),reData);
         setFirstData(doc,"拟用结构部 位",sampleInfo.getProposedPosition(),reData);
-        setFirstData(doc,"进场日期代表数量",format+representativeCount,reData);
+        setFirstData(doc,"进场日期代表数量",format+"/"+representativeCount+calculationUnit,reData);
     }
     private static void setFirstData(Document doc, String elementValue,Object value,Map<String, Object> reData) {