Merge branch 'master' into 刘彩月

刘彩月
刘彩月 2 years ago
commit ffd3cd2083

@ -0,0 +1,120 @@
<mxfile host="65bd71144e">
<diagram id="QEEwPKbDbDdqIUOv00vG" name="Page-1">
<mxGraphModel dx="988" dy="437" 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="2" value="&lt;b&gt;&lt;font style=&quot;font-size: 15px;&quot;&gt;DoBorrowBook&lt;/font&gt;&lt;/b&gt;" style="ellipse;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="200" y="100" width="140" height="80" as="geometry"/>
</mxCell>
<mxCell id="5" value="" style="endArrow=classic;html=1;fontSize=15;fontColor=#000000;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="269.5" y="180" as="sourcePoint"/>
<mxPoint x="270" y="240" as="targetPoint"/>
<Array as="points">
<mxPoint x="269.5" y="180"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="8" value="&lt;b&gt;是否存在该图书&lt;/b&gt;" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fontSize=15;fontColor=#F0F0F0;" parent="1" vertex="1">
<mxGeometry x="200" y="240" width="140" height="60" as="geometry"/>
</mxCell>
<mxCell id="9" value="" style="endArrow=classic;html=1;fontSize=15;fontColor=#000000;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="8" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="270" y="310" as="sourcePoint"/>
<mxPoint x="270" y="390" as="targetPoint"/>
<Array as="points">
<mxPoint x="270" y="320"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="11" value="&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;font style=&quot;font-size: 17px;&quot;&gt;N&lt;/font&gt;&lt;/span&gt;" style="text;strokeColor=none;fillColor=none;html=1;fontSize=24;fontStyle=1;verticalAlign=middle;align=center;fontColor=#000000;" parent="1" vertex="1">
<mxGeometry x="210" y="340" width="60" height="10" as="geometry"/>
</mxCell>
<mxCell id="40" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=15;fontColor=#000000;" parent="1" source="14" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="270" y="860" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="14" value="&lt;b style=&quot;&quot;&gt;&lt;font style=&quot;font-size: 15px;&quot;&gt;提示Books data empty&lt;/font&gt;&lt;/b&gt;" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;fontSize=15;fontColor=#F0F0F0;" parent="1" vertex="1">
<mxGeometry x="155" y="390" width="230" height="80" as="geometry"/>
</mxCell>
<mxCell id="15" value="&lt;b&gt;显示:输入图书编号&lt;/b&gt;" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fontSize=15;fontColor=#F0F0F0;" parent="1" vertex="1">
<mxGeometry x="440" y="220" width="160" height="80" as="geometry"/>
</mxCell>
<mxCell id="19" value="" style="endArrow=classic;html=1;fontSize=15;fontColor=#000000;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.042;entryY=0.64;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="8" target="15" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="370" y="300" as="sourcePoint"/>
<mxPoint x="440" y="270" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="20" value="" style="endArrow=classic;html=1;fontSize=15;fontColor=#000000;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="520" y="300" as="sourcePoint"/>
<mxPoint x="520" y="370" as="targetPoint"/>
<Array as="points">
<mxPoint x="520" y="300"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="32" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=15;fontColor=#000000;" parent="1" source="21" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="520" y="480" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="38" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontSize=15;fontColor=#000000;" parent="1" source="21" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="780" y="620" as="targetPoint"/>
<Array as="points">
<mxPoint x="780" y="400"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="21" value="&lt;b&gt;图书存在?&lt;/b&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontSize=15;fontColor=#F0F0F0;" parent="1" vertex="1">
<mxGeometry x="460" y="370" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="23" value="&lt;b&gt;显示OK&lt;/b&gt;" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fontSize=15;fontColor=#F0F0F0;" parent="1" vertex="1">
<mxGeometry x="630" y="480" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="42" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=15;fontColor=#000000;" parent="1" source="27" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="270" y="750" as="targetPoint"/>
<Array as="points">
<mxPoint x="520" y="750"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="27" value="&lt;b&gt;显示Book empty&lt;/b&gt;" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fontSize=15;fontColor=#F0F0F0;" parent="1" vertex="1">
<mxGeometry x="440" y="610" width="160" height="70" as="geometry"/>
</mxCell>
<mxCell id="35" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=15;fontColor=#000000;" parent="1" source="34" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="520" y="610" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="37" style="edgeStyle=none;html=1;fontSize=15;fontColor=#000000;" parent="1" source="34" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="640" y="510" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="34" value="&lt;b&gt;数量不小于0&lt;/b&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontSize=15;fontColor=#F0F0F0;" parent="1" vertex="1">
<mxGeometry x="460" y="480" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="41" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=15;fontColor=#000000;" parent="1" source="39" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="270" y="810" as="targetPoint"/>
<Array as="points">
<mxPoint x="770" y="810"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="39" value="&lt;b&gt;显示&lt;i&gt; &lt;/i&gt;Not Found This Book&lt;/b&gt;" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fontSize=15;fontColor=#F0F0F0;" parent="1" vertex="1">
<mxGeometry x="680" y="620" width="180" height="70" as="geometry"/>
</mxCell>
<mxCell id="43" value="" style="rounded=1;whiteSpace=wrap;html=1;fontSize=15;fontColor=#000000;" parent="1" vertex="1">
<mxGeometry x="210" y="860" width="120" height="60" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

@ -1,13 +1,13 @@
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="414px" height="741px" viewBox="-0.5 -0.5 414 741" content="&lt;mxfile&gt;&lt;diagram id=&quot;TgriccfKKwNxxR0kH169&quot; name=&quot;Page-1&quot;&gt;1VhNc5swEP01umYAIQNHwLjtoW2mObQ9KkbBmsiIEXJs59dXAmE+3TgT2+NcbOlpV7Bvn1YSAMbr3ReBi9V3nhIGHCvdATgHjuN5lvrVwL4GXOjVQCZoWkN2CzzQV2JA45dtaErKnqHknEla9MElz3OylD0MC8G3fbMnzvpPLXBGRsDDErMx+pumclWjPrJa/Cuh2ap5sm2ZkTVujA1QrnDKtx0IJgDGgnNZt9a7mDDNXcNL7bc4Mnp4MUFyeYqDWzu8YLYxsZn3kvsmWJKq2E0357n6i1ZyzVTPVs0nnkuTINtT/dpd+xx9IwOVfCOWxso8VWKREWMFD2woFRG+JlLslYkgDEv60p8dm3xmB7s2ZNUwUU8z4IwYmPNfpMA0jTh/HrPBmFKZJmG7opI8FLiKYat0PkGM8TtO1AsRkuz+T9WYBOPgQFS7mGXkG1FtW03aM2Oy6uixsfsIbcFtCAeOheNfSThwzEAyA/4CBBZIPBC6IApB4oMoAQEECQI+AiHSjSDSYKIMAhDOvs1HzKmqUOhmIfiSlOXbYnvEy+dM8E2e/txIRvNjohuK8hwiRN5dX4bQntBhU/C6OpydQYdoMgtBRXsvCwsNNpxXWXCAH1cNCMKw8opBGHdsqnnChXZXXd/uzOOBIAS+C5IFiGIQLI6nEAvMGGE8E3itGC+IoCpIIoZj9+3Am6WF7kizK16otNj+MKvORFYPGTx3Vm37NsqLPy4vtjVN3Nnri30je/MUB9fanP2J1T2snxoJ59WqRNUS9m9zVV6l9rrOFWuvPbsNhTaVqSdRdK1lao1ImPMwnT49fqqN3XUG4kKzCXGhS4lrfDD/MeJTRSf7hGFGs1y1lyrKatVqDqi6uoVmYE3TVLtHgpT0FT9WU1m6BnCay+qFUQTQXM+1kbxsF3QpBX8mMWdctGJ+oowNoQuc9Jsje5MJG40y4U4kAp4jEd47FzXZUflHk6rkU/f+dkbmO8N31dmbzpkKwUf3JeN6r6XQsg+dPvueM6C1LjzGq2U2FALvO2ZGYUefg+D0c9pE1TO2aTvEeFomp64s4+1UHXsRiNQlJgC+py80+u4SgtCyR0L4TPXMPW2zbKve2SvaxF1lSGhFDUlN1Kd8YrjwJuDN7pw+a4evdx3W/EnS0PtJU93241ct8fYLIkz+AQ==&lt;/diagram&gt;&lt;/mxfile&gt;"> <svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="375px" height="741px" viewBox="-0.5 -0.5 375 741" content="&lt;mxfile&gt;&lt;diagram id=&quot;TgriccfKKwNxxR0kH169&quot; name=&quot;Page-1&quot;&gt;1VhNl5sgFP01bOeoSNSlRjPtou2czqLtkomM4QwRD5JJMr++oDjGYDqZNh+dTQKXx8e77/IAAZwuN7cCV4svPCcMeE6+ATAFnue6ofrVwLYFfBi0QCFobmx64J6+EAM6Bl3RnNQDQ8k5k7QagnNelmQuBxgWgq+HZo+cDWetcEEs4H6OmY3+oLlctGiInB7/RGix6GZ2HdOyxJ2xAeoFzvl6B4IZgFPBuWxLy82UMM1dx0vbb3ag9XVhgpTymA5+2+EZs5XxzaxLbjtnSa58N9WSl+ovWcglUzVXFR95KU2A3EDV7QWYNdV8JeZmSDOJxKIgxgq2kJ5sp5tZ9C3hSyLFVhkIwrCkz8NAYBPP4tWud1kVjNfjDHgWAyn/TipM84TzJ5sNxpTKNAnrBZXkvsKNU2ul8xFiTL93EfVMhCSbP5JgWj2I2i5mG4VGVOtek+7EmCx29NjZ/Qtt0VWEA23hhNcSDrQZyCYgnIHIAVkAYh8kMchCkGQggiBDIEQgRroQJRrMlEEE4snn1GJOZYVKFyvB56Su3xbbA54/FYKvyvzbSjJaHhLdvihPIUIU3AxlCN0RHXYJb1eHkxPoEI1GIWpoH0RhpsGO88OMY4EZI4wXAi8VQRURVK2JiP22u77hzUxAN6Q7xM6VCbzJjTeMgjcWhdC7GckHp4iD69qBuEBCCO2E0Pl9+YzgXuc0HePgasdpOLIf9zOeRuK02Y+qaQpiVZiBZAqi2X+1MS+SLX3vgtnSnVxFod2WHEgUXW2bOhYJKY/z8fvehzqKfW9PXGgyIi50LnHZV+mvFp/KFTkkDDNalKo8V443u1Y7TNVjKzYNS5rnunsiSE1f8EMzlKNzAKelbBaMEoBSPdZK8rrf0LUU/IlMOeOiF/MjZWwfOsOJ3F2yu0h0et+JhD8SCHiKQATv3NRkQ+VPTaqST1v7tdOSbgzfTWVrKn+XCE5+Lpmud1oKPfvQG7IfeHu0tpnI9OqZjYXA2x0zo7CD8yA4Pk8fqHbEPmyvPh4XybFHhn2cqgsvAol6dkQgDPQTRL82YhA7riWEj5TP/OMOS/98l9qR18U+oQ01JDdeH/NR4MyHQGA9BYLAZm38JYDeT5qq9p+rWon33/xg9hs=&lt;/diagram&gt;&lt;/mxfile&gt;">
<defs/> <defs/>
<g> <g>
<path d="M 130.5 80 L 130.5 223.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/> <path d="M 91.5 80 L 91.5 223.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 130.5 228.88 L 127 221.88 L 130.5 223.63 L 134 221.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/> <path d="M 91.5 228.88 L 88 221.88 L 91.5 223.63 L 95 221.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<ellipse cx="130.5" cy="40" rx="82.5" ry="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/> <ellipse cx="91.5" cy="40" rx="82.5" ry="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)"> <g transform="translate(-0.5 -0.5)">
<switch> <switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"> <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 163px; height: 1px; padding-top: 40px; margin-left: 49px;"> <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 163px; height: 1px; padding-top: 40px; margin-left: 10px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"> <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 17px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;"> <div style="display: inline-block; font-size: 17px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;">
DoRepaidBook DoRepaidBook
@ -15,19 +15,19 @@
</div> </div>
</div> </div>
</foreignObject> </foreignObject>
<text x="131" y="45" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="17px" text-anchor="middle" font-weight="bold"> <text x="92" y="45" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="17px" text-anchor="middle" font-weight="bold">
DoRepaidBook DoRepaidBook
</text> </text>
</switch> </switch>
</g> </g>
<path d="M 130.5 290 L 130.5 333.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/> <path d="M 91.5 290 L 91.5 333.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 130.5 338.88 L 127 331.88 L 130.5 333.63 L 134 331.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/> <path d="M 91.5 338.88 L 88 331.88 L 91.5 333.63 L 95 331.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="70.5" y="230" width="120" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/> <rect x="31.5" y="230" width="120" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<path d="M 82.5 230 L 82.5 290 M 178.5 230 L 178.5 290" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/> <path d="M 43.5 230 L 43.5 290 M 139.5 230 L 139.5 290" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)"> <g transform="translate(-0.5 -0.5)">
<switch> <switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"> <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 94px; height: 1px; padding-top: 260px; margin-left: 84px;"> <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 94px; height: 1px; padding-top: 260px; margin-left: 45px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"> <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 17px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;"> <div style="display: inline-block; font-size: 17px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;">
提示输入图书ID 提示输入图书ID
@ -35,37 +35,37 @@
</div> </div>
</div> </div>
</foreignObject> </foreignObject>
<text x="131" y="265" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="17px" text-anchor="middle" font-weight="bold"> <text x="92" y="265" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="17px" text-anchor="middle" font-weight="bold">
提示输入图书ID 提示输入图书ID
</text> </text>
</switch> </switch>
</g> </g>
<path d="M 0.5 190 L 20.5 130 L 260.5 130 L 240.5 190 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/> <path d="M 0.25 190 L 20.25 130 L 182.75 130 L 162.75 190 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)"> <g transform="translate(-0.5 -0.5)">
<switch> <switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"> <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 258px; height: 1px; padding-top: 160px; margin-left: 2px;"> <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 181px; height: 1px; padding-top: 160px; margin-left: 1px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"> <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 17px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"> <div style="display: inline-block; font-size: 17px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
显示还书和哪本书是要还的? 显示还书
</div> </div>
</div> </div>
</div> </div>
</foreignObject> </foreignObject>
<text x="131" y="165" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="17px" text-anchor="middle"> <text x="92" y="165" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="17px" text-anchor="middle">
显示还书和哪本书是要还的? 显示还书
</text> </text>
</switch> </switch>
</g> </g>
<path d="M 130.5 400 L 130.5 473.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/> <path d="M 91.5 400 L 91.5 473.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 130.5 478.88 L 127 471.88 L 130.5 473.63 L 134 471.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/> <path d="M 91.5 478.88 L 88 471.88 L 91.5 473.63 L 95 471.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 180.5 370 L 264.13 370" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/> <path d="M 141.5 370 L 225.13 370" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 269.38 370 L 262.38 373.5 L 264.13 370 L 262.38 366.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/> <path d="M 230.38 370 L 223.38 373.5 L 225.13 370 L 223.38 366.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 70.5 400 L 90.5 340 L 190.5 340 L 170.5 400 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/> <path d="M 31.5 400 L 51.5 340 L 151.5 340 L 131.5 400 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)"> <g transform="translate(-0.5 -0.5)">
<switch> <switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"> <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 370px; margin-left: 72px;"> <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 370px; margin-left: 33px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"> <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 17px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;"> <div style="display: inline-block; font-size: 17px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;">
图书存在? 图书存在?
@ -73,19 +73,19 @@
</div> </div>
</div> </div>
</foreignObject> </foreignObject>
<text x="131" y="375" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="17px" text-anchor="middle" font-weight="bold"> <text x="92" y="375" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="17px" text-anchor="middle" font-weight="bold">
图书存在? 图书存在?
</text> </text>
</switch> </switch>
</g> </g>
<path d="M 130.5 540 L 130.5 683.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/> <path d="M 91.5 540 L 91.5 683.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 130.5 688.88 L 127 681.88 L 130.5 683.63 L 134 681.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/> <path d="M 91.5 688.88 L 88 681.88 L 91.5 683.63 L 95 681.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="55.5" y="480" width="150" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/> <rect x="16.5" y="480" width="150" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<path d="M 70.5 480 L 70.5 540 M 190.5 480 L 190.5 540" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/> <path d="M 31.5 480 L 31.5 540 M 151.5 480 L 151.5 540" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)"> <g transform="translate(-0.5 -0.5)">
<switch> <switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"> <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 510px; margin-left: 72px;"> <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 510px; margin-left: 33px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"> <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 17px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;"> <div style="display: inline-block; font-size: 17px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;">
DoAddBook DoAddBook
@ -93,16 +93,16 @@
</div> </div>
</div> </div>
</foreignObject> </foreignObject>
<text x="131" y="515" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="17px" text-anchor="middle" font-weight="bold"> <text x="92" y="515" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="17px" text-anchor="middle" font-weight="bold">
DoAddBook DoAddBook
</text> </text>
</switch> </switch>
</g> </g>
<rect x="93" y="435" width="40" height="30" fill="none" stroke="none" pointer-events="all"/> <rect x="54" y="435" width="40" height="30" fill="none" stroke="none" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)"> <g transform="translate(-0.5 -0.5)">
<switch> <switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"> <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 450px; margin-left: 113px;"> <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 450px; margin-left: 74px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"> <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 17px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;"> <div style="display: inline-block; font-size: 17px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;">
N N
@ -110,19 +110,19 @@
</div> </div>
</div> </div>
</foreignObject> </foreignObject>
<text x="113" y="455" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="17px" text-anchor="middle"> <text x="74" y="455" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="17px" text-anchor="middle">
N N
</text> </text>
</switch> </switch>
</g> </g>
<path d="M 341.75 400 L 342.95 630 Q 343 640 333 640 L 139.37 640" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/> <path d="M 302.75 400 L 303.95 630 Q 304 640 294 640 L 100.37 640" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 134.12 640 L 141.12 636.5 L 139.37 640 L 141.12 643.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/> <path d="M 95.12 640 L 102.12 636.5 L 100.37 640 L 102.12 643.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<rect x="270.5" y="340" width="142.5" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/> <rect x="231.5" y="340" width="142.5" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
<path d="M 284.5 340 L 284.5 400 M 399 340 L 399 400" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/> <path d="M 245.5 340 L 245.5 400 M 360 340 L 360 400" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)"> <g transform="translate(-0.5 -0.5)">
<switch> <switch>
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"> <foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 112px; height: 1px; padding-top: 370px; margin-left: 286px;"> <div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 112px; height: 1px; padding-top: 370px; margin-left: 247px;">
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"> <div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
<div style="display: inline-block; font-size: 17px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;"> <div style="display: inline-block; font-size: 17px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;">
图书数量加1 图书数量加1
@ -130,12 +130,12 @@
</div> </div>
</div> </div>
</foreignObject> </foreignObject>
<text x="341" y="375" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="17px" text-anchor="middle" font-weight="bold"> <text x="302" y="375" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="17px" text-anchor="middle" font-weight="bold">
图书数量加1 图书数量加1
</text> </text>
</switch> </switch>
</g> </g>
<rect x="89.25" y="690" width="82.5" height="50" rx="7.5" ry="7.5" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/> <rect x="50.25" y="690" width="82.5" height="50" rx="7.5" ry="7.5" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
</g> </g>
<switch> <switch>
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/> <g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 13 KiB

@ -67,14 +67,12 @@
请选择1 请选择1
Find Book Find Book
Book data empty Book data empty
``` ```
``` ```
请选择1 请选择1
Find Book Find Book
Enter book ID: 1 Enter book ID: 1
Not found Not found
``` ```
@ -82,7 +80,6 @@ Not found
请选择1 请选择1
Find Book Find Book
Enter book ID: 1 Enter book ID: 1
Found Found
************ ************
@ -98,16 +95,13 @@ Book
请选择2 请选择2
Boorow Book Boorow Book
Book data empty Book data empty
``` ```
``` ```
请选择2 请选择2
Boorow Book Boorow Book
Enter book ID:2
Which book you wanna boorow ?
2
NOT FOUND THIS BOOK NOT FOUND THIS BOOK
``` ```
@ -115,9 +109,7 @@ NOT FOUND THIS BOOK
请选择2 请选择2
Boorow Book Boorow Book
Enter book ID:1
Which book you wanna boorow ?
1
********* *********
OK OK
@ -129,19 +121,17 @@ OK
请选择3 请选择3
Repaid Book Repaid Book
Enter book ID:2
Which book you wanna repaid ?
2
Add Book Add Book
ID : 1 ID : 2
TITLE : 1 TITLE : 1
Number : 1 Number : 1
Book Book
**************** id: 1 **************** **************** id: 2 ****************
**** title: 《 1 》**** **** title: 《 1 》****
************** Number: 1 ************** ************** Number: 1 **************
````` `````
@ -151,9 +141,7 @@ Book
请选择3 请选择3
Repaid Book Repaid Book
Enter book ID:1
Which book you wanna repaid ?
1
````` `````
### C4打印书籍 ### C4打印书籍
@ -208,8 +196,6 @@ Book
请选择6 请选择6
Delete Book Delete Book
Which book you wanna delelet?
Enter book ID: 4 Enter book ID: 4
Book Book
@ -219,13 +205,12 @@ Book
************************ ************************
Deleted Deleted
************************
``` ```
``` ```
请选择6 请选择6
Delete Book Delete Book
Which book you wanna delelet?
Enter book ID: 5 Enter book ID: 5
Not found Not found
``` ```
@ -235,9 +220,7 @@ Not found
请选择7 请选择7
Revise Book Revise Book
Enter book ID : 1
Which book you wanna revise ?
1
Original book number : 1 Original book number : 1
Revised number :2 Revised number :2
********************** **********************
@ -249,9 +232,7 @@ Revise success
请选择7 请选择7
Revise Book Revise Book
Enter book ID : 2
Which book you wanna revise ?
2
No such book No such book
`````` ``````
### C8排序图书 ### C8排序图书
@ -260,14 +241,12 @@ No such book
请选择8 请选择8
Sort Books Sort Books
Book data empty Book data empty
``` ```
``` ```
请选择8 请选择8
Sort Books Sort Books
***************************** *****************************
Sort success Sort success
``` ```
@ -329,7 +308,7 @@ Step 6: if 没找到 then 提示Not found
![find](Graph\DoFindBook.drawio.svg) ![find](Graph\DoFindBook.drawio.svg)
## DoDeleteBook ## DoDeleteBook
``` ```
Step 1: 提示删除图书和要删除那本书? Step 1: 提示删除图书
Step 2: 输入图书编号 Step 2: 输入图书编号
Step 3: if 存在此图书 then 输出图上述信息 并提示 Deleted Step 3: if 存在此图书 then 输出图上述信息 并提示 Deleted
Step 4: if 不存在此图书 then 提示 Not found Step 4: if 不存在此图书 then 提示 Not found
@ -344,9 +323,18 @@ Step 3: 显示总书籍个数
![print](Graph\DoPrintBook.drawio.svg) ![print](Graph\DoPrintBook.drawio.svg)
## DoRepaidBook ## DoRepaidBook
``` ```
Step 1: 提示归还图书和哪本书是要还的 Step 1: 提示归还图书
Step 2: 输入图书编号 Step 2: 输入图书编号
Step 3: if 存在该书 then 图书数量变化 1 Step 3: if 存在该书 then 图书数量变化 1
Step 4: if 不存在该书 then 添加此图书 Step 4: if 不存在该书 then 添加此图书
``` ```
![repaid](Graph\DoRepaidBook.drawio.svg) ![repaid](Graph\DoRepaidBook.drawio.svg)
## DoBoorowBook
```
Step 1: 提示借用图书
Step 2: if 图书库为空 then 提示 Books data empty
Step 3: 输入图书编号
Step 4: if 此书存在 if 数量不小于0 then 进行程序并提示 OK 以表示完成 else 提示 Book empty
Step 5: if 此书不存在 then 提示 NOT FOUND THIS BOOK
```
![boorow](Graph\DoBorrowBook.drawio.svg)

@ -281,7 +281,7 @@ void input(Book& b)
// 打印一本书的信息 // 打印一本书的信息
void print(const Book& b) void print(const Book& b)
{ {
cout << "Book " << endl << endl cout << endl << "Book " << endl
<<"**************** id: " << b.id << " ****************" << endl <<"**************** id: " << b.id << " ****************" << endl
<< "**** title: 《 " << b.title << " 》****" << endl << "**** title: 《 " << b.title << " 》****" << endl
<< "************** Number: " << b.number << " **************" << endl << endl; << "************** Number: " << b.number << " **************" << endl << endl;
@ -316,43 +316,51 @@ bool bookempty()
// 添加图书 // 添加图书
void DoAddBook() void DoAddBook()
{ {
if (books.length == 256) cout << "Books full" << endl;
cout << endl << "Add Book"<< endl<<endl; cout << endl << "Add Book"<< endl<<endl;
if (books.length == 256) cout << "Books full" << endl;
else{
Book book; Book book;
input(book); //输入图书 input(book); //输入图书
books.elem[books.length + 1] = book; books.elem[books.length + 1] = book;
books.length++; books.length++;
print(book); print(book);
cout << "*******Added********" << endl; cout << "*******Added********" << endl;
}
} }
// 查找图书 // 查找图书
void DoFindBook() void DoFindBook()
{ {
cout << endl << "Find Book" << endl <<endl; cout << endl << "Find Book" << endl;
if (bookempty()) cout << "Book data empty"<< endl; if (bookempty()) cout << "Book data empty"<< endl;
else {
int id; int id;
cout << "Enter book ID: "; cout << "Enter book ID: ";
cin >> id; cin >> id;
Book book; Book book;
if (find(id) == 0) if (find(id) == 0)
cout << "Not found" << endl; {
cout << "************" << endl;
cout << "Not found" << endl;
cout << "************" << endl;
}
else else
{ {
book = books.elem[find(id)]; book = books.elem[find(id)];
cout << "************" << endl;
cout << "Found" << endl; cout << "Found" << endl;
cout << "************" << endl; cout << "************" << endl;
print(book); print(book);
} }
}
} }
// 删除图书 // 删除图书
void DoDeleteBook() void DoDeleteBook()
{ {
cout << endl << "Delete Book" << endl << endl; cout << endl << "Delete Book" << endl;
int id; int id;
cout << "Which book you wanna delelet?"<<endl;
cout << "Enter book ID: "; cout << "Enter book ID: ";
cin >> id; cin >> id;
Book e; Book e;
@ -369,6 +377,7 @@ void DoDeleteBook()
--books.length; --books.length;
cout << "************************" << endl; cout << "************************" << endl;
cout << "Deleted" << endl; cout << "Deleted" << endl;
cout << "************************" << endl;
} }
} }
@ -376,26 +385,25 @@ void DoDeleteBook()
void DoPrintBook() void DoPrintBook()
{ {
cout << endl << "Print All Books" << endl <<endl; cout << endl << "Print All Books" << endl <<endl;
int flag = 0; int number = 0;
for (int i = 0; i < books.length; i++) for (int i = 0; i < books.length; i++)
{ {
Book e; Book e;
e = books.elem[i + 1]; e = books.elem[i + 1];
print(e); print(e);
flag++; number++;
} }
cout << "Total: "; cout << "Total: ";
cout << flag; cout << number;
cout << " books" << endl; cout << " books" << endl;
} }
// 归还图书 // 归还图书
void DoRepaidBook() void DoRepaidBook()
{ {
cout << endl << "Repaid Book" << endl<<endl; cout << endl << "Repaid Book" << endl;
int id; int id;
cout << "Which book you wanna repaid ? " << endl; cout << "Enter book ID :";
cout << "Enter book ID :" << endl;
cin >> id; cin >> id;
cout << endl; cout << endl;
if (find(id)){ if (find(id)){
@ -403,6 +411,7 @@ void DoRepaidBook()
e = books.elem[find(id)]; e = books.elem[find(id)];
++books.elem[find(id)].number; ++books.elem[find(id)].number;
}else{ }else{
cout << "Add Book" << endl;
DoAddBook(); DoAddBook();
} }
} }
@ -410,13 +419,12 @@ void DoRepaidBook()
// 借用图书 // 借用图书
void DoBoorowBook() void DoBoorowBook()
{ {
cout << endl << "Boorow Book" << endl <<endl; cout << endl << "Boorow Book" << endl ;
int id; int id;
if (bookempty()) cout << "Book data empty"<< endl; if (bookempty()) cout << "Books data empty"<< endl;
cout << "Which book you wanna boorow ? " << endl; else{
cout << "Enter book ID :" << endl; cout << "Enter book ID :";
cin >> id; cin >> id;
cout << endl;
if (find(id)){ if (find(id)){
if (books.elem[find(id)].number>0) { if (books.elem[find(id)].number>0) {
Book e; Book e;
@ -425,25 +433,26 @@ void DoBoorowBook()
--books.elem[find(id)].number; --books.elem[find(id)].number;
}else cout << "***************************"<< endl }else cout << "***************************"<< endl
<< "Book empty" << endl << "***************************" << endl; << "Book empty" << endl << "***************************" << endl;
}else cout<< "NOT FOUND THIS BOOK"<<endl; }else cout<< "NOT FOUND THIS BOOK"<<endl;}
} }
// 修改图书 // 修改图书
void DoReviseBook() void DoReviseBook()
{ {
cout <<endl<< "Revise Book" <<endl <<endl; cout <<endl<< "Revise Book" <<endl ;
int id; int id;
printf( "Which book you wanna revise ?\n" ); cout << "Enter book ID :";
cin >> id; cin >> id;
if ( find(id)!=0 ) { if ( find(id)!=0 ) {
printf ( "Original book number : %d\n", books.elem[id].number ); printf ( "Original book number : %d\n", books.elem[find(id)].number );
printf ( "Revised number :" ); printf ( "Revised number :" );
int xiugai; int xiugai;
scanf ( "%d", &xiugai ); scanf ( "%d", &xiugai );
books.elem[id].number+=xiugai; books.elem[id].number=xiugai;
cout << "**********************" << endl; cout << "**********************" << endl;
printf ( "Revise success \n" ); printf ( "Revise success \n" );
cout << "**********************" << endl;
} }
else printf ( "No such book\n"); else printf ( "No such book\n");
} }
@ -451,12 +460,12 @@ void DoReviseBook()
// 排序图书 // 排序图书
void DoSortBook() void DoSortBook()
{ {
cout << endl << "Sort Books" << endl << endl; cout << endl << "Sort Books" << endl;
int a=0; int a=0;
if (bookempty()) cout << "Book data empty"<< endl; if (bookempty()) cout << "Book data empty"<< endl;
else { else {
for (int i=1;i<books.length;i++) for (int i=1;i<books.length-1;i++)
for (int j=books.length;j>0;j--) for (int j=2;j<books.length;j++)
{ {
if (books.elem[i].id>books.elem[j].id) { if (books.elem[i].id>books.elem[j].id) {
Book temp=books.elem[i];books.elem[i]=books.elem[j];books.elem[j]=temp;} Book temp=books.elem[i];books.elem[i]=books.elem[j];books.elem[j]=temp;}
@ -464,6 +473,7 @@ void DoSortBook()
} }
cout << "*****************************" <<endl; cout << "*****************************" <<endl;
cout << "Sort success"<<endl; cout << "Sort success"<<endl;
cout << "*****************************" <<endl;
} }
>>>>>>> master:code/data.h >>>>>>> master:code/data.h
#endif // DATA_H_INCLUDED #endif // DATA_H_INCLUDED
Loading…
Cancel
Save