boundBill.log 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  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