|
|
@ -544,6 +544,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
|
|
|
|
//3.循环更新或新增字表数据
|
|
|
|
String finalResiUserId = resiUserId; |
|
|
|
//存放子表的表名,用于删除字表数据时使用,比如未来可能会存在子表多条数据的情况,那样的只能删一次,不然第二条保存时又把第一条删了
|
|
|
|
Map<String, String> tableMap = new HashMap<>(); |
|
|
|
formDTO.forEach(d -> { |
|
|
|
if (!"ic_resi_user".equals(d.getTableName())) { |
|
|
|
for (LinkedHashMap<String, String> hash : d.getList()) { |
|
|
@ -554,7 +556,10 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
hash.put("customer_id", tokenDto.getCustomerId()); |
|
|
|
hash.put("created_by", tokenDto.getUserId()); |
|
|
|
//2022.5.31 bug修改【举例党员类别新增选是,修改为否,在修改为是时,此时字表id没值,实际有脏数据,导致字表新数据进不去】
|
|
|
|
baseDao.del(d.getTableName(), finalResiUserId); |
|
|
|
if (!"ic_resi_demand".equals(d.getTableName()) && !tableMap.containsKey(d.getTableName())) { |
|
|
|
baseDao.del(d.getTableName(), finalResiUserId); |
|
|
|
tableMap.put(d.getTableName(), d.getTableName()); |
|
|
|
} |
|
|
|
//字表新增数据
|
|
|
|
baseDao.add(d.getTableName(), hash); |
|
|
|
} else { |
|
|
|