#1185 closed дефект (fixed)

Необходимо создать процедуру в MYSQL для работы ревизии 277

Reported by: Denis_N Owned by: san
Priority: major Component: БД изделий АДС
Keywords: Cc:

Description

Удаление процедуры "без вывода строк ОТК" и создание процедуры "без вывод строк ОТК и строк Запись"

	 	drop procedure mismatchQueryWithoutOtkRows;
	 	
	 	DELIMITER }
	 	
	 	CREATE PROCEDURE mismatchQueryWithoutOtkAndRecordRows(min int, max int, searchName varchar (100), searchSerial varchar (100), searchComment varchar (10000)) READS SQL DATA
	 	BEGIN
	 	set @prevtotal := 0;
	 	set @mintotal := 0;
	 	select * from (select *, @mintotal as mintotal, @prevtotal := @mintotal - total as prevtotal from
	 	(select products.serial, history.uid, history.date, hist1.total from history inner join
	 	(select uid, count(uid) as total from history where (type_write = "mismatch"
	 	or type_write = "repair" or (type_write = "testing" and status = "fail")) and comment is not null and  comment != '' group by uid) as hist1 on history.uid = hist1.uid
	 	inner join products on products.uid = history.uid where (products.name like searchName
	 	and products.serial like searchSerial and history.comment like searchComment) and (history.uid, history.date) in
	 	(select uid, max(date) from history where (type_write = "mismatch" or type_write = "repair" or
	 	(type_write = "testing" and status = "fail")) and history.comment like searchComment and comment is not null and  comment != '' group by uid)
	 	group by products.serial, history.uid, history.date, hist1.total order by history.date desc) as hist2
	 	where (@mintotal := @minTotal + total)) as hust2 where hust2.mintotal > min and hust2.prevtotal < max;
	 	
	 	END}
	 	DELIMITER ;

Change History (4)

comment:1 by Denis_N, 18 months ago

Component: Разное и всякоеБД изделий АДС
Priority: minormajor

comment:2 by Denis_N, 18 months ago

In 277/base:

Улучшение: Расширен функционал по нажатию галочки так, чтобы не отображались и комментарии, и записи ОТК

ВАЖНО: необходимо удалить старую процедуру и создать новую в See #1185

comment:3 by Denis_N, 18 months ago

Summary: Необходимо создать процедуру в MYSQL для работы ревизииНеобходимо создать процедуру в MYSQL для работы ревизии 277

comment:4 by san, 17 months ago

Resolution: fixed
Status: assignedclosed

In 296/base:

Изменения в SQL
Добавлена процедура mismatchQueryWithoutOtkAndRecordRows (Closes #1185)
Старую процедуру mismatchQueryWithoutOtkRows пока оставил для совместимости с предыдущими версиями интерфейса.

Note: See TracTickets for help on using tickets.