更新webpack配置、精工车间工序工价/生产计划/派工及移动端界面,新增菜单迁移与工价公式调整SQL脚本

This commit is contained in:
Developer
2026-08-08 16:02:24 +08:00
parent fd84f9d3ca
commit 9fc3aae3e9
15 changed files with 2007 additions and 97 deletions

View File

@@ -0,0 +1,83 @@
ALTER PROCEDURE [dbo].[_零件工序_派工]
@ int = null,
@ int = null,
@ int = null,
@ int = null,
@ int = null,
@ nvarchar(50)=null,
@ nvarchar(50)=null
AS
declare @ int
declare @ int
declare @ int
declare @ nvarchar(50)
declare @ int
declare @ int=0
-- 修改人:Ld 修改时间:2026-08-05 09:35:00; 后端兜底校验派工数量,避免空值或非正数落入任务分配表。
if @ is null or @ <= 0
begin
RAISERROR(N'派工数量不能为空且必须大于0', 16, 1)
return
end
update _零件工序 set = ISNULL(,0) + @ where =@
select @=,@=,@=ISNULL(,0) from _零件工序 where =@
select @ = from _零件工艺计划 where =@
if @ is null
begin
update _零件工艺计划 set = getdate() where =@
end
if @ = 16
begin
update _零件工序 set = 1,=@ where =@
end
else
begin
update _零件工序 set = 0,=0 where =@
end
if @ = 1
begin
if @ > @ and @ > 0
begin
set @ = @
update _零件工序 set =0 where =@
end
else if @ <= @ and @ > 0
begin
set @ = @
update _零件工序 set =isnull(,0)-@ where =@
end
end
if (select COUNT(*) from _零件工序_任务分配 where =@ and =@ and =@) = 1
begin
-- 修改人:Ld 修改时间:2026-08-05 09:35:00; 累加时对历史空值做默认值处理,避免 NULL + 新数量 仍然为 NULL。
update _零件工序_任务分配 set =ISNULL(,0)+@,=GETDATE(),=isnull(,0)+@,=@,=@,=@ where =@ and =@ and =@
end
else
begin
insert into _零件工序_任务分配(,,,,,,,,)values(@,@,@,@,GETDATE(),@,@,@,@)
if @ <> 16
begin
select @ = IDENT_CURRENT('车间生产管理工艺_零件工序_任务分配')
exec _零件工序_派工_生产计划_增加 @,@,@,@
end
end