second commit

This commit is contained in:
sxu 2024-07-31 10:14:34 +08:00
parent 3414fa3d87
commit e39830930d
48 changed files with 739 additions and 0 deletions

38
.gitignore vendored Normal file
View File

@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

8
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

7
.idea/encodings.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>

View File

@ -0,0 +1,5 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
</profile>
</component>

14
.idea/misc.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

124
.idea/uiDesigner.xml Normal file
View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

17
pom.xml Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cn.bonus.design.uml</groupId>
<artifactId>Design</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View File

@ -0,0 +1,85 @@
@startuml
'https://plantuml.com/class-diagram
class bmProjectLot
class bmUnitInfo
class maHouseInfo
class maHouseSet
class maType
class maTypeFile
class maPartType
class maPropInfo
class maPropSet
class maTypeKeeper
class sysUser
class maTypeRepair
class maMachine
class maWholeSet
class maLabelBind
class maMachineLabel
class purchaseCheckInfo
class purchaseCheckDetails
class purchasePartInfo
class purchasePartDetails
class inputApplyDetails
class repairInputDetails
class repairApplyDetails
class maTypePutInStorageInfo
'仓库
maHouseInfo <.. maHouseSet
'新购入库
tmTask <.. purchaseCheckInfo
sysUser <.. purchaseCheckInfo
purchaseCheckInfo <.. purchaseCheckDetails
'新购配件入库
tmTask <.. purchasePartInfo
sysUser <.. purchasePartInfo
maType <.. purchasePartInfo
purchasePartInfo <.. purchasePartDetails
maPartType <.. purchasePartDetails
'退料管理
tmTask <.. inputApplyDetails
bmProjectLot <.. inputApplyDetails
bmUnitInfo <.. inputApplyDetails
'修试入库
repairInputDetails <.. repairApplyDetails
tmTask <.. repairInputDetails
bmProjectLot <.. repairInputDetails
bmUnitInfo <.. repairInputDetails
'盘点入库
bmProjectLot <.. maTypePutInStorageInfo
bmUnitInfo <.. maTypePutInStorageInfo
sysUser <.. maTypePutInStorageInfo
maType <.. maTypePutInStorageInfo
'设备
maType <.. maTypeFile
maType <.. maMachine
maHouseInfo <.. maMachine
maMachine <.. maLabelBind
maType <.. maLabelBind
maLabelBind <.. maMachineLabel
'库管员
sysUser <|-- maTypeKeeper
maType <.. maTypeKeeper
'维修
maType <.. maTypeRepair
sysUser <|-- maTypeRepair
'资产
maPropInfo <.. maPropSet
maType <.. maPropSet
'机具、调试成套设备配置
maType <.. maWholeSet
@enduml

View File

@ -0,0 +1,44 @@
@startuml
'https://plantuml.com/class-diagram
class bmAgreementInfo
class tmTask
class tmTaskAgreement
class maType
class leaseApplyInfo
class leaseApplyDetail
class leaseOutDetails
class backApplyInfo
class backApplyDetails
class backCheckDetails
class teamLeaseInfo
class sltAgreementInfo
'协议
bmAgreementInfo <.. tmTaskAgreement
'任务
tmTaskAgreement <.. tmTask
'领料
leaseApplyInfo <.. leaseApplyDetail
leaseApplyInfo <.. leaseOutDetails
tmTask <.. leaseApplyInfo
maType <.. leaseApplyDetail
maType <.. leaseOutDetails
'退料
backApplyInfo <.. backApplyDetails
backApplyInfo <.. backCheckDetails
tmTask <.. backApplyInfo
maType <.. backApplyDetails
maType <.. backCheckDetails
'二级库
bmAgreementInfo <.. teamLeaseInfo
sltAgreementInfo <.. teamLeaseInfo
bmAgreementInfo <.. sltAgreementInfo
maType <.. sltAgreementInfo
@enduml

View File

@ -0,0 +1,13 @@
package cn.bonus.design.uml.classic.knowledge.aggregation;
public class Computer {
private Mouse mouse;
private Monitor monitor;
public void setMouse(Mouse mouse) {
this.mouse = mouse;
}
public void setMonitor(Monitor monitor) {
this.monitor = monitor;
}
}

View File

@ -0,0 +1,5 @@
package cn.bonus.design.uml.classic.knowledge.aggregation;
public class Monitor {
}

View File

@ -0,0 +1,5 @@
package cn.bonus.design.uml.classic.knowledge.aggregation;
public class Mouse {
}

View File

@ -0,0 +1,19 @@
@startuml
'https://plantuml.com/class-diagram
class Monitor
class Mouse
Monitor --o Computer
Mouse --o Computer
class Computer {
-Mouse mouse;
-Monitor moniter;
+setMouse(Mouse mouse);
+setMonitor(Monitor monitor);
}
note bottom of Computer : 聚合关系可以看做是关联关系的特例,\n表示组件对于主体来说是可以或缺的
@enduml

View File

@ -0,0 +1,9 @@
package cn.bonus.design.uml.classic.knowledge.composition;
public class Bird {
private Wing wing;
public Bird() {
this.wing = new Wing();
}
}

View File

@ -0,0 +1,5 @@
package cn.bonus.design.uml.classic.knowledge.composition;
public class Head {
}

View File

@ -0,0 +1,5 @@
package cn.bonus.design.uml.classic.knowledge.composition;
public class IDCard {
}

View File

@ -0,0 +1,10 @@
package cn.bonus.design.uml.classic.knowledge.composition;
public class Person {
private IDCard card;
private Head head;
public Person() {
this.head = new Head();
}
}

View File

@ -0,0 +1,4 @@
package cn.bonus.design.uml.classic.knowledge.composition;
public class Wing {
}

View File

@ -0,0 +1,15 @@
@startuml
'https://plantuml.com/class-diagram
class Wing
Wing --* Bird
class Bird {
private Wing wing;
public Bird(){this.wing = new Wing();};
}
note bottom of Bird : 组合关系可以看做是关联关系的特例,\n表示组件对于主体来说是不可缺少的是同生共死的关系
@enduml

View File

@ -0,0 +1,17 @@
@startuml
'https://plantuml.com/class-diagram
class Head
class IDCard
Head --* Person
IDCard --o Person
class Person {
-IDCard card;
public Person(){this.head = new Head();};
}
note bottom of Person : 组合关系可以看做是关联关系的特例,\n表示组件对于主体来说是不可缺少的是同生共死的关系
@enduml

View File

@ -0,0 +1,5 @@
package cn.bonus.design.uml.classic.knowledge.dependence;
public class Department {
}

View File

@ -0,0 +1,5 @@
package cn.bonus.design.uml.classic.knowledge.dependence;
public class IDCard {
}

View File

@ -0,0 +1,5 @@
package cn.bonus.design.uml.classic.knowledge.dependence;
public class Person {
}

View File

@ -0,0 +1,17 @@
package cn.bonus.design.uml.classic.knowledge.dependence;
public class PersonBean {
private PersonDao personDao;
public void save(Person person) {
}
public IDCard getIDCard(Integer id) {
return null;
}
public void modify() {
Department department = new Department();
}
}

View File

@ -0,0 +1,5 @@
package cn.bonus.design.uml.classic.knowledge.dependence;
public class PersonDao {
}

View File

@ -0,0 +1,24 @@
@startuml
'https://plantuml.com/class-diagram
class Department
class IDCard
class Person
class PersonDao
Department <.. PersonBean
IDCard <.. PersonBean
Person <.. PersonBean
PersonDao <.. PersonBean
class PersonBean {
-PersonDao person;
#save(Person person);
~IDCard getIDCard(Integer id);
+modify();
}
note left of PersonBean: -private 私有\n'#protected 受保护\n~package private 包内可见\n+public 公有
note bottom of PersonBean : 依赖关系是所有关系的基础表现,\n其他关系都可以看做是依赖关系的特例
@enduml

View File

@ -0,0 +1,10 @@
package cn.bonus.design.uml.classic.knowledge.generalization;
public abstract class BasicBean {
public void save(Object obj){
}
public void delete(Object id){
}
}

View File

@ -0,0 +1,9 @@
package cn.bonus.design.uml.classic.knowledge.generalization;
public class PersonBean extends BasicBean {
public Object query(Object id){
return null;
}
}

View File

@ -0,0 +1,17 @@
@startuml
'https://plantuml.com/class-diagram
class BasicBean {
save(Object obj);
delete(Object id);
}
BasicBean <|-- PersonBean
class PersonBean {
Object query(Object id);
}
note bottom of PersonBean : 泛化(继承)关系可以看做是依赖关系的特例
@enduml

View File

@ -0,0 +1,6 @@
package cn.bonus.design.uml.classic.knowledge.implementation;
public interface IPersonService {
public void delete(Integer id);
}

View File

@ -0,0 +1,10 @@
package cn.bonus.design.uml.classic.knowledge.implementation;
public class PersonServiceImpl implements IPersonService {
@Override
public void delete(Integer id) {
System.out.println("delete..");
}
}

View File

@ -0,0 +1,16 @@
@startuml
'https://plantuml.com/class-diagram
class IPersonService {
delete(Integer id);
}
IPersonService <|.. PersonServiceImpl
class PersonServiceImpl {
delete(Integer id);
}
note bottom of PersonServiceImpl : 实现(接口)关系可以看做是依赖关系的特例
@enduml

View File

@ -0,0 +1,4 @@
@startuml
class ArrayList implements List
class ArrayList extends AbstractList
@enduml

View File

@ -0,0 +1,5 @@
package cn.bonus.design.uml.classic.knowledge.relationship;
public class Course {
private float score;
}

View File

@ -0,0 +1,4 @@
package cn.bonus.design.uml.classic.knowledge.relationship;
public class IDCard {
}

View File

@ -0,0 +1,4 @@
package cn.bonus.design.uml.classic.knowledge.relationship;
public class Person {
}

View File

@ -0,0 +1,5 @@
package cn.bonus.design.uml.classic.knowledge.relationship;
public class Student {
private String name;
}

View File

@ -0,0 +1,12 @@
@startuml
class Person {
String Name
}
class IDCard {
int id
}
Person "1" -- "1" IDCard
@enduml

View File

@ -0,0 +1,18 @@
@startuml
class Student {
String Name
}
class Course {
float score
}
Student "N" -- "N" Course
(Student, Course) .. Enrollment
class Enrollment {
drop()
cancel()
}
@enduml

View File

@ -0,0 +1,12 @@
@startuml
'https://plantuml.com/sequence-diagram
autonumber
'退料流程
安全员或班长等 -> 系统 --: 新建退料申请
库管员 -> 系统 --: 接收(合格,维修,预报废)
库管员 -> 系统 --: 退料报废
机具经理或库管员等 -> 系统 --: 退料查询
@enduml

View File

@ -0,0 +1,15 @@
@startuml
'https://plantuml.com/sequence-diagram
autonumber
'领料流程
经理或班长 -> 系统 --: 新建协议
调试领料员或班长等 -> 系统 --: 新增领料单
调试经理 -> 系统 --: 内部审核领料单
分管部门经理 -> 系统 --: 分管部门审核领料单
分公司经理 -> 系统 --: 分公司审核领料单
机具库管员 -> 系统 --: 领料出库
机具经理或库管员等 -> 系统 --: 领料查看
@enduml

View File

@ -0,0 +1,11 @@
@startuml
'https://plantuml.com/sequence-diagram
autonumber
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@enduml

View File

@ -0,0 +1,5 @@
@startuml
alice -> bob ++ : hello1
bob -> charlie --++ : hello2
charlie --> alice -- : ok
@enduml

View File

@ -0,0 +1,10 @@
@startuml
alice -> bob ++ : hello
bob -> bob ++ : self call
bob -> charlie ++ #005500 : hello
bob -> george ** : create
return done
return rc
bob -> george !! : delete
return success
@enduml

View File

@ -0,0 +1,7 @@
@startuml
:User: --> (normal)
"normal page" as (normal)
"Main Admin" as Admin
Admin --> (Administrator page)
@enduml

View File

@ -0,0 +1,7 @@
@startuml
:User: --> (normal)
"normal page" as (normal)
"Main Admin" as Admin
Admin --> (Administrator page)
@enduml

View File

@ -0,0 +1,24 @@
@startuml
left to right direction
actor "顾客1" as gk
rectangle 饭店 {
usecase "吃" as UC1
usecase "喝" as UC2
usecase "买单" as UC3
}
gk --> UC1
gk --> UC2
gk --> UC3
json lunch {
"food": {
"水果": ["苹果", "香蕉"],
"菜肴": ["麻辣小龙虾", "香菇肉丁"],
"主食": ["米饭", "馒头"]
},
"drink": {
"饮料": ["可乐", "橙汁"],
"酒水": ["白酒", "啤酒"]
}
}
@enduml

View File

@ -0,0 +1,18 @@
@startuml
left to right direction
actor Guest as g
package Professional {
actor Chef as c
actor "Food Critic" as fc
}
package Restaurant {
usecase "Eat Food" as UC1
usecase "Drink" as UC2
usecase "Pay for Food" as UC3
usecase "Review" as UC4
}
fc --> UC4
g --> UC1
g --> UC2
g --> UC3
@enduml