1.申购车查询结果新增字段

2.根据申请查询摄像头列表修改
3.修改新增收藏因为异步导致的数据库死锁
This commit is contained in:
dinggang 2022-07-01 14:35:24 +08:00
parent fa9f22628b
commit 7511a9d9f2
3 changed files with 19 additions and 7 deletions

View File

@ -16,6 +16,7 @@ import io.renren.common.page.PageData;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.utils.ConvertUtils;
import io.renren.common.utils.DateUtils;
import io.renren.modules.monitor.dto.CameraChannelDto1;
import io.renren.modules.monitor.entity.CameraChannel;
import io.renren.modules.monitor.mapper.CameraChannelMapper;
import io.renren.modules.processForm.dao.TAbilityApplicationDao;
@ -551,6 +552,11 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
re.add(new HashMap<String, Object>() {
{
QueryWrapper<CameraChannel> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("check_status", 1)
.ne("gps_x", "")
.ne("gps_y", "")
.isNotNull("gps_x")
.isNotNull("gps_y");
put("count", cameraChannelMapper.selectCount(queryWrapper) + "");
put("type", "基础设施");
}
@ -904,7 +910,12 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
.eq("approve_status", "通过");
List<TAbilityApplicationEntity> applicationEntities = tAbilityApplicationDao.selectList(queryWrapper);
ArrayList cameraList = new ArrayList();
applicationEntities.forEach(index -> cameraList.add(cameraChannelMapper.selectByChannelCode(index.getCameraList())));
applicationEntities.forEach(index -> {
List<CameraChannelDto1> channelDto1s = cameraChannelMapper.selectByChannelCode(index.getCameraList().replaceAll("\"", ""));
if (!channelDto1s.isEmpty()) {
cameraList.add(channelDto1s.get(0));
}
});
return cameraList;
}

View File

@ -73,11 +73,11 @@ public class ResourceCollectionServiceImpl extends CrudServiceImpl<ResourceColle
List<ResourceCollectionEntity> collectionEntities = resourceCollectionDao.selectByMap(selectMap);
if (collectionEntities.isEmpty()) {
resourceCollectionDao.insert(item);
CompletableFuture.runAsync(() -> {
jdbcTemplate.update("update tb_data_resource,\n" +
"tb_data_resource_assignmark\n" +
"SET tb_data_resource.total = round(tb_data_resource_assignmark.total) WHERE tb_data_resource.id =" + item.getResourceId());
});
jdbcTemplate.update("update tb_data_resource,\n" +
"tb_data_resource_assignmark\n" +
"SET tb_data_resource.total = round(tb_data_resource_assignmark.total) WHERE tb_data_resource.id =" + item.getResourceId());
}
});
}

View File

@ -89,7 +89,8 @@
res.type,
res.del_flag AS "delFlag",
car.note1,
car.create_date AS "time"
car.create_date AS "time",
res.del_flag AS "delFlag"
FROM
tb_resource_car car,
tb_data_resource res