def startJob(newRecord): conn = make_connection() c = conn.cursor() SQL = Q.InsertIntoJobRecord(newRecord) c.execute(SQL) conn.commit() SQL = Q.SelectLastJobRecord() c.execute(SQL) JobIndex = c.fetchone()[0] SQL = Q.InsertInitnialActivity(newRecord, JobIndex) c.execute(SQL) conn.commit() end_connection(conn)
def reformateDate_jobRecord(query): conn = make_connection() c = conn.cursor() SQL = Q.selectDateToUpdate(query) c.execute(SQL) items = c.fetchall() return items
def logActivity(details): conn = make_connection() c = conn.cursor() SQL = Q.InsertActivity(details) c.execute(SQL) conn.commit() end_connection(conn)
def getJobType(): conn = make_connection() c = conn.cursor() SQL = Q.SelectJobType() c.execute(SQL) items = c.fetchall() end_connection(conn) return items
def getNoteStringLength(id): conn = make_connection() c = conn.cursor() SQL = Q.SelectNotesByID(id) c.execute(SQL) items = c.fetchall()[0][0] end_connection(conn) return items
def updateDateField(record, date, query): conn = make_connection() c = conn.cursor() SQL = Q.updateDateFormat(record, date, query) c.execute(SQL) conn.commit() end_connection(conn) return SQL
def getJobTypeCount(routing): conn = make_connection() c = conn.cursor() SQL = Q.SelectJobTypeCount(routing) c.execute(SQL) items = c.fetchone() end_connection(conn) return items
def getCompletedJobsList(query_type): conn = make_connection() c = conn.cursor() SQL = Q.SelectCompletedJobList(query_type) c.execute(SQL) items = c.fetchall() end_connection(conn) return items
def RunningJobsCount(): conn = make_connection() c = conn.cursor() SQL = Q.SelectRunningJobsCount() c.execute(SQL) value = c.fetchone()[0] end_connection(conn) return value
def getTodaysCellCount(): conn = make_connection() c = conn.cursor() SQL = Q.SelectCompleteByWorkCellDaily() c.execute(SQL) items = c.fetchall() end_connection(conn) return items
def updateJobNotes(details): conn = make_connection() c = conn.cursor() SQL = Q.UpdateJobNotes(details) c.execute(SQL) conn.commit() end_connection(conn) return SQL
def getActiveOperators(): conn = make_connection() c = conn.cursor() SQL = Q.SelectActiveOperators() c.execute(SQL) items = c.fetchall() end_connection(conn) return items
def setUpdateForm(JobID): conn = make_connection() c = conn.cursor() SQL = Q.SelectJobToUpdate(JobID) c.execute(SQL) items = c.fetchall() end_connection(conn) return items
def getStatusByID(id): conn = make_connection() c = conn.cursor() SQL = Q.SelectStatusById(id) c.execute(SQL) value = c.fetchone()[0] end_connection(conn) return value
def getFinalOperationByID(id): conn = make_connection() c = conn.cursor() SQL = Q.SelectFinalOperation(id) c.execute(SQL) value = c.fetchone()[0] end_connection(conn) return value
def getCellCountAggregets(): conn = make_connection() c = conn.cursor() SQL = Q.selectCountAggregates() c.execute(SQL) items = c.fetchall() end_connection(conn) return items
def getLastJobRecord(): conn = make_connection() c = conn.cursor() SQL = Q.SelectLastJobRecord() c.execute(SQL) value = c.fetchone()[0] end_connection(conn) return value
def getReport(): conn = make_connection() c = conn.cursor() SQL = Q.SelectNightlyReportQuerey() c.execute(SQL) items = c.fetchall() end_connection(conn) return items
def getJobsCompleteThisWeek(): conn = make_connection() c = conn.cursor() SQL = Q.SelectCompleteThisWeekCount() c.execute(SQL) value = c.fetchone()[0] end_connection(conn) return value
def getRunningJobsList(): conn = make_connection() c = conn.cursor() SQL = Q.SelectRunningJobList() c.execute(SQL) items = c.fetchall() end_connection(conn) return items