if configBottlePrint var pTicket = await _ticketRepositoryGetAsynci = iTicketId == deptBottleTicketId; if pTicket == null return ResultMode
This code block checks if the BottlePrint configuration is enabled. If it is, it retrieves a ticket (pTicket) from the ticket repository based on the BottleTicketId of the dept object. If the ticket is not found, it returns a failed result with the message "瓶贴模板不存在" (which translates to "Bottle label template does not exist" in English).
It then creates a detailList by grouping the RecipeDetailList by the Tcdm property and selecting the first item from each group.
It then loops through each item in detailList and for each item, it loops item.pcs number of times. Within each iteration, it sets the Table property of item to a JSON serialized string of the RecipeDetailList items that have the same Tcdm as item.
It then deserializes the TicketText property of pTicket into a list of ComponentModel objects and loops through each component. It calls the SetPropValue method on each component, passing in the current item.
Finally, it adds pTicket to the list collection.
原文地址: https://www.cveoy.top/t/topic/jaaE 著作权归作者所有。请勿转载和采集!