This commit is contained in:
wucongxing8150 2025-07-08 15:35:34 +08:00
parent 3299851588
commit 33e17487c3
2 changed files with 14 additions and 1 deletions

View File

@ -328,6 +328,7 @@ public class MedicalRecordService {
dp.setDpmasImg(item.getDpmasImg()); dp.setDpmasImg(item.getDpmasImg());
dp.setCaseId(medicalRecord.getId()); dp.setCaseId(medicalRecord.getId());
dp.setTreatTime(item.getTreatTime()); dp.setTreatTime(item.getTreatTime());
dp.setContent(item.getContent());
int res = medicalRecorDpmasDao.insert(dp); int res = medicalRecorDpmasDao.insert(dp);
if (res <= 0){ if (res <= 0){
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();

View File

@ -236,13 +236,25 @@ public class CaseplatformCaseService {
Sheet sheet = workbook.getSheetAt(0); Sheet sheet = workbook.getSheetAt(0);
// 获取最后一行的行号 0 开始
int lastRowNum = sheet.getLastRowNum();
// 从第 1 行开始读取跳过标题行 // 从第 1 行开始读取跳过标题行
int rowNum = 0; int rowNum = 0;
for (Iterator<Row> it = sheet.rowIterator(); it.hasNext();) { for (Iterator<Row> it = sheet.rowIterator(); it.hasNext();) {
Row row = it.next(); Row row = it.next();
// 跳过第一行/二行 // 跳过第一行/二行
if (rowNum++ <= 1) continue; if (rowNum <= 1) {
rowNum++;
continue;
}
// 跳过最后一行
if (rowNum == lastRowNum) {
rowNum++;
continue;
}
// 判断整行是否为空 // 判断整行是否为空
boolean isEmptyRow = true; boolean isEmptyRow = true;