8 lines
1.9 KiB
SQL
8 lines
1.9 KiB
SQL
-- Insert STOP tag template
|
|
INSERT INTO `tag_templates` (`TagType`, `Name`, `TemplateConfig`, `TriggerRule`, `IsActive`) VALUES
|
|
('STOP', 'STOP Tag Template', '{"width": "100mm", "height": "150mm", "content": "<div style=\"width: 100mm; height: 150mm; border: 1px solid #000; padding: 10px; font-family: Arial;\"><h2 style=\"text-align: center; color: red;\">STOP</h2><div style=\"margin: 20px 0;\"><strong>Neutral Waybill Number:</strong> {{neutralWaybillNumber}}</div><div style=\"margin: 20px 0;\"><strong>Customer ID:</strong> {{customerId}}</div><div style=\"margin: 20px 0;\"><strong>Trigger Time:</strong> {{triggerTime}}</div><div style=\"margin: 20px 0;\"><strong>Reason:</strong> Not processed for more than 5 days</div></div>", "fields": ["neutralWaybillNumber", "customerId", "triggerTime"]}', '{"type": "time_based", "condition": "first_scan_result == 2 && elapsed_days > 5"}', 1);
|
|
|
|
-- Insert bag tag template
|
|
INSERT INTO `tag_templates` (`TagType`, `Name`, `TemplateConfig`, `TriggerRule`, `IsActive`) VALUES
|
|
('BAG', 'Bag Tag Template', '{"width": "100mm", "height": "150mm", "content": "<div style=\"width: 100mm; height: 150mm; border: 1px solid #000; padding: 10px; font-family: Arial;\"><h2 style=\"text-align: center;\">Bag Tag</h2><div style=\"margin: 20px 0; text-align: center;\"><strong>Tag Number:</strong> {{tagNumber}}</div><div style=\"margin: 20px 0; text-align: center;\" class=\"barcode-container\"><img src=\"data:image/png;base64,{{barcode}}\" alt=\"Barcode\" style=\"max-width: 100%;\"></div><div style=\"margin: 20px 0;\"><strong>Channel:</strong> {{channelName}}</div><div style=\"margin: 20px 0;\"><strong>Package Count:</strong> {{packageCount}}</div><div style=\"margin: 20px 0;\"><strong>Status:</strong> {{status}}</div></div>", "fields": ["tagNumber", "channelName", "packageCount", "status", "barcode"]}', '{"type": "manual", "condition": "bag_tag_exists"}', 1);
|