Skip to content

Instantly share code, notes, and snippets.

View ovsrohith's full-sized avatar
🎯
Focusing

O V S ROHITH ovsrohith

🎯
Focusing
View GitHub Profile
-- // Yoda Migration---------------
use yoda;
alter table entityDocument add column remarks varchar(255) DEFAULT NULL;
alter table entityDocument add column tags json DEFAULT NULL;
CREATE TABLE `countryInfo` (
`id` varchar(255) NOT NULL,
`currencyCode` varchar(255) NOT NULL,
`currencyName` varchar(255) NOT NULL,
`currencySymbol` varchar(255) NOT NULL,
alter table purchaseOrder add column transactionType varchar(255) null;
update purchaseOrder set transactionType= "BILL_TO_SHIP_TO" where isConsignee = true;
update purchaseOrder set transactionType= "REGULAR" where isConsignee = false or isConsignee is null;
alter table purchaseOrder drop column isConsignee;
*************************** 1. row ***************************
id: 793540714297302452
createdBy: SYSTEM
dateCreated: 1664260711882
isDeleted: 0x00
lastModified: 1664260711882
lastModifiedBy: SYSTEM
organisationId: DEFAULT
entityType: QUALITY_CHECK
template: 8487167~[[${user}]]~[[${quantity}]] [[${unit}]]~[[${sourceType}]]~[[${productName}]]~[[${date}]]~[[${smeAssistLink}]]
@ExcelCell(0)
private String srNo;
// format : dd/MM/yyyy
@ExcelCell(1)
private String dateCreated;
// format : dd/MM/yyyy
@ExcelCell(2)
private String invoiceDate;
package com.assist.analytics.constant;
public class Queries {
public static final String WEIGHTED_PURCHASE_RATE_QUERY =
"SELECT poli.totalPrice, poli.quantity, poli.dateCreated FROM purchaseOrderLineItem poli, purchaseOrder po "
+ "WHERE po.id = poli.purchaseOrderId AND po.purchaseOrderStatus IN ('ACTIVE','COMPLETED') "
+ "AND po.isDeleted=0 AND po.organisationId = %s AND po.dateCreated BETWEEN %s AND %s AND poli.productId = %s";
public static final String WEIGHTED_SALE_RATE_QUERY =
"SELECT ili.totalPrice, ili.quantity, ili.dateCreated FROM invoiceLineItem ili, invoice i "
import mysql.connector
import requests
from datetime import datetime, timedelta
from tabulate import tabulate
# Set the date range for last week
start_date = datetime.now() - timedelta(days=7)
end_date = datetime.now()
# Convert the dates to milliseconds
INSERT INTO `employee` (`id`, `createdBy`, `dateCreated`, `lastModified`, `lastModifiedBy`, `isDeleted`, `fullName`, `mobileNumber`, `emails`, `pan`, `aadharCard`, `dateOfBirth`, `dinNumber`, `dinStatus`, `drivingLicense`, `dscExpiryDate`, `dscStatus`, `gender`, `nationality`, `numberOfDependent`, `passport`, `qualification`, `sonOfDaughterOf`, `voterId`, `whatsappConsent`)
VALUES
('654489219867089911', '654489219867089911', 1611830990154, 1611830990154, '654489219867089911', 0, 'SMEASSIST_SYSTEM', '+919999999993', 'support@smeassist.com', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `employeeOrganisationMapping` (`id`, `createdBy`, `dateCreated`, `lastModified`, `lastModifiedBy`, `isDeleted`, `employeeId`, `organisationId`, `employeeEmailIds`, `employeeName`, `contactRole`, `shareHoldingPercentage`)
VALUES
('654489219867089911', '654489219867089911', 1611831280742, 1611831280742, '654489219867089911', 0, '654489219867089911', '654490438
---------------------- Dec Data --------------------
purchaseIndent
+----------+----------------------------+
| count(1) | name |
+----------+----------------------------+
| 6 | Rohith-Inventory |
| 1 | Constro Solution Inventory |
| 1 | Shree Sidhbali Inventory |