宋岱瑾 2 years ago
parent 7fc1ee9122
commit 865f150a79

@ -19,8 +19,6 @@
| C7 修改图书记录 | 费良荣 | 费良荣 | 宋岱瑾 | 费良荣 |
| C8 删除图书记录 | 姚震 | 姚震 | 费良荣 | 姚震 |
| C9 图书记录排序 | 姚震 | 姚震 | 金雨佳 | 姚震 |
| C10 从文件中读取图书记录 | 费良荣 | 费良荣 | 宋岱瑾 | 费良荣 |
| C11 将图书保存到文件 | 宋岱瑾 | 宋岱瑾 | 费良荣 | 宋岱瑾 |
| C12 以图表方式显示图书记录 | 宋岱瑾 | 宋岱瑾 | 金雨佳. | 宋岱瑾 |
每个成员的工作量(百分比):
@ -291,7 +289,6 @@ Step 2.2: 选择菜单命令 c
Step 2.3: if c == CMD_READ then 读取数据
Step 2.4: if c == CMD_SAVE then 保存数据
Step 2.5: if c == CMD_PRINT then 打印数据
Step 2.6:
![主程序流程图](main.svg)
@ -305,7 +302,7 @@ Step 4: 将所有库存记录写入文件
Step 5: 关闭文件
![保存数据流程图](picture-save.svg)
![保存数据流程图](save.svg)
#### add_data
Step 1: if 数据库满 then 提示数据库满并结束
@ -315,7 +312,7 @@ Step 4: 输入图书名和图书数量
Step 5: 添加新图书到数据
Step 6: 提示添加成功
![添加库存记录流程图](picture-add.svg)
![添加库存记录流程图](add.svg)
### query_data

@ -0,0 +1,122 @@
<mxfile host="65bd71144e">
<diagram id="5vowrda8EVcG1DB4cv1d" name="Page-1">
<mxGraphModel dx="873" dy="568" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="3" style="edgeStyle=none;html=1;" edge="1" parent="1" source="2">
<mxGeometry relative="1" as="geometry">
<mxPoint x="60" y="100" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="2" value="main" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="10" y="30" width="100" height="40" as="geometry"/>
</mxCell>
<mxCell id="5" style="edgeStyle=none;html=1;" edge="1" parent="1" source="4">
<mxGeometry relative="1" as="geometry">
<mxPoint x="60" y="170" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="4" value="初始化并显示菜单" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="10" y="100" width="100" height="40" as="geometry"/>
</mxCell>
<mxCell id="7" style="edgeStyle=none;html=1;" edge="1" parent="1" source="6">
<mxGeometry relative="1" as="geometry">
<mxPoint x="65" y="250" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="6" value="输入c" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="10" y="170" width="110" height="50" as="geometry"/>
</mxCell>
<mxCell id="9" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="8">
<mxGeometry relative="1" as="geometry">
<mxPoint x="210" y="290" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="19" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="8" target="12">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="8" value="&lt;div style=&quot;text-align: justify;&quot;&gt;c == cmd_read&lt;/div&gt;" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="2.5" y="250" width="125" height="80" as="geometry"/>
</mxCell>
<mxCell id="33" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="10" target="30">
<mxGeometry relative="1" as="geometry">
<mxPoint x="520" y="700" as="targetPoint"/>
<Array as="points">
<mxPoint x="440" y="290"/>
<mxPoint x="440" y="690"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="10" value="读取数据" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="210" y="260" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="13" style="edgeStyle=none;html=1;" edge="1" parent="1" source="12">
<mxGeometry relative="1" as="geometry">
<mxPoint x="65" y="490" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="24" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="12" target="22">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="12" value="c == cmd_save" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry y="370" width="130" height="80" as="geometry"/>
</mxCell>
<mxCell id="26" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="14" target="25">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="31" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="14" target="30">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="14" value="c == cmd_print" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry y="490" width="130" height="80" as="geometry"/>
</mxCell>
<mxCell id="17" value="yes" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="150" y="265" width="40" height="30" as="geometry"/>
</mxCell>
<mxCell id="21" value="no" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="10" y="330" width="60" height="30" as="geometry"/>
</mxCell>
<mxCell id="34" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="22" target="30">
<mxGeometry relative="1" as="geometry">
<mxPoint x="440" y="660" as="targetPoint"/>
<Array as="points">
<mxPoint x="440" y="410"/>
<mxPoint x="440" y="690"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="22" value="保存数据" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="210" y="380" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="36" style="edgeStyle=none;html=1;" edge="1" parent="1" source="25">
<mxGeometry relative="1" as="geometry">
<mxPoint x="130" y="690" as="targetPoint"/>
<Array as="points">
<mxPoint x="440" y="530"/>
<mxPoint x="440" y="690"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="25" value="打印数据" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="210" y="500" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="27" value="yes" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="130" y="380" width="60" height="30" as="geometry"/>
</mxCell>
<mxCell id="28" value="yes" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="140" y="500" width="60" height="30" as="geometry"/>
</mxCell>
<mxCell id="29" value="no" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="2.5" y="450" width="60" height="30" as="geometry"/>
</mxCell>
<mxCell id="30" value="结束" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="5" y="650" width="120" height="80" as="geometry"/>
</mxCell>
<mxCell id="32" value="no" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="2.5" y="600" width="60" height="30" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 21 KiB

@ -0,0 +1,50 @@
<mxfile host="65bd71144e">
<diagram id="dPPFDiDxtpt6Hqy5hFVP" name="Page-1">
<mxGraphModel dx="873" dy="568" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="4" style="edgeStyle=none;html=1;" edge="1" parent="1" source="2">
<mxGeometry relative="1" as="geometry">
<mxPoint x="100" y="170" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="2" value="开始" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="40" y="40" width="120" height="80" as="geometry"/>
</mxCell>
<mxCell id="3" value="结束" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="40" y="430" width="120" height="80" as="geometry"/>
</mxCell>
<mxCell id="11" style="edgeStyle=none;html=1;" edge="1" parent="1" source="6">
<mxGeometry relative="1" as="geometry">
<mxPoint x="100" y="430" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="18" style="edgeStyle=none;html=1;" edge="1" parent="1" source="6">
<mxGeometry relative="1" as="geometry">
<mxPoint x="100" y="140" as="targetPoint"/>
<Array as="points">
<mxPoint x="320" y="320"/>
<mxPoint x="320" y="140"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="6" value="是否全部打印完成" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="40" y="280" width="120" height="80" as="geometry"/>
</mxCell>
<mxCell id="9" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="8" target="6">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="8" value="打印图书信息" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="40" y="170" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="12" value="yes" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="40" y="370" width="60" height="30" as="geometry"/>
</mxCell>
<mxCell id="19" value="no" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="200" y="290" width="60" height="30" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.4 KiB

Loading…
Cancel
Save