boundBill.log 90 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  1. [2025-05-07 17:03:59,568][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'department': '', 'totalCount': 1, 'type': '1', 'warehouse': 'W01'}
  2. [2025-05-07 17:07:42,103][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'department': '', 'totalCount': 1, 'type': '1', 'warehouse': 'W01'}
  3. [2025-05-07 17:08:56,932][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'department': '', 'totalCount': 1, 'type': '1', 'warehouse': 'W01'}
  4. [2025-05-07 17:09:21,114][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'department': '', 'totalCount': 1, 'type': '1', 'warehouse': 'W01'}
  5. [2025-05-07 17:10:01,747][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '123456', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'department': '', 'totalCount': 1, 'type': '1', 'warehouse': 'W01'}
  6. [2025-05-07 17:11:20,207][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '123456', 'goods_std': 'GGXH'}], 'billId': 2203618341900258304, 'creater': '刘清', 'department': '', 'totalCount': 1, 'type': '1', 'warehouse': 'W01'}
  7. [2025-05-07 17:16:44,148][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'department': '', 'totalCount': 1, 'type': 1, 'warehouse': 'W01'}
  8. [2025-05-07 17:17:30,535][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'department': '1', 'totalCount': 1, 'type': 1, 'warehouse': 'W01'}
  9. [2025-05-07 17:17:30,562][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2203618341900258304, 'number': 'GDHB-20250429-000001', 'type': 1, 'date': '2025-04-29 09:56:16.0', 'department': '1', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}]}
  10. [2025-05-07 17:19:05,037][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'department': '', 'totalCount': 1, 'type': 1, 'warehouse': 'W01'}
  11. [2025-05-07 17:20:57,116][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'department': '', 'totalCount': 1, 'type': 1, 'warehouse': 'W01'}
  12. [2025-05-07 17:21:03,567][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'department': '1', 'totalCount': 1, 'type': 1, 'warehouse': 'W01'}
  13. [2025-05-07 17:21:03,586][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2203618341900258304, 'number': 'GDHB-20250429-000001', 'type': 1, 'date': '2025-04-29 09:56:16.0', 'department': '1', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}]}
  14. [2025-05-07 17:21:56,910][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'totalCount': 1, 'type': 1, 'warehouse': 'W01'}
  15. [2025-05-07 17:21:56,961][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2203618341900258304, 'number': 'GDHB-20250429-000001', 'type': 1, 'date': '2025-04-29 09:56:16.0', 'department': '空', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}]}
  16. [2025-05-07 17:22:05,956][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'department': '', 'totalCount': 1, 'type': 1, 'warehouse': 'W01'}
  17. [2025-05-07 17:23:23,324][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'department': '', 'totalCount': 1, 'type': 1, 'warehouse': 'W01'}
  18. [2025-05-07 17:25:09,025][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'totalCount': 1, 'type': 1, 'warehouse': 'W01'}
  19. [2025-05-07 17:25:09,071][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2203618341900258304, 'number': 'GDHB-20250429-000001', 'type': 1, 'date': '2025-04-29 09:56:16.0', 'department': '空', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}]}
  20. [2025-05-07 17:26:46,110][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '123456', 'goods_std': 'GGXH'}], 'billId': 2203618341900258304, 'creater': '刘清', 'totalCount': 1, 'type': '1', 'warehouse': 'W01'}
  21. [2025-05-07 17:26:46,189][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2203618341900258304, 'number': 'GDHB-20250429-000001', 'type': 1, 'date': '2025-04-29 09:56:16.0', 'department': '空', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '123456', 'goods_std': 'GGXH'}]}
  22. [2025-05-07 17:51:07,501][wms.boundBill.validate_and_lock():342] [INFO] 锁定原始单据成功 | billId: 2203618341900258304
  23. [2025-05-07 17:51:07,502][wms.boundBill.validate_and_lock():343] [INFO] 原始单据状态: 0
  24. [2025-05-07 17:51:07,512][wms.boundBill.post():300] [INFO] 创建出入库主单成功 | bound_code: GDHB-20250429-000001
  25. [2025-05-07 17:51:07,527][wms.boundBill.post():308] [INFO] 入库单生成成功 | billId: 2203618341900258304 -> boundCode: GDHB-20250429-000001
  26. [2025-05-07 18:19:13,232][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-24 00:00:00.0', 'number': 'CGSL-250424-000001', 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2200177500884050944, 'goods_unit': '个', 'plan_qty': 10.0, 'goods_code': 'Item-00000001', 'production_batch': '', 'goods_std': '111'}, {'goods_name': '物料2', 'note': '', 'entryIds': 2200177500884050945, 'goods_unit': '个', 'plan_qty': 5.0, 'goods_code': 'Item-00000002', 'production_batch': '', 'goods_std': ''}], 'billId': 2200177249217422336, 'creater': '刘清', 'department': '', 'totalCount': 2, 'type': '1', 'warehouse': 'W01'}
  27. [2025-05-07 18:21:11,908][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-24 00:00:00.0', 'number': 'CGSL-250424-000001', 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2200177500884050944, 'goods_unit': '个', 'plan_qty': 10.0, 'goods_code': 'Item-00000001', 'production_batch': '111', 'goods_std': '111'}, {'goods_name': '物料2', 'note': '', 'entryIds': 2200177500884050945, 'goods_unit': '个', 'plan_qty': 5.0, 'goods_code': 'Item-00000002', 'production_batch': '222', 'goods_std': 'ggxh222'}], 'billId': 2200177249217422336, 'creater': '刘清', 'totalCount': 2, 'type': '1', 'warehouse': 'W01'}
  28. [2025-05-07 18:21:11,914][wms.boundBill.post():135] [ERROR] 服务器内部错误
  29. Traceback (most recent call last):
  30. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 212, in save_or_update_inbound_bill
  31. bound_bill = InboundBill.objects.get(billId=serializer.validated_data['billId'])
  32. File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
  33. return getattr(self.get_queryset(), name)(*args, **kwargs)
  34. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 650, in get
  35. raise self.model.DoesNotExist(
  36. erp.models.InboundBill.DoesNotExist: InboundBill matching query does not exist.
  37. During handling of the above exception, another exception occurred:
  38. Traceback (most recent call last):
  39. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 124, in post
  40. bound_bill = self.save_or_update_inbound_bill(serializer)
  41. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 229, in save_or_update_inbound_bill
  42. department=serializer.validated_data['department'],
  43. KeyError: 'department'
  44. [2025-05-07 18:21:11,918][wms.boundBill.error():67] [ERROR] 入库申请错误: 系统处理异常
  45. Traceback (most recent call last):
  46. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 212, in save_or_update_inbound_bill
  47. bound_bill = InboundBill.objects.get(billId=serializer.validated_data['billId'])
  48. File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
  49. return getattr(self.get_queryset(), name)(*args, **kwargs)
  50. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 650, in get
  51. raise self.model.DoesNotExist(
  52. erp.models.InboundBill.DoesNotExist: InboundBill matching query does not exist.
  53. During handling of the above exception, another exception occurred:
  54. Traceback (most recent call last):
  55. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 124, in post
  56. bound_bill = self.save_or_update_inbound_bill(serializer)
  57. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 229, in save_or_update_inbound_bill
  58. department=serializer.validated_data['department'],
  59. KeyError: 'department'
  60. [2025-05-07 18:24:01,465][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-24 00:00:00.0', 'number': 'CGSL-250424-000001', 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2200177500884050944, 'goods_unit': '个', 'plan_qty': 10.0, 'goods_code': 'Item-00000001', 'production_batch': '111', 'goods_std': '111'}, {'goods_name': '物料2', 'note': '', 'entryIds': 2200177500884050945, 'goods_unit': '个', 'plan_qty': 5.0, 'goods_code': 'Item-00000002', 'production_batch': '222', 'goods_std': 'ggxh222'}], 'billId': 2200177249217422336, 'creater': '刘清', 'totalCount': 2, 'type': '1', 'warehouse': 'W01'}
  61. [2025-05-07 18:24:01,470][wms.boundBill.post():135] [ERROR] 服务器内部错误
  62. Traceback (most recent call last):
  63. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 212, in save_or_update_inbound_bill
  64. bound_bill = InboundBill.objects.get(billId=serializer.validated_data['billId'])
  65. File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
  66. return getattr(self.get_queryset(), name)(*args, **kwargs)
  67. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 650, in get
  68. raise self.model.DoesNotExist(
  69. erp.models.InboundBill.DoesNotExist: InboundBill matching query does not exist.
  70. During handling of the above exception, another exception occurred:
  71. Traceback (most recent call last):
  72. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 124, in post
  73. bound_bill = self.save_or_update_inbound_bill(serializer)
  74. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 229, in save_or_update_inbound_bill
  75. department=serializer.validated_data['department'],
  76. KeyError: 'department'
  77. [2025-05-07 18:24:01,471][wms.boundBill.error():67] [ERROR] 入库申请错误: 系统处理异常
  78. Traceback (most recent call last):
  79. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 212, in save_or_update_inbound_bill
  80. bound_bill = InboundBill.objects.get(billId=serializer.validated_data['billId'])
  81. File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
  82. return getattr(self.get_queryset(), name)(*args, **kwargs)
  83. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 650, in get
  84. raise self.model.DoesNotExist(
  85. erp.models.InboundBill.DoesNotExist: InboundBill matching query does not exist.
  86. During handling of the above exception, another exception occurred:
  87. Traceback (most recent call last):
  88. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 124, in post
  89. bound_bill = self.save_or_update_inbound_bill(serializer)
  90. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 229, in save_or_update_inbound_bill
  91. department=serializer.validated_data['department'],
  92. KeyError: 'department'
  93. [2025-05-07 18:25:07,197][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-24 00:00:00.0', 'number': 'CGSL-250424-000001', 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2200177500884050944, 'goods_unit': '个', 'plan_qty': 10.0, 'goods_code': 'Item-00000001', 'production_batch': '111', 'goods_std': '111'}, {'goods_name': '物料2', 'note': '', 'entryIds': 2200177500884050945, 'goods_unit': '个', 'plan_qty': 5.0, 'goods_code': 'Item-00000002', 'production_batch': '222', 'goods_std': 'ggxh222'}], 'billId': 2200177249217422336, 'creater': '刘清', 'totalCount': 2, 'type': '1', 'warehouse': 'W01'}
  94. [2025-05-07 18:25:07,219][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2200177249217422336, 'number': 'CGSL-250424-000001', 'type': 1, 'date': '2025-04-24 00:00:00.0', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 2, 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2200177500884050944, 'goods_unit': '个', 'plan_qty': 10.0, 'goods_code': 'Item-00000001', 'production_batch': '111', 'goods_std': '111'}, {'goods_name': '物料2', 'note': '', 'entryIds': 2200177500884050945, 'goods_unit': '个', 'plan_qty': 5.0, 'goods_code': 'Item-00000002', 'production_batch': '222', 'goods_std': 'ggxh222'}]}
  95. [2025-05-07 18:25:25,523][wms.boundBill.validate_and_lock():342] [INFO] 锁定原始单据成功 | billId: 2200177249217422336
  96. [2025-05-07 18:25:25,524][wms.boundBill.validate_and_lock():343] [INFO] 原始单据状态: 0
  97. [2025-05-07 18:25:25,535][wms.boundBill.post():300] [INFO] 创建出入库主单成功 | bound_code: CGSL-250424-000001
  98. [2025-05-07 18:25:25,561][wms.boundBill.post():308] [INFO] 入库单生成成功 | billId: 2200177249217422336 -> boundCode: CGSL-250424-000001
  99. [2025-05-07 18:27:22,363][wms.boundBill.validate_and_lock():342] [INFO] 锁定原始单据成功 | billId: 2200177249217422336
  100. [2025-05-07 18:27:22,364][wms.boundBill.validate_and_lock():343] [INFO] 原始单据状态: 1
  101. [2025-05-07 18:27:22,364][wms.boundBill.validate_and_lock():346] [WARNING] 单据已生成过入库单 | status: 1
  102. [2025-05-07 18:27:22,365][wms.boundBill.post():328] [ERROR] 入库单生成异常 | billId: 2200177249217422336
  103. Traceback (most recent call last):
  104. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 295, in post
  105. bill_obj, bound_list = self.validate_and_lock(bill_id)
  106. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 347, in validate_and_lock
  107. raise Exception("该单据已生成过入库单")
  108. Exception: 该单据已生成过入库单
  109. [2025-05-07 18:27:49,399][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-24 00:00:00.0', 'number': 'CGSL-250424-000001', 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2200177500884050944, 'goods_unit': '个', 'plan_qty': 10.0, 'goods_code': 'Item-00000001', 'production_batch': '111', 'goods_std': '111'}, {'goods_name': '物料2', 'note': '', 'entryIds': 2200177500884050945, 'goods_unit': '个', 'plan_qty': 5.0, 'goods_code': 'Item-00000002', 'production_batch': '222', 'goods_std': 'ggxh222'}], 'billId': 2200177249217422336, 'creater': '刘清', 'totalCount': 2, 'type': '2', 'warehouse': 'W01'}
  110. [2025-05-07 18:27:49,457][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2200177249217422336, 'number': 'CGSL-250424-000001', 'type': 2, 'date': '2025-04-24 00:00:00.0', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 2, 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2200177500884050944, 'goods_unit': '个', 'plan_qty': 10.0, 'goods_code': 'Item-00000001', 'production_batch': '111', 'goods_std': '111'}, {'goods_name': '物料2', 'note': '', 'entryIds': 2200177500884050945, 'goods_unit': '个', 'plan_qty': 5.0, 'goods_code': 'Item-00000002', 'production_batch': '222', 'goods_std': 'ggxh222'}]}
  111. [2025-05-07 18:31:23,040][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 00:00:00.0', 'number': 'QTRK-250429-000001', 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2203620976728475648, 'goods_unit': '个', 'plan_qty': 1.0, 'goods_code': 'Item-00000001', 'production_batch': '333', 'goods_std': '111'}], 'billId': 2203620976728476672, 'creater': '刘清', 'department': 'Org-00003', 'totalCount': 1, 'type': '3', 'warehouse': 'W01'}
  112. [2025-05-07 18:31:23,103][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2203620976728476672, 'number': 'QTRK-250429-000001', 'type': 3, 'date': '2025-04-29 00:00:00.0', 'department': 'Org-00003', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2203620976728475648, 'goods_unit': '个', 'plan_qty': 1.0, 'goods_code': 'Item-00000001', 'production_batch': '333', 'goods_std': '111'}]}
  113. [2025-05-07 18:31:46,597][wms.boundBill.validate_and_lock():342] [INFO] 锁定原始单据成功 | billId: 2203620976728476672
  114. [2025-05-07 18:31:46,597][wms.boundBill.validate_and_lock():343] [INFO] 原始单据状态: 0
  115. [2025-05-07 18:31:46,606][wms.boundBill.post():300] [INFO] 创建出入库主单成功 | bound_code: QTRK-250429-000001
  116. [2025-05-07 18:31:46,616][wms.boundBill.post():308] [INFO] 入库单生成成功 | billId: 2203620976728476672 -> boundCode: QTRK-250429-000001
  117. [2025-05-07 18:35:20,051][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-05-07 00:00:00.0', 'number': 'ZJDB-250429-000001', 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2203632462158891008, 'goods_unit': '个', 'plan_qty': 1.0, 'goods_code': 'Item-00000001', 'production_batch': '444', 'goods_std': '111'}], 'billId': 2203632462158892032, 'creater': '刘清', 'department': 'Org-00003', 'totalCount': 1, 'type': '3', 'warehouse': 'W01'}
  118. [2025-05-07 18:35:20,089][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2203632462158892032, 'number': 'ZJDB-250429-000001', 'type': 3, 'date': '2025-05-07 00:00:00.0', 'department': 'Org-00003', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2203632462158891008, 'goods_unit': '个', 'plan_qty': 1.0, 'goods_code': 'Item-00000001', 'production_batch': '444', 'goods_std': '111'}]}
  119. [2025-05-07 18:37:21,251][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-05-07 00:00:00.0', 'number': 'ZJDB-250429-000001', 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2203632462158891008, 'goods_unit': '个', 'plan_qty': 1.0, 'goods_code': 'Item-00000001', 'production_batch': '444', 'goods_std': '111'}], 'billId': 2203632462158892032, 'creater': '刘清', 'department': 'Org-00003', 'totalCount': 1, 'type': '4', 'warehouse': 'W01'}
  120. [2025-05-07 18:37:21,303][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2203632462158892032, 'number': 'ZJDB-250429-000001', 'type': 4, 'date': '2025-05-07 00:00:00.0', 'department': 'Org-00003', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2203632462158891008, 'goods_unit': '个', 'plan_qty': 1.0, 'goods_code': 'Item-00000001', 'production_batch': '444', 'goods_std': '111'}]}
  121. [2025-05-07 18:39:01,052][wms.boundBill.validate_and_lock():342] [INFO] 锁定原始单据成功 | billId: 2203632462158892032
  122. [2025-05-07 18:39:01,053][wms.boundBill.validate_and_lock():343] [INFO] 原始单据状态: 0
  123. [2025-05-07 18:39:01,063][wms.boundBill.post():300] [INFO] 创建出入库主单成功 | bound_code: ZJDB-250429-000001
  124. [2025-05-07 18:39:01,077][wms.boundBill.post():308] [INFO] 入库单生成成功 | billId: 2203632462158892032 -> boundCode: ZJDB-250429-000001
  125. [2025-05-07 18:43:58,312][wms.boundBill.post():674] [INFO] 生产出库申请请求 | 原始数据: {'billId': 2, 'number': 'B01-2025-04-0002', 'type': 1, 'type_code': 'B01', 'date': '2025-04-27 17:51:08', 'business_type': 'B01', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'note': '出库备注', 'totalCount': 2, 'materials': [{'entryIds': 52, 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'production_batch': 'QBF03-20250401', 'goods_out_qty': 5, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 53, 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'production_batch': 'QBF03-20250402', 'goods_out_qty': 5, 'goods_unit': 'kg/袋', 'note': ''}]}
  126. [2025-05-07 18:43:58,504][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2, 'number': 'B01-2025-04-0002', 'type': 1, 'date': '2025-04-27 17:51:08', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'note': '出库备注', 'totalCount': 2, 'materials': [{'entryIds': 52, 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'production_batch': 'QBF03-20250401', 'goods_out_qty': 5, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 53, 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'production_batch': 'QBF03-20250402', 'goods_out_qty': 5, 'goods_unit': 'kg/袋', 'note': ''}]}
  127. [2025-05-07 18:44:52,618][wms.boundBill.post():674] [INFO] 生产出库申请请求 | 原始数据: {'date': '2025-04-24 00:00:00.0', 'number': 'FHTZ-250424-000001', 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2200182571294270464, 'goods_out_qty': 1.0, 'goods_unit': '个', 'goods_code': 'Item-00000001', 'production_batch': '111'}, {'goods_name': '物料2', 'note': '', 'entryIds': 2200182571294270465, 'goods_out_qty': 2.0, 'goods_unit': '个', 'goods_code': 'Item-00000002', 'production_batch': '222'}], 'billId': 2200182534770270208, 'creater': '刘清', 'department': '', 'totalCount': 2, 'type': '1', 'warehouse': 'W01'}
  128. [2025-05-07 18:45:47,984][wms.boundBill.post():674] [INFO] 生产出库申请请求 | 原始数据: {'date': '2025-04-24 00:00:00.0', 'number': 'FHTZ-250424-000001', 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2200182571294270464, 'goods_out_qty': 1.0, 'goods_unit': '个', 'goods_code': 'Item-00000001', 'production_batch': '111'}, {'goods_name': '物料2', 'note': '', 'entryIds': 2200182571294270465, 'goods_out_qty': 2.0, 'goods_unit': '个', 'goods_code': 'Item-00000002', 'production_batch': '222'}], 'billId': 2200182534770270208, 'creater': '刘清', 'totalCount': 2, 'type': '1', 'warehouse': 'W01'}
  129. [2025-05-07 18:45:48,002][wms.boundBill.post():720] [ERROR] 服务器内部错误
  130. Traceback (most recent call last):
  131. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 826, in save_or_update_material_detail
  132. material_detail = OutMaterialDetail.objects.get(bound_billId=bound_bill, entryIds=item['entryIds'])
  133. File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
  134. return getattr(self.get_queryset(), name)(*args, **kwargs)
  135. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 650, in get
  136. raise self.model.DoesNotExist(
  137. erp.models.OutMaterialDetail.DoesNotExist: OutMaterialDetail matching query does not exist.
  138. During handling of the above exception, another exception occurred:
  139. Traceback (most recent call last):
  140. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 712, in post
  141. self.save_or_update_material_detail(bound_bill, serializer)
  142. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 844, in save_or_update_material_detail
  143. Material_entryIds = MaterialDetail.objects.filter(entryIds=item['source_entryIds']).first()
  144. KeyError: 'source_entryIds'
  145. [2025-05-07 18:45:48,005][wms.boundBill.error():67] [ERROR] 入库申请错误: 系统处理异常
  146. Traceback (most recent call last):
  147. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 826, in save_or_update_material_detail
  148. material_detail = OutMaterialDetail.objects.get(bound_billId=bound_bill, entryIds=item['entryIds'])
  149. File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
  150. return getattr(self.get_queryset(), name)(*args, **kwargs)
  151. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 650, in get
  152. raise self.model.DoesNotExist(
  153. erp.models.OutMaterialDetail.DoesNotExist: OutMaterialDetail matching query does not exist.
  154. During handling of the above exception, another exception occurred:
  155. Traceback (most recent call last):
  156. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 712, in post
  157. self.save_or_update_material_detail(bound_bill, serializer)
  158. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 844, in save_or_update_material_detail
  159. Material_entryIds = MaterialDetail.objects.filter(entryIds=item['source_entryIds']).first()
  160. KeyError: 'source_entryIds'
  161. [2025-05-07 18:48:06,038][wms.boundBill.post():674] [INFO] 生产出库申请请求 | 原始数据: {'date': '2025-04-24 00:00:00.0', 'number': 'FHTZ-250424-000001', 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2200182571294270464, 'goods_out_qty': 1.0, 'goods_unit': '个', 'goods_code': 'Item-00000001', 'production_batch': '111'}, {'goods_name': '物料2', 'note': '', 'entryIds': 2200182571294270465, 'goods_out_qty': 2.0, 'goods_unit': '个', 'goods_code': 'Item-00000002', 'production_batch': '222'}], 'billId': 2200182534770270208, 'creater': '刘清', 'totalCount': 2, 'type': '1', 'warehouse': 'W01'}
  162. [2025-05-07 18:48:06,062][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2200182534770270208, 'number': 'FHTZ-250424-000001', 'type': 1, 'date': '2025-04-24 00:00:00.0', 'department': '空', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 2, 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2200182571294270464, 'goods_out_qty': 1.0, 'goods_unit': '个', 'goods_code': 'Item-00000001', 'production_batch': '111'}, {'goods_name': '物料2', 'note': '', 'entryIds': 2200182571294270465, 'goods_out_qty': 2.0, 'goods_unit': '个', 'goods_code': 'Item-00000002', 'production_batch': '222'}]}
  163. [2025-05-07 18:54:30,096][wms.boundBill.validate_and_lock():535] [INFO] 锁定原始单据成功 | billId: 2200182534770270208
  164. [2025-05-07 18:54:30,097][wms.boundBill.validate_and_lock():536] [INFO] 原始单据状态: 0
  165. [2025-05-07 18:54:30,110][wms.boundBill.post():494] [INFO] 创建出入库主单成功 | bound_code: FHTZ-250424-000001
  166. [2025-05-07 18:54:30,135][wms.boundBill.post():502] [INFO] 出库单生成成功 | billId: 2200182534770270208 -> boundCode: FHTZ-250424-000001
  167. [2025-05-07 18:57:58,046][wms.boundBill.post():674] [INFO] 生产出库申请请求 | 原始数据: {'date': '2025-04-29 00:00:00.0', 'number': 'SCLL-20250429-000001', 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2203630617831147520, 'goods_out_qty': 2.0, 'goods_unit': '个', 'goods_code': 'Item-00000001', 'production_batch': '111'}], 'billId': 2203630578857674752, 'creater': '刘清', 'department': '', 'totalCount': 1, 'type': '2', 'warehouse': 'W01'}
  168. [2025-05-07 19:01:03,011][wms.boundBill.post():674] [INFO] 生产出库申请请求 | 原始数据: {'date': '2025-04-29 00:00:00.0', 'number': 'SCLL-20250429-000001', 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2203630617831147520, 'goods_out_qty': 2.0, 'goods_unit': '个', 'goods_code': 'Item-00000001', 'production_batch': '111'}], 'billId': 2203630578857674752, 'creater': '刘清', 'totalCount': 1, 'type': '2', 'warehouse': 'W01'}
  169. [2025-05-07 19:01:03,038][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2203630578857674752, 'number': 'SCLL-20250429-000001', 'type': 2, 'date': '2025-04-29 00:00:00.0', 'department': '空', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2203630617831147520, 'goods_out_qty': 2.0, 'goods_unit': '个', 'goods_code': 'Item-00000001', 'production_batch': '111'}]}
  170. [2025-05-07 19:01:25,663][wms.boundBill.validate_and_lock():535] [INFO] 锁定原始单据成功 | billId: 2203630578857674752
  171. [2025-05-07 19:01:25,664][wms.boundBill.validate_and_lock():536] [INFO] 原始单据状态: 0
  172. [2025-05-07 19:01:25,675][wms.boundBill.post():494] [INFO] 创建出入库主单成功 | bound_code: SCLL-20250429-000001
  173. [2025-05-07 19:01:25,691][wms.boundBill.post():521] [ERROR] 出库单生成异常 | billId: 2203630578857674752
  174. Traceback (most recent call last):
  175. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
  176. return self.cursor.execute(sql, params)
  177. File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
  178. return Database.Cursor.execute(self, query, params)
  179. sqlite3.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
  180. The above exception was the direct cause of the following exception:
  181. Traceback (most recent call last):
  182. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 496, in post
  183. self.process_materials(bill_obj, bound_list)
  184. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 632, in process_materials
  185. OutBoundDetailModel.objects.bulk_create(detail_list)
  186. File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
  187. return getattr(self.get_queryset(), name)(*args, **kwargs)
  188. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 815, in bulk_create
  189. returned_columns = self._batched_insert(
  190. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1816, in _batched_insert
  191. self._insert(
  192. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1790, in _insert
  193. return query.get_compiler(using=using).execute_sql(returning_fields)
  194. File "d:\language\python38\lib\site-packages\django\db\models\sql\compiler.py", line 1660, in execute_sql
  195. cursor.execute(sql, params)
  196. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 103, in execute
  197. return super().execute(sql, params)
  198. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 67, in execute
  199. return self._execute_with_wrappers(
  200. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 80, in _execute_with_wrappers
  201. return executor(sql, params, many, context)
  202. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
  203. return self.cursor.execute(sql, params)
  204. File "d:\language\python38\lib\site-packages\django\db\utils.py", line 91, in __exit__
  205. raise dj_exc_value.with_traceback(traceback) from exc_value
  206. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
  207. return self.cursor.execute(sql, params)
  208. File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
  209. return Database.Cursor.execute(self, query, params)
  210. django.db.utils.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
  211. [2025-05-07 19:01:34,344][wms.boundBill.validate_and_lock():535] [INFO] 锁定原始单据成功 | billId: 2203630578857674752
  212. [2025-05-07 19:01:34,344][wms.boundBill.validate_and_lock():536] [INFO] 原始单据状态: 0
  213. [2025-05-07 19:01:34,355][wms.boundBill.post():494] [INFO] 创建出入库主单成功 | bound_code: SCLL-20250429-000001
  214. [2025-05-07 19:01:34,369][wms.boundBill.post():521] [ERROR] 出库单生成异常 | billId: 2203630578857674752
  215. Traceback (most recent call last):
  216. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
  217. return self.cursor.execute(sql, params)
  218. File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
  219. return Database.Cursor.execute(self, query, params)
  220. sqlite3.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
  221. The above exception was the direct cause of the following exception:
  222. Traceback (most recent call last):
  223. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 496, in post
  224. self.process_materials(bill_obj, bound_list)
  225. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 632, in process_materials
  226. OutBoundDetailModel.objects.bulk_create(detail_list)
  227. File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
  228. return getattr(self.get_queryset(), name)(*args, **kwargs)
  229. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 815, in bulk_create
  230. returned_columns = self._batched_insert(
  231. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1816, in _batched_insert
  232. self._insert(
  233. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1790, in _insert
  234. return query.get_compiler(using=using).execute_sql(returning_fields)
  235. File "d:\language\python38\lib\site-packages\django\db\models\sql\compiler.py", line 1660, in execute_sql
  236. cursor.execute(sql, params)
  237. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 103, in execute
  238. return super().execute(sql, params)
  239. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 67, in execute
  240. return self._execute_with_wrappers(
  241. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 80, in _execute_with_wrappers
  242. return executor(sql, params, many, context)
  243. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
  244. return self.cursor.execute(sql, params)
  245. File "d:\language\python38\lib\site-packages\django\db\utils.py", line 91, in __exit__
  246. raise dj_exc_value.with_traceback(traceback) from exc_value
  247. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
  248. return self.cursor.execute(sql, params)
  249. File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
  250. return Database.Cursor.execute(self, query, params)
  251. django.db.utils.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
  252. [2025-05-07 19:02:11,798][wms.boundBill.post():674] [INFO] 生产出库申请请求 | 原始数据: {'date': '2025-04-29 00:00:00.0', 'number': 'QTCK-250429-000001', 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2203622121958018048, 'goods_out_qty': 1.0, 'goods_unit': '个', 'goods_code': 'Item-00000001', 'production_batch': '111'}], 'billId': 2203622121958017024, 'creater': '刘清', 'totalCount': 1, 'type': '3', 'warehouse': 'W01'}
  253. [2025-05-07 19:02:11,822][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2203622121958017024, 'number': 'QTCK-250429-000001', 'type': 3, 'date': '2025-04-29 00:00:00.0', 'department': '空', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '物料1', 'note': '', 'entryIds': 2203622121958018048, 'goods_out_qty': 1.0, 'goods_unit': '个', 'goods_code': 'Item-00000001', 'production_batch': '111'}]}
  254. [2025-05-07 19:07:24,425][wms.boundBill.validate_and_lock():535] [INFO] 锁定原始单据成功 | billId: 2203630578857674752
  255. [2025-05-07 19:07:24,426][wms.boundBill.validate_and_lock():536] [INFO] 原始单据状态: 0
  256. [2025-05-07 19:07:24,429][wms.boundBill.post():494] [INFO] 创建出入库主单成功 | bound_code: SCLL-20250429-000001
  257. [2025-05-07 19:07:24,435][wms.boundBill.post():502] [INFO] 出库单生成成功 | billId: 2203630578857674752 -> boundCode: SCLL-20250429-000001
  258. [2025-05-07 19:07:28,988][wms.boundBill.validate_and_lock():535] [INFO] 锁定原始单据成功 | billId: 2203622121958017024
  259. [2025-05-07 19:07:28,989][wms.boundBill.validate_and_lock():536] [INFO] 原始单据状态: 0
  260. [2025-05-07 19:07:29,000][wms.boundBill.post():494] [INFO] 创建出入库主单成功 | bound_code: QTCK-250429-000001
  261. [2025-05-07 19:07:29,016][wms.boundBill.post():521] [ERROR] 出库单生成异常 | billId: 2203622121958017024
  262. Traceback (most recent call last):
  263. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
  264. return self.cursor.execute(sql, params)
  265. File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
  266. return Database.Cursor.execute(self, query, params)
  267. sqlite3.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
  268. The above exception was the direct cause of the following exception:
  269. Traceback (most recent call last):
  270. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 496, in post
  271. self.process_materials(bill_obj, bound_list)
  272. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 632, in process_materials
  273. OutBoundDetailModel.objects.bulk_create(detail_list)
  274. File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
  275. return getattr(self.get_queryset(), name)(*args, **kwargs)
  276. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 815, in bulk_create
  277. returned_columns = self._batched_insert(
  278. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1816, in _batched_insert
  279. self._insert(
  280. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1790, in _insert
  281. return query.get_compiler(using=using).execute_sql(returning_fields)
  282. File "d:\language\python38\lib\site-packages\django\db\models\sql\compiler.py", line 1660, in execute_sql
  283. cursor.execute(sql, params)
  284. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 103, in execute
  285. return super().execute(sql, params)
  286. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 67, in execute
  287. return self._execute_with_wrappers(
  288. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 80, in _execute_with_wrappers
  289. return executor(sql, params, many, context)
  290. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
  291. return self.cursor.execute(sql, params)
  292. File "d:\language\python38\lib\site-packages\django\db\utils.py", line 91, in __exit__
  293. raise dj_exc_value.with_traceback(traceback) from exc_value
  294. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
  295. return self.cursor.execute(sql, params)
  296. File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
  297. return Database.Cursor.execute(self, query, params)
  298. django.db.utils.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
  299. [2025-05-07 19:07:50,730][wms.boundBill.validate_and_lock():535] [INFO] 锁定原始单据成功 | billId: 2203622121958017024
  300. [2025-05-07 19:07:50,731][wms.boundBill.validate_and_lock():536] [INFO] 原始单据状态: 0
  301. [2025-05-07 19:07:50,743][wms.boundBill.post():494] [INFO] 创建出入库主单成功 | bound_code: QTCK-250429-000001
  302. [2025-05-07 19:07:50,761][wms.boundBill.post():521] [ERROR] 出库单生成异常 | billId: 2203622121958017024
  303. Traceback (most recent call last):
  304. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
  305. return self.cursor.execute(sql, params)
  306. File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
  307. return Database.Cursor.execute(self, query, params)
  308. sqlite3.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
  309. The above exception was the direct cause of the following exception:
  310. Traceback (most recent call last):
  311. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 496, in post
  312. self.process_materials(bill_obj, bound_list)
  313. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 632, in process_materials
  314. OutBoundDetailModel.objects.bulk_create(detail_list)
  315. File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
  316. return getattr(self.get_queryset(), name)(*args, **kwargs)
  317. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 815, in bulk_create
  318. returned_columns = self._batched_insert(
  319. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1816, in _batched_insert
  320. self._insert(
  321. File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1790, in _insert
  322. return query.get_compiler(using=using).execute_sql(returning_fields)
  323. File "d:\language\python38\lib\site-packages\django\db\models\sql\compiler.py", line 1660, in execute_sql
  324. cursor.execute(sql, params)
  325. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 103, in execute
  326. return super().execute(sql, params)
  327. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 67, in execute
  328. return self._execute_with_wrappers(
  329. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 80, in _execute_with_wrappers
  330. return executor(sql, params, many, context)
  331. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
  332. return self.cursor.execute(sql, params)
  333. File "d:\language\python38\lib\site-packages\django\db\utils.py", line 91, in __exit__
  334. raise dj_exc_value.with_traceback(traceback) from exc_value
  335. File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
  336. return self.cursor.execute(sql, params)
  337. File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
  338. return Database.Cursor.execute(self, query, params)
  339. django.db.utils.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
  340. [2025-05-07 19:09:10,422][wms.boundBill.validate_and_lock():535] [INFO] 锁定原始单据成功 | billId: 2203622121958017024
  341. [2025-05-07 19:09:10,422][wms.boundBill.validate_and_lock():536] [INFO] 原始单据状态: 0
  342. [2025-05-07 19:09:10,424][wms.boundBill.post():494] [INFO] 创建出入库主单成功 | bound_code: QTCK-250429-000001
  343. [2025-05-07 19:09:10,428][wms.boundBill.post():502] [INFO] 出库单生成成功 | billId: 2203622121958017024 -> boundCode: QTCK-250429-000001
  344. [2025-05-08 08:56:52,827][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'billId': 8, 'number': 'BC01-2025-04-0008', 'type': 2, 'date': '2025-04-27 17:51:08', 'business_type': 'B01', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'goods_std': '', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'goods_std': '', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  345. [2025-05-08 08:56:52,848][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 8, 'number': 'BC01-2025-04-0008', 'type': 2, 'date': '2025-04-27 17:51:08', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'goods_std': '', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'goods_std': '', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  346. [2025-05-08 08:57:06,284][wms.boundBill.validate_and_lock():342] [INFO] 锁定原始单据成功 | billId: 8
  347. [2025-05-08 08:57:06,284][wms.boundBill.validate_and_lock():343] [INFO] 原始单据状态: 0
  348. [2025-05-08 08:57:06,286][wms.boundBill.post():300] [INFO] 创建出入库主单成功 | bound_code: BC01-2025-04-0008
  349. [2025-05-08 08:57:06,291][wms.boundBill.post():308] [INFO] 入库单生成成功 | billId: 8 -> boundCode: BC01-2025-04-0008
  350. [2025-05-08 09:00:07,723][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'billId': 9, 'number': 'BC01-2025-04-0009', 'type': 2, 'date': '2025-04-27 17:51:08', 'business_type': 'B01', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  351. [2025-05-08 09:00:07,811][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 9, 'number': 'BC01-2025-04-0009', 'type': 2, 'date': '2025-04-27 17:51:08', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  352. [2025-05-08 09:01:45,561][wms.boundBill.validate_and_lock():342] [INFO] 锁定原始单据成功 | billId: 9
  353. [2025-05-08 09:01:45,562][wms.boundBill.validate_and_lock():343] [INFO] 原始单据状态: 0
  354. [2025-05-08 09:01:45,567][wms.boundBill.post():300] [INFO] 创建出入库主单成功 | bound_code: BC01-2025-04-0009
  355. [2025-05-08 09:01:45,576][wms.boundBill.post():308] [INFO] 入库单生成成功 | billId: 9 -> boundCode: BC01-2025-04-0009
  356. [2025-05-08 09:05:43,498][wms.boundBill.post():879] [INFO] 批次信息更新 | 原始数据: {'totalCount': 2, 'materials': [{'id': 1235, 'product_name': '漆黄素', 'product_code': 'FAF01', 'product_std': '', 'product_unit': 'kg/袋'}, {'id': 1359, 'product_name': '圣草次苷', 'product_code': 'LCF01', 'product_unit': 'kg/袋'}]}
  357. [2025-05-08 09:05:43,514][wms.boundBill.post():926] [WARNING] Material processing failed: {'id': 1235, 'product_name': '漆黄素', 'product_code': 'FAF01', 'product_std': '', 'product_unit': 'kg/袋'} | Error: ValidationError: {'product_std': ['此字段不能为空。']}
  358. [2025-05-08 09:05:43,577][wms.boundBill.success():45] [INFO] 成功响应 | 数据: []
  359. [2025-05-08 09:09:31,059][wms.boundBill.post():879] [INFO] 批次信息更新 | 原始数据: {'totalCount': 2, 'materials': [{'id': 1235, 'product_name': '漆黄素', 'product_code': 'FAF01', 'product_std': '', 'product_unit': 'kg/袋'}, {'id': 1359, 'product_name': '圣草次苷', 'product_code': 'LCF01', 'product_unit': 'kg/袋'}]}
  360. [2025-05-08 09:09:31,071][wms.boundBill.success():45] [INFO] 成功响应 | 数据: []
  361. [2025-05-08 09:11:40,561][wms.boundBill.post():879] [INFO] 批次信息更新 | 原始数据: {'materials': [{'id': 2170317619020707843, 'product_code': 'BFW0034', 'product_name': '乙醇(F2502)', 'product_unit': 'kg', 'product_std': '内控标准一'}], 'totalCount': 1}
  362. [2025-05-08 09:11:40,576][wms.boundBill.success():45] [INFO] 成功响应 | 数据: []
  363. [2025-05-08 09:12:32,414][wms.boundBill.post():879] [INFO] 批次信息更新 | 原始数据: {'materials': [{'id': 2158100204123874313, 'product_code': 'BG00003', 'product_name': '槲皮素混合物', 'product_unit': 'kg', 'product_std': ''}], 'totalCount': 1}
  364. [2025-05-08 09:12:32,422][wms.boundBill.success():45] [INFO] 成功响应 | 数据: []
  365. [2025-05-08 09:15:33,537][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': 'Thu May 08 09:14:00 GMT+08:00 2025', 'number': 'GDHB-20250508-000012', 'materials': [{'goods_name': '新橙皮甙(D/NAF01)', 'entryIds': 2210120576591215616, 'goods_unit': 'kg', 'plan_qty': 20.0, 'goods_code': 'DG00001', 'production_batch': '1001', 'goods_std': '标准一'}], 'billId': 2210120046355695616, 'creater': '刘清', 'totalCount': 1, 'type': '1', 'warehouse': 'W01'}
  366. [2025-05-08 09:15:33,560][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2210120046355695616, 'number': 'GDHB-20250508-000012', 'type': 1, 'date': 'Thu May 08 09:14:00 GMT+08:00 2025', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '新橙皮甙(D/NAF01)', 'entryIds': 2210120576591215616, 'goods_unit': 'kg', 'plan_qty': 20.0, 'goods_code': 'DG00001', 'production_batch': '1001', 'goods_std': '标准一'}]}
  367. [2025-05-08 09:17:58,882][wms.boundBill.validate_and_lock():342] [INFO] 锁定原始单据成功 | billId: 2210120046355695616
  368. [2025-05-08 09:17:58,883][wms.boundBill.validate_and_lock():343] [INFO] 原始单据状态: 0
  369. [2025-05-08 09:17:58,895][wms.boundBill.post():300] [INFO] 创建出入库主单成功 | bound_code: GDHB-20250508-000012
  370. [2025-05-08 09:17:58,917][wms.boundBill.post():308] [INFO] 入库单生成成功 | billId: 2210120046355695616 -> boundCode: GDHB-20250508-000012
  371. [2025-05-08 09:23:42,791][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'totalCount': 1, 'type': '1', 'warehouse': 'W01'}
  372. [2025-05-08 09:23:42,818][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2203618341900258304, 'number': 'GDHB-20250429-000001', 'type': 1, 'date': '2025-04-29 09:56:16.0', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}]}
  373. [2025-05-08 09:26:43,391][wms.boundBill.success():45] [INFO] 成功响应 | 数据: []
  374. [2025-05-08 09:45:16,449][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'totalCount': 1, 'type': '1', 'warehouse': 'W01'}
  375. [2025-05-08 09:45:16,471][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2203618341900258304, 'number': 'GDHB-20250429-000001', 'type': 1, 'date': '2025-04-29 09:56:16.0', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}]}
  376. [2025-05-08 09:56:41,855][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': '2025-04-29 09:56:16.0', 'number': 'GDHB-20250429-000001', 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}], 'billId': 2203618341900258304, 'creater': '刘清', 'totalCount': 1, 'type': '1', 'warehouse': 'W01'}
  377. [2025-05-08 09:56:41,885][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2203618341900258304, 'number': 'GDHB-20250429-000001', 'type': 1, 'date': '2025-04-29 09:56:16.0', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '物料3', 'entryIds': 2203618480119351296, 'goods_unit': '个', 'plan_qty': 8.0, 'goods_code': 'Item-00000003', 'production_batch': '', 'goods_std': ''}]}
  378. [2025-05-08 10:03:59,792][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': 'Thu May 08 10:03:21 GMT+08:00 2025', 'number': 'GDHB-20250508-000013', 'materials': [{'goods_name': '新橙皮甙(D/NAF01)', 'entryIds': 2210145066519947264, 'goods_unit': 'kg', 'plan_qty': 10.0, 'goods_code': 'DG00001', 'production_batch': '1002', 'goods_std': '标准一'}], 'billId': 2210144887247006720, 'creater': '刘清', 'totalCount': 1, 'type': '1', 'warehouse': 'W01'}
  379. [2025-05-08 10:03:59,847][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2210144887247006720, 'number': 'GDHB-20250508-000013', 'type': 1, 'date': 'Thu May 08 10:03:21 GMT+08:00 2025', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '新橙皮甙(D/NAF01)', 'entryIds': 2210145066519947264, 'goods_unit': 'kg', 'plan_qty': 10.0, 'goods_code': 'DG00001', 'production_batch': '1002', 'goods_std': '标准一'}]}
  380. [2025-05-08 10:05:20,399][wms.boundBill.success():45] [INFO] 成功响应 | 数据: []
  381. [2025-05-08 10:11:10,251][wms.boundBill.post():1020] [INFO] 入库单号GDHB-20250508-000013,物料明细2210145066519947264,更新状态,审核通过None
  382. [2025-05-08 10:11:10,260][wms.boundBill.success():45] [INFO] 成功响应 | 数据: []
  383. [2025-05-08 10:12:14,210][wms.boundBill.post():1021] [INFO] 入库单号GDHB-20250508-000013,物料明细2210145066519947264,更新状态,审核通过None
  384. [2025-05-08 10:12:14,218][wms.boundBill.success():45] [INFO] 成功响应 | 数据: []
  385. [2025-05-08 10:13:59,245][wms.boundBill.post():1022] [INFO] 入库单号GDHB-20250508-000013,物料明细2210145066519947264,更新状态,审核通过WGRK-20250508-000009
  386. [2025-05-08 10:13:59,253][wms.boundBill.success():45] [INFO] 成功响应 | 数据: []
  387. [2025-05-08 10:15:50,218][wms.boundBill.post():1022] [INFO] [1]入库单号GDHB-20250508-000013,物料明细2210145066519947264,更新状态,审核通过WGRK-20250508-000009
  388. [2025-05-08 10:15:50,219][wms.boundBill.post():1023] [INFO] [2]入库单号GDHB-20250508-000013,物料明细2210145066519947264,更新状态,审核通过WGRK-20250508-000009
  389. [2025-05-08 10:15:50,225][wms.boundBill.success():45] [INFO] 成功响应 | 数据: []
  390. [2025-05-08 10:22:29,964][wms.boundBill.get_token():1115] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9NWXNwMTBWOGZjRkoxQ3Bib3c0aFBvM1EzcENhbDFRM1gxM2hLMjNSajFQQTN6ZzkyOHAxa0lxN3RHV3BTMjhrdHBVWjE1SHpXRFIzTWtCUUVOeEpLSHk4UkVTcDZGRHlNUUJDMDI=
  391. [2025-05-08 10:22:59,488][wms.boundBill.get_token():1115] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9QazRDOU85RzMyVmowTDRKaldDelFEOG1pNHhNMDU0VkZNVHlmSlpJODBUQnBITGpIcWpXYkVSdXJhZzNmZjdRejlodkhmNVFOcjNzY0ZkdXZsOUd4RW5qUVBBdmgxc1U0TFhHMDI=
  392. [2025-05-08 10:23:15,189][wms.boundBill.get_token():1115] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl91VzRhQjJyN3JwSTd3ZUhPQzFIS3B4QngyYTNoT3pSN3lRMDZVV1gzTFN1ZlI4aFozTHBkYzhYN1d2VXM4QW8yWTFObWx4YzFMNW5pRjVRUzVOaWdLUnpZcGVXd1BTbElUZU9BMDI=
  393. [2025-05-08 10:23:28,879][wms.boundBill.get_token():1115] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9FS0h5UjVpbUhubEY4MlhDVjlyTXNVSjhmYjJscGpiekUwczRwaFNVWFhhQjJJNnZkNGhjMml2Y3JqVzFGdFRucWpsOGdTSGlCRFpYNUM2NVdyOTZSN1lOeE1FTHB5aXhhSndnMDI=
  394. [2025-05-08 10:25:12,938][wms.boundBill.get_token():1115] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl83NjUzeUFhWXRwMzB6YzF6RUdEZmU4Y1RwN2ZJeDE5dWFnS2xkOUkza3Nnemp5MlRrT3dJWW9yRXNKcTZxUDQ2ZHg1MXlyUHpqTTR0NFBuWVhnMmRBMjF1RFk4OHNUYzBrcU1sMDI=
  395. [2025-05-08 10:25:13,136][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第1次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  396. [2025-05-08 10:25:16,355][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第2次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  397. [2025-05-08 10:25:19,545][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第3次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  398. [2025-05-08 10:25:22,755][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第4次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  399. [2025-05-08 10:25:25,964][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第5次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  400. [2025-05-08 10:25:29,196][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第6次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  401. [2025-05-08 10:25:32,414][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第7次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  402. [2025-05-08 10:25:35,624][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第8次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  403. [2025-05-08 10:25:38,806][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第9次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  404. [2025-05-08 10:25:42,024][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第10次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  405. [2025-05-08 10:25:45,235][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第11次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  406. [2025-05-08 10:25:48,465][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第12次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  407. [2025-05-08 10:25:51,695][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第13次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  408. [2025-05-08 10:25:54,950][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第14次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  409. [2025-05-08 10:25:58,251][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第15次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  410. [2025-05-08 10:26:01,528][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第16次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  411. [2025-05-08 10:26:04,765][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第17次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  412. [2025-05-08 10:26:08,006][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第18次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  413. [2025-05-08 10:26:11,220][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第19次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  414. [2025-05-08 10:26:14,454][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第20次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  415. [2025-05-08 10:26:17,705][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第21次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  416. [2025-05-08 10:26:20,903][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第22次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  417. [2025-05-08 10:26:24,063][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第23次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  418. [2025-05-08 10:26:27,264][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第24次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  419. [2025-05-08 10:26:30,454][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第25次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  420. [2025-05-08 10:26:35,693][wms.boundBill.get_token():1115] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9ISzZjSm1WNFpnR0VFM3FqQnRJWWJrVHdXc0lDc1Q2dXd5ZWNPNnJtcE5mbWhOTTZkbzFRc3pWeDloV2M1NmhmM2hOUVNIRzUzVE01cVlocWl4M0Y3OW1QeHJNVTI0amJFSW9xMDI=
  421. [2025-05-08 10:26:35,883][wms.boundBill.execute_sync():1184] [ERROR] ERP接口HTTP错误 519 第1次重试 | 单据:GDHB-20250508-000013 | 错误: 519 Server Error: for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  422. [2025-05-08 10:44:36,350][wms.boundBill.get_token():1115] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9UNTE0N0JuR3BsT0V6WjNzZzd4U0JQajZxOE9iellCMnZYSkNMb3lMM2NYb2FvSDFSVXJTbTdiS1VVa0R2VG1pVGVPQ2dFRlpGdEM2TmVxZXROQlZxSzQ2OHE1R3NJV1k3YkswMDI=
  423. [2025-05-08 10:48:37,896][wms.boundBill.get_token():1115] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9EVUlWZmYwbTJlQUVzUFN4U295R05OOFZYQ0FHN0xWck92aWFyRUl4U1VxQm05cGxqSWhjY1N3TWh4cVR5TjgxMGpMdmE1TXI4N0d2NVZXcHFKWWNpcTF0cnAxNDd2VjlwMmw0MDI=
  424. [2025-05-08 10:48:38,075][wms.boundBill.execute_sync():1190] [ERROR] ERP接口HTTP错误 第1次重试 | 单据:GDHB-20250508-000013 | 错误: 404 Client Error: Not Found for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  425. [2025-05-08 10:48:41,276][wms.boundBill.execute_sync():1190] [ERROR] ERP接口HTTP错误 第2次重试 | 单据:GDHB-20250508-000013 | 错误: 404 Client Error: Not Found for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  426. [2025-05-08 10:48:44,516][wms.boundBill.execute_sync():1190] [ERROR] ERP接口HTTP错误 第3次重试 | 单据:GDHB-20250508-000013 | 错误: 404 Client Error: Not Found for url: https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit
  427. [2025-05-08 10:49:24,836][wms.boundBill.get_token():1115] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9ZZDNLM3hIZnhYQ21mMjRLMDg2MWkyOUFhNmVWWDFwNzhlZHpuUDY3RGI5eFUyTzNxMzZQZFBBRlJDblc2bURIRXV1d3czNzNMc2VZblg0QVZvbHlVTE1LM21UdnBIbkNycjMxMDI=
  428. [2025-05-08 10:49:38,458][wms.boundBill.get_token():1115] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9tNnlTSjVtU0FjUU1KSXRrZnh4QndpNVkyY0s5Y1lCYmRxemRDcTZjVjRISkZsRG1uQmhFSzlheTdXOEM4d3BCaXljbmtURG1GUTF2WldmWHRqUUtxSlVwbmowYjRvdkwyMVo2MDI=
  429. [2025-05-08 10:54:52,235][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': 'Thu May 08 00:00:00 GMT+08:00 2025', 'number': 'CGSL-250508-000001', 'materials': [{'goods_name': '内镶式板框布', 'note': '', 'entryIds': 2210170759207204864, 'goods_unit': '套', 'plan_qty': 3, 'goods_code': 'P1300073', 'production_batch': '', 'goods_std': '800*800 750A'}], 'billId': 2210170242427054080, 'creater': '刘清', 'department': 'okyy0101', 'totalCount': 1, 'type': '2', 'warehouse': 'W01'}
  430. [2025-05-08 10:54:52,261][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2210170242427054080, 'number': 'CGSL-250508-000001', 'type': 2, 'date': 'Thu May 08 00:00:00 GMT+08:00 2025', 'department': 'okyy0101', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '内镶式板框布', 'note': '', 'entryIds': 2210170759207204864, 'goods_unit': '套', 'plan_qty': 3, 'goods_code': 'P1300073', 'production_batch': '', 'goods_std': '800*800 750A'}]}
  431. [2025-05-08 10:55:57,937][wms.boundBill.validate_and_lock():349] [INFO] 锁定原始单据成功 | billId: 2210170242427054080
  432. [2025-05-08 10:55:57,938][wms.boundBill.validate_and_lock():350] [INFO] 原始单据状态: 0
  433. [2025-05-08 10:55:57,953][wms.boundBill.post():307] [INFO] 创建出入库主单成功 | bound_code: CGSL-250508-000001
  434. [2025-05-08 10:55:57,987][wms.boundBill.post():315] [INFO] 入库单生成成功 | billId: 2210170242427054080 -> boundCode: CGSL-250508-000001
  435. [2025-05-08 10:58:09,849][wms.boundBill.get_token():1115] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9FUTIwaE1wTWZ6YTJrZjY5ODE0UTU4aXZVMnpZODRqNzVhTzBJVTE1VEFxR2ZEOGM3blhZUnpHOEtrdUNNWld3N25yM3lVMURwQzFmQ2F6YWZpV1ByeEkwbHMxNHdEbGdkUjVnMDI=
  436. [2025-05-08 11:01:26,896][wms.boundBill.post():89] [INFO] 生产入库申请请求 | 原始数据: {'date': 'Thu May 08 00:00:00 GMT+08:00 2025', 'number': 'CGSL-250508-000001', 'materials': [{'goods_name': '内镶式板框布', 'note': '', 'entryIds': 2210170759207204864, 'goods_unit': '套', 'plan_qty': 3.0, 'goods_code': 'P1300073', 'production_batch': '', 'goods_std': '800*800 750A'}], 'billId': 2210170242427054080, 'creater': '刘清', 'department': 'okyy0101', 'totalCount': 1, 'type': '2', 'warehouse': 'W01'}
  437. [2025-05-08 11:01:26,911][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2210170242427054080, 'number': 'CGSL-250508-000001', 'type': 2, 'date': 'Thu May 08 00:00:00 GMT+08:00 2025', 'department': 'okyy0101', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '内镶式板框布', 'note': '', 'entryIds': 2210170759207204864, 'goods_unit': '套', 'plan_qty': 3.0, 'goods_code': 'P1300073', 'production_batch': '', 'goods_std': '800*800 750A'}]}
  438. [2025-05-08 11:01:40,402][wms.boundBill.get_token():1116] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9JczVJdm94VEV6TVRyczFJaFpmcXBVT0pKdnpBWDdpMVRrTkZvV0NvVUNLWU0yNk8wazE3b3I3eVNPOFY0Z01BeWx1TzdGRjlvbmxWVFVvbE1ydU1yWTFkRUExTnMyVTRzcWxBMDM=
  439. [2025-05-08 11:03:03,213][wms.boundBill.validate_and_lock():350] [INFO] 锁定原始单据成功 | billId: 2210144887247006720
  440. [2025-05-08 11:03:03,213][wms.boundBill.validate_and_lock():351] [INFO] 原始单据状态: 0
  441. [2025-05-08 11:03:03,217][wms.boundBill.post():308] [INFO] 创建出入库主单成功 | bound_code: GDHB-20250508-000013
  442. [2025-05-08 11:03:03,222][wms.boundBill.post():316] [INFO] 入库单生成成功 | billId: 2210144887247006720 -> boundCode: GDHB-20250508-000013
  443. [2025-05-08 11:04:40,305][wms.boundBill.post():682] [INFO] 生产出库申请请求 | 原始数据: {'date': '2025-04-17 00:00:00.0', 'number': 'QTCK-250417-000001', 'materials': [{'goods_name': '盐酸小檗碱(Y2002)', 'note': '', 'entryIds': 2194926863518824448, 'goods_out_qty': 2.0, 'goods_unit': 'kg', 'goods_code': 'YS00002', 'production_batch': '123'}], 'billId': 2194926863518846976, 'creater': '林鹏飞', 'totalCount': 1, 'type': '3', 'warehouse': 'W01'}
  444. [2025-05-08 11:04:40,319][wms.boundBill.save_or_update_material_detail():863] [INFO] 出库单号QTCK-250417-000001,创建——物料明细不存在
  445. [2025-05-08 11:04:40,325][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2194926863518846976, 'number': 'QTCK-250417-000001', 'type': 3, 'date': '2025-04-17 00:00:00.0', 'department': '空', 'warehouse': 'W01', 'creater': '林鹏飞', 'totalCount': 1, 'materials': [{'goods_name': '盐酸小檗碱(Y2002)', 'note': '', 'entryIds': 2194926863518824448, 'goods_out_qty': 2.0, 'goods_unit': 'kg', 'goods_code': 'YS00002', 'production_batch': '123'}]}
  446. [2025-05-08 11:05:21,731][wms.boundBill.validate_and_lock():543] [INFO] 锁定原始单据成功 | billId: 2194926863518846976
  447. [2025-05-08 11:05:21,732][wms.boundBill.validate_and_lock():544] [INFO] 原始单据状态: 0
  448. [2025-05-08 11:05:21,744][wms.boundBill.post():502] [INFO] 创建出入库主单成功 | bound_code: QTCK-250417-000001
  449. [2025-05-08 11:05:21,757][wms.boundBill.post():529] [ERROR] 出库单生成异常 | billId: 2194926863518846976
  450. Traceback (most recent call last):
  451. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 504, in post
  452. self.process_materials(bill_obj, bound_list)
  453. File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 579, in process_materials
  454. MaterialDetail_obj = MaterialDetail.objects.get(entryIds=material.Material_entryIds.entryIds)
  455. AttributeError: 'NoneType' object has no attribute 'entryIds'
  456. [2025-05-08 11:07:13,482][wms.boundBill.post():682] [INFO] 生产出库申请请求 | 原始数据: {'date': 'Thu May 08 00:00:00 GMT+08:00 2025', 'number': 'QTCK-250508-000001', 'materials': [{'goods_name': '新橙皮甙(D/NAF01)', 'note': '', 'entryIds': 2210176946912904192, 'goods_out_qty': 1.0, 'goods_unit': 'kg', 'goods_code': 'DG00001', 'production_batch': '1001'}], 'billId': 2210176946912903168, 'creater': '刘清', 'totalCount': 1, 'type': '3', 'warehouse': 'W01'}
  457. [2025-05-08 11:07:13,553][wms.boundBill.success():45] [INFO] 成功响应 | 数据: {'billId': 2210176946912903168, 'number': 'QTCK-250508-000001', 'type': 3, 'date': 'Thu May 08 00:00:00 GMT+08:00 2025', 'department': '空', 'warehouse': 'W01', 'creater': '刘清', 'totalCount': 1, 'materials': [{'goods_name': '新橙皮甙(D/NAF01)', 'note': '', 'entryIds': 2210176946912904192, 'goods_out_qty': 1.0, 'goods_unit': 'kg', 'goods_code': 'DG00001', 'production_batch': '1001'}]}
  458. [2025-05-08 11:07:28,136][wms.boundBill.validate_and_lock():543] [INFO] 锁定原始单据成功 | billId: 2210176946912903168
  459. [2025-05-08 11:07:28,137][wms.boundBill.validate_and_lock():544] [INFO] 原始单据状态: 0
  460. [2025-05-08 11:07:28,149][wms.boundBill.post():502] [INFO] 创建出入库主单成功 | bound_code: QTCK-250508-000001
  461. [2025-05-08 11:07:28,170][wms.boundBill.post():510] [INFO] 出库单生成成功 | billId: 2210176946912903168 -> boundCode: QTCK-250508-000001
  462. [2025-05-08 21:16:18,910][wms.boundBill.get_token():1114] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl84WUpNV0dQSUY2ZHNQUUlDaFFzenFQdXhOQlF6UkF2MWV6ZHY4UzVkS3NOeVI1bmY5UVV5bFBsSER4ZTZnZUVwNk9pTnhCa0g5M1cydjJHdDRqbGhLemMyRFlQa0Y0NE9Od1FhMTM=
  463. [2025-05-08 21:16:43,118][wms.boundBill.get_token():1114] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9qY0piaXNWcjRkNm5OZEZqUVh1aHJLR1VTNUxsS1A0MTVZSHd0SWltVTZGYUtraWZBYUlpSGJHRmJTMUtOOTJuMVgxUDY3TGF4Zm1NdmZKVTl3WWhRMENsbHhGaDU3NlltTjJlMTM=
  464. [2025-05-08 21:44:04,478][wms.boundBill.validate_and_lock():541] [INFO] 锁定原始单据成功 | billId: 2194926863518846976
  465. [2025-05-08 21:44:04,478][wms.boundBill.validate_and_lock():542] [INFO] 原始单据状态: 0
  466. [2025-05-08 21:44:04,484][wms.boundBill.post():500] [INFO] 创建出入库主单成功 | bound_code: QTCK-250417-000001
  467. [2025-05-08 21:44:04,488][wms.boundBill.post():527] [ERROR] 出库单生成异常 | billId: 2194926863518846976
  468. Traceback (most recent call last):
  469. File "D:\Document\code\vue\greater_wms\erp\views.py", line 502, in post
  470. self.process_materials(bill_obj, bound_list)
  471. File "D:\Document\code\vue\greater_wms\erp\views.py", line 577, in process_materials
  472. MaterialDetail_obj = MaterialDetail.objects.get(entryIds=material.Material_entryIds.entryIds)
  473. AttributeError: 'NoneType' object has no attribute 'entryIds'
  474. [2025-05-09 16:41:20,633][wms.boundBill.post():87] [INFO] 生产入库申请请求 | 原始数据: {'billId': 9, 'number': 'BC01-2025-04-0009', 'type': 2, 'date': '2025-04-27 17:51:08', 'business_type': 'B01', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  475. [2025-05-09 16:41:20,711][wms.boundBill.success():43] [INFO] 成功响应 | 数据: {'billId': 9, 'number': 'BC01-2025-04-0009', 'type': 2, 'date': '2025-04-27 17:51:08', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  476. [2025-05-09 16:41:35,129][wms.boundBill.post():87] [INFO] 生产入库申请请求 | 原始数据: {'billId': 9, 'number': 'BC01-2025-04-0009', 'type': 2, 'date': '2025-04-27 17:51:08', 'business_type': 'B01', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  477. [2025-05-09 16:41:35,170][wms.boundBill.success():43] [INFO] 成功响应 | 数据: {'billId': 9, 'number': 'BC01-2025-04-0009', 'type': 2, 'date': '2025-04-27 17:51:08', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  478. [2025-05-09 16:41:59,661][wms.boundBill.post():721] [INFO] 生产出库申请请求 | 原始数据: {'billId': 2, 'number': 'B01-2025-04-0002', 'type': 1, 'type_code': 'B01', 'date': '2025-04-27 17:51:08', 'business_type': 'B01', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'note': '出库备注', 'totalCount': 2, 'materials': [{'entryIds': 52, 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'production_batch': 'QBF03-20250401', 'goods_out_qty': 5, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 53, 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'production_batch': 'QBF03-20250402', 'goods_out_qty': 5, 'goods_unit': 'kg/袋', 'note': ''}]}
  479. [2025-05-09 16:41:59,712][wms.boundBill.success():43] [INFO] 成功响应 | 数据: {'billId': 2, 'number': 'B01-2025-04-0002', 'type': 1, 'date': '2025-04-27 17:51:08', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'note': '出库备注', 'totalCount': 2, 'materials': [{'entryIds': 52, 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'production_batch': 'QBF03-20250401', 'goods_out_qty': 5, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 53, 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'production_batch': 'QBF03-20250402', 'goods_out_qty': 5, 'goods_unit': 'kg/袋', 'note': ''}]}
  480. [2025-05-09 16:42:33,523][wms.boundBill.post():87] [INFO] 生产入库申请请求 | 原始数据: {'billId': 10, 'number': 'BC01-2025-04-0010', 'type': 2, 'date': '2025-04-27 17:51:08', 'business_type': 'B01', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  481. [2025-05-09 16:42:33,573][wms.boundBill.success():43] [INFO] 成功响应 | 数据: {'billId': 10, 'number': 'BC01-2025-04-0010', 'type': 2, 'date': '2025-04-27 17:51:08', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  482. [2025-05-09 23:32:31,473][wms.boundBill.post():87] [INFO] 生产入库申请请求 | 原始数据: {'billId': 10, 'number': 'BC01-2025-04-0010', 'type': 2, 'date': '2025-04-27 17:51:08', 'business_type': 'B01', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  483. [2025-05-09 23:32:31,583][wms.boundBill.success():43] [INFO] 成功响应 | 数据: {'billId': 10, 'number': 'BC01-2025-04-0010', 'type': 2, 'date': '2025-04-27 17:51:08', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  484. [2025-05-09 23:33:25,920][wms.boundBill.validate_and_lock():359] [INFO] 锁定原始单据成功 | billId: 10
  485. [2025-05-09 23:33:25,921][wms.boundBill.validate_and_lock():360] [INFO] 原始单据状态: 0
  486. [2025-05-09 23:33:25,940][wms.boundBill.post():317] [INFO] 创建出入库主单成功 | bound_code: BC01-2025-04-0010
  487. [2025-05-09 23:33:25,987][wms.boundBill.post():325] [INFO] 入库单生成成功 | billId: 10 -> boundCode: BC01-2025-04-0010
  488. [2025-05-10 00:18:16,120][wms.boundBill.post():1074] [INFO] [1]入库单号BC01-2025-04-0010,物料明细71,更新状态,审核通过1
  489. [2025-05-10 00:18:16,121][wms.boundBill.post():1075] [INFO] [2]入库单号BC01-2025-04-0010,物料明细71,更新状态,审核通过1
  490. [2025-05-10 00:18:16,131][wms.boundBill.success():43] [INFO] 成功响应 | 数据: []
  491. [2025-05-10 00:19:40,378][wms.boundBill.post():1074] [INFO] [1]入库单号BC01-2025-04-0010,物料明细72,更新状态,审核通过1
  492. [2025-05-10 00:19:40,379][wms.boundBill.post():1075] [INFO] [2]入库单号BC01-2025-04-0010,物料明细72,更新状态,审核通过1
  493. [2025-05-10 00:19:40,396][wms.boundBill.success():43] [INFO] 成功响应 | 数据: []
  494. [2025-05-10 00:20:43,594][wms.boundBill.post():1074] [INFO] [1]入库单号BC01-2025-04-0010,物料明细72,更新状态,审核通过1
  495. [2025-05-10 00:20:43,595][wms.boundBill.post():1075] [INFO] [2]入库单号BC01-2025-04-0010,物料明细72,更新状态,审核通过1
  496. [2025-05-10 00:20:43,614][wms.boundBill.success():43] [INFO] 成功响应 | 数据: []
  497. [2025-05-10 00:20:58,519][wms.boundBill.post():1074] [INFO] [1]入库单号BC01-2025-04-0010,物料明细72,更新状态,审核通过1
  498. [2025-05-10 00:20:58,519][wms.boundBill.post():1075] [INFO] [2]入库单号BC01-2025-04-0010,物料明细72,更新状态,审核通过1
  499. [2025-05-10 00:20:58,527][wms.boundBill.success():43] [INFO] 成功响应 | 数据: []
  500. [2025-05-10 00:23:09,061][wms.boundBill.post():1080] [INFO] [1]入库单号BC01-2025-04-0010,物料明细72,更新状态,审核通过1
  501. [2025-05-10 00:23:09,062][wms.boundBill.post():1081] [INFO] [2]入库单号BC01-2025-04-0010,物料明细72,更新状态,审核通过1
  502. [2025-05-10 00:23:09,073][wms.boundBill.success():43] [INFO] 成功响应 | 数据: []
  503. [2025-05-10 01:01:45,806][wms.boundBill.validate_and_lock():359] [INFO] 锁定原始单据成功 | billId: 10
  504. [2025-05-10 01:01:45,806][wms.boundBill.validate_and_lock():360] [INFO] 原始单据状态: 1
  505. [2025-05-10 01:01:45,806][wms.boundBill.validate_and_lock():363] [WARNING] 单据已生成过入库单 | status: 1
  506. [2025-05-10 01:01:45,807][wms.boundBill.post():345] [ERROR] 入库单生成异常 | billId: 10
  507. Traceback (most recent call last):
  508. File "D:\Document\code\vue\greater_wms\erp\views.py", line 312, in post
  509. bill_obj, bound_list = self.validate_and_lock(bill_id)
  510. File "D:\Document\code\vue\greater_wms\erp\views.py", line 364, in validate_and_lock
  511. raise Exception("该单据已生成过入库单")
  512. Exception: 该单据已生成过入库单
  513. [2025-05-10 01:02:59,228][wms.boundBill.post():87] [INFO] 生产入库申请请求 | 原始数据: {'billId': 11, 'number': 'BC01-2025-04-0011', 'type': 2, 'date': '2025-04-27 17:51:08', 'business_type': 'B01', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  514. [2025-05-10 01:02:59,276][wms.boundBill.success():43] [INFO] 成功响应 | 数据: {'billId': 11, 'number': 'BC01-2025-04-0011', 'type': 2, 'date': '2025-04-27 17:51:08', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  515. [2025-05-10 01:07:24,661][wms.boundBill.validate_and_lock():359] [INFO] 锁定原始单据成功 | billId: 11
  516. [2025-05-10 01:07:24,661][wms.boundBill.validate_and_lock():360] [INFO] 原始单据状态: 0
  517. [2025-05-10 01:07:24,673][wms.boundBill.post():317] [INFO] 创建出入库主单成功 | bound_code: BC01-2025-04-0011
  518. [2025-05-10 01:07:24,693][wms.boundBill.post():325] [INFO] 入库单生成成功 | billId: 11 -> boundCode: BC01-2025-04-0011
  519. [2025-05-10 01:08:23,577][wms.boundBill.post():87] [INFO] 生产入库申请请求 | 原始数据: {'billId': 12, 'number': 'BC01-2025-04-0012', 'type': 2, 'date': '2025-04-27 17:51:08', 'business_type': 'B01', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  520. [2025-05-10 01:08:23,614][wms.boundBill.success():43] [INFO] 成功响应 | 数据: {'billId': 12, 'number': 'BC01-2025-04-0012', 'type': 2, 'date': '2025-04-27 17:51:08', 'department': 'D01', 'warehouse': 'W01', 'creater': '洪敏', 'totalCount': 2, 'materials': [{'entryIds': 71, 'production_batch': 'QBF03-20250401', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 20, 'goods_unit': 'kg/袋', 'note': ''}, {'entryIds': 72, 'production_batch': 'QBF03-20250402', 'goods_code': 'B000345', 'goods_name': '二水槲皮素颗粒(QBF03)', 'plan_qty': 10, 'goods_unit': 'kg/袋', 'note': ''}]}
  521. [2025-05-10 02:06:37,079][wms.boundBill.get_token():1175] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9EQ1ZMNHdORUpMejNCd0s2RzFNdDl6ZWJFUXE2Ylh2Nzc3N2VQcEI5aFJnN2VWZFFhZmNIRU1zWXVlODJFY0NwbmR3SGVtMXdEeHlRaEtCZU03THV5MUdsOHFRUVl5ak9pdFVQMTg=
  522. [2025-05-10 02:13:25,616][wms.boundBill.get_token():1175] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9tM0hidkRDbllqbE5JaGtGMUhjbWU4NU9EeHVKYXFuNkJVSnl1M3hBS3RjWlhTQmZ4dHIxRVkzYVRzWFMwaENZZWxYc3V6Y3E5NEpmZ3lOaHJCSTNPQzRtR2U4WmpBUjhQOG5VMTg=
  523. [2025-05-10 02:13:26,127][wms.boundBill.process_erp_response():1317] [INFO] ERP审核响应:
  524. [2025-05-10 02:13:58,172][wms.boundBill.process_erp_response():1317] [INFO] ERP审核响应:
  525. [2025-05-10 02:18:53,086][wms.boundBill.get_token():1175] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9qWjZWNDZzUXlpM3Bmb1R4N0NIeGw1eHhqblVBRDlmVjlleHJxcHpjUzd3SjBSbWlnMVZtRkZjeFZDMG04MkZZa1VFalNTQ1gzcHJNVmd1VzNkclNzU2Y4WFlsY2V4cEtvbExoMTg=
  526. [2025-05-10 02:18:53,593][wms.boundBill.process_erp_response():1317] [INFO] ERP审核响应:
  527. [2025-05-10 02:20:31,575][wms.boundBill.get_token():1175] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl9BMzFVREZtTmhPNmh4cWdPbTk2R1RCUnBVNEhGOGoyQmJmeVR6ZVRuTFNqd1BBM1hZbjcyVVVUNWVMczNoMk5CYmo4YVYzMWl5eWVoMGsyNXlnSXZWUjVnUExJeHpINzZTTWVQMTg=
  528. [2025-05-10 02:20:31,852][wms.boundBill.process_erp_response():1317] [INFO] ERP审核响应:
  529. [2025-05-10 02:24:27,029][wms.boundBill.get_token():1175] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl81VjFPQkI0NXJhSTVYU0FjdXI3RDBkNzVVQzdwV0dhaWR2ZTd0Z2RSUkZyMXpCSTVXOThDT2NuZWRHZ1VIdEtubThTUUtHY1RPQ2MxZkRKMm9POXk0TVhVbUE4YWV2UU4zMnY5MTg=
  530. [2025-05-10 02:24:27,552][wms.boundBill.process_erp_response():1317] [INFO] ERP审核响应:
  531. [2025-05-10 02:24:41,584][wms.boundBill.process_erp_response():1317] [INFO] ERP审核响应:
  532. [2025-05-10 02:26:27,093][wms.boundBill.get_token():1175] [INFO] 获取access_token成功 | access_token: OPENAPIAUTH_MjE1NDcxOTUxMDEwNjQ3NDQ5Nl8xOW41cTE0eWZCd1Y1d2hSWWR0a0kzVERjR0FsbElHUTZpZzNLS0g5SFFSUzExVkRxdXkwOWJGRzhNT2hibDRPS3VCT0Zxb29HblBwRHFEeDd1VnU3cTJ2TzRqUFg2TTk2MjIzMTg=
  533. [2025-05-10 02:26:27,329][wms.boundBill.process_erp_response():1317] [INFO] ERP审核响应:
  534. [2025-05-10 02:27:30,397][wms.boundBill.validate_and_lock():359] [INFO] 锁定原始单据成功 | billId: 12
  535. [2025-05-10 02:27:30,397][wms.boundBill.validate_and_lock():360] [INFO] 原始单据状态: 0
  536. [2025-05-10 02:27:30,407][wms.boundBill.post():317] [INFO] 创建出入库主单成功 | bound_code: BC01-2025-04-0012
  537. [2025-05-10 02:27:30,417][wms.boundBill.post():325] [INFO] 入库单生成成功 | billId: 12 -> boundCode: BC01-2025-04-0012
  538. [2025-05-10 02:27:44,199][wms.boundBill.process_erp_response():1317] [INFO] ERP审核响应: