|
|
|
|
@ -53,7 +53,8 @@ public class ComplaintCollectionResourceService extends BaseDAO {
|
|
|
|
|
// 构建分页对象
|
|
|
|
|
Page<ComplaintCollection> page = new Page<>(param.getCurrent(), param.getSize()); |
|
|
|
|
LambdaQueryWrapper<ComplaintCollection> qw = new LambdaQueryWrapper<>(); |
|
|
|
|
setBatchQuery(param.getSourceTable(), param.getSourceTables(), qw, ComplaintCollection::getSourceTable); |
|
|
|
|
setBatchQuery(param.getSourceTable(), param.getSourceTableList(), qw, ComplaintCollection::getSourceTable); |
|
|
|
|
setBatchQuery(param.getSourceTableSubOne(), param.getSourceTableSubOneList(), qw, ComplaintCollection::getSourceTableSubOne); |
|
|
|
|
setBatchLikeQuery(param.getOriginId(), param.getOriginIds(), qw, ComplaintCollection::getOriginId); |
|
|
|
|
if (CollectionUtil.size(param.getDiscoveryTimeList()) == 2 |
|
|
|
|
&& param.getDiscoveryTimeList().get(0) != null |
|
|
|
|
@ -220,4 +221,29 @@ public class ComplaintCollectionResourceService extends BaseDAO {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* |
|
|
|
|
* @param list |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
public Boolean saveOrUpdateComplaintCollection(List<ComplaintCollection> list) { |
|
|
|
|
if (CollectionUtil.isEmpty(list)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
for (ComplaintCollection item :list) { |
|
|
|
|
LambdaQueryWrapper<ComplaintCollection> query = new LambdaQueryWrapper<>(); |
|
|
|
|
query.eq(ComplaintCollection::getOriginId, item.getOriginId()); |
|
|
|
|
query.eq(ComplaintCollection::getSourceTable, item.getSourceTable()); |
|
|
|
|
ComplaintCollection exist = complaintCollectionMapper.selectOne(query); |
|
|
|
|
if (exist != null) { |
|
|
|
|
item.setId(exist.getId()); |
|
|
|
|
complaintCollectionMapper.updateById(item); |
|
|
|
|
} else { |
|
|
|
|
complaintCollectionMapper.insert(item); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|