Merge branch 'dev'
This commit is contained in:
commit
286df76ec3
|
@ -84,7 +84,7 @@ public class ResourceCarController {
|
|||
@ApiOperation("批量添加申购车")
|
||||
@LogOperation(value = "批量添加申购车", operationTable = "tb_resource_car;")
|
||||
public Result save(@RequestBody List<ResourceCarDTO> dtoList) {
|
||||
dtoList.stream().forEach(dto->resourceCarService.insertOrUpdate(dto));
|
||||
dtoList.stream().forEach(dto -> resourceCarService.insertOrUpdate(dto));
|
||||
return new Result();
|
||||
}
|
||||
|
||||
|
|
|
@ -40,13 +40,13 @@ public interface ResourceCarDao extends BaseDao<ResourceCarEntity> {
|
|||
Integer selectProvideDeptCount(@Param("userId") Long userId, @Param("name") String name);
|
||||
|
||||
List<Map> selectInfrastructureCarGroupByDept(@Param("userId") Long userId,
|
||||
@Param("pageNum") Integer pageNum,
|
||||
@Param("pageSize") Integer pageSize,
|
||||
@Param("name") String name);
|
||||
@Param("pageNum") Integer pageNum,
|
||||
@Param("pageSize") Integer pageSize,
|
||||
@Param("name") String name);
|
||||
|
||||
List<Map> selectInfrastructureListByDept(@Param("name") String name,
|
||||
@Param("userId") Long userId,
|
||||
@Param("deptId") Long deptId,
|
||||
@Param("pageNum") Integer pageNum,
|
||||
@Param("pageSize") Integer pageSize);
|
||||
@Param("userId") Long userId,
|
||||
@Param("deptId") Long deptId,
|
||||
@Param("pageNum") Integer pageNum,
|
||||
@Param("pageSize") Integer pageSize);
|
||||
}
|
|
@ -119,7 +119,7 @@ public class ResourceCarServiceImpl extends CrudServiceImpl<ResourceCarDao, Reso
|
|||
case TSINGTAO_XHA: {
|
||||
List<Map> maps = resourceCarDao.selectInfrastructureCarGroupByDept(userId, (pageNum - 1) * pageSize, pageSize, name);
|
||||
resultMap.put("list", maps);
|
||||
resultMap.put("deptCount", maps.stream().collect(Collectors.groupingBy(it->it.get("deptId"))).size());
|
||||
resultMap.put("deptCount", maps.stream().collect(Collectors.groupingBy(it -> it.get("deptId"))).size());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ public class ResourceCarServiceImpl extends CrudServiceImpl<ResourceCarDao, Reso
|
|||
@Override
|
||||
public Object selectResourceListByDept(String name, Long deptId, Integer pageNum, Integer pageSize) {
|
||||
Long userId = SecurityUser.getUserId();
|
||||
List<Map> result=new ArrayList<>();
|
||||
List<Map> result = new ArrayList<>();
|
||||
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
|
||||
case TSINGTAO: {
|
||||
result.addAll(resourceCarDao.selectResourceListByDept(name, userId, deptId, (pageNum - 1) * pageSize, pageSize));
|
||||
|
|
|
@ -88,7 +88,8 @@
|
|||
dept.name AS "deptName",
|
||||
COUNT(car.id) AS "count"
|
||||
FROM
|
||||
(select del_flag, user_id, json_extract(note1, '$[0].idtCameraChannel') as id, TRIM(BOTH '"' FROM json_extract(note1, '$[0].managementUnitName')) as dept_name, json_extract(note1, '$[0].channelName') as name
|
||||
(select del_flag, user_id, json_extract(note1, '$[0].idtCameraChannel') as id, TRIM(BOTH '"' FROM
|
||||
json_extract(note1, '$[0].managementUnitName')) as dept_name, json_extract(note1, '$[0].channelName') as name
|
||||
from tb_resource_car where note1 IS NOT NULL) car,
|
||||
sys_dept dept
|
||||
WHERE car.user_id = #{userId}
|
||||
|
@ -162,7 +163,9 @@
|
|||
car.note1,
|
||||
car.create_date AS "time"
|
||||
FROM
|
||||
(select del_flag, user_id, note1, create_date, resource_id, json_extract(note1, '$[0].idtCameraChannel') as id, TRIM(BOTH '"' FROM json_extract(note1, '$[0].managementUnitName')) as dept_name, json_extract(note1, '$[0].channelName') as name
|
||||
(select del_flag, user_id, note1, create_date, resource_id, json_extract(note1, '$[0].idtCameraChannel') as id,
|
||||
TRIM(BOTH '"' FROM json_extract(note1, '$[0].managementUnitName')) as dept_name, json_extract(note1,
|
||||
'$[0].channelName') as name
|
||||
from tb_resource_car where note1 IS NOT NULL) car
|
||||
left join sys_dept dept on car.dept_name=dept.name
|
||||
WHERE 1 = 1
|
||||
|
|
Loading…
Reference in New Issue