Merge branch 'master' of https://e.coding.net/ctcdevteam/safesite
This commit is contained in:
commit
7c20469ff9
|
@ -964,7 +964,7 @@ def ApiGasPredict(request, element, drainId):
|
|||
.order_by('-create_time')[0:5].values_list(element, flat=True))
|
||||
element_list.reverse()
|
||||
if len(element_list)>=3:
|
||||
result = GM11(np.array(element_list), 3)
|
||||
result = GM11(np.array(element_list), 1)
|
||||
element_list.extend(result['predict']['value'])
|
||||
ret = {"code":1, "data":[round(i,2) for i in element_list]}
|
||||
return JsonResponse(ret)
|
||||
|
|
|
@ -193,11 +193,11 @@ def correct_yjz(year:int, month:int, companyid: int = 0):
|
|||
else:
|
||||
companys = Partment.objects.filter(partid=companyid)
|
||||
for i in companys:
|
||||
yjjs(i.id, first_day, first_day_of_next_month)
|
||||
yjjs_px(i.id, first_day, first_day_of_next_month)
|
||||
yjjs_gc(i.id, first_day, first_day_of_next_month)
|
||||
yjjs_ws(i.id, first_day, first_day_of_next_month)
|
||||
yjjs_yl(i.id, first_day, first_day_of_next_month)
|
||||
yjjs(i.partid, first_day, first_day_of_next_month)
|
||||
yjjs_px(i.partid, first_day, first_day_of_next_month)
|
||||
yjjs_gc(i.partid, first_day, first_day_of_next_month)
|
||||
yjjs_ws(i.partid, first_day, first_day_of_next_month)
|
||||
yjjs_yl(i.partid, first_day, first_day_of_next_month)
|
||||
|
||||
@shared_task
|
||||
def ycjs():
|
||||
|
@ -207,7 +207,7 @@ def ycjs():
|
|||
nowmonth = datetime.datetime.now().month
|
||||
objs = Yjyc.objects.exclude(yjz=0,year=nowyear,month=nowmonth)
|
||||
for x in companys:
|
||||
obj = objs.filter(usecomp=x).order_by('-yjycid')[-6:] # 只取半年内的
|
||||
obj = objs.filter(usecomp=x).order_by('-yjycid')[0:5] # 只取半年内的
|
||||
objv = obj.values('yjycid','yjz')
|
||||
#print(objv)
|
||||
if len(obj)>1:
|
||||
|
|
Loading…
Reference in New Issue