Chương II: Phân tích – thiết kế hệ thống bằng ngôn ngữ Mô hình hóa
III- Phân tích - thiết kế bằng ngôn ngữ Mô hình hóa thống nhất UML
3. Mô hình hóa yêu cầu bằng lược đồ cộng tác (Collaboration diagram)
Hình II.27: Collaboration Diagram Đăng nhập hệ thống(Login)
Collaboration Diagram Quản lý thông tin cá nhân (Profile):
Hình II.28: Collaboration Diagram Quản lý thông tin cá nhân (Profile)
SVTH: Lê Công Thành – 207102197 Trang 81
: Employee FrmCouponTypes : BoundaryClass
CouponTypes : ControlClass
Permission : EntityClass
CouponTypes : EntityClass 1: Access
2: CheckPermission(Access)
3: <<create>>
4: GetPermission(Access) 5: return bool
6: <<destroy>>
7: return bool
8: GetAll()
9: GetAll()
10: Info CouponTypes 11: return DataTable
12: LoadForm()
: Employee FrmCouponTypes : BoundaryClass
CouponTypes : ControlClass
CouponTypes : EntityClass
Permission : EntityClass 2: CheckPermission(Insert)
3: <<create>>
4: GetPermission(Insert)
5: return bool
6: <<destroy>>
7: return bool
8: CheckCouponTypeId(info)
9: GetInfo(CouponTypeId) 10: Info CouponType
11: CheckCouponTypeId(CouponTypeId)
12: return bool
13: Insert(info)
14: Insert(info) 15: return bool
16: return bool
17: LoadForm()
1: CreateCouponType(info)
Collaboration Diagram Quản lý loại phiếu:
Chức năng truy cập
Hình II.29: Collaboration Diagram Truy cập loại phiếu
Chức năng thêm mới
Hình II.30: Collaboration Diagram thêm mới loại phiếu
SVTH: Lê Công Thành – 207102197 Trang 82
Permission : EntityClass
: Employee FrmCouponTypes : BoundaryClass
CouponTypes : ControlClass
CouponTypes : EntityClass
14: LoadForm()
1: DeleteCouponType(info)
2: CheckPermission(Delete) 8: Delete(info) 7: return bool
13: return bool
9: CheckDelete(CouponTypeId) 11: Delete(CouponTypeId) 10: return bool
12: return bool
3: <<create>>
4: GetPermission(Delete) 6: <<destroy>>
5: return bool Permission :
EntityClass
: Employee FrmCouponTypes : BoundaryClass
CouponTypes : ControlClass
CouponTypes : EntityClass
12: LoadForm()
1: UpdateCouponType(info)
2: CheckPermission(Update) 8: Update(info) 7: return bool
11: return bool
9: Update(info) 10: return bool
3: <<create>>
4: GetPermission(Update) 6: <<destroy>>
5: return bool
Chức năng cập nhật
Hình II.31: Collaboration Diagram cập nhật loại phiếu
Chức năng xóa
Hình II.32: Collaboration Diagram xóa loại phiếu
SVTH: Lê Công Thành – 207102197 Trang 83
: Manager frmExchangeUnits : BoundaryClass
ExchangeUnits : ControlClass
Permission : EntityClass ExchangeUnits :
EntityClass
12: LoadForm()
1: Access
2: CheckPermission(Access) 8: GetAll()
7: return bool 11: return DataTable
3: <<create>>
4: GetPermission(Access) 6: <<destroy>>
5: return bool 9: GetAll()
10: Info ExchangeUnits
Chú thích: Do lược đồ cộng tác (Collaboration diagram) của một số chức năng tương đồng với các chức năng trong lược đồ tuần tự của chức năng quản lý loại phiếu. Nên sẽ không được việc vẽ và mô tả lại lược đồ cộng tác của các chức năng này. Các chức năng không được mô tả bao gồm:
Quản lý danh mục xuất xứ(Manage Origins).
Quản lý danh mục nhóm mặt hàng (Manage ProdGroup).
Quản lý danh mục loại loại mặt hàng (Manage ProdTypes).
Quản lý danh mục các mặt hàng (Manage Product).
Quản lý danh mục các nhà cung cấp(Manage Suppliers).
Quản lý danh mục các khách hàng (Manager Customers).
Quản lý danh mục các nhân viên (Manage Employer) – Với tác nhân Manager
Quản lý các phiếu thu – chi tiền(Manage Receipt) tác nhân Manager Collaboration Diagram Quản lý chuyển đổi đơn vị:
Chức năng truy cập bảng hệ số chuyển đổi
Hình II.33: Collaboration Diagram Truy cập bảng hệ số qui đổi.
SVTH: Lê Công Thành – 207102197 Trang 84
: Manager frmExchangeUnits : BoundaryClass
ExchangeUnits : ControlClass
Permission : EntityClass ExchangeUnit :
EntityClass
11: CheckSSU(ProductId, UnitId) 1: CreateSSU(info)
2: CheckPermission(Insert) 8: CheckSSU(ProductId, UnitId)
13: Insert(info) 7: return bool
12: return bool 16: return bool
9: GetInfo(ProductId, UnitId) 14: Insert(info) 10: Info ExchangeUnit
15: return bool
3: <<create>>
4: GetPermission(Insert) 6: <<destroy>>
5: return bool
: Employee frmExchangeUnits : BoundaryClass
ExchangeUnits : ControlClass
Permission : EntityClass ExchangeUnit :
EntityClass
11: CheckSSU(ProductId, UnitId)
17: LoadForm()
1: CreateSSU(info)
2: CheckPermission(Insert) 8: CheckSSU(ProductId, UnitId)
13: Insert(info) 7: return bool
12: return bool 16: return bool
9: GetInfo(ProductId, UnitId) 14: Insert(info) 10: Info ExchangeUnit
15: return bool
3: <<create>>
4: GetPermission(Insert) 6: <<destroy>>
5: return bool
Chức năng thêm mới hệ số
Hình II.34: Collaboration Diagram thêm mới hệ số
Chức năng cập nhật hệ số chuyển đổi
Hình II.35: Collaboration Diagram cập nhật hệ số chuyển đổi
SVTH: Lê Công Thành – 207102197 Trang 85
: Manager
Exchange : ControlClass
frmExchange : BoundaryClass
ExchangeUnits :
EntityClass Mainstore : EntityClass
2: CheckInfo()
8: ExchangeUnit(QuantityA, RatioA, QuantityB, RatioB)
1: Exchange(ProductId, UnitA, QuantityA, Unitb, QuantityB)
4: GetInfo(UnitA) 6: GetInfo(UnitB) 5: return RationExchange(ProductId, Unit A)
7: return RatioExchange(ProductId, UnitB) 9: <<create>>
10: ExchangeUnit(ProductId, UnitA, QuantityA, UnitB, QuantityB)
12: <<destroy>>
11: return bool
3: Exchange(ProductId, UnitA, QuantityA, Unitb, QuantityB)
13: return bool
: Manager frmExchangeUnits : BoundaryClass
ExchangeUnit : ControlClass
Permission : EntityClass ExchangeUnit :
EntityClass
12: LoadForm()
1: DeleteSSU(info)
2: CheckPermission(Delete) 8: Delete(info) 7: return bool
11: return bool
9: CheckDelete(ProductId, UnitId) 10: return bool
3: <<create>>
4: GetPermission(Delete) 6: <<destroy>>
5: return bool
Chức năng xóa hệ số
Hình II.36: Collaboration Diagram xóa hệ số
Chức năng chuyển đổi đơn vị tính
Hình II.37: Collaboration Diagram chuyển đổi đơn vị tính
SVTH: Lê Công Thành – 207102197 Trang 86
: Manager frmConfig : BoundaryClass
Config : ControlClass
Permission : EntityClass Connect : EntityClass
12: LoadForm() 14: CheckConnect()
19: LoadForm()
1: Access 13: ChangeConfig(info)
2: CheckPermission(Access) 8: ReadConnection() 15: SaveConnect(info) 7: return bool
11: return DataTable 18: return bool
3: <<create>>
4: GetPermission(Access) 6: <<destroy>>
5: return bool 9: ReadConnection()
16: WriteConnection(info) 10: Info CouponTypes
17: return bool
: Manager
Backup : ControlClass Permission :
EntityClass frmBackup : BoundaryClass
11: CreateBackupFile(Place, Name)
1: Backup Database 9: Save(Place, Name)
8: Input Info Save
3: <<create>>
4: GetPermission(Access) 6: <<destroy>>
5: return bool
2: CheckPermission(Access) 10: BackupDatabase(Place, Name) 7: return bool
12: return bool
Collaboration Diagram Quản lý cấu hình hệ thống:
Hình II.38: Collaboration Diagram Truy cập bảng hệ số qui đổi Collaboration Diagram Tạo dữ liệu dự phòng(Backup Database):
Hình II.39: Collaboration Diagram tạo dữ liệu dữ phòng
SVTH: Lê Công Thành – 207102197 Trang 87
: Manager frmSysLog : BoundaryClass
SysLog : ControlClass
Permission : EntityClass Syslog : EntityClass
13: LoadForm() 24: LoadForm()
1: Access 8: ViewLog(info) 14: DeleteSysLog()
2: CheckPermission(Access) 9: Search(info) 15: CheckPermission(Delete)
20: Delete() 7: return bool
12: return DataTable 19: return bool 23: return bool
3: <<create>>
4: GetPermission(Access) 6: <<destroy>>
16: GetPermission(Delete) 17: <<destroy>>
5: return bool 18: return bool 10: Search(info)
21: Delete() 11: return InfoLog
22: return bool
: Manager frmPermission : BoundaryClass
Permission : ControlClass Permission :
EntityClass
10: LoadForm() 20: LoadForm()
1: Access
11: UpdatePermission(GroupId, Permissions)
2: CheckPermission(Access) 6: GetInfo(GroupId) 12: CheckPermission(Update) 16: Update(GroupId, Permissions)
5: return bool 9: return DataTable
15: return bool 19: return bool
3: GetPermission(Access) 7: GetInfo(GroupId) 13: GetPermission(Update) 17: Update(GroupId, Permissions)
4: return bool 8: return Permissions
14: return bool 18: return bool
Collaboration Diagram Quản lý nhật ký hệ thống(Diary System Log):
Hình II.40: Collaboration Diagram tạo dữ liệu dữ phòng
Collaboration Diagram Phân quyền hệ thống(Manage Decentralize):
Hình II.41: Collaboration Diagram phân quyền hệ thống
SVTH: Lê Công Thành – 207102197 Trang 88
: Manager frmPrices : BoundaryClass
Prices : ControlClass
Permission :
EntityClass Prices : EntityClass
1: Access
2: CheckPermission(Access)
3: <<create>>
4: GetPermission(Access) 5: return bool
6: <<destroy>>
7: return bool
8: Search(FromDate, ToDate)
9: Search(FromDate, ToDate)
10: Info Prices 11: return DataTable
12: LoadForm()
: Manager frmPrice : BoundaryClass
Prices : ControlClass
Permission : EntityClass Prices : EntityClass
1: CreatePrices(info)
2: CheckPermission(Insert)
3: <<create>>
4: GetPermission(Insert)
5: return bool
6: <<destroy>>
7: return bool
8: CheckPrices(PriceId)
9: GetInfo(PriceId) 10: Info Price
11: CheckPrice(PriceId)
12: return bool
13: Insert(info)
14: Insert(info) 15: return bool
16: return bool
Collaboration Diagram điều chỉnh giá (Exchange Prices):
Chức năng truy cập quản lý điều chỉnh giá bán
Hình II.42: Collaboration Diagram Truy cập điều chỉnh giá.
Chức năng thêm mới phiếu điều chỉnh giá bán
Hình II.43: Collaboration Diagram thêm mới điều chỉnh giá.
SVTH: Lê Công Thành – 207102197 Trang 89
: Employee frmPrices : BoundaryClass
Prices : ControlClass
Permission : EntityClass Prices : EntityClass
1: UpdatePrice(info)
2: CheckPermission(Update)
3: <<create>>
4: GetPermission(Update)
5: return bool
6: <<destroy>>
7: return bool
8: Update(info)
9: Update(info) 10: return bool
11: return bool
12: LoadForm()
: Manager frmRptReceipts : BoundaryClass
RptReceipts : ControlClass
Permission : EntityClass RptReceipts :
EntityClass
1: Access
2: CheckPermission(Access)
3: <<create>>
4: GetPermission(Access)
5: return bool
6: <<destroy>>
7: return bool 8: ReportReceiptIns(FromDate, ToDate)
9: SearchReceiptIns(FromDate, ToDate) 10: return DataTable
11: LoadForm()
12: ReportReceiptOuts(FromDate, ToDate)
13: SearchReceiptOuts(FromDate, ToDate)
14: SearchReceiptOuts(FromDate, ToDate) 15: return ReceiptOuts
16: return DataTable
17: LoadForm()
Chức năng cập nhật điều phiếu chỉnh giá bán
Hình II.44: Collaboration Diagram cập nhật phiếu điều chỉnh giá.
Collaboration Diagram báo cáo thu – chi (Report Receipt):
Hình II.45: Collaboration Diagram báo cáo thu – chi
SVTH: Lê Công Thành – 207102197 Trang 90
: Employee frmImports : BoundaryClass
Imports : ControlClass
Imports : EntityClass Permission :
EntityClass
ReceiptOuts : EntityClass
1: Insert(info)
2: CheckPerrmission(Insert)
3: <<create>>
4: GetPermission(Insert) 5: return bool
6: <<destroy>>
7: return bool
8: CheckImport(ImportNo)
9: GetInfo(ImportNo)
10: return info Import 11: CheckImport(ImportNo) 12: return bool
13: Insert(info)
14: Insert(Info)
15: CheckPayMoney()
16: InsertReceipt(info)
17: return bool 18: return bool 19: return bool
20: LoadForm()
Chú thích: Do lược đồ cộng tác Report Receipt (Collaboration diagram) có cùng chức năng với một số lược đồ. Nên sẽ không được việc vẽ và mô tả lại lược đồ cộng tác của các chức năng này. Các chức năng không được mô tả bao gồm:
Báo cáo công nợ khách hàng (Report Debt).
Báo cáo các loại danh mục Khách hàng/Nhà cung cấp/Các hệ số qui đổi.(Report Customer/Supplier/SSUProduct).
Báo cáo tồn kho hiện tại(Report Mainstore).
Báo cáo bảng giá bán hiện tại (Report Prices).
Collaboration Diagram Quản lý phiếu nhập (Manage Import):
Chức năng thêm mới phiếu nhập
Hình II.46: Collaboration Diagram Thêm mới phiếu nhập.
SVTH: Lê Công Thành – 207102197 Trang 91
: Employee frmImports : BoundaryClass
Imports : ControlClass
Permission : EntityClass
Imports : EntityClass
ReceiptOuts : EntityClass
1: Update(info)
2: CheckPerrmission(Update)
3: <<create>>
4: GetPermission(Update) 5: return bool
6: <<destroy>>
7: return bool
8: Update(Info)
9: Update(Info)
10: UpdateReceipt(ReceiptNo) 11: return bool
12: return bool 13: return bool
14: LoadForm()
Chức năng cập nhật phiếu nhập
Hình II.47: Collaboration Diagram cập nhật phiếu nhập.
SVTH: Lê Công Thành – 207102197 Trang 92
: Employee frmExports : BoundaryClass
Exports : ControlClass
Permission : EntityClass
Exports : EntityClass ReceiptIns : EntityClass
Mainstores : EntityClass 1: Insert(info)
2: CheckPerrmission(Insert)
3: <<create>>
4: GetPermission(Insert) 5: return bool
6: <<destroy> >
7: return bool
8: CheckExport(ExportNo)
9: GetInfo(ExportNo)
10: return info Export 11: CheckExport(ExportNo) 12: return bool
13: Insert(info)
14: GetQuantity(ProductId, UnitId, ExpiryDate)
15: return QuantityRemain 16: CheckMainStores(Quantity, QuantityRemain)
17: Insert(Info) 18: CheckPayMoney()
19: InsertReceiptOut(info) 20: return bool
21: return bool 22: return bool
23: LoadForm()
: Employee frmExports : BoundaryClass
Exports : ControlClass
Permission : EntityClass
Exports : EntityClass ReceiptIns : EntityClass
Mainstores : EntityClass
1: Update(info)
2: CheckPerrmission(Update)
3: <<create>>
4: GetPermission(Update)
5: return bool 6: <<destroy>>
7: return bool
8: Update(Info)
9: GetQuantity(ProductId, UnitId, ExpiryDate) 10: return QuantityRemain
11: CheckQuantity(Quantity, QuantityRemain)
12: Update(Info)
13: UpdateReceiptIn(ReceiptNo) 14: return bool
15: return bool 16: return bool
17: LoadForm()
Collaboration Diagram Quản lý phiếu xuất (Manage Exports):
Chức năng thêm mới phiếu xuất
Hình II.48: Collaboration Diagram Thêm mới phiếu xuất.
Chức năng cập nhật phiếu nhập
Hình II.49: Collaboration Diagram cập nhật phiếu nhập.
SVTH: Lê Công Thành – 207102197 Trang 93
CheckPermission Input Value Import
CheckPayMoney Have Permission
Create ReceiptIn
Add Mainstore &
Save Import MessageError
Don't Have Permission
PayMoney = 0 PayMoney > 0 Delete ImportNo
Check Permission Delete
Don't have Permission
Check Quantity Remove
Remove Mainstore
& Delete Import Have Permission
Don't enough quatity
Enough quantity
CheckPermission Input Value Export
CheckPayMoney Have Permission
Create ReceiptOut
Remove Mainstore &
Save Export MessageError
Don't Have Permission
PayMoney = 0 PayMoney > 0 Delete ExportNo
Check Permission Delete
Don't have Permission
Add Mainstore &
Delete Export
Have Permission