Commit 9ded88bd by lijingjing

样品编码问题;

parent 228f24c9
...@@ -195,7 +195,7 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe ...@@ -195,7 +195,7 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
return org.apache.commons.lang3.StringUtils.isBlank(value) ? "" : value.trim(); return org.apache.commons.lang3.StringUtils.isBlank(value) ? "" : value.trim();
} }
private void generateOtherReportFile(EntrustReport report, Long[] sampleIds) { protected void generateOtherReportFile(EntrustReport report, Long[] sampleIds) {
if (ArrayUtils.isEmpty(sampleIds)) { if (ArrayUtils.isEmpty(sampleIds)) {
return; return;
...@@ -207,7 +207,15 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe ...@@ -207,7 +207,15 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
return; return;
} }
Map<String, String> sampleMap = sampleList.stream().collect(Collectors.toMap(EntrustSample::getCode, EntrustSample::getFirstCode)); Map<String, String> sampleMap = sampleList.stream().collect(Collectors.toMap(t -> {
if (StringUtils.isNotEmpty(t.getThirdCode())) {
return t.getThirdCode();
} else if (StringUtils.isNotEmpty(t.getSecondCode())) {
return t.getSecondCode();
} else {
return t.getFirstCode();
}
}, EntrustSample::getFirstCode));
// objectKey data // objectKey data
InputStream is = ossClient.download(report.getObjectKey()); InputStream is = ossClient.download(report.getObjectKey());
...@@ -223,9 +231,9 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe ...@@ -223,9 +231,9 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
int rowNum = sheet.getLastRowNum(); int rowNum = sheet.getLastRowNum();
// 默认开始行为:5,单元格序号为:-1 // 默认开始行为:5,单元格序号为:-1
int startRow = 5, sampleCodePos = -1, sampleBrandPos = -1; int startRow = -1, sampleCodePos = -1, sampleBrandPos = -1;
flag: flag:
for (int i = 5; i < rowNum; i++) { for (int i = 1; i < rowNum; i++) {
startRow = i; startRow = i;
XSSFRow xssfRow = sheet.getRow(i); XSSFRow xssfRow = sheet.getRow(i);
for (int j = 0; j < xssfRow.getLastCellNum(); j++) { for (int j = 0; j < xssfRow.getLastCellNum(); j++) {
...@@ -397,7 +405,8 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe ...@@ -397,7 +405,8 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
return entrust; return entrust;
} }
private boolean doExecuteSubmit(Long[] ids, EntrustFlowEnum fromFlowStatus, EntrustFlowEnum toFlowStatus, Account account) { @Transactional(rollbackFor = Exception.class)
protected boolean doExecuteSubmit(Long[] ids, EntrustFlowEnum fromFlowStatus, EntrustFlowEnum toFlowStatus, Account account) {
Entrust entrust = handleConditionGetEntrust(ids); Entrust entrust = handleConditionGetEntrust(ids);
List<Long> sampleIds = getSampleIds(ids); List<Long> sampleIds = getSampleIds(ids);
RestAssert.fail(null == sampleIds || sampleIds.isEmpty(), "报告样品信息为空"); RestAssert.fail(null == sampleIds || sampleIds.isEmpty(), "报告样品信息为空");
...@@ -494,6 +503,7 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe ...@@ -494,6 +503,7 @@ public class EntrustReportServiceImpl extends BaseServiceImpl<EntrustReportMappe
/** /**
* 记录签发人、发放人、记录审核人 * 记录签发人、发放人、记录审核人
*
* @param fromFlowStatus * @param fromFlowStatus
* @param account * @param account
* @param entrustReport * @param entrustReport
......
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