hcy 6 days ago
parent ce5f4035d3
commit b96f23a405

@ -1,2 +1,41 @@
# SCASS_project 民航不安全事件上报统计分析系统 - 微信小程序
项目简介
本项目是一个基于微信小程序开发的民航不安全事件上报统计分析系统,旨在为用户提供一个便捷的渠道,实时上报民航领域中的不安全事件,并对上报内容进行统计、分析与可视化展示。通过该系统,用户能够上传不安全事件信息,系统自动生成图表和报告,管理员能够审核和管理上报内容,并能根据数据进行决策支持。
功能概述
用户上报
用户可以通过微信小程序上报民航领域的不安全事件。上报内容包括事件类型、发生地点、时间、事件描述等,系统将生成相应的记录并提交给管理员审核。
审核管理
管理员可以审核用户提交的上报内容,决定是否批准发布。如果有不符合规定或缺少信息的上报,管理员可以要求用户修改或补充。
数据统计与图表展示
根据用户上报的事件数据,系统将自动生成统计图表,帮助管理人员对不安全事件进行量化分析,如事件类型分布、地域分布、发生频率等。
AI问答功能
系统提供AI智能问答功能用户可以根据关键词提问系统会根据历史上报内容、事件数据以及安全管理规定提供相关的回答或建议。
智能报告生成
系统会根据用户上报的内容智能生成安全报告,涵盖事件的发生频率、潜在的风险趋势、影响的领域等信息,报告支持下载与导出。
技术架构
前端技术
微信小程序框架采用WXML、WXSS、JavaScript开发页面和交互功能结合微信提供的API实现消息推送、数据获取等功能。
后端技术
后端采用springboot使用MySQL数据库存储用户数据、事件上报记录和统计信息。
数据分析与可视化
利用UCharts进行数据图表的展示支持柱状图图表形式直观展示统计结果。
人工智能
利用自然语言处理技术和AI问答接口根据用户提问自动生成回答。结合大数据分析技术辅助生成智能报告。

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 KiB

@ -0,0 +1,20 @@
package com.sa.unsafeincidents.config;
import com.sa.unsafeincidents.interceptors.LoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class webconfig implements WebMvcConfigurer {
@Autowired
private LoginInterceptor loginInterceptor;
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(loginInterceptor).excludePathPatterns("/user/login", "/user/register");
}
}

@ -40,14 +40,14 @@ public class ReportController {
@GetMapping("/list") @GetMapping("/list")
public Result<List<Report>> list() { public Result<List<Report>> list() {
// Map<String,Object> claims = ThreadLocalUtil.get(); Map<String,Object> claims = ThreadLocalUtil.get();
// String username = (String) claims.get("username"); String username = (String) claims.get("username");
// User user = userService.findByUsername(username); User user = userService.findByUsername(username);
// if (user.getPermissions() == 1) { if (user.getPermissions() == 1) {
return Result.success(reportService.list()); return Result.success(reportService.list());
// } else { } else {
// List<Report> reports = reportService.list(username); List<Report> reports = reportService.list(username);
// return Result.success(reports); return Result.success(reports);
// } }
} }
} }

@ -0,0 +1,31 @@
package com.sa.unsafeincidents.interceptors;
import com.sa.unsafeincidents.utils.JwtUtil;
import com.sa.unsafeincidents.utils.ThreadLocalUtil;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
@Component
public class LoginInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
String token = request.getHeader("Authorization");
try {
ThreadLocalUtil.set(JwtUtil.parseToken(token));
return true;
} catch (Exception e) {
response.setStatus(401);
return false;
}
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
ThreadLocalUtil.remove();
}
}

@ -8,8 +8,22 @@ import java.util.ArrayList;
@Mapper @Mapper
public interface ReportMapper { public interface ReportMapper {
@Insert("INSERT INTO reports (name, selectedTime, selectedDate, license, acftType, fixstage, fixcheck, aarcstatus, phase, wether, lightCondition, carone, cartwo, workPosition, task, plan, ats, atc, tcas, advise, involve, tudentType, acft0Type, task0, plan0, phase0, wether0, lightCondition0, ats0, atc0, tcas0, advise0, inputValue1, inputValue2, inputValue3, inputValue4, inputValue5, inputValue6, inputValue7, inputValue8, inputValue9, inputValue10, inputValue11, inputValue12, inputValue13, inputValue14, inputValue15, inputValue16, inputValue17, inputValue18, inputValue19, inputValue20, inputValue21, inputValue22, inputValue23, inputValue100, inputValue101, inputValue102, reply) " + @Insert("INSERT INTO reports (username, name, selectedTime, selectedDate, license, acftType, fixstage, " +
"VALUES (#{name}, #{selectedTime}, #{selectedDate}, #{license}, #{acftType}, #{fixstage}, #{fixcheck}, #{aarcstatus}, #{phase}, #{wether}, #{lightCondition}, #{carone}, #{cartwo}, #{workPosition}, #{task}, #{plan}, #{ats}, #{atc}, #{tcas}, #{advise}, #{involve}, #{tudentType}, #{acft0Type}, #{task0}, #{plan0}, #{phase0}, #{wether0}, #{lightCondition0}, #{ats0}, #{atc0}, #{tcas0}, #{advise0}, #{inputValue1}, #{inputValue2}, #{inputValue3}, #{inputValue4}, #{inputValue5}, #{inputValue6}, #{inputValue7}, #{inputValue8}, #{inputValue9}, #{inputValue10}, #{inputValue11}, #{inputValue12}, #{inputValue13}, #{inputValue14}, #{inputValue15}, #{inputValue16}, #{inputValue17}, #{inputValue18}, #{inputValue19}, #{inputValue20}, #{inputValue21}, #{inputValue22}, #{inputValue23}, #{inputValue100}, #{inputValue101}, #{inputValue102}, #{reply})") "fixcheck, aarcstatus, phase, wether, lightCondition, carone, cartwo, workPosition, task, plan, ats, atc, tcas, " +
"advise, involve, tudentType, acft0Type, task0, plan0, phase0, wether0, lightCondition0, ats0, atc0, tcas0, " +
"advise0, inputValue1, inputValue2, inputValue3, inputValue4, inputValue5, inputValue6, inputValue7, " +
"inputValue8, inputValue9, inputValue10, inputValue11, inputValue12, inputValue13, inputValue14, inputValue15, " +
"inputValue16, inputValue17, inputValue18, inputValue19, inputValue20, inputValue21, inputValue22, " +
"inputValue23, inputValue100, inputValue101, inputValue102, reply) " +
"VALUES (#{username}, #{name}, #{selectedTime}, #{selectedDate}, #{license}, #{acftType}, #{fixstage}, " +
"#{fixcheck}, #{aarcstatus}, #{phase}, #{wether}, #{lightCondition}, #{carone}, #{cartwo}, #{workPosition}, " +
"#{task}, #{plan}, #{ats}, #{atc}, #{tcas}, #{advise}, #{involve}, #{tudentType}, #{acft0Type}, #{task0}, " +
"#{plan0}, #{phase0}, #{wether0}, #{lightCondition0}, #{ats0}, #{atc0}, #{tcas0}, #{advise0}, " +
"#{inputValue1}, #{inputValue2}, #{inputValue3}, #{inputValue4}, #{inputValue5}, #{inputValue6}, " +
"#{inputValue7}, #{inputValue8}, #{inputValue9}, #{inputValue10}, #{inputValue11}, #{inputValue12}, " +
"#{inputValue13}, #{inputValue14}, #{inputValue15}, #{inputValue16}, #{inputValue17}, #{inputValue18}, " +
"#{inputValue19}, #{inputValue20}, #{inputValue21}, #{inputValue22}, #{inputValue23}, #{inputValue100}, " +
"#{inputValue101}, #{inputValue102}, #{reply})")
void add(Report report); void add(Report report);
@Delete("DELETE FROM reports WHERE id = #{id}") @Delete("DELETE FROM reports WHERE id = #{id}")

@ -0,0 +1,14 @@
package com.sa.unsafeincidents.pojo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
@Data
public class Image {
private Integer id; //图片id
private String image; //图片url
private String link; //图片跳转链接
private String content; //图片文本
@JsonIgnore
private String category; //图片类别,图片用在什么地方
}

@ -20,18 +20,11 @@
"pages/dataAnalysis/dataAnalysis", "pages/dataAnalysis/dataAnalysis",
"pages/z1/z1", "pages/z1/z1",
"pages/z2/z2", "pages/z2/z2",
"pages/z3/z3", "pages/z3/z3"
"pages/z4/z4",
"pages/z5/z5",
"pages/z6/z6",
"pages/z7/z7",
"pages/z8/z8",
"pages/z9/z9",
"pages/z10/z10"
], ],
"window": { "window": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "民航反馈分析系统", "navigationBarTitleText": "民航不安全事件上报",
"navigationBarBackgroundColor": "#fff" "navigationBarBackgroundColor": "#fff"
}, },
"tabBar": { "tabBar": {

@ -0,0 +1 @@
Subproject commit 82e6cdfe5347265c04cced222bd6398dcb6eb279

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save