This commit is contained in:
why 2023-04-24 18:49:52 +08:00
commit 1c8d4fc090
8 changed files with 105 additions and 5 deletions

View File

@ -114,6 +114,24 @@ public class EntityData implements Serializable {
@TableField(exist = false)
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)
private static final long serialVersionUID = 1L;

View File

@ -89,4 +89,9 @@ public class UserVo {
//国家
private String country;
private Integer byUserStatisticsOne;
private Integer byUserStatisticsTwo;
private Integer byUserStatisticsThree;
private Integer byUserStatisticsFour;
}

View File

@ -410,5 +410,8 @@ public class DisasterInfoController {
return R.data(disasterInfoService.updateById(disasterInfo));
}
@GetMapping("/getByUserDisasterInfoStatistics")
public R getByUserDisasterInfo(Long userId) {
return R.data(disasterInfoService.getByUserDisasterInfoStatistics(userId));
}
}

View File

@ -35,9 +35,13 @@
<select id="getEntityDataList" resultType="com.kening.vordm.entity.EntityData">
select
<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
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>
<if test="entityData.disasterId != null and entityData.disasterId != ''">
ed.disaster_id = #{entityData.disasterId}

View File

@ -17,7 +17,15 @@ public interface GuestInfoMapper extends BaseMapper<GuestInfo> {
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);
}

View File

@ -39,4 +39,46 @@
email = #{email}
</where>
</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>

View File

@ -70,4 +70,6 @@ public interface DisasterInfoService extends IService<DisasterInfo> {
UserVo getBladeUserByEmail(String email);
Integer getByUserDisasterInfo(Long userId, Long disasterId);
UserVo getByUserDisasterInfoStatistics(Long userId);
}

View File

@ -218,6 +218,24 @@ public class DisasterInfoServiceImpl extends ServiceImpl<DisasterInfoMapper, Dis
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 暂时没有条件查询 所有统计都暂时写在一个查询里面