Merge branch 'master' of http://47.92.168.204:3000/VoRDM/vordm-backend
This commit is contained in:
commit
1c8d4fc090
|
@ -114,6 +114,24 @@ public class EntityData implements Serializable {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String uploaderName;
|
private String uploaderName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图层名称
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String layerName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* vordmId
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String vordmId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图层名称
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String msName;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
|
@ -89,4 +89,9 @@ public class UserVo {
|
||||||
|
|
||||||
//国家
|
//国家
|
||||||
private String country;
|
private String country;
|
||||||
|
|
||||||
|
private Integer byUserStatisticsOne;
|
||||||
|
private Integer byUserStatisticsTwo;
|
||||||
|
private Integer byUserStatisticsThree;
|
||||||
|
private Integer byUserStatisticsFour;
|
||||||
}
|
}
|
||||||
|
|
|
@ -410,5 +410,8 @@ public class DisasterInfoController {
|
||||||
return R.data(disasterInfoService.updateById(disasterInfo));
|
return R.data(disasterInfoService.updateById(disasterInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getByUserDisasterInfoStatistics")
|
||||||
|
public R getByUserDisasterInfo(Long userId) {
|
||||||
|
return R.data(disasterInfoService.getByUserDisasterInfoStatistics(userId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,9 +35,13 @@
|
||||||
<select id="getEntityDataList" resultType="com.kening.vordm.entity.EntityData">
|
<select id="getEntityDataList" resultType="com.kening.vordm.entity.EntityData">
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List"/>,
|
<include refid="Base_Column_List"/>,
|
||||||
gi.username AS uploaderName
|
gi.username AS uploaderName,
|
||||||
|
ms.layer_name,
|
||||||
|
ms.vordm_id,
|
||||||
|
ms.name AS msName
|
||||||
from entity_data ed
|
from entity_data ed
|
||||||
left join guest_info gi on gi.id = ed.uploader_id
|
inner join guest_info gi on gi.id = ed.uploader_id
|
||||||
|
inner join map_server ms on ms.disaster_id = ed.disaster_id
|
||||||
<where>
|
<where>
|
||||||
<if test="entityData.disasterId != null and entityData.disasterId != ''">
|
<if test="entityData.disasterId != null and entityData.disasterId != ''">
|
||||||
ed.disaster_id = #{entityData.disasterId}
|
ed.disaster_id = #{entityData.disasterId}
|
||||||
|
|
|
@ -17,7 +17,15 @@ public interface GuestInfoMapper extends BaseMapper<GuestInfo> {
|
||||||
|
|
||||||
UserVo getBladeUserByEmail(@Param("email") String email);
|
UserVo getBladeUserByEmail(@Param("email") String email);
|
||||||
|
|
||||||
int updatePassword(String email, String password);
|
int updatePassword(@Param("email") String email,@Param("password") String password);
|
||||||
|
|
||||||
int updateAccount(UserVo userVo);
|
int updateAccount(@Param("userVo") UserVo userVo);
|
||||||
|
|
||||||
|
int getByUserStatisticsOne(@Param("userId") Long userId);
|
||||||
|
|
||||||
|
int getByUserStatisticsTwo(@Param("userId") Long userId);
|
||||||
|
|
||||||
|
int getByUserStatisticsThree(@Param("userId") Long userId);
|
||||||
|
|
||||||
|
int getByUserStatisticsFour(@Param("userId") Long userId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,4 +39,46 @@
|
||||||
email = #{email}
|
email = #{email}
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getByUserStatisticsOne" resultType="java.lang.Integer">
|
||||||
|
select count(di.id)
|
||||||
|
FROM disaster_info di
|
||||||
|
inner join guest_manage_disaster_ref gmdr on gmdr.disaster_id = di.id
|
||||||
|
inner join guest_info gi on gi.id = gmdr.sponsor_id
|
||||||
|
inner join blade_user bu on bu.email = gi.email
|
||||||
|
<where>
|
||||||
|
bu.id = #{userId}
|
||||||
|
and di.respond_status = 3
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByUserStatisticsTwo" resultType="java.lang.Integer">
|
||||||
|
select count(di.id)
|
||||||
|
FROM disaster_info di
|
||||||
|
inner join guest_manage_disaster_ref gmdr on gmdr.disaster_id = di.id
|
||||||
|
inner join guest_info gi on gi.id = gmdr.sponsor_id
|
||||||
|
inner join blade_user bu on bu.email = gi.email
|
||||||
|
<where>
|
||||||
|
bu.id = #{userId}
|
||||||
|
and di.respond_status = 2
|
||||||
|
</where>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByUserStatisticsThree" resultType="java.lang.Integer">
|
||||||
|
select count(ed.id)
|
||||||
|
FROM entity_data ed
|
||||||
|
<where>
|
||||||
|
ed.manager_id = #{userId}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByUserStatisticsFour" resultType="java.lang.Integer">
|
||||||
|
select count(ed.id)
|
||||||
|
FROM entity_data ed
|
||||||
|
left join guest_manage_disaster_ref gmdr on gmdr.disaster_id = ed.disaster_id
|
||||||
|
<where>
|
||||||
|
gmdr.manager_id = #{userId}
|
||||||
|
and ed.manager_id = null
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -70,4 +70,6 @@ public interface DisasterInfoService extends IService<DisasterInfo> {
|
||||||
UserVo getBladeUserByEmail(String email);
|
UserVo getBladeUserByEmail(String email);
|
||||||
|
|
||||||
Integer getByUserDisasterInfo(Long userId, Long disasterId);
|
Integer getByUserDisasterInfo(Long userId, Long disasterId);
|
||||||
|
|
||||||
|
UserVo getByUserDisasterInfoStatistics(Long userId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -218,6 +218,24 @@ public class DisasterInfoServiceImpl extends ServiceImpl<DisasterInfoMapper, Dis
|
||||||
return guestManageDisasterRefService.count(queryWrapper);
|
return guestManageDisasterRefService.count(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserVo getByUserDisasterInfoStatistics(Long userId) {
|
||||||
|
//已响应
|
||||||
|
int byUserStatisticsOne = guestInfoMapper.getByUserStatisticsOne(userId);
|
||||||
|
//正在响应
|
||||||
|
int byUserStatisticsTwo = guestInfoMapper.getByUserStatisticsTwo(userId);
|
||||||
|
//已审核数据数量
|
||||||
|
int byUserStatisticsThree = guestInfoMapper.getByUserStatisticsThree(userId);
|
||||||
|
//待审核数据数量
|
||||||
|
int byUserStatisticsFour = guestInfoMapper.getByUserStatisticsFour(userId);
|
||||||
|
UserVo userVo = new UserVo();
|
||||||
|
userVo.setByUserStatisticsOne(byUserStatisticsOne);
|
||||||
|
userVo.setByUserStatisticsTwo(byUserStatisticsTwo);
|
||||||
|
userVo.setByUserStatisticsThree(byUserStatisticsThree);
|
||||||
|
userVo.setByUserStatisticsFour(byUserStatisticsFour);
|
||||||
|
return userVo;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 后台管理系统-控制台灾害各项统计
|
* 后台管理系统-控制台灾害各项统计
|
||||||
* @description 暂时没有条件查询 所有统计都暂时写在一个查询里面
|
* @description 暂时没有条件查询 所有统计都暂时写在一个查询里面
|
||||||
|
|
Loading…
Reference in New Issue