CNCEC_SUBQHSE_WUHUAN/DataBase/版本日志/SUBQHSE_V2026-01-16-xiaj(现场...

45 lines
1.8 KiB
Transact-SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--现场质量问题台账
/*******************************************************************************
现场质量问题台账修改项:
1、菜单名称调整NCR管理 =》 现场质量问题台账
2、问题类别调整同步修正处理历史数据
3、补充字段现场质量问题来源、目前实施进展状况
*******************************************************************************/
update Sys_Menu set MenuName='现场质量问题台账' where MenuName='NCR管理'
go
update Sys_Menu set MenuName='现场质量问题台账统计' where MenuName='NCR统计'
go
--历史数据处理:原来问题状态前面补充:施工管理问题-
update Comprehensive_NCRManagement
set Problem=REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(Problem, '成品保护不到位', '施工管理问题-成品保护不到位'), '不按程序施工', '施工管理问题-不按程序施工'), '不按设计要求施工', '施工管理问题-不按设计要求施工'), '质量管理问题', '施工管理问题-质量管理问题'), '质量缺陷', '施工管理问题-质量缺陷'), '过程监督不到位', '施工管理问题-过程监督不到位')
where Problem is not null and Problem not like '%施工管理问题-%'
go
--补充字段:现场质量问题来源、目前实施进展状况
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Comprehensive_NCRManagement' AND COLUMN_NAME = 'Source')
BEGIN
ALTER TABLE Comprehensive_NCRManagement ADD Source nvarchar(100);
ALTER TABLE Comprehensive_NCRManagement ADD ProgressStatus nvarchar(100);
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'现场质量问题来源' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_NCRManagement', @level2type=N'COLUMN',@level2name=N'Source'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'目前实施进展状况' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_NCRManagement', @level2type=N'COLUMN',@level2name=N'ProgressStatus'
END
GO