处理 坯料的制造订单生成的批次序列号不对 的bug

This commit is contained in:
yuxianghui
2024-11-28 17:50:12 +08:00
parent 0b5645496b
commit 20cfbf7230

View File

@@ -424,6 +424,8 @@ class ProductionLot(models.Model):
"""Generate `lot_names` from a string."""
if first_lot.__contains__(display_name):
first_lot = first_lot[(len(display_name) + 1):]
else:
first_lot = first_lot[-3:]
# We look if the first lot contains at least one digit.
caught_initial_number = regex_findall(r"\d+", first_lot)