物流报价领域模型
2023-10-10 17:58:11   20  举报             
     
         
 报价领域模型
    作者其他创作
 大纲/内容
 QuoteStub
  - id: QuoteStubId- data: JSONObject- totalVolume- totalWeight- totalValue
  + getSourceId()+ getSourceType()+ getRelations()
  QuoteMethod
  - STANDARD- SURCHARGE
  创建QuoteStub
  QuotationDetailVO
  - quotationId- quotationNo- templateId- status- close- stub- remarks- hasSurcharge- hasBargain- relations
    QuotationRecalled
  发布领域事件
  QuotationRejectDTO
  - quotationId- reason
  QuotationDetailVO.Close
  - type- reason
  创建Quotation
  创建Quote
  QuotationRejected
  QuoteService
  创建QuoteMatch
  TemplateMatchDTO
  - transportMode- billingMode- billingUnit- weight- volume- quantity- pick- deliver- load- unload- insure- fromTime- fromAddress- toAddress- vehicle
  领域服务
  QuotationCreationDTO.Quote
  - transportFee- pickFee- loadFee- unloadFee- minimumFee- insureFee- taxFee- prepayFee- arrivePayFee- collectionFee- surcharges
  QuotationSurchargeAddDTO
  - quotationId- prepayFee- arrivePayFee- collectionFee- sucharges- submit
  BasicFee
  - freightFee- loadFee- unloadFee- pickFee- deliverFee- ...
  Capacity
  - CUSTOMER- CARRIER- CONSIGNEE
  QuotationDiscardDTO
  Quotation
  - id: QuotationId- quotationNo: QuotationNo- totalVolume- totalWeight- totalValue- stubId: QuoteStubId- ...- relations: List<Relation>- tenantId: TenantId
  + submit(quotes)+ agree(quotes)+ reject(quotes)+ update()+ discard()+ close()+ recall()
  QuotationCreated
  Quote
  - id: QuoteId- method: QuoteMethod- surchargeFees: List<SurchargeFee>- status: QuoteStatus- bargain: QuoteId- tenantId: TenantId
  + close()+ agree()+ reject()+ recall()
  QuotationClosed
  QuotationDetailVO.Relation
  - tenantId- status
  QuotationDetailVO.Stub
  - sourceId- type- transportMode- totalVolume- totalWeight- totalValue
  Relation
  - tenantId: TenantId- capacity: Capacity
  TemplateQuoteDTO
  - stubId- templateId
  QuoteMatch
  - id: QuoteMatchId- stubId: QuoteStubId- match: JSONObject
  + getTemplateId()
  Quotes
  - quotes: List<Quote>- quotation
  + quote(quote)+ submit(quote)+ agree(quote)
  QuotationSubmitDTO
  - quotationId
  QuotationBargainDTO
  - quotationId- quote
  QuotationUpdateDTO
  匹配合约
  QuotationDetailVO.Quote
  QuotationAgreed
  SurchargeFee
  - type- money- remarks
  QuotationSubbmited
  QuotationRecallDTO
  QuotationCreationDTO
  - stubId- submit- quote- remarks
  QuotationCreationDTO.Surcharge
  QuotationCloseDTO
  - quotationId- type- reason
  QuotationUpdated
  领域事件
  查询Quotation
  1. 先创建QuoteStub实体(报价的运单/合单信息),然后从QuoteStub取得relations创建Quotation实体,QuoteStub实体和Quotation实体创建后不需要再更新(可能有状态更新),最后创建Quote实体,发布领域事件。2. QuoteStub实体和Quotation实体冗余relations是为了后续操作方便。进行议价、补充报价、同意报价、拒绝报价、撤回报价等操作时都需要使用relations来判断是否合法操作。3. 在设计报价实体时,实体要设计得尽量小,QuoteMatch和QuoteStub分开设计,可以方便的记录每一次的合约匹配结果,匹配记录没有业务,但需要记录过程,所以每次匹配都要新增记录。
  QuotationBargainVO
  - previous: Quote
  更新Quote
   
 
 
 
 
  0 条评论
 下一页