Browse Source

接口对接更新

flower_mr 1 month ago
parent
commit
c1200f25b9
100 changed files with 496 additions and 118 deletions
  1. BIN
      bound/__pycache__/models.cpython-38.pyc
  2. 23 0
      bound/migrations/0008_alter_boundbatchmodel_goods_std_and_more.py
  3. BIN
      bound/migrations/__pycache__/0008_alter_boundbatchmodel_goods_std_and_more.cpython-38.pyc
  4. 2 2
      bound/models.py
  5. 26 22
      data_base/test_erp.py
  6. BIN
      db.sqlite3
  7. BIN
      erp/__pycache__/models.cpython-38.pyc
  8. BIN
      erp/__pycache__/serializers.cpython-38.pyc
  9. BIN
      erp/__pycache__/urls.cpython-38.pyc
  10. BIN
      erp/__pycache__/views.cpython-38.pyc
  11. 31 0
      erp/migrations/0014_remove_outboundbill_erp_pick_id_and_more.py
  12. 43 0
      erp/migrations/0015_alter_inboundbill_department_and_more.py
  13. BIN
      erp/migrations/__pycache__/0014_remove_outboundbill_erp_pick_id_and_more.cpython-38.pyc
  14. BIN
      erp/migrations/__pycache__/0015_alter_inboundbill_department_and_more.cpython-38.pyc
  15. 7 6
      erp/models.py
  16. 1 1
      erp/serializers.py
  17. 102 39
      erp/views.py
  18. BIN
      greaterwms/__pycache__/settings.cpython-38.pyc
  19. 118 0
      logs/boundBill.log
  20. 64 0
      logs/error.log
  21. 79 0
      logs/server.log
  22. 0 1
      templates/dist/spa/css/10.f721cf95.css
  23. 0 1
      templates/dist/spa/css/11.00a78ca4.css
  24. 0 1
      templates/dist/spa/css/12.90edc1da.css
  25. 0 1
      templates/dist/spa/css/13.0d4c4716.css
  26. 0 1
      templates/dist/spa/css/14.a65cb06f.css
  27. 0 1
      templates/dist/spa/css/15.0b5a9844.css
  28. 0 1
      templates/dist/spa/css/16.d66bc7d6.css
  29. 0 1
      templates/dist/spa/css/17.e4f041cc.css
  30. 0 1
      templates/dist/spa/css/18.7a23b7fb.css
  31. 0 1
      templates/dist/spa/css/3.48edef75.css
  32. 0 1
      templates/dist/spa/css/4.0ac6b60c.css
  33. 0 1
      templates/dist/spa/css/5.7100e471.css
  34. 0 1
      templates/dist/spa/css/6.22759db8.css
  35. 0 1
      templates/dist/spa/css/7.82d60571.css
  36. 0 1
      templates/dist/spa/css/8.68989bda.css
  37. 0 1
      templates/dist/spa/css/9.eeace633.css
  38. 0 1
      templates/dist/spa/css/app.45730797.css
  39. 0 6
      templates/dist/spa/css/vendor.2ac1ba6a.css
  40. BIN
      templates/dist/spa/css/vendor.2ac1ba6a.css.gz
  41. BIN
      templates/dist/spa/favicon.ico
  42. BIN
      templates/dist/spa/fonts/KFOkCnqEu92Fr1MmgVxIIzQ.68bb21d0.woff
  43. BIN
      templates/dist/spa/fonts/KFOlCnqEu92Fr1MmEU9fBBc-.48af7707.woff
  44. BIN
      templates/dist/spa/fonts/KFOlCnqEu92Fr1MmSU5fBBc-.c2f7ab22.woff
  45. BIN
      templates/dist/spa/fonts/KFOlCnqEu92Fr1MmWUlfBBc-.77ecb942.woff
  46. BIN
      templates/dist/spa/fonts/KFOlCnqEu92Fr1MmYUtfBBc-.f5677eb2.woff
  47. BIN
      templates/dist/spa/fonts/KFOmCnqEu92Fr1Mu4mxM.f1e2a767.woff
  48. BIN
      templates/dist/spa/fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.99f5f787.woff
  49. BIN
      templates/dist/spa/fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.c08197a9.woff2
  50. BIN
      templates/dist/spa/icons/favicon-128x128.png
  51. BIN
      templates/dist/spa/icons/favicon-16x16.png
  52. BIN
      templates/dist/spa/icons/favicon-32x32.png
  53. BIN
      templates/dist/spa/icons/favicon-96x96.png
  54. BIN
      templates/dist/spa/icons/logo.png
  55. 0 1
      templates/dist/spa/index.html
  56. 0 1
      templates/dist/spa/js/1.66e8190d.js
  57. BIN
      templates/dist/spa/js/1.66e8190d.js.gz
  58. 0 1
      templates/dist/spa/js/10.82a2ece5.js
  59. BIN
      templates/dist/spa/js/10.82a2ece5.js.gz
  60. 0 1
      templates/dist/spa/js/11.c094525f.js
  61. BIN
      templates/dist/spa/js/11.c094525f.js.gz
  62. 0 1
      templates/dist/spa/js/12.077687d1.js
  63. BIN
      templates/dist/spa/js/12.077687d1.js.gz
  64. 0 1
      templates/dist/spa/js/13.4cb828ed.js
  65. 0 1
      templates/dist/spa/js/14.be39ef51.js
  66. BIN
      templates/dist/spa/js/14.be39ef51.js.gz
  67. 0 1
      templates/dist/spa/js/15.f5f5f35b.js
  68. BIN
      templates/dist/spa/js/15.f5f5f35b.js.gz
  69. 0 1
      templates/dist/spa/js/16.ed4c9435.js
  70. BIN
      templates/dist/spa/js/16.ed4c9435.js.gz
  71. 0 1
      templates/dist/spa/js/17.cb55703b.js
  72. 0 1
      templates/dist/spa/js/18.7ce0af4f.js
  73. 0 1
      templates/dist/spa/js/19.77246a69.js
  74. 0 1
      templates/dist/spa/js/20.0a3341c5.js
  75. BIN
      templates/dist/spa/js/20.0a3341c5.js.gz
  76. 0 1
      templates/dist/spa/js/21.53a3e18b.js
  77. BIN
      templates/dist/spa/js/21.53a3e18b.js.gz
  78. 0 1
      templates/dist/spa/js/22.3054b5f5.js
  79. BIN
      templates/dist/spa/js/22.3054b5f5.js.gz
  80. 0 1
      templates/dist/spa/js/23.87fd40d4.js
  81. BIN
      templates/dist/spa/js/23.87fd40d4.js.gz
  82. 0 1
      templates/dist/spa/js/24.5ebb6d1b.js
  83. BIN
      templates/dist/spa/js/24.5ebb6d1b.js.gz
  84. 0 1
      templates/dist/spa/js/25.73320c40.js
  85. BIN
      templates/dist/spa/js/25.73320c40.js.gz
  86. 0 1
      templates/dist/spa/js/26.b3d0a428.js
  87. BIN
      templates/dist/spa/js/26.b3d0a428.js.gz
  88. 0 1
      templates/dist/spa/js/27.e967265e.js
  89. BIN
      templates/dist/spa/js/27.e967265e.js.gz
  90. 0 1
      templates/dist/spa/js/28.072bfae1.js
  91. BIN
      templates/dist/spa/js/28.072bfae1.js.gz
  92. 0 1
      templates/dist/spa/js/29.5db67fa0.js
  93. BIN
      templates/dist/spa/js/29.5db67fa0.js.gz
  94. 0 1
      templates/dist/spa/js/3.4f075d5f.js
  95. BIN
      templates/dist/spa/js/3.4f075d5f.js.gz
  96. 0 1
      templates/dist/spa/js/30.3e778dac.js
  97. BIN
      templates/dist/spa/js/30.3e778dac.js.gz
  98. 0 1
      templates/dist/spa/js/31.c4946907.js
  99. BIN
      templates/dist/spa/js/31.c4946907.js.gz
  100. 0 0
      templates/dist/spa/js/32.0a828ef7.js

BIN
bound/__pycache__/models.cpython-38.pyc


+ 23 - 0
bound/migrations/0008_alter_boundbatchmodel_goods_std_and_more.py

@@ -0,0 +1,23 @@
+# Generated by Django 4.1.2 on 2025-05-08 08:59
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('bound', '0007_alter_outbounddetailmodel_detail_code'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='boundbatchmodel',
+            name='goods_std',
+            field=models.CharField(blank=True, default='待填写', max_length=255, null=True, verbose_name='商品标准'),
+        ),
+        migrations.AlterField(
+            model_name='outbatchmodel',
+            name='goods_std',
+            field=models.CharField(blank=True, default='待填写', max_length=255, null=True, verbose_name='商品标准'),
+        ),
+    ]

BIN
bound/migrations/__pycache__/0008_alter_boundbatchmodel_goods_std_and_more.cpython-38.pyc


+ 2 - 2
bound/models.py

@@ -56,7 +56,7 @@ class BoundBatchModel(models.Model):
     warehouse_name = models.CharField(max_length=255, verbose_name="仓库名称")
     warehouse_name = models.CharField(max_length=255, verbose_name="仓库名称")
     goods_code = models.CharField(max_length=255, verbose_name="商品编码")
     goods_code = models.CharField(max_length=255, verbose_name="商品编码")
     goods_desc = models.CharField(max_length=255, verbose_name="商品描述")
     goods_desc = models.CharField(max_length=255, verbose_name="商品描述")
-    goods_std = models.CharField(default='待填写', max_length=255, verbose_name="商品标准")
+    goods_std = models.CharField(default='待填写', max_length=255, verbose_name="商品标准",blank=True, null=True)
     goods_unit = models.CharField(default='待填写', max_length=255, verbose_name="商品单位")
     goods_unit = models.CharField(default='待填写', max_length=255, verbose_name="商品单位")
     goods_qty = models.BigIntegerField(default=0, verbose_name="商品数量")
     goods_qty = models.BigIntegerField(default=0, verbose_name="商品数量")
     goods_in_qty = models.BigIntegerField(default=0, verbose_name="入库数量")
     goods_in_qty = models.BigIntegerField(default=0, verbose_name="入库数量")
@@ -107,7 +107,7 @@ class OutBatchModel(models.Model):
 
 
     goods_code = models.CharField(max_length=255, verbose_name="商品编码")
     goods_code = models.CharField(max_length=255, verbose_name="商品编码")
     goods_desc = models.CharField(max_length=255, verbose_name="商品描述")
     goods_desc = models.CharField(max_length=255, verbose_name="商品描述")
-    goods_std = models.CharField(default='待填写', max_length=255, verbose_name="商品标准")
+    goods_std = models.CharField(default='待填写', max_length=255, verbose_name="商品标准",blank=True, null=True)
     goods_unit = models.CharField(default='待填写', max_length=255, verbose_name="商品单位")
     goods_unit = models.CharField(default='待填写', max_length=255, verbose_name="商品单位")
     goods_qty = models.BigIntegerField(default=0, verbose_name="商品数量")
     goods_qty = models.BigIntegerField(default=0, verbose_name="商品数量")
     goods_out_qty = models.BigIntegerField(default=0, verbose_name="出库数量")
     goods_out_qty = models.BigIntegerField(default=0, verbose_name="出库数量")

+ 26 - 22
data_base/test_erp.py

@@ -25,37 +25,41 @@ def main():
        
        
 
 
         # 所有同步操作统一入口
         # 所有同步操作统一入口
-        inbound_bill = InboundBill.objects.first()
+        # inbound_bill = InboundBill.objects.filter(billId=2210144887247006720).first()
+        inbound_bill = InboundBill.objects.filter(billId=2210170242427054080).first()
         print(f"ERP单号: {inbound_bill.number}")
         print(f"ERP单号: {inbound_bill.number}")
+        if not inbound_bill:
+            print("❌ 未找到ERP单据")
+            return
 
 
-        ProductionInboundAuditsync = ProductionInboundAuditSync(inbound_bill)
+        # ProductionInboundAuditsync = ProductionInboundAuditSync(inbound_bill)
         
         
         PurchaseInboundAuditsync = PurchaseInboundAuditSync(inbound_bill)
         PurchaseInboundAuditsync = PurchaseInboundAuditSync(inbound_bill)
-        OtherInboundAuditsync = OtherInboundAuditSync(inbound_bill)
-        OtherOutboundAuditsync = OtherOutboundAuditSync(inbound_bill)
-        ProductionOutboundAuditsync = ProductionOutboundAuditSync(inbound_bill)
-        PurchaseInboundSavesync = PurchaseInboundSaveSync(inbound_bill)
-        SaleOutboundSavesync = SaleOutboundSaveSync(inbound_bill)
+        # OtherInboundAuditsync = OtherInboundAuditSync(inbound_bill)
+        # OtherOutboundAuditsync = OtherOutboundAuditSync(inbound_bill)
+        # ProductionOutboundAuditsync = ProductionOutboundAuditSync(inbound_bill)
+        # PurchaseInboundSavesync = PurchaseInboundSaveSync(inbound_bill)
+        # SaleOutboundSavesync = SaleOutboundSaveSync(inbound_bill)
 
 
-        # 同步生产入库单
-        success = ProductionInboundAuditsync.execute_sync()
+        # success = ProductionInboundAuditsync.execute_sync()
         # 同步采购入库单
         # 同步采购入库单
         success = PurchaseInboundAuditsync.execute_sync()
         success = PurchaseInboundAuditsync.execute_sync()
-        # 同步其它入库单
-        success = OtherInboundAuditsync.execute_sync()
-        # 同步其它出库单
-        success = OtherOutboundAuditsync.execute_sync()
-        # 同步生产出库单
-        success = ProductionOutboundAuditsync.execute_sync()
-        # 同步采购入库单保存
-        success = PurchaseInboundSavesync.execute_sync()
-        # 同步销售出库单保存
-        success = SaleOutboundSavesync.execute_sync()
+        # success = PurchaseInboundAuditsync.execute_sync()
+        # # 同步其它入库单
+        # success = OtherInboundAuditsync.execute_sync()
+        # # 同步其它出库单
+        # success = OtherOutboundAuditsync.execute_sync()
+        # # 同步生产出库单
+        # success = ProductionOutboundAuditsync.execute_sync()
+        # # 同步采购入库单保存
+        # success = PurchaseInboundSavesync.execute_sync()
+        # # 同步销售出库单保存
+        # success = SaleOutboundSavesync.execute_sync()
 
 
 
 
-        # 通过模型字段直接访问ERP ID
-        print(f"ERP审核单号: {inbound_bill.erp_audit_id}")
-        print(f"ERP采购单号: {inbound_bill.erp_save_id}")
+        # # 通过模型字段直接访问ERP ID
+        # print(f"ERP审核单号: {inbound_bill.erp_audit_id}")
+        # print(f"ERP采购单号: {inbound_bill.erp_save_id}")
 
 
         print("✅ 方法生成成功!")
         print("✅ 方法生成成功!")
     except Exception as e:
     except Exception as e:

BIN
db.sqlite3


BIN
erp/__pycache__/models.cpython-38.pyc


BIN
erp/__pycache__/serializers.cpython-38.pyc


BIN
erp/__pycache__/urls.cpython-38.pyc


BIN
erp/__pycache__/views.cpython-38.pyc


+ 31 - 0
erp/migrations/0014_remove_outboundbill_erp_pick_id_and_more.py

@@ -0,0 +1,31 @@
+# Generated by Django 4.1.2 on 2025-05-08 10:01
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('erp', '0013_alter_materialdetail_entryids_and_more'),
+    ]
+
+    operations = [
+        migrations.RemoveField(
+            model_name='outboundbill',
+            name='erp_pick_id',
+        ),
+        migrations.RemoveField(
+            model_name='outboundbill',
+            name='erp_shipment_id',
+        ),
+        migrations.AddField(
+            model_name='outboundbill',
+            name='erp_audit_id',
+            field=models.CharField(max_length=100, null=True, verbose_name='ERP审核ID'),
+        ),
+        migrations.AddField(
+            model_name='outboundbill',
+            name='erp_save_id',
+            field=models.CharField(max_length=100, null=True, verbose_name='ERP保存ID'),
+        ),
+    ]

+ 43 - 0
erp/migrations/0015_alter_inboundbill_department_and_more.py

@@ -0,0 +1,43 @@
+# Generated by Django 4.1.2 on 2025-05-08 10:44
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('erp', '0014_remove_outboundbill_erp_pick_id_and_more'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='inboundbill',
+            name='department',
+            field=models.CharField(max_length=100, null=True, verbose_name='部门'),
+        ),
+        migrations.AlterField(
+            model_name='inboundbill',
+            name='erp_audit_id',
+            field=models.CharField(max_length=1000, null=True, verbose_name='ERP审核ID'),
+        ),
+        migrations.AlterField(
+            model_name='inboundbill',
+            name='erp_save_id',
+            field=models.CharField(max_length=1000, null=True, verbose_name='ERP保存ID'),
+        ),
+        migrations.AlterField(
+            model_name='inboundbill',
+            name='warehouse',
+            field=models.CharField(default='W01', max_length=100, verbose_name='仓库'),
+        ),
+        migrations.AlterField(
+            model_name='outboundbill',
+            name='erp_audit_id',
+            field=models.CharField(max_length=1000, null=True, verbose_name='ERP审核ID'),
+        ),
+        migrations.AlterField(
+            model_name='outboundbill',
+            name='erp_save_id',
+            field=models.CharField(max_length=1000, null=True, verbose_name='ERP保存ID'),
+        ),
+    ]

BIN
erp/migrations/__pycache__/0014_remove_outboundbill_erp_pick_id_and_more.cpython-38.pyc


BIN
erp/migrations/__pycache__/0015_alter_inboundbill_department_and_more.cpython-38.pyc


+ 7 - 6
erp/models.py

@@ -15,8 +15,8 @@ class InboundBill(models.Model):
     number = models.CharField(max_length=50, unique=True, verbose_name='单据编号')
     number = models.CharField(max_length=50, unique=True, verbose_name='单据编号')
     type = models.IntegerField(choices=BOUND_TYPE, verbose_name='绑定类型')
     type = models.IntegerField(choices=BOUND_TYPE, verbose_name='绑定类型')
     date = models.CharField(max_length=10, verbose_name='入库时间')  
     date = models.CharField(max_length=10, verbose_name='入库时间')  
-    department = models.CharField(max_length=10, verbose_name='部门', null=True)
-    warehouse = models.CharField(max_length=10, verbose_name='仓库', default='W01')  
+    department = models.CharField(max_length=100, verbose_name='部门', null=True)
+    warehouse = models.CharField(max_length=100, verbose_name='仓库', default='W01')  
     creater = models.CharField(max_length=50, verbose_name='创建人', null=True)
     creater = models.CharField(max_length=50, verbose_name='创建人', null=True)
     note = models.TextField(blank=True, verbose_name='备注说明', null=True)
     note = models.TextField(blank=True, verbose_name='备注说明', null=True)
     totalCount = models.IntegerField(verbose_name='总条目数')
     totalCount = models.IntegerField(verbose_name='总条目数')
@@ -24,8 +24,8 @@ class InboundBill(models.Model):
     update_time = models.DateTimeField(auto_now=True, verbose_name='更新时间')
     update_time = models.DateTimeField(auto_now=True, verbose_name='更新时间')
     bound_status = models.IntegerField(default=0, verbose_name='状态')
     bound_status = models.IntegerField(default=0, verbose_name='状态')
     is_delete = models.BooleanField(default=False, verbose_name='是否删除')
     is_delete = models.BooleanField(default=False, verbose_name='是否删除')
-    erp_audit_id = models.CharField(max_length=100, null=True, verbose_name='ERP审核ID')  
-    erp_save_id = models.CharField(max_length=100, null=True, verbose_name='ERP保存ID')  
+    erp_audit_id = models.CharField(max_length=1000,null=True, verbose_name='ERP审核ID')  
+    erp_save_id = models.CharField(max_length=1000,null=True, verbose_name='ERP保存ID')  
     class Meta:
     class Meta:
         verbose_name = '生产入库单'
         verbose_name = '生产入库单'
         verbose_name_plural = verbose_name
         verbose_name_plural = verbose_name
@@ -57,8 +57,9 @@ class OutboundBill(models.Model):
     update_time = models.DateTimeField(auto_now=True, verbose_name='更新时间')
     update_time = models.DateTimeField(auto_now=True, verbose_name='更新时间')
     bound_status = models.IntegerField(default=0, verbose_name='状态')
     bound_status = models.IntegerField(default=0, verbose_name='状态')
     is_delete = models.BooleanField(default=False, verbose_name='是否删除')
     is_delete = models.BooleanField(default=False, verbose_name='是否删除')
-    erp_shipment_id = models.CharField(max_length=100, null=True, verbose_name='ERP出库ID')
-    erp_pick_id = models.CharField(max_length=100, null=True, verbose_name='ERP领料ID')
+    erp_audit_id = models.CharField(max_length=1000,null=True, verbose_name='ERP审核ID')  
+    erp_save_id = models.CharField(max_length=1000,null=True, verbose_name='ERP保存ID')  
+
     class Meta:
     class Meta:
         verbose_name = '出库单'
         verbose_name = '出库单'
         verbose_name_plural = verbose_name
         verbose_name_plural = verbose_name

+ 1 - 1
erp/serializers.py

@@ -49,7 +49,7 @@ class boundPostSerializer(serializers.Serializer):
         """
         """
         required_fields = [
         required_fields = [
             'entryIds', 'production_batch', 
             'entryIds', 'production_batch', 
-            'goods_code', 'goods_name', 'goods_std',
+            'goods_code', 'goods_name', 
             'plan_qty',
             'plan_qty',
             'goods_unit'
             'goods_unit'
         ]
         ]

+ 102 - 39
erp/views.py

@@ -1,8 +1,7 @@
-from rest_framework.views import APIView
-from rest_framework.parsers import JSONParser
-from rest_framework.decorators import api_view, parser_classes
 
 
-from rest_framework.response import Response
+from pathlib import Path
+
+from rest_framework.views import APIView
 from rest_framework.permissions import AllowAny
 from rest_framework.permissions import AllowAny
 from rest_framework import status
 from rest_framework import status
 from rest_framework import viewsets
 from rest_framework import viewsets
@@ -11,8 +10,6 @@ from rest_framework.filters import OrderingFilter
 from django.utils import timezone
 from django.utils import timezone
 from django.db.models import Q, F, Case, When
 from django.db.models import Q, F, Case, When
 from django.core.cache import cache
 from django.core.cache import cache
-
-from datetime import datetime
 import requests
 import requests
 from collections import defaultdict
 from collections import defaultdict
 from utils.page import MyPageNumberPagination
 from utils.page import MyPageNumberPagination
@@ -21,13 +18,14 @@ from .serializers import *
 from .filter import *
 from .filter import *
 from .parsers import TextJSONParser  
 from .parsers import TextJSONParser  
 from .parsers import TextJSONRenderer
 from .parsers import TextJSONRenderer
-
 import logging
 import logging
 import time
 import time
 from django.db import transaction
 from django.db import transaction
-
 from bound.models import BoundListModel, BoundBatchModel, OutBatchModel,BoundDetailModel,OutBoundDetailModel,BatchLogModel
 from bound.models import BoundListModel, BoundBatchModel, OutBatchModel,BoundDetailModel,OutBoundDetailModel,BatchLogModel
-from warehouse.models import ProductListModel   
+from warehouse.models import ProductListModel
+from rest_framework.response import Response
+
+
 logger = logging.getLogger('wms.boundBill')
 logger = logging.getLogger('wms.boundBill')
 
 
 class WMSResponse:
 class WMSResponse:
@@ -218,6 +216,9 @@ class InboundApplyCreate(APIView):
             bound_bill.creater = serializer.validated_data['creater']
             bound_bill.creater = serializer.validated_data['creater']
             bound_bill.note = (serializer.validated_data['note'] if 'note' in serializer.validated_data else '')
             bound_bill.note = (serializer.validated_data['note'] if 'note' in serializer.validated_data else '')
             bound_bill.totalCount = serializer.validated_data['totalCount']
             bound_bill.totalCount = serializer.validated_data['totalCount']
+            if bound_bill.type != 1:
+                bound_bill.erp_audit_id = bound_bill.number
+            bound_bill.erp_save_id = bound_bill.billId
             bound_bill.update_time = timezone.now()
             bound_bill.update_time = timezone.now()
             bound_bill.save()
             bound_bill.save()
         except InboundBill.DoesNotExist:
         except InboundBill.DoesNotExist:
@@ -231,9 +232,14 @@ class InboundApplyCreate(APIView):
                 creater=serializer.validated_data['creater'],
                 creater=serializer.validated_data['creater'],
                 note=(serializer.validated_data['note'] if 'note' in serializer.validated_data else ''),
                 note=(serializer.validated_data['note'] if 'note' in serializer.validated_data else ''),
                 totalCount=serializer.validated_data['totalCount'],
                 totalCount=serializer.validated_data['totalCount'],
+               
+                erp_save_id = serializer.validated_data['billId'],
                 create_time=timezone.now(),
                 create_time=timezone.now(),
                 update_time=timezone.now()
                 update_time=timezone.now()
             )
             )
+            if bound_bill.type != 1:
+                bound_bill.erp_audit_id = bound_bill.number
+            bound_bill.save()
         return bound_bill
         return bound_bill
 
 
     def save_or_update_material_detail(self, bound_bill, serializer):
     def save_or_update_material_detail(self, bound_bill, serializer):
@@ -246,7 +252,7 @@ class InboundApplyCreate(APIView):
         
         
                 material_detail.goods_code = item['goods_code']
                 material_detail.goods_code = item['goods_code']
                 material_detail.goods_name = item['goods_name']
                 material_detail.goods_name = item['goods_name']
-                material_detail.goods_std = item['goods_std']
+                material_detail.goods_std = (item['goods_std'] if 'goods_std' in item else '')
          
          
                 material_detail.plan_qty = item['plan_qty']
                 material_detail.plan_qty = item['plan_qty']
                 material_detail.goods_total_weight = item['plan_qty']
                 material_detail.goods_total_weight = item['plan_qty']
@@ -261,7 +267,7 @@ class InboundApplyCreate(APIView):
                     production_batch=item['production_batch'],
                     production_batch=item['production_batch'],
                     goods_code=item['goods_code'],
                     goods_code=item['goods_code'],
                     goods_name=item['goods_name'],
                     goods_name=item['goods_name'],
-                    goods_std=item['goods_std'],
+                    goods_std=(item['goods_std'] if 'goods_std' in item else ''),
                     goods_weight=1,
                     goods_weight=1,
                     plan_qty=item['plan_qty'],
                     plan_qty=item['plan_qty'],
                     goods_total_weight=item['plan_qty'],
                     goods_total_weight=item['plan_qty'],
@@ -395,7 +401,7 @@ class GenerateInbound(APIView):
                 warehouse_name='立体仓',
                 warehouse_name='立体仓',
                 goods_code=material.goods_code,
                 goods_code=material.goods_code,
                 goods_desc=material.goods_name,
                 goods_desc=material.goods_name,
-                goods_std=material.goods_std,
+                goods_std=(material.goods_std if material.goods_std else ''),
                 goods_unit=material.goods_unit,
                 goods_unit=material.goods_unit,
                 goods_qty=material.plan_qty,
                 goods_qty=material.plan_qty,
                 goods_weight=float(material.goods_weight),
                 goods_weight=float(material.goods_weight),
@@ -801,6 +807,10 @@ class OutboundApplyCreate(APIView):
             bound_bill.creater = serializer.validated_data['creater']
             bound_bill.creater = serializer.validated_data['creater']
             bound_bill.note = (serializer.validated_data['note'] if 'note' in serializer.validated_data else '')
             bound_bill.note = (serializer.validated_data['note'] if 'note' in serializer.validated_data else '')
             bound_bill.totalCount = serializer.validated_data['totalCount']
             bound_bill.totalCount = serializer.validated_data['totalCount']
+           
+            bound_bill.erp_audit_id = bound_bill.number
+            bound_bill.erp_save_id = bound_bill.billId
+
             bound_bill.update_time = timezone.now()
             bound_bill.update_time = timezone.now()
             bound_bill.save()
             bound_bill.save()
         except OutboundBill.DoesNotExist:
         except OutboundBill.DoesNotExist:
@@ -814,6 +824,8 @@ class OutboundApplyCreate(APIView):
                 creater=serializer.validated_data['creater'],
                 creater=serializer.validated_data['creater'],
                 note=(serializer.validated_data['note'] if 'note' in serializer.validated_data else ''),
                 note=(serializer.validated_data['note'] if 'note' in serializer.validated_data else ''),
                 totalCount=serializer.validated_data['totalCount'],
                 totalCount=serializer.validated_data['totalCount'],
+                erp_audit_id = serializer.validated_data['number'],
+                erp_save_id = serializer.validated_data['billId'],
                 create_time=timezone.now(),
                 create_time=timezone.now(),
                 update_time=timezone.now()
                 update_time=timezone.now()
             )
             )
@@ -907,7 +919,7 @@ class ProductInfo(APIView):
                         instance.id = material_id
                         instance.id = material_id
                         instance.product_code = material.get('product_code', instance.product_code)
                         instance.product_code = material.get('product_code', instance.product_code)
                         instance.product_name = material.get('product_name', instance.product_name)
                         instance.product_name = material.get('product_name', instance.product_name)
-                        instance.product_std = material.get('product_std', instance.product_std)
+                        instance.product_std = material.get('product_std', instance.product_std or 'on std')
                         instance.product_unit = material.get('product_unit', instance.product_unit or 'KG')
                         instance.product_unit = material.get('product_unit', instance.product_unit or 'KG')
                         
                         
                         # 必填字段校验[7](@ref)
                         # 必填字段校验[7](@ref)
@@ -930,7 +942,7 @@ class ProductInfo(APIView):
                         })
                         })
                         
                         
                 # 检查总数一致性[7](@ref)
                 # 检查总数一致性[7](@ref)
-                if len(materials) != total_count:
+                if success_count != total_count:
                     return WMSResponse.error(
                     return WMSResponse.error(
                         message="物料数量不匹配",
                         message="物料数量不匹配",
                         total=total_count,
                         total=total_count,
@@ -963,6 +975,7 @@ class BatchUpdate(APIView):
     def post(self, request):
     def post(self, request):
         data = request.data
         data = request.data
         total_count = data.get('totalCount', 0)
         total_count = data.get('totalCount', 0)
+        material_audit_id = data.get('billnos')
         materials = data.get('materials', [])
         materials = data.get('materials', [])
         
         
         success_count = 0
         success_count = 0
@@ -981,6 +994,7 @@ class BatchUpdate(APIView):
                     material_billId = material.get('billId')
                     material_billId = material.get('billId')
                     material_entryId = material.get('entryIds')
                     material_entryId = material.get('entryIds')
                     material_status = material.get('status')
                     material_status = material.get('status')
+                    
                     if material_status == 'passing':
                     if material_status == 'passing':
                         try:
                         try:
                             instance = MaterialDetail.objects.get(bound_billId_id=material_billId,entryIds=material_entryId)
                             instance = MaterialDetail.objects.get(bound_billId_id=material_billId,entryIds=material_entryId)
@@ -993,7 +1007,21 @@ class BatchUpdate(APIView):
                                 fail_count += 1
                                 fail_count += 1
                                 continue
                                 continue
                             instance.status = 1
                             instance.status = 1
+                         
+                            bill_obj = InboundBill.objects.get(billId=material_billId)
+                            if not bill_obj:
+                                logger.info("入库单不存在")
+                                fail_materials.append({
+                                    **material,
+                                    "error": "入库单不存在"
+                                })
+                                fail_count += 1
+                                continue
+                            bill_obj.erp_audit_id = material_audit_id
+                            logger.info("[1]入库单号%s,物料明细%s,更新状态,审核通过%s",bill_obj.number,material_entryId,material_audit_id)   
+                            logger.info("[2]入库单号%s,物料明细%s,更新状态,审核通过%s",bill_obj.number,material_entryId,bill_obj.erp_audit_id)   
                             instance.save()
                             instance.save()
+                            bill_obj.save()
                             success_count += 1
                             success_count += 1
                         except Exception as e:
                         except Exception as e:
                             fail_count += 1
                             fail_count += 1
@@ -1130,8 +1158,11 @@ class ERPSyncBase:
         
         
     def execute_sync(self):
     def execute_sync(self):
         """执行同步操作"""
         """执行同步操作"""
+        # 测试环境 @ todo
+    
         headers = {
         headers = {
-            'accessToken': f'{AccessToken.get_current_token()}'
+            'accessToken': f'{AccessToken.get_current_token()}',
+            'x-acgw-identity': 'djF8MTk2M2QzMWEzMjUwMTZlMzA3MDF8NDg5ODM4MzM4NjE3OHwYjYJyvo-DbkhOliEpFtiFOsCgKKo6braaiQGE9qdNx3w='
         }
         }
         
         
         for attempt in range(self.max_retries):
         for attempt in range(self.max_retries):
@@ -1172,7 +1203,7 @@ class ProductionInboundAuditSync(ERPSyncBase):
     erp_id_field = 'erp_audit_id'
     erp_id_field = 'erp_audit_id'
     # 请求地址
     # 请求地址
     def get_erp_endpoint(self):
     def get_erp_endpoint(self):
-        return "https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_productinbill/audit"
+        return "https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_mdc_mftmanuinbill/audit"
     # 请求参数
     # 请求参数
         #     {
         #     {
     # 	"data":{
     # 	"data":{
@@ -1186,7 +1217,7 @@ class ProductionInboundAuditSync(ERPSyncBase):
         return {
         return {
             "data": {
             "data": {
                 "billnos": [
                 "billnos": [
-                    self.wms_bill.number,
+                    self.wms_bill.erp_audit_id,
                 ]
                 ]
             }
             }
         }
         }
@@ -1194,9 +1225,9 @@ class ProductionInboundAuditSync(ERPSyncBase):
 
 
     def process_erp_response(self, response):
     def process_erp_response(self, response):
         print("ERP审核响应:",response)
         print("ERP审核响应:",response)
-        if response['code'] != '200':
-            raise ValueError(f"ERP审核失败: {response['msg']}")
-        return response['data']['erp_audit_id']
+        if response['status'] != True:
+            raise ValueError(f"ERP审核失败: {response['message']}")
+        return response['data']
 """采购收料入库审核"""      
 """采购收料入库审核"""      
 class PurchaseInboundAuditSync(ERPSyncBase):
 class PurchaseInboundAuditSync(ERPSyncBase):
     
     
@@ -1217,7 +1248,7 @@ class PurchaseInboundAuditSync(ERPSyncBase):
         return {
         return {
             "data": {
             "data": {
                 "billnos": [
                 "billnos": [
-                    self.wms_bill.number,
+                    self.wms_bill.erp_audit_id,
                 ]
                 ]
             }
             }
         }
         }
@@ -1225,9 +1256,9 @@ class PurchaseInboundAuditSync(ERPSyncBase):
 
 
     def process_erp_response(self, response):
     def process_erp_response(self, response):
         print("ERP审核响应:",response)
         print("ERP审核响应:",response)
-        if response['code'] != '200':
-            raise ValueError(f"ERP审核失败: {response['msg']}")
-        return response['data']['erp_audit_id']
+        if response['status'] != True:
+            raise ValueError(f"ERP审核失败: {response['message']}")
+        return response['data']
 """其他入库审核"""
 """其他入库审核"""
 class OtherInboundAuditSync(ERPSyncBase):
 class OtherInboundAuditSync(ERPSyncBase):
     
     
@@ -1248,7 +1279,7 @@ class OtherInboundAuditSync(ERPSyncBase):
         return {
         return {
             "data": {
             "data": {
                 "billnos": [
                 "billnos": [
-                    self.wms_bill.number,
+                    self.wms_bill.erp_audit_id,
                 ]
                 ]
             }
             }
         }
         }
@@ -1256,9 +1287,41 @@ class OtherInboundAuditSync(ERPSyncBase):
 
 
     def process_erp_response(self, response):
     def process_erp_response(self, response):
         print("ERP审核响应:",response)
         print("ERP审核响应:",response)
-        if response['code'] != '200':
-            raise ValueError(f"ERP审核失败: {response['msg']}")
-        return response['data']['erp_audit_id']
+        if response['status'] != True:
+            raise ValueError(f"ERP审核失败: {response['message']}")
+        return response['data']
+"""调拨入库审核"""
+class TransferInboundAuditSync(ERPSyncBase):
+    
+    erp_id_field = 'erp_audit_id'
+    # 请求地址
+    def get_erp_endpoint(self):
+        return "https://okyy.test.kdgalaxy.com/kapi/v2/l772/im/im_transdirbill/audit"
+
+    # 请求参数
+        #     {
+    # 	"data":{
+    # 		"billnos":[
+    # 			"AgTSC",
+    # 			"fgBAH"
+    # 		]
+    # 	}
+    # }
+    def build_erp_payload(self):
+        return {
+            "data": {
+                "billnos": [
+                    self.wms_bill.erp_audit_id,
+                ]
+            }
+        }
+    # 处理响应
+
+    def process_erp_response(self, response):
+        print("ERP审核响应:",response)
+        if response['status'] != True:
+            raise ValueError(f"ERP审核失败: {response['message']}")
+        return response['data']
 """其他出库审核同步"""
 """其他出库审核同步"""
 class OtherOutboundAuditSync(ERPSyncBase):
 class OtherOutboundAuditSync(ERPSyncBase):
     
     
@@ -1279,7 +1342,7 @@ class OtherOutboundAuditSync(ERPSyncBase):
         return {
         return {
             "data": {
             "data": {
                 "billnos": [
                 "billnos": [
-                    self.wms_bill.number,
+                    self.wms_bill.erp_audit_id,
                 ]
                 ]
             }
             }
         }
         }
@@ -1287,9 +1350,9 @@ class OtherOutboundAuditSync(ERPSyncBase):
 
 
     def process_erp_response(self, response):
     def process_erp_response(self, response):
         print("ERP审核响应:",response)
         print("ERP审核响应:",response)
-        if response['code'] != '200':
-            raise ValueError(f"ERP审核失败: {response['msg']}")
-        return response['data']['erp_audit_id']
+        if response['status'] != True:
+            raise ValueError(f"ERP审核失败: {response['message']}")
+        return response['data']
 """生产领料出库审核"""
 """生产领料出库审核"""
 class ProductionOutboundAuditSync(ERPSyncBase):
 class ProductionOutboundAuditSync(ERPSyncBase):
     
     
@@ -1310,7 +1373,7 @@ class ProductionOutboundAuditSync(ERPSyncBase):
         return {
         return {
             "data": {
             "data": {
                 "billnos": [
                 "billnos": [
-                    self.wms_bill.number,
+                    self.wms_bill.erp_audit_id,
                 ]
                 ]
             }
             }
         }
         }
@@ -1318,9 +1381,9 @@ class ProductionOutboundAuditSync(ERPSyncBase):
 
 
     def process_erp_response(self, response):
     def process_erp_response(self, response):
         print("ERP审核响应:",response)
         print("ERP审核响应:",response)
-        if response['code'] != '200':
-            raise ValueError(f"ERP审核失败: {response['msg']}")
-        return response['data']['erp_audit_id']
+        if response['status'] != True:
+            raise ValueError(f"ERP审核失败: {response['message']}")
+        return response['data']
 """采购入库保存"""
 """采购入库保存"""
 class PurchaseInboundSaveSync(ERPSyncBase):
 class PurchaseInboundSaveSync(ERPSyncBase):
    
    
@@ -1341,7 +1404,7 @@ class PurchaseInboundSaveSync(ERPSyncBase):
         # }
         # }
         return {
         return {
             "purinbill": {
             "purinbill": {
-                "billId":self.wms_bill.number,
+                "billId":self.wms_bill.erp_audit_id,
                 "entryIds": [
                 "entryIds": [
                     self.wms_bill.number,
                     self.wms_bill.number,
                 ]
                 ]
@@ -1371,7 +1434,7 @@ class SaleOutboundSaveSync(ERPSyncBase):
         # }
         # }
         return {
         return {
             "purinbill": {
             "purinbill": {
-                "billId":self.wms_bill.number,
+                "billId":self.wms_bill.erp_audit_id,
                 "entryIds": [
                 "entryIds": [
                     self.wms_bill.number,
                     self.wms_bill.number,
                 ]
                 ]
@@ -1538,6 +1601,6 @@ class OutMaterials(viewsets.ModelViewSet):
         if self.action in ['retrieve', 'list']:
         if self.action in ['retrieve', 'list']:
             return OutMaterialDetailSerializer
             return OutMaterialDetailSerializer
         else:
         else:
-            return self.http_method_not_allowed(request=self.request)   
+            return self.http_method_not_allowed(request=self.request)
 
 
 
 

BIN
greaterwms/__pycache__/settings.cpython-38.pyc


File diff suppressed because it is too large
+ 118 - 0
logs/boundBill.log


+ 64 - 0
logs/error.log

@@ -4550,3 +4550,67 @@ AssertionError: It is redundant to specify `source='billId'` on field 'CharField
 [2025-05-07 18:21:11,923][django.request.log_response():241] [ERROR] Internal Server Error: /wms/createInboundApply
 [2025-05-07 18:21:11,923][django.request.log_response():241] [ERROR] Internal Server Error: /wms/createInboundApply
 [2025-05-07 18:24:01,473][django.request.log_response():241] [ERROR] Internal Server Error: /wms/createInboundApply
 [2025-05-07 18:24:01,473][django.request.log_response():241] [ERROR] Internal Server Error: /wms/createInboundApply
 [2025-05-07 18:45:48,008][django.request.log_response():241] [ERROR] Internal Server Error: /wms/createOutboundApply
 [2025-05-07 18:45:48,008][django.request.log_response():241] [ERROR] Internal Server Error: /wms/createOutboundApply
+[2025-05-08 17:51:51,851][django.request.log_response():241] [ERROR] Internal Server Error: /wms/logs/
+Traceback (most recent call last):
+  File "d:\language\python38\lib\site-packages\asgiref\sync.py", line 472, in thread_handler
+    raise exc_info[1]
+  File "d:\language\python38\lib\site-packages\django\core\handlers\exception.py", line 42, in inner
+    response = await get_response(request)
+  File "d:\language\python38\lib\site-packages\django\core\handlers\base.py", line 253, in _get_response_async
+    response = await wrapped_callback(
+  File "d:\language\python38\lib\site-packages\asgiref\sync.py", line 435, in __call__
+    ret = await asyncio.wait_for(future, timeout=None)
+  File "d:\language\python38\lib\asyncio\tasks.py", line 455, in wait_for
+    return await fut
+  File "d:\language\python38\lib\concurrent\futures\thread.py", line 57, in run
+    result = self.fn(*self.args, **self.kwargs)
+  File "d:\language\python38\lib\site-packages\asgiref\sync.py", line 476, in thread_handler
+    return func(*args, **kwargs)
+  File "d:\language\python38\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
+    return view_func(*args, **kwargs)
+  File "d:\language\python38\lib\site-packages\rest_framework\viewsets.py", line 125, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 509, in dispatch
+    response = self.handle_exception(exc)
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 469, in handle_exception
+    self.raise_uncaught_exception(exc)
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 480, in raise_uncaught_exception
+    raise exc
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 506, in dispatch
+    response = handler(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 1638, in list
+    with open(settings.LOGGING['boundbill_log'], 'r') as f:
+KeyError: 'boundbill_log'
+[2025-05-08 17:57:16,768][django.request.log_response():241] [ERROR] Internal Server Error: /wms/logs/
+Traceback (most recent call last):
+  File "d:\language\python38\lib\site-packages\asgiref\sync.py", line 472, in thread_handler
+    raise exc_info[1]
+  File "d:\language\python38\lib\site-packages\django\core\handlers\exception.py", line 42, in inner
+    response = await get_response(request)
+  File "d:\language\python38\lib\site-packages\django\core\handlers\base.py", line 253, in _get_response_async
+    response = await wrapped_callback(
+  File "d:\language\python38\lib\site-packages\asgiref\sync.py", line 435, in __call__
+    ret = await asyncio.wait_for(future, timeout=None)
+  File "d:\language\python38\lib\asyncio\tasks.py", line 455, in wait_for
+    return await fut
+  File "d:\language\python38\lib\concurrent\futures\thread.py", line 57, in run
+    result = self.fn(*self.args, **self.kwargs)
+  File "d:\language\python38\lib\site-packages\asgiref\sync.py", line 476, in thread_handler
+    return func(*args, **kwargs)
+  File "d:\language\python38\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
+    return view_func(*args, **kwargs)
+  File "d:\language\python38\lib\site-packages\rest_framework\viewsets.py", line 125, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 509, in dispatch
+    response = self.handle_exception(exc)
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 469, in handle_exception
+    self.raise_uncaught_exception(exc)
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 480, in raise_uncaught_exception
+    raise exc
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 506, in dispatch
+    response = handler(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 1645, in list
+    total = sum(1 for _ in f)
+  File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 1645, in <genexpr>
+    total = sum(1 for _ in f)
+UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 74: illegal multibyte sequence

+ 79 - 0
logs/server.log

@@ -4772,3 +4772,82 @@ AssertionError: It is redundant to specify `source='billId'` on field 'CharField
 [2025-05-07 18:40:48,947][django.request.log_response():241] [WARNING] Not Found: /stock/list/
 [2025-05-07 18:40:48,947][django.request.log_response():241] [WARNING] Not Found: /stock/list/
 [2025-05-07 18:45:48,008][django.request.log_response():241] [ERROR] Internal Server Error: /wms/createOutboundApply
 [2025-05-07 18:45:48,008][django.request.log_response():241] [ERROR] Internal Server Error: /wms/createOutboundApply
 [2025-05-07 19:09:18,482][django.request.log_response():241] [WARNING] Not Found: /cyclecount/qtyrecorviewset/
 [2025-05-07 19:09:18,482][django.request.log_response():241] [WARNING] Not Found: /cyclecount/qtyrecorviewset/
+[2025-05-08 09:00:19,768][django.request.log_response():241] [WARNING] Not Found: /cyclecount/qtyrecorviewset/
+[2025-05-08 10:56:15,474][django.request.log_response():241] [WARNING] Not Found: /cyclecount/qtyrecorviewset/
+[2025-05-08 10:56:44,105][django.request.log_response():241] [WARNING] Not Found: /cyclecount/qtyrecorviewset/
+[2025-05-08 11:03:05,259][django.request.log_response():241] [WARNING] Not Found: /cyclecount/qtyrecorviewset/
+[2025-05-08 16:33:52,891][django.request.log_response():241] [WARNING] Not Found: /cyclecount/qtyrecorviewset/
+[2025-05-08 16:36:21,489][django.request.log_response():241] [WARNING] Not Found: /asn/list/
+[2025-05-08 16:36:45,605][django.request.log_response():241] [WARNING] Not Found: /asn/list/
+[2025-05-08 16:36:49,987][django.request.log_response():241] [WARNING] Not Found: /cyclecount/qtyrecorviewset/
+[2025-05-08 16:44:23,865][django.request.log_response():241] [WARNING] Not Found: /dn/detail/
+[2025-05-08 16:44:24,825][django.request.log_response():241] [WARNING] Not Found: /dn/detail/
+[2025-05-08 16:44:25,552][django.request.log_response():241] [WARNING] Not Found: /dn/detail/
+[2025-05-08 16:44:26,132][django.request.log_response():241] [WARNING] Not Found: /dn/detail/
+[2025-05-08 16:44:26,667][django.request.log_response():241] [WARNING] Not Found: /dn/detail/
+[2025-05-08 16:44:27,106][django.request.log_response():241] [WARNING] Not Found: /dn/pickinglistfilter/
+[2025-05-08 16:44:28,405][django.request.log_response():241] [WARNING] Not Found: /dn/detail/
+[2025-05-08 17:51:51,851][django.request.log_response():241] [ERROR] Internal Server Error: /wms/logs/
+Traceback (most recent call last):
+  File "d:\language\python38\lib\site-packages\asgiref\sync.py", line 472, in thread_handler
+    raise exc_info[1]
+  File "d:\language\python38\lib\site-packages\django\core\handlers\exception.py", line 42, in inner
+    response = await get_response(request)
+  File "d:\language\python38\lib\site-packages\django\core\handlers\base.py", line 253, in _get_response_async
+    response = await wrapped_callback(
+  File "d:\language\python38\lib\site-packages\asgiref\sync.py", line 435, in __call__
+    ret = await asyncio.wait_for(future, timeout=None)
+  File "d:\language\python38\lib\asyncio\tasks.py", line 455, in wait_for
+    return await fut
+  File "d:\language\python38\lib\concurrent\futures\thread.py", line 57, in run
+    result = self.fn(*self.args, **self.kwargs)
+  File "d:\language\python38\lib\site-packages\asgiref\sync.py", line 476, in thread_handler
+    return func(*args, **kwargs)
+  File "d:\language\python38\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
+    return view_func(*args, **kwargs)
+  File "d:\language\python38\lib\site-packages\rest_framework\viewsets.py", line 125, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 509, in dispatch
+    response = self.handle_exception(exc)
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 469, in handle_exception
+    self.raise_uncaught_exception(exc)
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 480, in raise_uncaught_exception
+    raise exc
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 506, in dispatch
+    response = handler(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 1638, in list
+    with open(settings.LOGGING['boundbill_log'], 'r') as f:
+KeyError: 'boundbill_log'
+[2025-05-08 17:57:16,768][django.request.log_response():241] [ERROR] Internal Server Error: /wms/logs/
+Traceback (most recent call last):
+  File "d:\language\python38\lib\site-packages\asgiref\sync.py", line 472, in thread_handler
+    raise exc_info[1]
+  File "d:\language\python38\lib\site-packages\django\core\handlers\exception.py", line 42, in inner
+    response = await get_response(request)
+  File "d:\language\python38\lib\site-packages\django\core\handlers\base.py", line 253, in _get_response_async
+    response = await wrapped_callback(
+  File "d:\language\python38\lib\site-packages\asgiref\sync.py", line 435, in __call__
+    ret = await asyncio.wait_for(future, timeout=None)
+  File "d:\language\python38\lib\asyncio\tasks.py", line 455, in wait_for
+    return await fut
+  File "d:\language\python38\lib\concurrent\futures\thread.py", line 57, in run
+    result = self.fn(*self.args, **self.kwargs)
+  File "d:\language\python38\lib\site-packages\asgiref\sync.py", line 476, in thread_handler
+    return func(*args, **kwargs)
+  File "d:\language\python38\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
+    return view_func(*args, **kwargs)
+  File "d:\language\python38\lib\site-packages\rest_framework\viewsets.py", line 125, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 509, in dispatch
+    response = self.handle_exception(exc)
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 469, in handle_exception
+    self.raise_uncaught_exception(exc)
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 480, in raise_uncaught_exception
+    raise exc
+  File "d:\language\python38\lib\site-packages\rest_framework\views.py", line 506, in dispatch
+    response = handler(request, *args, **kwargs)
+  File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 1645, in list
+    total = sum(1 for _ in f)
+  File "D:\Document\code\vue\greater_wms\.\erp\views.py", line 1645, in <genexpr>
+    total = sum(1 for _ in f)
+UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 74: illegal multibyte sequence

+ 0 - 1
templates/dist/spa/css/10.f721cf95.css

@@ -1 +0,0 @@
-.q-date__calendar-item--selected[data-v-c72a1b14]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-c72a1b14]{background-color:rgba(25,118,210,0.1)}

+ 0 - 1
templates/dist/spa/css/11.00a78ca4.css

@@ -1 +0,0 @@
-.q-date__calendar-item--selected[data-v-2c7b2e73]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-2c7b2e73]{background-color:rgba(25,118,210,0.1)}

+ 0 - 1
templates/dist/spa/css/12.90edc1da.css

@@ -1 +0,0 @@
-.q-date__calendar-item--selected[data-v-0cca92ed]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-0cca92ed]{background-color:rgba(25,118,210,0.1)}[data-v-0cca92ed] .q-field__label{margin-top:8px;align-self:center}[data-v-0cca92ed] .q-field__control-container{padding-left:50px;margin-top:-5px}

File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/css/13.0d4c4716.css


+ 0 - 1
templates/dist/spa/css/14.a65cb06f.css

@@ -1 +0,0 @@
-.q-date__calendar-item--selected[data-v-358efdde]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-358efdde]{background-color:rgba(25,118,210,0.1)}[data-v-358efdde] .q-field__label{margin-top:8px;align-self:center}[data-v-358efdde] .q-field__control-container{padding-left:50px;margin-top:-5px}

File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/css/15.0b5a9844.css


+ 0 - 1
templates/dist/spa/css/16.d66bc7d6.css

@@ -1 +0,0 @@
-.q-date__calendar-item--selected[data-v-016cb5de]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-016cb5de]{background-color:rgba(25,118,210,0.1)}

File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/css/17.e4f041cc.css


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/css/18.7a23b7fb.css


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/css/3.48edef75.css


+ 0 - 1
templates/dist/spa/css/4.0ac6b60c.css

@@ -1 +0,0 @@
-.q-date__calendar-item--selected[data-v-3b1d1346]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-3b1d1346]{background-color:rgba(25,118,210,0.1)}

+ 0 - 1
templates/dist/spa/css/5.7100e471.css

@@ -1 +0,0 @@
-.q-date__calendar-item--selected[data-v-0b572384]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-0b572384]{background-color:rgba(25,118,210,0.1)}

+ 0 - 1
templates/dist/spa/css/6.22759db8.css

@@ -1 +0,0 @@
-.q-date__calendar-item--selected[data-v-1056e070]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-1056e070]{background-color:rgba(25,118,210,0.1)}

+ 0 - 1
templates/dist/spa/css/7.82d60571.css

@@ -1 +0,0 @@
-.q-date__calendar-item--selected[data-v-257b6ff4]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-257b6ff4]{background-color:rgba(25,118,210,0.1)}[data-v-257b6ff4] .q-field__label{margin-top:8px;align-self:center}[data-v-257b6ff4] .q-field__control-container{padding-left:50px;margin-top:-5px}

+ 0 - 1
templates/dist/spa/css/8.68989bda.css

@@ -1 +0,0 @@
-.q-date__calendar-item--selected[data-v-050cf908]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-050cf908]{background-color:rgba(25,118,210,0.1)}

+ 0 - 1
templates/dist/spa/css/9.eeace633.css

@@ -1 +0,0 @@
-.q-date__calendar-item--selected[data-v-248f47b8]{transition:all 0.3s ease;background-color:#1976d2!important}.q-date__range[data-v-248f47b8]{background-color:rgba(25,118,210,0.1)}[data-v-248f47b8] .q-field__label{margin-top:8px;align-self:center}[data-v-248f47b8] .q-field__control-container{padding-left:50px;margin-top:-5px}

File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/css/app.45730797.css


File diff suppressed because it is too large
+ 0 - 6
templates/dist/spa/css/vendor.2ac1ba6a.css


BIN
templates/dist/spa/css/vendor.2ac1ba6a.css.gz


BIN
templates/dist/spa/favicon.ico


BIN
templates/dist/spa/fonts/KFOkCnqEu92Fr1MmgVxIIzQ.68bb21d0.woff


BIN
templates/dist/spa/fonts/KFOlCnqEu92Fr1MmEU9fBBc-.48af7707.woff


BIN
templates/dist/spa/fonts/KFOlCnqEu92Fr1MmSU5fBBc-.c2f7ab22.woff


BIN
templates/dist/spa/fonts/KFOlCnqEu92Fr1MmWUlfBBc-.77ecb942.woff


BIN
templates/dist/spa/fonts/KFOlCnqEu92Fr1MmYUtfBBc-.f5677eb2.woff


BIN
templates/dist/spa/fonts/KFOmCnqEu92Fr1Mu4mxM.f1e2a767.woff


BIN
templates/dist/spa/fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.99f5f787.woff


BIN
templates/dist/spa/fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.c08197a9.woff2


BIN
templates/dist/spa/icons/favicon-128x128.png


BIN
templates/dist/spa/icons/favicon-16x16.png


BIN
templates/dist/spa/icons/favicon-32x32.png


BIN
templates/dist/spa/icons/favicon-96x96.png


BIN
templates/dist/spa/icons/logo.png


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/index.html


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/1.66e8190d.js


BIN
templates/dist/spa/js/1.66e8190d.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/10.82a2ece5.js


BIN
templates/dist/spa/js/10.82a2ece5.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/11.c094525f.js


BIN
templates/dist/spa/js/11.c094525f.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/12.077687d1.js


BIN
templates/dist/spa/js/12.077687d1.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/13.4cb828ed.js


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/14.be39ef51.js


BIN
templates/dist/spa/js/14.be39ef51.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/15.f5f5f35b.js


BIN
templates/dist/spa/js/15.f5f5f35b.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/16.ed4c9435.js


BIN
templates/dist/spa/js/16.ed4c9435.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/17.cb55703b.js


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/18.7ce0af4f.js


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/19.77246a69.js


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/20.0a3341c5.js


BIN
templates/dist/spa/js/20.0a3341c5.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/21.53a3e18b.js


BIN
templates/dist/spa/js/21.53a3e18b.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/22.3054b5f5.js


BIN
templates/dist/spa/js/22.3054b5f5.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/23.87fd40d4.js


BIN
templates/dist/spa/js/23.87fd40d4.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/24.5ebb6d1b.js


BIN
templates/dist/spa/js/24.5ebb6d1b.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/25.73320c40.js


BIN
templates/dist/spa/js/25.73320c40.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/26.b3d0a428.js


BIN
templates/dist/spa/js/26.b3d0a428.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/27.e967265e.js


BIN
templates/dist/spa/js/27.e967265e.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/28.072bfae1.js


BIN
templates/dist/spa/js/28.072bfae1.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/29.5db67fa0.js


BIN
templates/dist/spa/js/29.5db67fa0.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/3.4f075d5f.js


BIN
templates/dist/spa/js/3.4f075d5f.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/30.3e778dac.js


BIN
templates/dist/spa/js/30.3e778dac.js.gz


File diff suppressed because it is too large
+ 0 - 1
templates/dist/spa/js/31.c4946907.js


BIN
templates/dist/spa/js/31.c4946907.js.gz


+ 0 - 0
templates/dist/spa/js/32.0a828ef7.js


Some files were not shown because too many files changed in this diff