|
@@ -101,23 +101,25 @@ public class InspectionItemVO {
|
|
|
entity.add(e1);
|
|
entity.add(e1);
|
|
|
ExcelExportEntity e2 = new ExcelExportEntity(DISPLAY_NUMBER, "number");
|
|
ExcelExportEntity e2 = new ExcelExportEntity(DISPLAY_NUMBER, "number");
|
|
|
e2.setType(BaseEntityTypeConstants.DoubleType);
|
|
e2.setType(BaseEntityTypeConstants.DoubleType);
|
|
|
-// e2.setMergeVertical(true);
|
|
|
|
|
entity.add(e2);
|
|
entity.add(e2);
|
|
|
|
|
|
|
|
- List<ExcelExportEntity> temp = new ArrayList<ExcelExportEntity>();
|
|
|
|
|
- ExcelExportEntity e3 = new ExcelExportEntity(DISPLAY_VALUE, "value");
|
|
|
|
|
-// e3.setType(BaseEntityTypeConstants.DoubleType);
|
|
|
|
|
- temp.add(e3);
|
|
|
|
|
- if (config.isConvert()) {
|
|
|
|
|
- ExcelExportEntity e4 = new ExcelExportEntity(DISPLAY_LOG, "log");
|
|
|
|
|
-// e4.setType(BaseEntityTypeConstants.DoubleType);
|
|
|
|
|
- temp.add(e4);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
for (int i = 0; i < config.getSpecimensNum(); i++) {
|
|
for (int i = 0; i < config.getSpecimensNum(); i++) {
|
|
|
- ExcelExportEntity excelEntity = new ExcelExportEntity(config.getSpecimensName()[i], "inspection" + i);
|
|
|
|
|
|
|
+ List<ExcelExportEntity> temp = new ArrayList<ExcelExportEntity>();
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ ExcelExportEntity e3 = new ExcelExportEntity(config.getSpecimensName()[i], "value");
|
|
|
|
|
+ temp.add(e3);
|
|
|
|
|
+ ExcelExportEntity excelEntity = new ExcelExportEntity("", "inspection" + i);
|
|
|
excelEntity.setList(temp);
|
|
excelEntity.setList(temp);
|
|
|
entity.add(excelEntity);
|
|
entity.add(excelEntity);
|
|
|
|
|
+ if (config.isConvert()) {
|
|
|
|
|
+ excelEntity.setName(config.getSpecimensName()[i]);
|
|
|
|
|
+ e3.setName(DISPLAY_VALUE);
|
|
|
|
|
+ ExcelExportEntity e4 = new ExcelExportEntity(DISPLAY_LOG, "log");
|
|
|
|
|
+ temp.add(e4);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
map.put("entity", entity);
|
|
map.put("entity", entity);
|
|
|
|
|
|
|
@@ -160,7 +162,7 @@ public class InspectionItemVO {
|
|
|
List<ExcelSheetRecord> list = PVExcelUtil.importExcel(inputstream, Map.class, params);
|
|
List<ExcelSheetRecord> list = PVExcelUtil.importExcel(inputstream, Map.class, params);
|
|
|
LocalDate startDate = config.getStartDate();
|
|
LocalDate startDate = config.getStartDate();
|
|
|
for (ExcelSheetRecord record : list) {
|
|
for (ExcelSheetRecord record : list) {
|
|
|
- record.convert(config,startDate.toString());
|
|
|
|
|
|
|
+ record.convert(config, startDate.toString());
|
|
|
if (record.getErrors().size() > 0) {
|
|
if (record.getErrors().size() > 0) {
|
|
|
errorMessage.put(startDate.toString(), record.getErrors());
|
|
errorMessage.put(startDate.toString(), record.getErrors());
|
|
|
}
|
|
}
|
|
@@ -186,7 +188,7 @@ public class InspectionItemVO {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void buildItemCalcVO() {
|
|
private void buildItemCalcVO() {
|
|
|
- if(config.getTargetValue() == null) return;
|
|
|
|
|
|
|
+ if (config.getTargetValue() == null) return;
|
|
|
|
|
|
|
|
xValue[] specimens = new xValue[config.getSpecimensNum()];
|
|
xValue[] specimens = new xValue[config.getSpecimensNum()];
|
|
|
xValue[] target = new xValue[config.getSpecimensNum()];
|
|
xValue[] target = new xValue[config.getSpecimensNum()];
|
|
@@ -196,7 +198,7 @@ public class InspectionItemVO {
|
|
|
specimens[i] = record.get(sName).getAverage();
|
|
specimens[i] = record.get(sName).getAverage();
|
|
|
target[i] = new xValue(config.getTargetValue()[i]);
|
|
target[i] = new xValue(config.getTargetValue()[i]);
|
|
|
}
|
|
}
|
|
|
- itemCalcVO = new ItemCalcVO(specimens,target);
|
|
|
|
|
|
|
+ itemCalcVO = new ItemCalcVO(specimens, target);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public Map<String, SpecimensCalcVO> getRecord() {
|
|
public Map<String, SpecimensCalcVO> getRecord() {
|