201771030108- Lubin experiment two personal projects - "Northwest Normal University student epidemic reporting system" project report

project content
Course class blog link https://edu.cnblogs.com/campus/xbsf/nwnu2020SE
This job requires link https://www.cnblogs.com/nwnu-daizh/p/12416880.html
My course learning objectives Familiar with the project development process
This job helped me achieve learning objectives in what areas Psp with the way I learned the science of planning process
Github repository project link address https://github.com/Bufanbin/test

A mission statement daily epidemic reporting subsystem students experience

(1) There are a lot of questions epidemic reporting system has just started, first and foremost people with no access to the card, and then just started very tedious, every time manually fill in their poor sense of experience. Later, school improvements have been made, only fill once, no problem later if you can directly point to determine, using up all of a sudden a lot of convenience.

Task two summary read Section 1-2 "Building of the law," and with Chapter 2, Section 2.3 PSP process, develop a mind of your own, Northwest Normal University students daily epidemic reporting system.

(1). I chose the first class development requirements, that there is a data file, saving 100 days 2000 faculty / student all immunization information, please design a command-line program that supports queries in person one day epidemic, the epidemic query statistics data of some kind of week / month, and displays statistical results histogram.

1. Project Development Brief Background

   2019年12月末,中国武汉发生新型冠状病毒(2019-nCoV) 感染的肺炎疫情,为遏制疫情蔓延,有效切断病毒传播途径,在中央政府指导下,各级政府部分采取了一系列防控措施: 2020年1 月23 日10时起对武汉“封城”,全国 31个省市也相继实施了严格的防控措施;全国各省市向武汉和湖北派遣医疗队参与救治工作;在全国范围内调配口罩、防护服、药品等急需的医疗资源支援武汉;指导和督促全国范围内拥有医疗物资生产资质的企业尽快恢复生产能力;定向拨付专项财政资金用于疾病防控;从其他省份调集物资保障武汉市民日常生活。

   值得一提的是,中国互联网企业在此次疫情防控中发挥了社会治理方面的重要作用。以腾讯为例,围绕应对疫情管控需求开发了十一款产品。其中疫情在线问诊功能,对于减少发热病人之间的相互交叉感染具有重要的作用,患者在家通过互联网向在线医生问诊,减少了病毒传播或感染的风险;谣言粉碎对于公众采取理性态度看待疫情的发展具有重要意义。滴滴出行还在武汉专门组建车队,服务于医护人员的通勤,这在实施交通管制的武汉具有重要作用。此外,还有新型肺炎确诊患者同行程查询工具,用户只需要输入自己所乘坐交通工具的时间和班次,就可以确认是否与被确诊感染者同行,提前做好自我隔离和就诊工作。在疫情防控中,中国互联网企业不仅发展壮大,在承担社会责任方面也越来越成熟。

   为有效配合防控机构有关疫情信息的采集、统计与排查,我校开发了教职工/学生疫情上报系统,该系统由教职工疫情每日上报、学生疫情每日上报、二级部门疫情每日汇总表、疫情防控填报统计四个子系统组成。实现对我校各类人员基本情况、所在区域及活动轨迹及健康状况的信息收集。师生通过我校企业微信服务大厅访问该系统进行远程信息填报。 

2. Requirements Analysis

1. To achieve the query;
2. weekly and monthly data query are displayed in the form of charts.

4. Functional Design

1. implemented by name inquiry;
2. Student ID inquiry;
3. student number and time of the query;
4. circumferential query;
5. month query.

3. Design and Implementation

To achieve the query, I set up several functions as follows:
1.def the MENU (): used to display the menu
2.def init (): used to initialize
3.def search_by_name (st_name): Query by name
4.def search_by_id (st_id ): according to Student ID query
5.def search_by_idAndtime (st_id, st_time): by student number and time of the query
6.def search_by_weekend (st_weekend): weekly query
7.def search_by_month (st_month): monthly inquiries
Finally, the main () function to control these functions, implement the query and statistics. Background With mysql database and python3 as well as some of python modules.

4. Test Run

1. To achieve a query by name;

2. Student ID inquiry;

3. Student ID and time of the query;

4. circumferential query;

5. monthly queries.

6. System Function

7. Database Structure

8. code hosting

5. Code Display

    elif kind == 4:
        st_weekend = input("请输入'年-周':")
        results = search_by_weekend(st_weekend)
        r=[ ]
        ry=[ ]
        rn=[ ]
        t = len(results)
        n = [ ]
        n = results[0]
        q = n[0]
        print("该周点到人数:", q)
        for i in range(1, t):
            r = results[i]
            rn.append(r[0])
            ry.append(q-r[0])

        # 设置中文字体和负号正常显示
        matplotlib.rcParams['font.sans-serif'] = ['SimHei']
        matplotlib.rcParams['axes.unicode_minus'] = False

        label_list = ['heat', 'at_school', 'at_huobei', 'at_wuhan','meet_dap']    # 横坐标刻度显示值
        num_list1 = ry      # 纵坐标值1
        num_list2 = rn      # 纵坐标值2

        m = range(len(num_list1))
        
                    rects1 = plt.bar(x=m, height=num_list1, width=0.4, alpha=0.8, color='red', label="Yes")
        rects2 = plt.bar(x=[i + 0.4 for i in m], height=num_list2, width=0.4, color='green', label="No")
        plt.ylim(0, 20)     # y轴取值范围
        plt.ylabel("数量")
        """
        设置x轴刻度显示值
        参数一:中点坐标
        参数二:显示值
        """
        plt.xticks([index + 0.2 for index in m], label_list)
        plt.xlabel("类型")
        plt.title("周统计图")
        plt.legend()     # 设置题注
        # 编辑文本
        for rect in rects1:
            height = rect.get_height()
            plt.text(rect.get_x() + rect.get_width() / 2, height+1, str(height), ha="center", va="bottom")
        for rect in rects2:
            height = rect.get_height()
            plt.text(rect.get_x() + rect.get_width() / 2, height+1, str(height), ha="center", va="bottom")
        plt.show()
        kind = int(input("按111退出: "))
        if kind == 111:
            exit()
        kind = init()

6. Summary

1. I learned with psp own project planning process, use github managed code, also reviewed relevant knowledge database.
1. This time I learned a lot, started too late, resulting in failure to achieve part of expansion capabilities, next time you want to start early.
2. To learn ahead of time, laying the foundation for the next fight.
3. This is not the end of the project is completed in a timely manner to reflect the shortage will continue to be modified.

7.PSP show

PSP2.1 SUMMARY Plan time (min) required to complete a total of The actual time required for completion (min)
Planning plan 60 40
· Estimate · Estimate how much time this task requires, and planning generally work steps 900
Development Develop 600 500
·· Analysis Needs analysis (including learning new technologies) 40 40
· Design Spec Generate design documents 60 50
· Design Review · Design Review (and his colleagues reviewed the design documents) 30 30
· Coding Standard Code specifications (development of appropriate norms for the current development) 10 20
· Design Specific design 60 40
· Coding Specific coding 600 500
· Code Review · Code Review 40 40
· Test · Test (self-test, modify the code, submit modifications) 50 50
Reporting report 100 90
·· Test Report · testing report 30 30
· Size Measurement Computing workload 1080 920
· Postmortem & Process Improvement Plan · Hindsight, and propose process improvement plan 20 10

8. Experience

1.python There are many modules, like numpy, pandas and matplotlib, these modules are very easy to use in the plot.
2. Try to use Java to achieve this kind of system design.
3.psp can detect you, can find their own problems through the PSP.
4.Github to be proficient.

Guess you like

Origin www.cnblogs.com/XuWang-000/p/12420944.html