Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
c1e165135b
|
@ -17,7 +17,7 @@ public interface CameraOrgenizationMapper extends BaseDao<CameraOrganization> {
|
||||||
@Select("select * from t_camera_organization where parent_id = #{parentId}")
|
@Select("select * from t_camera_organization where parent_id = #{parentId}")
|
||||||
List<CameraOrganization> selectSubOrganization(@Param("parentId") String parentId);
|
List<CameraOrganization> selectSubOrganization(@Param("parentId") String parentId);
|
||||||
|
|
||||||
@Select("select *,0 AS channelCount from t_camera_organization02 where parent_id = #{parentId}")
|
@Select("select * channelCount from t_camera_organization02 where parent_id = #{parentId}")
|
||||||
List<Map> selectSubOrganizationMap(@Param("parentId") String parentId);
|
List<Map> selectSubOrganizationMap(@Param("parentId") String parentId);
|
||||||
|
|
||||||
void batchSaveOrgenization(List<Map> list);
|
void batchSaveOrgenization(List<Map> list);
|
||||||
|
|
|
@ -1097,16 +1097,8 @@ public class MonitorService {
|
||||||
if (parentId == null){
|
if (parentId == null){
|
||||||
parentId = "";
|
parentId = "";
|
||||||
}
|
}
|
||||||
List<Map> organs = cameraOrgenMapper.selectSubOrganizationMap(parentId);//查询某个区域下的所有地区
|
List<Map> organs = cameraOrgenMapper.selectSubOrganizationMap(parentId);
|
||||||
if(organs.size() > 0){
|
|
||||||
for(int i=0;i< organs.size();i++){
|
|
||||||
String path = organs.get(i).get("path").toString();
|
|
||||||
|
|
||||||
Integer count = cameraChannelMapper.selectChannelCounts(path);
|
|
||||||
organs.get(i).put("channelCount",count);
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return organs;
|
return organs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,8 +96,13 @@ public class TAbilityApplicationController {
|
||||||
PageData<TAbilityApplicationDTO> page = tAbilityApplicationService.page(params);
|
PageData<TAbilityApplicationDTO> page = tAbilityApplicationService.page(params);
|
||||||
List<TAbilityApplicationDTO> list =
|
List<TAbilityApplicationDTO> list =
|
||||||
page.getList().stream().map(index -> {
|
page.getList().stream().map(index -> {
|
||||||
|
Integer inStanceId =
|
||||||
|
jdbcTemplate.queryForObject(String.format("SELECT DISTINCT instance_id FROM t_ability_application WHERE apply_flag = '%s' LIMIT 1", index.getApplyFlag()), Integer.class);
|
||||||
|
if (inStanceId == null) {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
List<TAbilityApplicationDTO> dtos =
|
List<TAbilityApplicationDTO> dtos =
|
||||||
tAbilityApplicationService.getByInstanceId(index.getInstanceId());
|
tAbilityApplicationService.getByInstanceId(inStanceId + "");
|
||||||
if (!dtos.isEmpty()) {
|
if (!dtos.isEmpty()) {
|
||||||
dtos.stream()
|
dtos.stream()
|
||||||
.limit(1l)
|
.limit(1l)
|
||||||
|
|
|
@ -32,12 +32,10 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
|
||||||
params.keySet().stream().filter(index -> null != params.get(index)).forEach(index -> {
|
params.keySet().stream().filter(index -> null != params.get(index)).forEach(index -> {
|
||||||
switch (index) { //
|
switch (index) { //
|
||||||
case "abilityprocess_v2":
|
case "abilityprocess_v2":
|
||||||
wrapper.select("DISTINCT apply_flag,instance_id,apply_number");
|
wrapper.select("DISTINCT apply_flag,apply_number");
|
||||||
wrapper.isNotNull(Boolean.valueOf(params.get("abilityprocess_v2").toString()), "apply_flag")
|
wrapper.isNotNull(Boolean.valueOf(params.get("abilityprocess_v2").toString()), "apply_flag")
|
||||||
.isNotNull(Boolean.valueOf(params.get("abilityprocess_v2").toString()), "instance_id")
|
|
||||||
.isNotNull(Boolean.valueOf(params.get("abilityprocess_v2").toString()), "apply_number");
|
.isNotNull(Boolean.valueOf(params.get("abilityprocess_v2").toString()), "apply_number");
|
||||||
wrapper.groupBy(Boolean.valueOf(params.get("abilityprocess_v2").toString()), "apply_flag")
|
wrapper.groupBy(Boolean.valueOf(params.get("abilityprocess_v2").toString()), "apply_flag")
|
||||||
.groupBy(Boolean.valueOf(params.get("abilityprocess_v2").toString()), "instance_id")
|
|
||||||
.groupBy(Boolean.valueOf(params.get("abilityprocess_v2").toString()), "apply_number");
|
.groupBy(Boolean.valueOf(params.get("abilityprocess_v2").toString()), "apply_number");
|
||||||
wrapper.orderByDesc("apply_number"); // 流程排序
|
wrapper.orderByDesc("apply_number"); // 流程排序
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
<insert id="batchSaveOrgenization" parameterType="java.util.List">
|
<insert id="batchSaveOrgenization" parameterType="java.util.List">
|
||||||
|
|
||||||
INSERT INTO t_camera_organization02 (
|
INSERT INTO t_camera_organization02 (
|
||||||
id,name,parent_id,sort,subCount,is_parent,path
|
id,name,parent_id,sort,subCount,path
|
||||||
) VALUES
|
) VALUES
|
||||||
<foreach collection="list" item="item" separator="," >
|
<foreach collection="list" item="item" separator="," >
|
||||||
(
|
(
|
||||||
#{item.id},#{item.name},#{item.parentId},#{item.sort},#{item.subCount},case when #{item.isParent} = true then 1 else 0 end,#{item.name}
|
#{item.id},#{item.name},#{item.parentId},#{item.sort},#{item.subCount},#{item.name}
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
Loading…
Reference in New Issue