Commit 3f544d45 by ghxdhr

生成原始记录修改

parent 5974521d
......@@ -65,6 +65,7 @@ public class MoreItemMoreOperation implements Operation {
XSSFRow xssfRow = sheetIndex.getRow(beginRow);
XSSFRow xssfRowTwo = null;
XSSFRow xssfRowThree = null;
XSSFRow xssfRow4 = null;
if (sampleMergerNum == 2) {
xssfRowTwo = sheetOne.getRow(beginRow + 1);
}
......@@ -72,15 +73,24 @@ public class MoreItemMoreOperation implements Operation {
xssfRowTwo = sheetOne.getRow(beginRow + 1);
xssfRowThree = sheetOne.getRow(beginRow + 2);
}
if (sampleMergerNum == 4) {
xssfRowTwo = sheetOne.getRow(beginRow + 1);
xssfRowThree = sheetOne.getRow(beginRow + 2);
xssfRow4 = sheetOne.getRow(beginRow + 3);
}
for (OriginalTemplateConfig config:configList) {
XSSFCell cell = xssfRow.getCell(config.getColumnPlace());
XSSFCell cell2 = null;
XSSFCell cell3 = null;
XSSFCell cell4 = null;
if (null != xssfRowTwo) {
cell2 = xssfRowTwo.getCell(config.getColumnPlace());
}
if (null != xssfRowThree) {
cell3 = xssfRowTwo.getCell(config.getColumnPlace());
cell3 = xssfRowThree.getCell(config.getColumnPlace());
}
if (null != xssfRow4) {
cell4 = xssfRow4.getCell(config.getColumnPlace());
}
if ("sn".equals(config.getDataAttribute())){
continue;
......@@ -99,6 +109,9 @@ public class MoreItemMoreOperation implements Operation {
if (null != cell3 && vo.getCollectionDataList().size() >= 3) {
cell3.setCellValue(vo.getCollectionDataList().get(2).get(mapKey));
}
if (null != cell4 && vo.getCollectionDataList().size() >= 4) {
cell4.setCellValue(vo.getCollectionDataList().get(3).get(mapKey));
}
}
continue;
}
......
......@@ -46,6 +46,7 @@ public class SingleSheetLittleOperation implements Operation {
XSSFRow xssfRow = sheetOne.getRow(beginRow);
XSSFRow xssfRowTwo = null;
XSSFRow xssfRowThree = null;
XSSFRow xssfRow4 = null;
if (sampleMergerNum == 2) {
xssfRowTwo = sheetOne.getRow(beginRow + 1);
}
......@@ -53,15 +54,24 @@ public class SingleSheetLittleOperation implements Operation {
xssfRowTwo = sheetOne.getRow(beginRow + 1);
xssfRowThree = sheetOne.getRow(beginRow + 2);
}
if (sampleMergerNum == 4) {
xssfRowTwo = sheetOne.getRow(beginRow + 1);
xssfRowThree = sheetOne.getRow(beginRow + 2);
xssfRow4 = sheetOne.getRow(beginRow + 3);
}
for (OriginalTemplateConfig config:configList) {
XSSFCell cell = xssfRow.getCell(config.getColumnPlace());
XSSFCell cell2 = null;
XSSFCell cell3 = null;
XSSFCell cell4 = null;
if (null != xssfRowTwo) {
cell2 = xssfRowTwo.getCell(config.getColumnPlace());
}
if (null != xssfRowThree) {
cell3 = xssfRowTwo.getCell(config.getColumnPlace());
cell3 = xssfRowThree.getCell(config.getColumnPlace());
}
if (null != xssfRow4) {
cell4 = xssfRow4.getCell(config.getColumnPlace());
}
if ("sn".equals(config.getDataAttribute())){
continue;
......@@ -80,6 +90,9 @@ public class SingleSheetLittleOperation implements Operation {
if (null != cell3 && vo.getCollectionDataList().size() >= 3) {
cell3.setCellValue(vo.getCollectionDataList().get(2).get(mapKey));
}
if (null != cell4 && vo.getCollectionDataList().size() >= 4) {
cell4.setCellValue(vo.getCollectionDataList().get(3).get(mapKey));
}
}
continue;
}
......
......@@ -90,6 +90,7 @@ public class SingleSheetMoreItemOperation implements Operation {
XSSFRow xssfRow = sheetOne.getRow(beginRow);
XSSFRow xssfRowTwo = null;
XSSFRow xssfRowThree = null;
XSSFRow xssfRow4 = null;
if (sampleMergerNum == 2) {
xssfRowTwo = sheetOne.getRow(beginRow + 1);
}
......@@ -97,15 +98,24 @@ public class SingleSheetMoreItemOperation implements Operation {
xssfRowTwo = sheetOne.getRow(beginRow + 1);
xssfRowThree = sheetOne.getRow(beginRow + 2);
}
if (sampleMergerNum == 4) {
xssfRowTwo = sheetOne.getRow(beginRow + 1);
xssfRowThree = sheetOne.getRow(beginRow + 2);
xssfRow4 = sheetOne.getRow(beginRow + 3);
}
for (OriginalTemplateConfig config:configList) {
XSSFCell cell = xssfRow.getCell(config.getColumnPlace());
XSSFCell cell2 = null;
XSSFCell cell3 = null;
XSSFCell cell4 = null;
if (null != xssfRowTwo) {
cell2 = xssfRowTwo.getCell(config.getColumnPlace());
}
if (null != xssfRowThree) {
cell3 = xssfRowTwo.getCell(config.getColumnPlace());
cell3 = xssfRowThree.getCell(config.getColumnPlace());
}
if (null != xssfRow4) {
cell4 = xssfRow4.getCell(config.getColumnPlace());
}
if ("sn".equals(config.getDataAttribute())){
continue;
......@@ -113,7 +123,7 @@ public class SingleSheetMoreItemOperation implements Operation {
if (StringUtils.isBlank(config.getDataAttribute())){
continue;
}
if (config.getDataAttribute().startsWith(collectionDatePrefix)) {
if (sampleIdMap.size() != 0 && config.getDataAttribute().startsWith(collectionDatePrefix)) {
String mapKey = config.getDataAttribute().substring(4);
if (sampleIdMap.get(vo.getId()).size() > 0) {
cell.setCellValue(sampleIdMap.get(vo.getId()).get(mapKey));
......@@ -124,6 +134,9 @@ public class SingleSheetMoreItemOperation implements Operation {
if (null != cell3 && vo.getCollectionDataList().size() >= 3) {
cell3.setCellValue(vo.getCollectionDataList().get(2).get(mapKey));
}
if (null != cell4 && vo.getCollectionDataList().size() >= 4) {
cell4.setCellValue(vo.getCollectionDataList().get(3).get(mapKey));
}
}
continue;
}
......
......@@ -65,6 +65,7 @@ public class SingleSheetMoreOperation implements Operation {
XSSFRow xssfRow = sheetOne.getRow(beginRow);
XSSFRow xssfRowTwo = null;
XSSFRow xssfRowThree = null;
XSSFRow xssfRow4 = null;
if (sampleMergerNum == 2) {
xssfRowTwo = sheetOne.getRow(beginRow + 1);
}
......@@ -72,6 +73,11 @@ public class SingleSheetMoreOperation implements Operation {
xssfRowTwo = sheetOne.getRow(beginRow + 1);
xssfRowThree = sheetOne.getRow(beginRow + 2);
}
if (sampleMergerNum == 4) {
xssfRowTwo = sheetOne.getRow(beginRow + 1);
xssfRowThree = sheetOne.getRow(beginRow + 2);
xssfRow4 = sheetOne.getRow(beginRow + 3);
}
for (OriginalTemplateConfig config:configList) {
if (null == config.getColumnPlace()){
......@@ -80,11 +86,15 @@ public class SingleSheetMoreOperation implements Operation {
XSSFCell cell = xssfRow.getCell(config.getColumnPlace());
XSSFCell cell2 = null;
XSSFCell cell3 = null;
XSSFCell cell4 = null;
if (null != xssfRowTwo) {
cell2 = xssfRowTwo.getCell(config.getColumnPlace());
}
if (null != xssfRowThree) {
cell3 = xssfRowTwo.getCell(config.getColumnPlace());
cell3 = xssfRowThree.getCell(config.getColumnPlace());
}
if (null != xssfRow4) {
cell4 = xssfRow4.getCell(config.getColumnPlace());
}
if (null == config.getDataAttribute()) {
continue;
......@@ -102,6 +112,9 @@ public class SingleSheetMoreOperation implements Operation {
if (null != cell3 && vo.getCollectionDataList().size() >= 3) {
cell3.setCellValue(vo.getCollectionDataList().get(2).get(mapKey));
}
if (null != cell4 && vo.getCollectionDataList().size() >= 4) {
cell4.setCellValue(vo.getCollectionDataList().get(3).get(mapKey));
}
}
continue;
}else{
......
......@@ -361,7 +361,11 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
if (StringUtils.isBlank(config.getDataAttribute())){
collectEntity.setName(config.getAttributeName());
}else{
collectEntity.setName(config.getDataAttribute());
if (config.getDataAttribute().startsWith("clc.")){
collectEntity.setName(config.getAttributeName());
} else {
collectEntity.setName(config.getDataAttribute());
}
}
collectEntity.setSingleElse(1);
collectEntitiesList.add(collectEntity);
......@@ -379,7 +383,11 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
if (StringUtils.isBlank(config.getDataAttribute())){
collectEntity.setName(config.getAttributeName());
}else{
collectEntity.setName(config.getDataAttribute());
if (config.getDataAttribute().startsWith("clc.")){
collectEntity.setName(config.getAttributeName());
} else {
collectEntity.setName(config.getDataAttribute());
}
}
collectEntitiesList.add(collectEntity);
......
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