|
@@ -87,7 +87,11 @@ public class InspectionItemVO {
|
|
|
}
|
|
}
|
|
|
List<ExportParams> exportParamsList = new ArrayList<ExportParams>();
|
|
List<ExportParams> exportParamsList = new ArrayList<ExportParams>();
|
|
|
for (int i = 1; i < config.getDays()+1; i++) {
|
|
for (int i = 1; i < config.getDays()+1; i++) {
|
|
|
- ExportParams exportParams = new ExportParams(config.getName() + " 数据导入模板", String.format("第 %d 天",i));
|
|
|
|
|
|
|
+ String sheetName = String.format("第 %d 天",i);
|
|
|
|
|
+ if(config.getDays() == 1){
|
|
|
|
|
+ sheetName = config.getName();
|
|
|
|
|
+ }
|
|
|
|
|
+ ExportParams exportParams = new ExportParams(config.getName() + " 数据导入模板", sheetName);
|
|
|
exportParams.setStyle(PVExcelExportStyler.class);
|
|
exportParams.setStyle(PVExcelExportStyler.class);
|
|
|
exportParamsList.add(exportParams);
|
|
exportParamsList.add(exportParams);
|
|
|
exportParams.setType(ExcelType.XSSF);
|
|
exportParams.setType(ExcelType.XSSF);
|
|
@@ -168,15 +172,19 @@ public class InspectionItemVO {
|
|
|
|
|
|
|
|
public void importExcelRecord(InputStream inputstream) {
|
|
public void importExcelRecord(InputStream inputstream) {
|
|
|
ImportParams params = new ImportParams();
|
|
ImportParams params = new ImportParams();
|
|
|
- params.setTitleRows(2);
|
|
|
|
|
|
|
+ params.setTitleRows(1);
|
|
|
params.setHeadRows(1);
|
|
params.setHeadRows(1);
|
|
|
params.setSheetNum(config.getDays());
|
|
params.setSheetNum(config.getDays());
|
|
|
List<ExcelSheetRecord> list = PVExcelUtil.importExcel(inputstream, Map.class, params);
|
|
List<ExcelSheetRecord> list = PVExcelUtil.importExcel(inputstream, Map.class, params);
|
|
|
int i = 1;
|
|
int i = 1;
|
|
|
for (ExcelSheetRecord record : list) {
|
|
for (ExcelSheetRecord record : list) {
|
|
|
- record.convert(config, String.format("第 %d 天",i));
|
|
|
|
|
|
|
+ String sheetName = String.format("第 %d 天",i);
|
|
|
|
|
+ if(config.getDays() == 1){
|
|
|
|
|
+ sheetName = config.getName();
|
|
|
|
|
+ }
|
|
|
|
|
+ record.convert(config, sheetName);
|
|
|
if (record.getErrors().size() > 0) {
|
|
if (record.getErrors().size() > 0) {
|
|
|
- errorMessage.put(String.format("第 %d 天",i), record.getErrors());
|
|
|
|
|
|
|
+ errorMessage.put(sheetName, record.getErrors());
|
|
|
}
|
|
}
|
|
|
i++;
|
|
i++;
|
|
|
}
|
|
}
|
|
@@ -186,16 +194,6 @@ public class InspectionItemVO {
|
|
|
dataPass = true;
|
|
dataPass = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(config.getName().toLowerCase().contains("ep15")){
|
|
|
|
|
- for (String sName : config.getSpecimensName()) {
|
|
|
|
|
- SpecimensCalcVO[] data = new SpecimensCalcVO[config.getDays()];
|
|
|
|
|
- for (int j = 0; j < list.size(); j++) {
|
|
|
|
|
- final xValue[] xValues = list.get(j).getConvertedData().get(sName);
|
|
|
|
|
- data[j] = new SpecimensCalcVO(xValues, config.isConvert());
|
|
|
|
|
- }
|
|
|
|
|
- record2.put(sName, new EP15CalcVO(data,config.getRepeatNum(),config.getBatchCVSValue(),config.getDailyCVSValue(),config.getDecimal()));
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
for (String sName : config.getSpecimensName()) {
|
|
for (String sName : config.getSpecimensName()) {
|
|
|
final xValue[] total = new xValue[config.getRepeatNum() * config.getDays()];
|
|
final xValue[] total = new xValue[config.getRepeatNum() * config.getDays()];
|
|
|
for (int j = 0; j < list.size(); j++) {
|
|
for (int j = 0; j < list.size(); j++) {
|
|
@@ -206,7 +204,37 @@ public class InspectionItemVO {
|
|
|
}
|
|
}
|
|
|
record.put(sName, new SpecimensCalcVO(total, config.isConvert()));
|
|
record.put(sName, new SpecimensCalcVO(total, config.isConvert()));
|
|
|
}
|
|
}
|
|
|
- buildItemCalcVO();
|
|
|
|
|
|
|
+// buildItemCalcVO();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if(config.getName().toLowerCase().contains("精密度")){
|
|
|
|
|
+ for (String sName : config.getSpecimensName()) {
|
|
|
|
|
+ SpecimensCalcVO[] data = new SpecimensCalcVO[config.getDays()];
|
|
|
|
|
+ for (int j = 0; j < list.size(); j++) {
|
|
|
|
|
+ final xValue[] xValues = list.get(j).getConvertedData().get(sName);
|
|
|
|
|
+ data[j] = new SpecimensCalcVO(xValues, config.isConvert());
|
|
|
|
|
+ }
|
|
|
|
|
+ record2.put(sName, new EP15PrecisionVO(data,config.getRepeatNum(),config.getBatchCVSValue(),config.getDailyCVSValue(),config.getDecimal()));
|
|
|
|
|
+ }
|
|
|
|
|
+ }else if(config.getName().equals("定值参考物质验证")){
|
|
|
|
|
+ for (String sName : config.getSpecimensName()) {
|
|
|
|
|
+ final xValue[] total = new xValue[config.getRepeatNum() * config.getDays()];
|
|
|
|
|
+ for (int j = 0; j < list.size(); j++) {
|
|
|
|
|
+ final xValue[] xValues = list.get(j).getConvertedData().get(sName);
|
|
|
|
|
+ for (int k = 0; k < xValues.length; k++) {
|
|
|
|
|
+ total[j * xValues.length + k] = xValues[k];
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ record2.put(sName, new EP15TruenessReferneceVO(total, config.getTargetValue()[0],config.getClaimValue(),0));
|
|
|
|
|
+ }
|
|
|
|
|
+ }else if(config.getName().equals("EP15-A方法学比对")){
|
|
|
|
|
+
|
|
|
|
|
+ record2.put("EP15-A方法学比对",
|
|
|
|
|
+ new EP15TruenessPatientVO(record.get(config.getSpecimensName()[0]),record.get(config.getSpecimensName()[1]), config.getClaimValue(),0));
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|