Custom Query (1135 matches)
Results (58 - 60 of 1135)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#1176 | готово | Не отбражается список изделий после манипуляций с фильтрами | ||
Description |
В r216/base после некоторых (на мой взгляд, совершенно безобидных) действий перестает отображаться список изделий. Делал следующее:
В результате получил страницу с сообщением об ошибке: "Ошибка запроса в Продукты1: mysqli_queryUnknown column 'history.type_write' in 'order clause'". Ожидалось, что вместо сообщения об ошибке отобразится список изделий. |
|||
#1175 | fixed | Для ревизии 252 необходимо обновить код процедур для страницы "Несоответствия" | ||
Description |
drop procedure mismatchQuery; DELIMITER } CREATE PROCEDURE mismatchQuery(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 = 'record' or type_write = "repair" or (type_write = "otk" and status = "fail") 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 = 'record' or type_write = "repair" or (type_write = "otk" and status = "fail") 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 ; drop procedure mismatchQueryWithoutOtkRows; DELIMITER } CREATE PROCEDURE mismatchQueryWithoutOtkRows(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 = 'record' 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 = 'record' or type_write = "repair" or (type_write = "testing" and status = "fail") or `history`.type_write = 'record') 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 ; |
|||
#1173 | готово | Ремонт через ОТК и дополнительные проверки | ||
Description |
Чтобы оставить функцию ремонта контролёром Отк(ну удобнее так производству), но устранить озвученные в #1061 недостатки нужно: Добавить в интерфейс ОТК чекбокс - Ремонт (при открытии интерфейса он должен быть всегда снят). При наличии несоответствия изделия и попытке записать успешный статус ОТК: если чекбокс Ремонт не установлен - отказать в записи и выдать сообщении об ошибке вроде "Статус ОТК не записан. Изделие содержит несоответствие" если чекбокс Ремонт установлен, то в историю должны быть сделаны две записи Ремонт=ok, а затем ОТК=pass, а отметка о несоответствии в продуктах должна быть снята. Пользователь обязательно должен заполнить комментарий, который будет размещён в записи Ремонт. Если записывается Неуспешный статус ОТК, чекбокс Ремонт никак не влияет на запись, наверное логично сделать его неактивным Уточнение от alx: требуется проверять одновременное наличие у пользователя прав "otk" и "repair". Иначе (если есть только "otk") - показывать "чистый" интерфейс ОКТ (без предложенного дополнения). Для изделий, которые не прошли тестирование, ОТК не может пройти успешно не зависимо от галочки Ремонт. При попытке записать "ОТК успешно" для непроверенного изделия, интерфейс должен сообщить пользователю ошибку. |