Commit 09002306 authored by huyuchen's avatar huyuchen

稿酬导入修改

parent f1b5b3e8
...@@ -287,16 +287,12 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla ...@@ -287,16 +287,12 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
} }
private void importTStatisticsDeclarer(List<TStatisticsDeclarerVo> excelVOList, List<ErrorMessage> errorMessageList) { private void importTStatisticsDeclarer(List<TStatisticsDeclarerVo> excelVOList, List<ErrorMessage> errorMessageList) {
int successInt = 0;
int failuerInt = 0;
List<TStatisticsDeclarerVo> updateList = new ArrayList<>();
// 执行数据插入操作 组装 // 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
TStatisticsDeclarerVo excel = excelVOList.get(i); TStatisticsDeclarerVo excel = excelVOList.get(i);
if (CommonConstants.ONE_STRING.equals(excel.getIsDeclare()) && Common.isEmpty(excel.getUndeclareReason())) { if (CommonConstants.ONE_STRING.equals(excel.getIsDeclare()) && Common.isEmpty(excel.getUndeclareReason())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "本期是否申报为否时,不申报原因不可为空")); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "本期是否申报为否时,不申报原因不可为空"));
failuerInt++;
continue; continue;
} }
...@@ -311,14 +307,10 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla ...@@ -311,14 +307,10 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
tStatisticsDeclarer.setUndeclareReason(excel.getUndeclareReason()); tStatisticsDeclarer.setUndeclareReason(excel.getUndeclareReason());
} }
baseMapper.updateById(tStatisticsDeclarer); baseMapper.updateById(tStatisticsDeclarer);
successInt++;
}else { }else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到身份证和申报月份对应的申报人员信息")); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到身份证和申报月份对应的申报人员信息"));
failuerInt++;
continue; continue;
} }
} }
errorMessageList.add(new ErrorMessage(-1, "成功操作" + successInt +"条数据," + "失败"
+ failuerInt + "条数据"));
} }
} }
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