Commit 6f0e60b3 authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/MVP1.7.16' into MVP1.7.16

parents 3f153b86 67df314a
...@@ -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())){
...@@ -852,7 +853,18 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu ...@@ -852,7 +853,18 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
rel.setCreateBy(user.getId()); rel.setCreateBy(user.getId());
rel.setCreateTime(LocalDateTime.now()); rel.setCreateTime(LocalDateTime.now());
rel.setCreateName(user.getNickname()); rel.setCreateName(user.getNickname());
autoSocialRuleRelMapper.insert(rel); if (Common.isNotNull(rel.getId())){
temp = autoSocialRuleRelMapper.selectById(rel.getId());
if (null != temp){
autoSocialRuleRelMapper.updateById(rel);
}else {
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