Commit 739df990 authored by 赵啸非's avatar 赵啸非

添加自定义导入修改

parent e9f0d622
......@@ -2064,6 +2064,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
list = list.stream().distinct().collect(Collectors.toList());
int SucessCount = 0;
int failCount = 0;
int updateCount = 0;
for (MatterCustomImportEntity matterCustomImportEntity : list) {
if (ObjectUtils.isEmpty(matterCustomImportEntity.getAreaCode())) {
log.info("事项名称:{},区域编码为空", matterCustomImportEntity.getMatterName());
......@@ -2158,17 +2159,16 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
} else {
log.info("事项已存在,更新事项:" + matterEntity.getMatterName());
BeanUtils.copyProperties(matterCustomImportEntity, matterEntity, new String[]{"areaCode", "deptName", "matterName"});
matterEntity.setMatterNo(RandomUtil.randomString(12));
matterEntity.setUpdateTime(new Date());
matterEntity.setUpdateUserId(1L);
this.dao.update(matterEntity);
updateCount++;
// failCount++;
}
}
return Rest.ok("成功:" + SucessCount + " 失败:" + failCount);
return Rest.ok("成功:" + SucessCount + "更新:" + updateCount + " 失败:" + failCount);
}
......
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