Browse Source

新的库位model

flower_mr 1 month ago
parent
commit
5d322976c6

BIN
bin/__pycache__/__init__.cpython-38.pyc


BIN
bin/__pycache__/admin.cpython-38.pyc


BIN
bin/__pycache__/apps.cpython-38.pyc


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


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


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


+ 60 - 0
bin/filter.py

@@ -0,0 +1,60 @@
+from django_filters import FilterSet
+from .models import DeviceModel,LocationModel,LocationContainerLink,LocationChangeLog
+
+class DeviceFilter(FilterSet):
+    class Meta:
+        model = DeviceModel
+        fields = {
+            device_id: ['icontains'],
+            device_name: ['icontains'],
+            device_type: ['icontains'],
+            ip_address: ['icontains'],
+            port: ['exact'],
+            status: ['icontains'],
+            create_time: ['exact', 'range'],
+            update_time: ['exact', 'range'],
+        }
+
+class LocationFilter(FilterSet):
+    class Meta:
+        model = LocationModel
+        fields = {
+            warehouse_code: ['icontains'],
+            warehouse_name: ['icontains'],
+            shelf_type: ['icontains'],
+            row: ['exact', 'range'],
+            col: ['exact', 'range'],
+            layer: ['exact', 'range'],
+            update_time: ['exact', 'range'],
+            empty_label: ['exact'],
+            location_code: ['icontains'],
+            location_type: ['icontains'],
+            status: ['icontains'],
+            max_capacity: ['exact', 'range'],
+            current_quantity: ['exact', 'range'],
+            coordinate: ['icontains'],
+        }
+
+class LocationContainerLinkFilter(FilterSet):
+    class Meta:
+        model = LocationContainerLink
+        fields = {
+            location: ['exact'],
+            container: ['exact'],
+            put_time: ['exact', 'range'],
+            operator: ['icontains'],
+            is_active: ['exact'],
+        }
+
+class LocationChangeLogFilter(FilterSet):
+    class Meta:
+        model = LocationChangeLog        
+        fields = {
+            location: ['exact'],
+            container: ['exact'],
+            operation_type: ['exact'],
+            related_location: ['exact'],
+            timestamp: ['exact', 'range'],
+            operator: ['icontains'],
+            wcs_task_id: ['icontains'],
+        }

+ 110 - 0
bin/migrations/0001_initial.py

@@ -0,0 +1,110 @@
+# Generated by Django 4.1.2 on 2025-04-15 19:55
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+    initial = True
+
+    dependencies = [
+        ('container', '0002_containerwcsmodel_tasknumber'),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='LocationContainerLink',
+            fields=[
+                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('put_time', models.DateTimeField(auto_now_add=True, verbose_name='上架时间')),
+                ('operator', models.CharField(max_length=50, verbose_name='操作人')),
+                ('is_active', models.BooleanField(default=True, verbose_name='是否有效')),
+                ('container', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='container.containerlistmodel')),
+            ],
+            options={
+                'verbose_name': 'Location-Container Link',
+                'verbose_name_plural': 'Location-Container Link',
+                'db_table': 'location_container_link',
+                'ordering': ['-id'],
+            },
+        ),
+        migrations.CreateModel(
+            name='LocationModel',
+            fields=[
+                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('warehouse_code', models.CharField(max_length=255, verbose_name='Warehouse code')),
+                ('warehouse_name', models.CharField(max_length=255, verbose_name='Warehouse Name')),
+                ('shelf_type', models.CharField(default='storage', max_length=255, verbose_name='Shelf Type')),
+                ('row', models.IntegerField(verbose_name='Row')),
+                ('col', models.IntegerField(verbose_name='Column')),
+                ('layer', models.IntegerField(verbose_name='Layer')),
+                ('update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Update Time')),
+                ('empty_label', models.BooleanField(default=True, verbose_name='Empty Flag')),
+                ('location_code', models.CharField(max_length=20, unique=True, verbose_name='库位编码')),
+                ('location_type', models.CharField(choices=[('T5', '5货位'), ('T4', '4货位'), ('T2', '2货位'), ('S1', '散货位'), ('M', '通道区'), ('E', '提升机'), ('C', '输送机')], max_length=3, verbose_name='货位类型')),
+                ('status', models.CharField(choices=[('available', '可用'), ('occupied', '占用'), ('disabled', '禁用'), ('reserved', '预留'), ('maintenance', '维护中')], default='available', max_length=20, verbose_name='库位状态')),
+                ('max_capacity', models.PositiveIntegerField(verbose_name='最大容量')),
+                ('current_quantity', models.PositiveIntegerField(default=0, verbose_name='当前托盘数')),
+                ('coordinate', models.CharField(max_length=50, verbose_name='三维坐标')),
+                ('current_containers', models.ManyToManyField(through='bin.LocationContainerLink', to='container.containerlistmodel', verbose_name='当前存放托盘')),
+            ],
+            options={
+                'verbose_name': 'Location',
+                'verbose_name_plural': 'Location',
+                'db_table': 'location',
+                'ordering': ['-id'],
+                'unique_together': {('warehouse_code', 'row', 'col', 'layer')},
+            },
+        ),
+        migrations.AddField(
+            model_name='locationcontainerlink',
+            name='location',
+            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bin.locationmodel'),
+        ),
+        migrations.CreateModel(
+            name='LocationChangeLog',
+            fields=[
+                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('operation_type', models.CharField(choices=[('put', '上架'), ('pick', '下架'), ('move_in', '移入'), ('move_out', '移出')], max_length=10, verbose_name='操作类型')),
+                ('timestamp', models.DateTimeField(auto_now_add=True, verbose_name='操作时间')),
+                ('operator', models.CharField(max_length=50, verbose_name='操作人')),
+                ('wcs_task_id', models.CharField(max_length=50, null=True, verbose_name='WCS任务ID')),
+                ('container', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='container.containerlistmodel', verbose_name='托盘')),
+                ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bin.locationmodel', verbose_name='库位')),
+                ('related_location', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='related_logs', to='bin.locationmodel', verbose_name='关联库位')),
+            ],
+            options={
+                'verbose_name': 'Location Change Log',
+                'verbose_name_plural': 'Location Change Log',
+                'db_table': 'location_change_log',
+                'ordering': ['-id'],
+            },
+        ),
+        migrations.AlterUniqueTogether(
+            name='locationcontainerlink',
+            unique_together={('location', 'container')},
+        ),
+        migrations.CreateModel(
+            name='DeviceModel',
+            fields=[
+                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('device_id', models.CharField(max_length=255, verbose_name='Device ID')),
+                ('device_name', models.CharField(max_length=255, verbose_name='Device Name')),
+                ('device_type', models.CharField(max_length=255, verbose_name='Device Type')),
+                ('ip_address', models.CharField(max_length=255, verbose_name='IP Address')),
+                ('port', models.IntegerField(verbose_name='Port')),
+                ('status', models.CharField(max_length=255, verbose_name='Status')),
+                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='Create Time')),
+                ('update_time', models.DateTimeField(auto_now=True, null=True, verbose_name='Update Time')),
+                ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bin.locationmodel')),
+            ],
+            options={
+                'verbose_name': 'Device',
+                'verbose_name_plural': 'Device',
+                'db_table': 'device',
+                'ordering': ['-id'],
+                'unique_together': {('device_id',)},
+            },
+        ),
+    ]

+ 43 - 0
bin/migrations/0002_remove_locationchangelog_operator_and_more.py

@@ -0,0 +1,43 @@
+# Generated by Django 4.1.2 on 2025-04-15 20:07
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('container', '0002_containerwcsmodel_tasknumber'),
+        ('bin', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.RemoveField(
+            model_name='locationchangelog',
+            name='operator',
+        ),
+        migrations.RemoveField(
+            model_name='locationchangelog',
+            name='wcs_task_id',
+        ),
+        migrations.AddField(
+            model_name='locationchangelog',
+            name='task_detail',
+            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='container.taskmodel', verbose_name='批次详情'),
+        ),
+        migrations.AddField(
+            model_name='locationchangelog',
+            name='task_wcs',
+            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='container.containerwcsmodel', verbose_name='WCS任务'),
+        ),
+        migrations.AddField(
+            model_name='locationcontainerlink',
+            name='task_detail',
+            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='container.taskmodel'),
+        ),
+        migrations.AddField(
+            model_name='locationcontainerlink',
+            name='task_wcs',
+            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='container.containerwcsmodel'),
+        ),
+    ]

+ 28 - 0
bin/migrations/0003_locationmodel_access_priority_and_more.py

@@ -0,0 +1,28 @@
+# Generated by Django 4.1.2 on 2025-04-15 21:10
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('bin', '0002_remove_locationchangelog_operator_and_more'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='locationmodel',
+            name='access_priority',
+            field=models.IntegerField(default=0, help_text='值越大表示越远离主通道,应优先使用', verbose_name='访问优先级'),
+        ),
+        migrations.AddField(
+            model_name='locationmodel',
+            name='is_active',
+            field=models.BooleanField(default=True, verbose_name='是否有效'),
+        ),
+        migrations.AlterField(
+            model_name='locationmodel',
+            name='location_type',
+            field=models.CharField(choices=[('T5', '5货位'), ('T4', '4货位'), ('T2', '2货位'), ('T1', '散货位'), ('M1', '通道区'), ('E1', '提升机'), ('C1', '输送机')], max_length=3, verbose_name='货位类型'),
+        ),
+    ]

BIN
bin/migrations/__pycache__/0001_initial.cpython-38.pyc


BIN
bin/migrations/__pycache__/0002_remove_locationchangelog_operator_and_more.cpython-38.pyc


BIN
bin/migrations/__pycache__/0003_locationmodel_access_priority_and_more.cpython-38.pyc


BIN
bin/migrations/__pycache__/__init__.cpython-38.pyc


+ 250 - 1
bin/models.py

@@ -1,3 +1,252 @@
 from django.db import models
+from container.models import ContainerListModel,ContainerWCSModel,TaskModel
 
-# Create your models here.
+
+
+# 库位主表(记录实时状态)
+class LocationModel(models.Model):
+    LOCATION_TYPES = (
+        ('T5', '5货位'),  # 5托盘/批次
+        ('T4', '4货位'),  # 4托盘/批次
+        ('S4', '4单货位'),  # 4单托盘
+        ('T2', '2货位'),  # 2托盘/批次 
+        ('T1', '散货位'),  # 1托盘
+        ('M1', '通道区'),  # 通道区
+        ('E1', '提升机'),  # 提升机
+        ('C1', '输送机'),  # 输送机
+    )
+    LOCATION_STATUS = (
+        ('available', '可用'),
+        ('occupied', '占用'),
+        ('disabled', '禁用'),
+        ('reserved', '预留'),
+        ('maintenance', '维护中'),
+    )
+    warehouse_code = models.CharField(max_length=255, verbose_name="Warehouse code")
+    warehouse_name = models.CharField(max_length=255, verbose_name="Warehouse Name")
+    shelf_type = models.CharField(max_length=255,default = 'storage', verbose_name="Shelf Type")
+
+    row = models.IntegerField(verbose_name="Row")        # 位置的行号
+    col = models.IntegerField(verbose_name="Column")     # 位置的列号
+    layer = models.IntegerField(verbose_name="Layer")    # 位置的层号
+
+    update_time = models.DateTimeField(auto_now=True, blank=True, null=True, verbose_name="Update Time")
+    empty_label = models.BooleanField(default=True, verbose_name="Empty Flag")
+
+    location_code = models.CharField(max_length=20, unique=True, verbose_name='库位编码') 
+    # 示例:T1-L1C001-1
+    # T1-L1C001-1 代表货位类型为T1,层号为1,列号为001,货位号为1
+    location_type = models.CharField(max_length=3, choices=LOCATION_TYPES, verbose_name='货位类型')
+    status = models.CharField(max_length=20, choices=LOCATION_STATUS, default='available', verbose_name='库位状态')
+    max_capacity = models.PositiveIntegerField(verbose_name='最大容量')  # 根据类型自动设置
+    current_quantity = models.PositiveIntegerField(default=0, verbose_name='当前托盘数')
+    current_containers = models.ManyToManyField(ContainerListModel, 
+                                              through='LocationContainerLink',
+                                              verbose_name='当前存放托盘')
+    coordinate = models.CharField(max_length=50, verbose_name='三维坐标')  # 格式:行-列-层
+    access_priority = models.IntegerField(
+        default=0, 
+        verbose_name='访问优先级',
+        help_text='值越大表示越远离主通道,应优先使用'
+    )
+    is_active = models.BooleanField(default=True, verbose_name='是否有效')
+    class Meta:
+        db_table = 'location'
+        verbose_name = 'Location'
+        verbose_name_plural = "Location"
+        ordering = ['-id']
+        unique_together = ( 'warehouse_code','row', 'col', 'layer')  # 防止重复坐标
+
+    
+    @classmethod
+    def get_existing_positions(cls, warehouse_code, rows, cols, layers):
+        """获取已存在的坐标集合"""
+        return set(
+            cls.objects.filter(
+                warehouse_code=warehouse_code,
+                row__lte=rows,
+                col__lte=cols,
+                layer__lte=layers
+            ).values_list('row', 'col', 'layer')
+        )
+        # 在LocationModel类中新增方法
+    
+    @classmethod
+    def generate_locations(cls, warehouse_code):
+         # 清空现有数据(新增部分)
+        cls.objects.filter(warehouse_code=warehouse_code).delete()
+        """根据规划图生成库位"""
+        # 定义核心参数(根据规划图调整)
+        MAIN_AISLES = [18, 29]      # 子通道列号
+        SUB_AISLES = [2,8, 13]           # 主通道行号
+    
+        
+        for row in range(1, 16):       # 1-15行
+            for col in range(1, 19):   # 1-19列
+                for layer in range(1, 4): # 1-3层
+                    # 判断通道区
+                    if col in MAIN_AISLES or row in SUB_AISLES:
+                        loc_type = 'M1'
+                        c_number = row
+                        if col ==18 and row == 1:
+                            loc_type = 'T1'
+                            c_number = 1
+               
+                    # 判断货位类型(根据实际规划)
+                    
+                    else:
+                        if row <2:
+                            loc_type = 'T1' 
+                            c_number = 1
+                        elif row < 8:
+                            loc_type = 'T5'
+                            c_number = row-2
+                        elif row < 13:
+                            loc_type = 'T4'
+                            c_number = row-8
+                        else:
+                            loc_type = 'T2'
+                            c_number = 16-row
+
+                    # 生成唯一编码
+                    location_code = f"{loc_type}-L{layer}C{col:03d}-{c_number:02d}"
+                    print(f"生成库位:{location_code}-{row}-{col}-{layer}")
+                    
+                    # 创建库位
+                    cls.objects.update_or_create(
+                        warehouse_code=warehouse_code,
+                        row=row,
+                        col=col,
+                        layer=layer,
+                        defaults={
+                            'location_code': location_code,
+                            'location_type': loc_type,
+                            'max_capacity': {
+                                'T5': 5,
+                                'T4': 4,
+                                'T2': 2,
+                                'T1': 1,
+                                'M1': 0,
+                                'E1': 0,
+                                'C1': 0
+                            }[loc_type],
+                            'coordinate': f"{row}-{col}-{layer}",
+                            'is_active': True
+                        },
+                        access_priority=c_number if loc_type == 'T1'or loc_type == 'T2'or loc_type == 'T4'or loc_type == 'T5' else 0
+                    )
+        print("✅ 库位生成成功!")           
+        for row in range(1, 18):       # 1-17行
+            for col in range(19, 30):   # 19-29列
+                for layer in range(1, 4): # 1-3层
+                    # 判断货位类型(根据实际规划)
+                    if row < 2:
+                        loc_type = 'T1' 
+                        c_number = row
+                        if col ==18 and row == 1:
+                            loc_type = 'T1'
+                            c_number = 1
+                        if col ==29 and row == 1:
+                            loc_type = 'T1'
+                            c_number = 1
+                    elif row < 8:
+                        loc_type = 'T5'
+                        c_number = row-2
+                    elif row < 13:
+                        loc_type = 'T4'
+                        c_number = row-8
+                    else:
+                        loc_type = 'S4'
+                        c_number = 20-row
+
+                    # 生成唯一编码
+                    location_code = f"{loc_type}-L{layer}C{col:03d}-{c_number:02d}"
+                    
+                    # 生成唯一编码
+                    location_code = f"{loc_type}-L{layer}C{col:03d}-{c_number:02d}"
+                    print(f"生成库位:{location_code}-{row}-{col}-{layer}")
+                    
+                    # 创建库位
+                    cls.objects.update_or_create(
+                        warehouse_code=warehouse_code,
+                        row=row,
+                        col=col,
+                        layer=layer,
+                        defaults={
+                            'location_code': location_code,
+                            'location_type': loc_type,
+                            'max_capacity': {
+                                'T5': 5,
+                                'T4': 4,
+                                'S4': 4,
+                                'T2': 2,
+                                'T1': 1,
+                                'M1': 0,
+                                'E1': 0,
+                                'C1': 0
+                            }[loc_type],
+                            'coordinate': f"{row}-{col}-{layer}",
+                            'is_active': True
+                        },
+                        access_priority=c_number if loc_type == 'T1'or loc_type == 'T2'or loc_type == 'T4'or loc_type == 'T5' else 0
+                    )
+
+
+# 库位-托盘关联表(记录实时存放关系)
+class LocationContainerLink(models.Model):
+    location = models.ForeignKey(LocationModel, on_delete=models.CASCADE)
+    container = models.ForeignKey(ContainerListModel, on_delete=models.CASCADE)
+    task_wcs = models.ForeignKey(ContainerWCSModel, on_delete=models.CASCADE, null=True, blank=True)
+    task_detail = models.ForeignKey(TaskModel, on_delete=models.CASCADE, null=True, blank=True)
+    put_time = models.DateTimeField(auto_now_add=True, verbose_name='上架时间')
+    operator = models.CharField(max_length=50, verbose_name='操作人')
+    is_active = models.BooleanField(default=True, verbose_name='是否有效')
+    class Meta:
+        db_table = 'location_container_link'
+        verbose_name = 'Location-Container Link'
+        verbose_name_plural = "Location-Container Link"
+        ordering = ['-id']
+        unique_together = ( 'location', 'container')  # 防止重复关联关系
+
+class DeviceModel(models.Model):
+    location = models.ForeignKey(LocationModel, on_delete=models.CASCADE)
+    device_id = models.CharField(max_length=255, verbose_name="Device ID")
+    device_name = models.CharField(max_length=255, verbose_name="Device Name")
+    device_type = models.CharField(max_length=255, verbose_name="Device Type")
+    ip_address = models.CharField(max_length=255, verbose_name="IP Address")
+    port = models.IntegerField(verbose_name="Port")
+    status = models.CharField(max_length=255, verbose_name="Status")
+    create_time = models.DateTimeField(auto_now_add=True, verbose_name="Create Time")
+    update_time = models.DateTimeField(auto_now=True, blank=True, null=True, verbose_name="Update Time")
+    class Meta:
+        db_table = 'device'
+        verbose_name = 'Device'
+        verbose_name_plural = "Device"
+        ordering = ['-id']
+        unique_together = ('device_id',)  # 防止重复设备ID
+# 库位变更记录(历史追溯)
+class LocationChangeLog(models.Model):
+    OPERATION_TYPES = (
+        ('put', '上架'),
+        ('pick', '下架'), 
+        ('move_in', '移入'),
+        ('move_out', '移出')
+    )
+    
+    location = models.ForeignKey(LocationModel, on_delete=models.CASCADE, verbose_name='库位')
+    container = models.ForeignKey(ContainerListModel, on_delete=models.CASCADE, verbose_name='托盘')
+    task_wcs = models.ForeignKey(ContainerWCSModel, on_delete=models.CASCADE, null=True, blank=True, verbose_name='WCS任务')
+    task_detail = models.ForeignKey(TaskModel, on_delete=models.CASCADE, null=True, blank=True, verbose_name='批次详情')
+    operation_type = models.CharField(max_length=10, choices=OPERATION_TYPES, verbose_name='操作类型')
+    related_location = models.ForeignKey(LocationModel, 
+                                       on_delete=models.SET_NULL,
+                                       null=True,
+                                       related_name='related_logs',
+                                       verbose_name='关联库位')  # 用于移库操作
+    timestamp = models.DateTimeField(auto_now_add=True, verbose_name='操作时间')
+
+    class Meta:
+        db_table = 'location_change_log'
+        verbose_name = 'Location Change Log'
+        verbose_name_plural = "Location Change Log"
+        ordering = ['-id']

+ 0 - 0
bin/serializers.py


+ 8 - 0
bin/urls.py

@@ -0,0 +1,8 @@
+from django.urls import path, re_path
+from . import views
+
+urlpatterns = [
+    # path(r'management/', views.stockshelfViewSet.as_view({"get": "list", "post": "create"}), name="management"),
+    # re_path(r'^management/(?P<pk>\d+)/$', views.stockshelfViewSet.as_view({'get': 'retrieve','put': 'update','patch': 'partial_update','delete': 'destroy'}), name="staff_1"),
+
+]

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


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


+ 1 - 1
container/models.py

@@ -115,7 +115,7 @@ class ContainerWCSModel(models.Model):
             'container': self.container,
             'status': self.status
         }
-
+# 这里的批次详情是主入库申请单下的子批次
 class TaskModel(models.Model):
     
     task_wcs = models.ForeignKey(ContainerWCSModel, on_delete=models.CASCADE, related_name='tasks')

+ 36 - 0
data_base/generate_location.py

@@ -0,0 +1,36 @@
+# generate_locations.py
+import os
+import django
+import sys
+
+def setup_django():
+    # 使用原始字符串处理Windows路径
+    project_path = "D:/Document/code/vue/greater_wms"
+    sys.path.append(project_path)
+    
+    # 根据实际目录名设置(注意下划线)
+    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'greaterwms.settings')
+    django.setup()
+
+def main():
+    try:
+        # 从正确的应用导入模型
+        from bin.models import LocationModel
+        
+        warehouse_code = "WH001"
+        print(f"开始生成库位,仓库编码:{warehouse_code}")
+        
+        # 调用生成方法
+        LocationModel.generate_locations(warehouse_code)
+        
+        print("✅ 库位生成成功!")
+        print(f"共生成库位数:{LocationModel.objects.count()}条")
+        
+    except Exception as e:
+        print(f"❌ 生成失败:{str(e)}")
+        import traceback
+        traceback.print_exc()
+
+if __name__ == "__main__":
+    setup_django()
+    main()

BIN
db.sqlite3


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


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


+ 1 - 0
greaterwms/settings.py

@@ -39,6 +39,7 @@ INSTALLED_APPS = [
     # 'asn.apps.AsnConfig',
     'bound.apps.BoundConfig',
     'container.apps.ContainerConfig',
+    'bin.apps.BinConfig',
 
     'throttle.apps.ThrottleConfig',
     'rest_framework',

+ 1 - 0
greaterwms/urls.py

@@ -22,6 +22,7 @@ urlpatterns = [
     path('login/', include('userlogin.urls')),
     path('register/', include('userregister.urls')),
     path('stock/', include('stock.urls')),
+    path('bin/', include('bin.urls')),
     path('warehouse/', include('warehouse.urls')),
     path('reportcenter/', include('reportcenter.urls')),
     # path('asn/', include('asn.urls')),

+ 4 - 0
logs/server.log

@@ -2482,3 +2482,7 @@ RuntimeError: You called this URL via POST, but the URL doesn't end in a slash a
 [2025-04-15 01:07:48,094][django.request.log_response():241] [WARNING] Not Found: /cyclecount/manualcyclecount/
 [2025-04-15 10:20:36,698][django.request.log_response():241] [ERROR] Internal Server Error: /container/container_wcs/
 [2025-04-15 10:20:59,725][django.request.log_response():241] [ERROR] Internal Server Error: /container/container_wcs/
+[2025-04-15 15:17:42,864][django.request.log_response():241] [WARNING] Not Found: /cyclecount/qtyrecorviewset/
+[2025-04-15 15:24:08,294][django.request.log_response():241] [WARNING] Not Found: /cyclecount/qtyrecorviewset/
+[2025-04-15 15:26:37,231][django.request.log_response():241] [WARNING] Not Found: /asn/list/
+[2025-04-15 15:34:53,059][django.request.log_response():241] [WARNING] Not Found: /cyclecount/qtyrecorviewset/

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