123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363 |
- [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'}
- [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'}
- [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'}
- [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'}
- [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'}
- [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'}
- [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'}
- [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'}
- [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': ''}]}
- [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'}
- [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'}
- [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'}
- [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': ''}]}
- [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'}
- [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': ''}]}
- [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'}
- [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'}
- [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'}
- [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': ''}]}
- [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'}
- [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'}]}
- [2025-05-07 17:51:07,501][wms.boundBill.validate_and_lock():342] [INFO] 锁定原始单据成功 | billId: 2203618341900258304
- [2025-05-07 17:51:07,502][wms.boundBill.validate_and_lock():343] [INFO] 原始单据状态: 0
- [2025-05-07 17:51:07,512][wms.boundBill.post():300] [INFO] 创建出入库主单成功 | bound_code: GDHB-20250429-000001
- [2025-05-07 17:51:07,527][wms.boundBill.post():308] [INFO] 入库单生成成功 | billId: 2203618341900258304 -> boundCode: GDHB-20250429-000001
- [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'}
- [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'}
- [2025-05-07 18:21:11,914][wms.boundBill.post():135] [ERROR] 服务器内部错误
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 212, in save_or_update_inbound_bill
- bound_bill = InboundBill.objects.get(billId=serializer.validated_data['billId'])
- File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 650, in get
- raise self.model.DoesNotExist(
- erp.models.InboundBill.DoesNotExist: InboundBill matching query does not exist.
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 124, in post
- bound_bill = self.save_or_update_inbound_bill(serializer)
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 229, in save_or_update_inbound_bill
- department=serializer.validated_data['department'],
- KeyError: 'department'
- [2025-05-07 18:21:11,918][wms.boundBill.error():67] [ERROR] 入库申请错误: 系统处理异常
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 212, in save_or_update_inbound_bill
- bound_bill = InboundBill.objects.get(billId=serializer.validated_data['billId'])
- File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 650, in get
- raise self.model.DoesNotExist(
- erp.models.InboundBill.DoesNotExist: InboundBill matching query does not exist.
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 124, in post
- bound_bill = self.save_or_update_inbound_bill(serializer)
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 229, in save_or_update_inbound_bill
- department=serializer.validated_data['department'],
- KeyError: 'department'
- [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'}
- [2025-05-07 18:24:01,470][wms.boundBill.post():135] [ERROR] 服务器内部错误
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 212, in save_or_update_inbound_bill
- bound_bill = InboundBill.objects.get(billId=serializer.validated_data['billId'])
- File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 650, in get
- raise self.model.DoesNotExist(
- erp.models.InboundBill.DoesNotExist: InboundBill matching query does not exist.
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 124, in post
- bound_bill = self.save_or_update_inbound_bill(serializer)
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 229, in save_or_update_inbound_bill
- department=serializer.validated_data['department'],
- KeyError: 'department'
- [2025-05-07 18:24:01,471][wms.boundBill.error():67] [ERROR] 入库申请错误: 系统处理异常
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 212, in save_or_update_inbound_bill
- bound_bill = InboundBill.objects.get(billId=serializer.validated_data['billId'])
- File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 650, in get
- raise self.model.DoesNotExist(
- erp.models.InboundBill.DoesNotExist: InboundBill matching query does not exist.
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 124, in post
- bound_bill = self.save_or_update_inbound_bill(serializer)
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 229, in save_or_update_inbound_bill
- department=serializer.validated_data['department'],
- KeyError: 'department'
- [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'}
- [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'}]}
- [2025-05-07 18:25:25,523][wms.boundBill.validate_and_lock():342] [INFO] 锁定原始单据成功 | billId: 2200177249217422336
- [2025-05-07 18:25:25,524][wms.boundBill.validate_and_lock():343] [INFO] 原始单据状态: 0
- [2025-05-07 18:25:25,535][wms.boundBill.post():300] [INFO] 创建出入库主单成功 | bound_code: CGSL-250424-000001
- [2025-05-07 18:25:25,561][wms.boundBill.post():308] [INFO] 入库单生成成功 | billId: 2200177249217422336 -> boundCode: CGSL-250424-000001
- [2025-05-07 18:27:22,363][wms.boundBill.validate_and_lock():342] [INFO] 锁定原始单据成功 | billId: 2200177249217422336
- [2025-05-07 18:27:22,364][wms.boundBill.validate_and_lock():343] [INFO] 原始单据状态: 1
- [2025-05-07 18:27:22,364][wms.boundBill.validate_and_lock():346] [WARNING] 单据已生成过入库单 | status: 1
- [2025-05-07 18:27:22,365][wms.boundBill.post():328] [ERROR] 入库单生成异常 | billId: 2200177249217422336
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 295, in post
- bill_obj, bound_list = self.validate_and_lock(bill_id)
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 347, in validate_and_lock
- raise Exception("该单据已生成过入库单")
- Exception: 该单据已生成过入库单
- [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'}
- [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'}]}
- [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'}
- [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'}]}
- [2025-05-07 18:31:46,597][wms.boundBill.validate_and_lock():342] [INFO] 锁定原始单据成功 | billId: 2203620976728476672
- [2025-05-07 18:31:46,597][wms.boundBill.validate_and_lock():343] [INFO] 原始单据状态: 0
- [2025-05-07 18:31:46,606][wms.boundBill.post():300] [INFO] 创建出入库主单成功 | bound_code: QTRK-250429-000001
- [2025-05-07 18:31:46,616][wms.boundBill.post():308] [INFO] 入库单生成成功 | billId: 2203620976728476672 -> boundCode: QTRK-250429-000001
- [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'}
- [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'}]}
- [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'}
- [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'}]}
- [2025-05-07 18:39:01,052][wms.boundBill.validate_and_lock():342] [INFO] 锁定原始单据成功 | billId: 2203632462158892032
- [2025-05-07 18:39:01,053][wms.boundBill.validate_and_lock():343] [INFO] 原始单据状态: 0
- [2025-05-07 18:39:01,063][wms.boundBill.post():300] [INFO] 创建出入库主单成功 | bound_code: ZJDB-250429-000001
- [2025-05-07 18:39:01,077][wms.boundBill.post():308] [INFO] 入库单生成成功 | billId: 2203632462158892032 -> boundCode: ZJDB-250429-000001
- [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': ''}]}
- [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': ''}]}
- [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'}
- [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'}
- [2025-05-07 18:45:48,002][wms.boundBill.post():720] [ERROR] 服务器内部错误
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 826, in save_or_update_material_detail
- material_detail = OutMaterialDetail.objects.get(bound_billId=bound_bill, entryIds=item['entryIds'])
- File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 650, in get
- raise self.model.DoesNotExist(
- erp.models.OutMaterialDetail.DoesNotExist: OutMaterialDetail matching query does not exist.
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 712, in post
- self.save_or_update_material_detail(bound_bill, serializer)
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 844, in save_or_update_material_detail
- Material_entryIds = MaterialDetail.objects.filter(entryIds=item['source_entryIds']).first()
- KeyError: 'source_entryIds'
- [2025-05-07 18:45:48,005][wms.boundBill.error():67] [ERROR] 入库申请错误: 系统处理异常
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 826, in save_or_update_material_detail
- material_detail = OutMaterialDetail.objects.get(bound_billId=bound_bill, entryIds=item['entryIds'])
- File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 650, in get
- raise self.model.DoesNotExist(
- erp.models.OutMaterialDetail.DoesNotExist: OutMaterialDetail matching query does not exist.
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 712, in post
- self.save_or_update_material_detail(bound_bill, serializer)
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 844, in save_or_update_material_detail
- Material_entryIds = MaterialDetail.objects.filter(entryIds=item['source_entryIds']).first()
- KeyError: 'source_entryIds'
- [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'}
- [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'}]}
- [2025-05-07 18:54:30,096][wms.boundBill.validate_and_lock():535] [INFO] 锁定原始单据成功 | billId: 2200182534770270208
- [2025-05-07 18:54:30,097][wms.boundBill.validate_and_lock():536] [INFO] 原始单据状态: 0
- [2025-05-07 18:54:30,110][wms.boundBill.post():494] [INFO] 创建出入库主单成功 | bound_code: FHTZ-250424-000001
- [2025-05-07 18:54:30,135][wms.boundBill.post():502] [INFO] 出库单生成成功 | billId: 2200182534770270208 -> boundCode: FHTZ-250424-000001
- [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'}
- [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'}
- [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'}]}
- [2025-05-07 19:01:25,663][wms.boundBill.validate_and_lock():535] [INFO] 锁定原始单据成功 | billId: 2203630578857674752
- [2025-05-07 19:01:25,664][wms.boundBill.validate_and_lock():536] [INFO] 原始单据状态: 0
- [2025-05-07 19:01:25,675][wms.boundBill.post():494] [INFO] 创建出入库主单成功 | bound_code: SCLL-20250429-000001
- [2025-05-07 19:01:25,691][wms.boundBill.post():521] [ERROR] 出库单生成异常 | billId: 2203630578857674752
- Traceback (most recent call last):
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
- return self.cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
- return Database.Cursor.execute(self, query, params)
- sqlite3.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
- The above exception was the direct cause of the following exception:
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 496, in post
- self.process_materials(bill_obj, bound_list)
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 632, in process_materials
- OutBoundDetailModel.objects.bulk_create(detail_list)
- File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 815, in bulk_create
- returned_columns = self._batched_insert(
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1816, in _batched_insert
- self._insert(
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1790, in _insert
- return query.get_compiler(using=using).execute_sql(returning_fields)
- File "d:\language\python38\lib\site-packages\django\db\models\sql\compiler.py", line 1660, in execute_sql
- cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 103, in execute
- return super().execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 67, in execute
- return self._execute_with_wrappers(
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 80, in _execute_with_wrappers
- return executor(sql, params, many, context)
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
- return self.cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\utils.py", line 91, in __exit__
- raise dj_exc_value.with_traceback(traceback) from exc_value
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
- return self.cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
- return Database.Cursor.execute(self, query, params)
- django.db.utils.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
- [2025-05-07 19:01:34,344][wms.boundBill.validate_and_lock():535] [INFO] 锁定原始单据成功 | billId: 2203630578857674752
- [2025-05-07 19:01:34,344][wms.boundBill.validate_and_lock():536] [INFO] 原始单据状态: 0
- [2025-05-07 19:01:34,355][wms.boundBill.post():494] [INFO] 创建出入库主单成功 | bound_code: SCLL-20250429-000001
- [2025-05-07 19:01:34,369][wms.boundBill.post():521] [ERROR] 出库单生成异常 | billId: 2203630578857674752
- Traceback (most recent call last):
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
- return self.cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
- return Database.Cursor.execute(self, query, params)
- sqlite3.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
- The above exception was the direct cause of the following exception:
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 496, in post
- self.process_materials(bill_obj, bound_list)
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 632, in process_materials
- OutBoundDetailModel.objects.bulk_create(detail_list)
- File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 815, in bulk_create
- returned_columns = self._batched_insert(
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1816, in _batched_insert
- self._insert(
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1790, in _insert
- return query.get_compiler(using=using).execute_sql(returning_fields)
- File "d:\language\python38\lib\site-packages\django\db\models\sql\compiler.py", line 1660, in execute_sql
- cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 103, in execute
- return super().execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 67, in execute
- return self._execute_with_wrappers(
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 80, in _execute_with_wrappers
- return executor(sql, params, many, context)
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
- return self.cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\utils.py", line 91, in __exit__
- raise dj_exc_value.with_traceback(traceback) from exc_value
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
- return self.cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
- return Database.Cursor.execute(self, query, params)
- django.db.utils.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
- [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'}
- [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'}]}
- [2025-05-07 19:07:24,425][wms.boundBill.validate_and_lock():535] [INFO] 锁定原始单据成功 | billId: 2203630578857674752
- [2025-05-07 19:07:24,426][wms.boundBill.validate_and_lock():536] [INFO] 原始单据状态: 0
- [2025-05-07 19:07:24,429][wms.boundBill.post():494] [INFO] 创建出入库主单成功 | bound_code: SCLL-20250429-000001
- [2025-05-07 19:07:24,435][wms.boundBill.post():502] [INFO] 出库单生成成功 | billId: 2203630578857674752 -> boundCode: SCLL-20250429-000001
- [2025-05-07 19:07:28,988][wms.boundBill.validate_and_lock():535] [INFO] 锁定原始单据成功 | billId: 2203622121958017024
- [2025-05-07 19:07:28,989][wms.boundBill.validate_and_lock():536] [INFO] 原始单据状态: 0
- [2025-05-07 19:07:29,000][wms.boundBill.post():494] [INFO] 创建出入库主单成功 | bound_code: QTCK-250429-000001
- [2025-05-07 19:07:29,016][wms.boundBill.post():521] [ERROR] 出库单生成异常 | billId: 2203622121958017024
- Traceback (most recent call last):
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
- return self.cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
- return Database.Cursor.execute(self, query, params)
- sqlite3.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
- The above exception was the direct cause of the following exception:
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 496, in post
- self.process_materials(bill_obj, bound_list)
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 632, in process_materials
- OutBoundDetailModel.objects.bulk_create(detail_list)
- File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 815, in bulk_create
- returned_columns = self._batched_insert(
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1816, in _batched_insert
- self._insert(
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1790, in _insert
- return query.get_compiler(using=using).execute_sql(returning_fields)
- File "d:\language\python38\lib\site-packages\django\db\models\sql\compiler.py", line 1660, in execute_sql
- cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 103, in execute
- return super().execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 67, in execute
- return self._execute_with_wrappers(
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 80, in _execute_with_wrappers
- return executor(sql, params, many, context)
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
- return self.cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\utils.py", line 91, in __exit__
- raise dj_exc_value.with_traceback(traceback) from exc_value
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
- return self.cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
- return Database.Cursor.execute(self, query, params)
- django.db.utils.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
- [2025-05-07 19:07:50,730][wms.boundBill.validate_and_lock():535] [INFO] 锁定原始单据成功 | billId: 2203622121958017024
- [2025-05-07 19:07:50,731][wms.boundBill.validate_and_lock():536] [INFO] 原始单据状态: 0
- [2025-05-07 19:07:50,743][wms.boundBill.post():494] [INFO] 创建出入库主单成功 | bound_code: QTCK-250429-000001
- [2025-05-07 19:07:50,761][wms.boundBill.post():521] [ERROR] 出库单生成异常 | billId: 2203622121958017024
- Traceback (most recent call last):
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
- return self.cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
- return Database.Cursor.execute(self, query, params)
- sqlite3.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
- The above exception was the direct cause of the following exception:
- Traceback (most recent call last):
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 496, in post
- self.process_materials(bill_obj, bound_list)
- File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 632, in process_materials
- OutBoundDetailModel.objects.bulk_create(detail_list)
- File "d:\language\python38\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 815, in bulk_create
- returned_columns = self._batched_insert(
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1816, in _batched_insert
- self._insert(
- File "d:\language\python38\lib\site-packages\django\db\models\query.py", line 1790, in _insert
- return query.get_compiler(using=using).execute_sql(returning_fields)
- File "d:\language\python38\lib\site-packages\django\db\models\sql\compiler.py", line 1660, in execute_sql
- cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 103, in execute
- return super().execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 67, in execute
- return self._execute_with_wrappers(
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 80, in _execute_with_wrappers
- return executor(sql, params, many, context)
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
- return self.cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\utils.py", line 91, in __exit__
- raise dj_exc_value.with_traceback(traceback) from exc_value
- File "d:\language\python38\lib\site-packages\django\db\backends\utils.py", line 89, in _execute
- return self.cursor.execute(sql, params)
- File "d:\language\python38\lib\site-packages\django\db\backends\sqlite3\base.py", line 357, in execute
- return Database.Cursor.execute(self, query, params)
- django.db.utils.IntegrityError: UNIQUE constraint failed: Outbounddetail.detail_code
- [2025-05-07 19:09:10,422][wms.boundBill.validate_and_lock():535] [INFO] 锁定原始单据成功 | billId: 2203622121958017024
- [2025-05-07 19:09:10,422][wms.boundBill.validate_and_lock():536] [INFO] 原始单据状态: 0
- [2025-05-07 19:09:10,424][wms.boundBill.post():494] [INFO] 创建出入库主单成功 | bound_code: QTCK-250429-000001
- [2025-05-07 19:09:10,428][wms.boundBill.post():502] [INFO] 出库单生成成功 | billId: 2203622121958017024 -> boundCode: QTCK-250429-000001
|