|
@@ -646,8 +646,16 @@ class SearchImages < Riddl::Implementation
|
|
if result.length > 0
|
|
if result.length > 0
|
|
result.each do |item|
|
|
result.each do |item|
|
|
result2 = $db.execute "SELECT DISTINCT internalID, imageID FROM image WHERE internalID = #{item[0]} ORDER BY imageID ASC"
|
|
result2 = $db.execute "SELECT DISTINCT internalID, imageID FROM image WHERE internalID = #{item[0]} ORDER BY imageID ASC"
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
result2.each do |item2|
|
|
result2.each do |item2|
|
|
- ret << @r[0] + "/" + item2[0].to_s + "/" + item2[1].to_s
|
|
|
|
|
|
+
|
|
|
|
+ result3 = $db.execute "SELECT DISTINCT station FROM stationpattern WHERE internalID = #{item2[0]} AND station = #{@r[0]}"
|
|
|
|
+ if(result3[0] != nil)
|
|
|
|
+
|
|
|
|
+ ret << @r[0] + "/" + item2[0].to_s + "/" + item2[1].to_s
|
|
|
|
+ end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
@@ -677,24 +685,39 @@ class SearchImagesSingle < Riddl::Implementation
|
|
result.each do |item|
|
|
result.each do |item|
|
|
result2 = $db.execute "SELECT DISTINCT internalID, imageID FROM image WHERE internalID = #{item[0]} ORDER BY imageID ASC"
|
|
result2 = $db.execute "SELECT DISTINCT internalID, imageID FROM image WHERE internalID = #{item[0]} ORDER BY imageID ASC"
|
|
result2.each do |item2|
|
|
result2.each do |item2|
|
|
- if(count == @r[3].to_i)
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
result3 = $db.execute "SELECT DISTINCT internalID, imageID, language, label FROM image WHERE internalID = #{item[0]} and imageID =#{item2[1]}"
|
|
result3 = $db.execute "SELECT DISTINCT internalID, imageID, language, label FROM image WHERE internalID = #{item[0]} and imageID =#{item2[1]}"
|
|
|
|
|
|
- result3.each do |item3|
|
|
|
|
- uri = @a[0][:appconf]["wasurl"] + "ui/imageReplacement.php?___image___=" + @r[0].to_s + "/" + item3[0].to_s + "/" + item3[1].to_s + "/" + item3[2].to_s + ".svg"
|
|
|
|
-
|
|
|
|
- @p.each_with_index do |item, index|
|
|
|
|
- if index != 0
|
|
|
|
- uri += "&" + item.name.to_s + "=" + item.value.to_s
|
|
|
|
|
|
+ result3.each do |item3|
|
|
|
|
+
|
|
|
|
+ result4 = $db.execute "SELECT DISTINCT station FROM stationpattern WHERE internalID = #{item3[0]} AND station = #{@r[0]}"
|
|
|
|
+ if(result4[0] != nil)
|
|
|
|
+
|
|
|
|
+ if(count == @r[3].to_i)
|
|
|
|
+
|
|
|
|
+ #ret << @r[0] + "/" + item2[0].to_s + "/" + item2[1].to_s
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ uri = @a[0][:appconf]["wasurl"] + "ui/imageReplacement.php?___image___=" + @r[0].to_s + "/" + item3[0].to_s + "/" + item3[1].to_s + "/" + item3[2].to_s + ".svg"
|
|
|
|
+
|
|
|
|
+ @p.each_with_index do |item, index|
|
|
|
|
+ if index != 0
|
|
|
|
+ uri += "&" + item.name.to_s + "=" + item.value.to_s
|
|
|
|
+ end
|
|
|
|
+ end
|
|
|
|
+
|
|
|
|
+ xml.variant(:lang => item3[2].to_s, :label => item3[3].to_s){
|
|
|
|
+ xml.text(uri)
|
|
|
|
+ }
|
|
end
|
|
end
|
|
|
|
+ count += 1
|
|
end
|
|
end
|
|
-
|
|
|
|
- xml.variant(:lang => item3[2].to_s, :label => item3[3].to_s){
|
|
|
|
- xml.text(uri)
|
|
|
|
- }
|
|
|
|
end
|
|
end
|
|
- end
|
|
|
|
- count += 1
|
|
|
|
|
|
+
|
|
|
|
+
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
@@ -850,8 +873,6 @@ class ListAssignmentSearch < Riddl::Implementation
|
|
def response
|
|
def response
|
|
|
|
|
|
#https://centurio.work/customers/evva/was/ui/TransformProductCode.php?ProductCode=E.A.PZ.DZ-S.31.31.MP.SEP
|
|
#https://centurio.work/customers/evva/was/ui/TransformProductCode.php?ProductCode=E.A.PZ.DZ-S.31.31.MP.SEP
|
|
-
|
|
|
|
-
|
|
|
|
pattern = JSON.parse(Net::HTTP.get URI(@a[0][:appconf]["wasurl"] + "ui/TransformProductCode.php?ProductCode=" + @p[0].value))
|
|
pattern = JSON.parse(Net::HTTP.get URI(@a[0][:appconf]["wasurl"] + "ui/TransformProductCode.php?ProductCode=" + @p[0].value))
|
|
|
|
|
|
#$db.execute "CREATE TABLE IF NOT EXISTS patternassignments(ID INT, AssID INT, type CHARACTER(20), value CHARACTER(20), FOREIGN KEY(ID) REFERENCES assignments(ID) ON DELETE CASCADE)"
|
|
#$db.execute "CREATE TABLE IF NOT EXISTS patternassignments(ID INT, AssID INT, type CHARACTER(20), value CHARACTER(20), FOREIGN KEY(ID) REFERENCES assignments(ID) ON DELETE CASCADE)"
|