Merge branch 'dev' of http://221.0.232.152:9393/ability-center/share-platform into dev
This commit is contained in:
commit
4e32f0c58e
|
@ -299,10 +299,10 @@ public class CensusControllerV3 {
|
|||
})
|
||||
public Result<List<Map<String, Object>>> assemblerUseScoreTopInfo(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
Object[] ps = {params.get("resourceType"),params.get("id"),params.get("id")};
|
||||
List<Map<String, Object>> maps = jdbcTemplate.queryForList("SELECT AVG(a.score) as score,b.name FROM tb_resource_score a INNER JOIN tb_data_resource b on a.resource_id = b.id\n" +
|
||||
"INNER JOIN sys_dept c ON b.dept_id = c.id\n" +
|
||||
"WHERE a.del_flag = 0 AND b.type = ? AND (c.id = ? OR INSTR(c.pids,?))\n" +
|
||||
"group by b.name order by score desc limit 5", ps);
|
||||
List<Map<String, Object>> maps = jdbcTemplate.queryForList("SELECT SUM(IFNULL(e.score,0)) as score,c.name FROM tb_data_resource_rel a INNER JOIN sys_user b ON a.creator = b.id INNER JOIN tb_data_resource c ON a.reference_id = c.id\n" +
|
||||
"INNER JOIN sys_dept d ON b.dept_id = d.id INNER JOIN tb_resource_score e ON a.reference_id = e.resource_id \n" +
|
||||
"WHERE a.del_flag = 0 AND c.type = ? AND c.del_flag = 0 AND (d.id = ? OR INSTR(d.pids,?)) AND e.del_flag = 0\n" +
|
||||
"group by c.name order by score desc limit 5", ps);
|
||||
|
||||
return new Result<List<Map<String,Object>>>().ok(maps);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue