This commit is contained in:
zty 2025-06-23 13:55:55 +08:00
commit ce54f326ee
6 changed files with 21 additions and 3 deletions

View File

@ -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']

View File

@ -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

View File

@ -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()

View File

@ -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()

View File

@ -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]

View File

@ -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