From fec244765aad92eb0dd9e153efbbd8ed0f392fed Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 20 Jun 2025 11:11:31 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=20=E8=AF=A5=E4=BA=A4=E6=8E=A5?= =?UTF-8?q?=E5=8D=95=E4=B8=8D=E6=94=AF=E6=8C=81=E6=92=A4=E9=94=80=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/services.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/wpm/services.py b/apps/wpm/services.py index ff59693a..36c35949 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -921,6 +921,8 @@ def handover_revert(handover:Handover): handover_type = handover.type handover_mtype = handover.mtype if handover_type in [Handover.H_NORMAL, Handover.H_REPAIR] and handover_mtype == Handover.H_NORMAL: + pass + else: raise ParseError('该交接单不支持撤销!') handoverb_qs = Handoverb.objects.filter(handover=handover) material = handover.material From 307935cb166ce71dacb5245bbd6ccf9fa0efa830 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 20 Jun 2025 13:28:55 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20wpr=E4=B8=8D=E5=90=88=E6=A0=BC?= =?UTF-8?q?=E7=9A=84=E8=AF=9D=E5=85=88save=E5=86=8D=E5=88=9B=E5=BB=BAwm.de?= =?UTF-8?q?fect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpmw/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/wpmw/models.py b/apps/wpmw/models.py index 99678377..03d4f75f 100644 --- a/apps/wpmw/models.py +++ b/apps/wpmw/models.py @@ -103,11 +103,12 @@ class Wpr(BaseModel): if is_create: ins.material_start = wm.material WprDefect.objects.filter(wpr=ins).delete() - if wm.defect: - WprDefect.objects.create(wpr=ins, defect=wm.defect, is_main=True) if add_version: ins.version = ins.version + 1 ins.save() + if wm: + if wm.defect: + WprDefect.objects.create(wpr=ins, defect=wm.defect, is_main=True) if ftest: # 通过检验变更其缺陷项 WprDefect.objects.filter(wpr=ins).delete() From 50bf3e78d4104bf8688573e271caa3928f62a92e Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 20 Jun 2025 15:20:49 +0800 Subject: [PATCH 3/5] release: 2.6.2025062015 --- changelog.md | 11 +++++++++++ server/settings.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index cba9228c..060455f4 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,14 @@ +## 2.6.2025062015 +- feat: 新增功能 + - 增加交接撤回功能 [caoqianming] + - mlogbin的bug [caoqianming] + - mioitem返回mio数据添加单价字段 [caoqianming] + - 物料增加主库位号 [caoqianming] + - wmaterial添加can_handover字段 [caoqianming] +- fix: 问题修复 + - wpr不合格的话先save再创建wm.defect [caoqianming] + - wpm/service 优化煤粉热值获取方式 [zty] + - mioitem price 计算bug [caoqianming] ## 2.6.2025061715 - feat: 新增功能 - mlogbin的编辑与mlogbout的联动 [caoqianming] diff --git a/server/settings.py b/server/settings.py index d28aed0b..f45999bb 100755 --- a/server/settings.py +++ b/server/settings.py @@ -35,7 +35,7 @@ sys.path.insert(0, os.path.join(BASE_DIR, 'apps')) ALLOWED_HOSTS = ['*'] SYS_NAME = '星途工厂综合管理系统' -SYS_VERSION = '2.6.2025061715' +SYS_VERSION = '2.6.2025062015' X_FRAME_OPTIONS = 'SAMEORIGIN' # Application definition From f0cacf6777413d7c77a82f15ffeff73aff8bf74a Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 20 Jun 2025 15:28:49 +0800 Subject: [PATCH 4/5] =?UTF-8?q?feat:=20mioitem=E6=B7=BB=E5=8A=A0material?= =?UTF-8?q?=5F=5Ftype=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/inm/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/inm/views.py b/apps/inm/views.py index 2a1b8085..5be1edfb 100644 --- a/apps/inm/views.py +++ b/apps/inm/views.py @@ -255,6 +255,7 @@ class MIOItemViewSet(CustomListModelMixin, BulkCreateModelMixin, BulkDestroyMode "mio__type": ["exact", "in"], "mio__inout_date": ["gte", "lte", "exact"], "material": ["exact"], + "material__type": ["exact"], "test_date": ["isnull", "exact"] } ordering = ['create_time'] From 108fe0ae9f220ce9c2478cc6b5b41cc426eb76af Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 23 Jun 2025 13:44:28 +0800 Subject: [PATCH 5/5] =?UTF-8?q?feat:=20mlogbout=E5=8D=95=E4=B8=AA=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E4=B8=8D=E6=94=AF=E6=8C=81=E7=9B=B4=E6=8E=A5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/wpm/views.py b/apps/wpm/views.py index 750c0904..83123d2e 100644 --- a/apps/wpm/views.py +++ b/apps/wpm/views.py @@ -746,6 +746,9 @@ class MlogbOutViewSet(UpdateModelMixin, CustomGenericViewSet): @transaction.atomic def perform_update(self, serializer): + material_out = serializer.validated_data.get('material_out') + if material_out and material_out.tracking == Material.MA_TRACKING_SINGLE: + raise ParseError("单件产品不支持直接修改") ins:Mlogb = serializer.save() ins.mlog.cal_mlog_count_from_mlogb()