Commit 4fcd2899 authored by hongguangwu's avatar hongguangwu

MVP1.7.12-瓜子导出档案

parent 93a08997
...@@ -31,7 +31,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -31,7 +31,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzEmpContactInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TRegisteWarningEmployee; import com.yifu.cloud.plus.v1.yifu.archives.entity.TRegisteWarningEmployee;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.EmployeeRegistrationPreMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.EmployeeRegistrationPreMapper;
...@@ -346,7 +345,7 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz ...@@ -346,7 +345,7 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
*/ */
private void saveData() { private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size()); log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTDispatchExportLog(cachedDataList, errorMessageList); importTDispatchExportLog(cachedDataList);
log.info("存储数据库成功!"); log.info("存储数据库成功!");
} }
}).sheet().doRead(); }).sheet().doRead();
...@@ -354,7 +353,11 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz ...@@ -354,7 +353,11 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e); log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR); return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
} }
return R.ok(errorMessageList); if (errorMessageList.isEmpty()) {
return R.ok();
} else {
return R.ok(errorMessageList);
}
} }
@Override @Override
...@@ -546,16 +549,14 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz ...@@ -546,16 +549,14 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
return YiFuSmsUtil.sendRegistBatchSms(phones, params, signNames, templeteVo.getTempleteCode()); return YiFuSmsUtil.sendRegistBatchSms(phones, params, signNames, templeteVo.getTempleteCode());
} }
private void importTDispatchExportLog(List<TGzOfferInfoImportVo> excelVOList, List<ErrorMessage> errorMessageList) { private void importTDispatchExportLog(List<TGzOfferInfoImportVo> excelVOList) {
// 个性化校验逻辑 // 个性化校验逻辑
ErrorMessage errorMsg;
// 执行数据插入操作 组装 // 执行数据插入操作 组装
TGzOfferInfoImportVo excel; TGzOfferInfoImportVo excel;
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
excel = excelVOList.get(i); excel = excelVOList.get(i);
// 插入 // 插入
insertExcel(excel); insertExcel(excel);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS));
} }
} }
......
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