def removeRecord(oid): guguDao = mongoDao() guguDao.remove_a_record(oid) return ""
def saveRecord(): content = request.json content['pcs'] = int(content['pcs']) guguDao = mongoDao() guguDao.add_a_record(content) return ""
def precaculate_pcs(targetPn, opType, pcs): guguDao = mongoDao() f = guguDao.pre_saving_test(targetPn, pcs, opType) return str(f)
def bomByPn(pn): if __isLogined(): guguDao = mongoDao() records = guguDao.read_records_by_pn(pn) return render_template('bom.html', data = records, leaf_level = True, not_bom = True) return redirect('/login')
def summary(): guguDao = mongoDao() w = guguDao.aggregrate_records() return render_template('summary.html', data = w)