Commit 39f399e3 by wangweidong

土工平台修改

parent 714a5e70
......@@ -162,12 +162,12 @@ public class SoilExpReportServiceImpl extends BaseServiceImpl<SoilExpReportMappe
Map<String,String> replaceMap = new HashMap<>();
Map<String, String> mapReplace = new HashMap<>();
mapReplace.put("#{projectName}",entrust.getProjectName());
mapReplace.put("#{projectName}",StringHandleUtils.getString(entrust.getProjectName()));
mapReplace.put("#{reportCode}","报告编号:"+entrust.getEntrustCode());
mapReplace.put("#{client}",entrust.getClient());
mapReplace.put("#{boreholeName}",entrust.getBoreholeName());
mapReplace.put("#{projectNo}",entrust.getProjectNo());
mapReplace.put("#{testType}",entrust.getTestType());
mapReplace.put("#{client}",StringHandleUtils.getString(entrust.getClient()));
mapReplace.put("#{boreholeName}",StringHandleUtils.getString(entrust.getBoreholeName()));
mapReplace.put("#{projectNo}",StringHandleUtils.getString(entrust.getProjectNo()));
mapReplace.put("#{testType}",StringHandleUtils.getString(entrust.getTestType()));
int sheetNums = xssfWorkbook.getNumberOfSheets();
......@@ -709,28 +709,72 @@ public class SoilExpReportServiceImpl extends BaseServiceImpl<SoilExpReportMappe
if (dataAttribute.contains("-")){
String [] attrArrray = dataAttribute.split("-");
if (attrArrray.length !=2){
if (attrArrray.length < 2){
return;
}
String expName = attrArrray [0];
String itemName = attrArrray [1];
StringBuffer expNameSb =new StringBuffer();
String expName ="";
int length = attrArrray.length-1;
for (int i = 0; i < length; i++) {
expNameSb.append(attrArrray[i]).append("-");
}
expName = StringHandleUtils.getExcepLastOne(expNameSb.toString());
String itemName = attrArrray [attrArrray.length-1];
if (CollectionUtils.isNotEmpty(experimentVOList)){
for (SoilExperimentVO experiment:experimentVOList) {
if (vo.getSampleCode().equals(experiment.getSampleCode())&&expName.equals(experiment.getName())){
List<SoilItem> itemList = experiment.getItemList();
if (CollectionUtils.isNotEmpty(itemList)){
for (SoilItem item:itemList) {
if (itemName.equals(item.getName())){
cell.setCellValue(item.getTestValue());
break;
if (expName.equals("三轴压缩CD/CU")|| expName.equals("三轴CD/CU")){
for (int i = 0; i < 2; i++) {
if (vo.getSampleCode().equals(experiment.getSampleCode())&&"三轴压缩-CD".equals(experiment.getName())){
List<SoilItem> itemList = experiment.getItemList();
if (CollectionUtils.isNotEmpty(itemList)){
for (SoilItem item:itemList) {
if (itemName.equals(item.getName())){
cell.setCellValue(item.getTestValue());
break;
}
}
}
}
if (vo.getSampleCode().equals(experiment.getSampleCode())&&"三轴压缩-CU".equals(experiment.getName())){
List<SoilItem> itemList = experiment.getItemList();
if (CollectionUtils.isNotEmpty(itemList)){
for (SoilItem item:itemList) {
if (itemName.equals(item.getName())){
cell.setCellValue(item.getTestValue());
break;
}
}
}
}
}
}else{
if (vo.getSampleCode().equals(experiment.getSampleCode())&&expName.equals(experiment.getName())){
List<SoilItem> itemList = experiment.getItemList();
if (CollectionUtils.isNotEmpty(itemList)){
for (SoilItem item:itemList) {
if (itemName.equals(item.getName())){
cell.setCellValue(item.getTestValue());
break;
}
}
}
}
}
}
}
}
......
......@@ -427,6 +427,9 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
for (SoilExperimentVO vo:voList) {
XSSFRow xssfRow = sheetOne.getRow(beginRow);
for (SoilOriginalTemplateConfig config:configList) {
if(null == config.getColumnPlace()){
continue;
}
XSSFCell cell = xssfRow.getCell(config.getColumnPlace());
if ("sn".equals(config.getDataAttribute())){
continue;
......
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