Backstage shipping business logic

1. Delivery judge

  Ship Type: The entire single shipment, demolition of single shipments.

  Judge:

    1. whether the order exists

    2. whether it is to be a library status

    3. Does the delivery staff to obtain information distribution

    4. Is the order information have been paid

    5. Log on whether the user has permission to ship

2. Create the storehouse:

  1. Obtain order to obtain sources of orders, create storehouse of information, the binding order number

  2. Obtain order is locked (Threading.ReaderWriterLockSlim.EnterWriteLock), to determine whether the order is occupied by other users

  3. Delivery order creation process :( affairs in this package System.TransactionScope.TransactionScope)

    a). Select Warehouse

    b). order to determine whether the state can create Deliveries

    c) determining the order type: send Fu: to pay

    d) obtain orders shipping address: Mail: from mentioning

    e) modify the status: single distribution to be created, the state is to be dispensed, in the first invoice Delivery

    f). Deliveries calculated actual sales amount, calculated retail price, discount amount is calculated

      1. Obtain order details all product information, discount information, determine whether the current order line number has been assigned to create a library of storehouse details

      2. After subtracting freight, calculate the sale amount, discount amount, gross amount, the amount to be assessed

      3. circulation of goods out of the library, the library when the last commodity: the number of orders of goods has a library == number of items

    g). Add recording Delivery primary table, add records child table Delivery

    h). push out library information, the number to the WMS, the push is successful, the number of database update

    . I) primary table update order status as a library: a library section, to be a library

  4. unlocked, the order has been processed in the deleted task pool, and written orders for the transaction log table

3. Create a distribution list

  1. Obtain a storehouse of information, order information, product information, warehouse information, check the time stamp has changed, whether storehouse is to change people

  2. Get all orders for merchandise inventory information, inventory adequacy

  3. Modify the storehouse for the state to be picking, update inventory quantity

  4. Get Order Delivery, adding the recording sheet delivery note

 Delivery status: After you create a delivery order number as shipped.

Front-end delivery confirmation button events

  1. Obtain information warehouse, distribution member information, information distribution methods, distribution of single details

  2. The single judge whether the normal distribution, express delivery judgment to fill a single number is correct, whether occupied

  3. Delivery Delivery will generate a single void corresponding storage lists, again adding this single storage and distribution, check this single storage warehouse has been completed

  4. Create a single successful delivery, the logistics information to fill orders logistics page

  

 

Guess you like

Origin www.cnblogs.com/aimerh/p/11142554.html