Commit 6ec54a2d by wangweidong

土工平台修改

parent 89a034b6
...@@ -1054,11 +1054,28 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap ...@@ -1054,11 +1054,28 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
mapReplace.put("#{sampleCode}",vo.getSampleCode()); mapReplace.put("#{sampleCode}",vo.getSampleCode());
mapReplace.put("#{siteNo}",vo.getSiteNo()); mapReplace.put("#{siteNo}",vo.getSiteNo());
mapReplace.put("#{sampleDepth}",vo.getSampleDepth()); mapReplace.put("#{sampleDepth}",vo.getSampleDepth());
HSSFWorkbookUtil.replaceModel(mapReplace,xssfWorkbook,sheet); String midu = mapReplace.get("#{密度}");
if (StringUtils.isNotBlank(midu)){
try {
BigDecimal bigDecimal = new BigDecimal(midu);
BigDecimal mul = new BigDecimal("9.81");
BigDecimal rz981 = bigDecimal.multiply(mul);
mapReplace.put("#{密度9.81}",rz981.toString());
}catch (Exception e){
logger.error("密度9.81失败"+e.getMessage());
mapReplace.put("#{密度9.81}","");
}
}else{
mapReplace.put("#{密度9.81}","");
}
// HSSFWorkbookUtil.replaceModel(mapReplace,xssfWorkbook,sheet);
nextSample++; nextSample++;
} }
List<SoilItemVO> itemVOList = sampleSoilItemVOMap.get(firstVO.getSampleId()); List<SoilItemVO> itemVOList = sampleSoilItemVOMap.get(firstVO.getSampleId());
if (CollectionUtils.isNotEmpty(itemVOList)){ if (CollectionUtils.isNotEmpty(itemVOList)){
for (SoilItemVO itemVO:itemVOList) { for (SoilItemVO itemVO:itemVOList) {
...@@ -1087,8 +1104,27 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap ...@@ -1087,8 +1104,27 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
mapReplace.put("#{sampleCode}",firstVO.getSampleCode()); mapReplace.put("#{sampleCode}",firstVO.getSampleCode());
mapReplace.put("#{siteNo}",firstVO.getSiteNo()); mapReplace.put("#{siteNo}",firstVO.getSiteNo());
mapReplace.put("#{sampleDepth}",firstVO.getSampleDepth()); mapReplace.put("#{sampleDepth}",firstVO.getSampleDepth());
HSSFWorkbookUtil.replaceModel(mapReplace,xssfWorkbook,xssfSheet); String midu = mapReplace.get("#{密度}");
if (StringUtils.isNotBlank(midu)){
try {
BigDecimal bigDecimal = new BigDecimal(midu);
BigDecimal mul = new BigDecimal("9.81");
BigDecimal rz981 = bigDecimal.multiply(mul);
mapReplace.put("#{密度9.81}",rz981.toString());
}catch (Exception e){
logger.error("密度9.81失败"+e.getMessage());
mapReplace.put("#{密度9.81}","");
}
}else{
mapReplace.put("#{密度9.81}","");
}
HSSFWorkbookUtil.replaceModel(mapReplace,xssfWorkbook,xssfSheet);
int numSheet = xssfWorkbook.getNumberOfSheets();
for (int i = 0; i < numSheet; i++) {
HSSFWorkbookUtil.replaceModel(mapReplace,xssfWorkbook,xssfWorkbook.getSheetAt(i));
}
int length = voList.size(); int length = voList.size();
// for (int i = 0; i < length; i++) { // for (int i = 0; i < length; i++) {
......
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