Commit 67df314a authored by fangxinjiang's avatar fangxinjiang

社保自动化配置-fxj

parent 12f63016
...@@ -841,6 +841,7 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu ...@@ -841,6 +841,7 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
//保存社保规则明细 //保存社保规则明细
if (Common.isNotNull(socialRuleRels)){ if (Common.isNotNull(socialRuleRels)){
TAutoSocialRuleRel temp = null;
for (TAutoSocialRuleRel rel:socialRuleRels){ for (TAutoSocialRuleRel rel:socialRuleRels){
//存在新增的直接socialFlag =true 后面不在判断此种场景 //存在新增的直接socialFlag =true 后面不在判断此种场景
if (!Common.isNotNull(rel.getId())){ if (!Common.isNotNull(rel.getId())){
...@@ -853,11 +854,17 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu ...@@ -853,11 +854,17 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
rel.setCreateTime(LocalDateTime.now()); rel.setCreateTime(LocalDateTime.now());
rel.setCreateName(user.getNickname()); rel.setCreateName(user.getNickname());
if (Common.isNotNull(rel.getId())){ if (Common.isNotNull(rel.getId())){
temp = autoSocialRuleRelMapper.selectById(rel.getId());
if (null != temp){
autoSocialRuleRelMapper.updateById(rel); autoSocialRuleRelMapper.updateById(rel);
}else { }else {
autoSocialRuleRelMapper.insert(rel); autoSocialRuleRelMapper.insert(rel);
} }
}else {
autoSocialRuleRelMapper.insert(rel);
}
} }
} }
// 判断数据对象是否都在页面传的对象里,有不在的数据,则返回true 目的是判断是否更新了 // 判断数据对象是否都在页面传的对象里,有不在的数据,则返回true 目的是判断是否更新了
......
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