1
0

2 Коммитууд 60b6cef744 ... f7fa3fab2f

Эзэн SHA1 Мессеж Огноо
  mingyue-unimat f7fa3fab2f Merge remote-tracking branch 'origin/master' 1 долоо хоног өмнө
  mingyue-unimat 57e2d762e7 输入数据空值判断增加null 1 долоо хоног өмнө

+ 6 - 4
calculation/calculation_process.py

@@ -11,24 +11,26 @@ class CalculationProcess(object):
 
     def pre_to_temp(self):
         if self.dict_input["evapPre"] and not self.dict_input["evapTemp"]:
-            self.dict_input["evapTemp"] = PropsSI('T', 'P', self.dict_input['evapTemp']*1000,
+            self.dict_input["evapTemp"] = PropsSI('T', 'P', self.dict_input['evapPre']*1000 + 101325,
                                                   'Q', 1, self.dict_input['refrigerant']) - 273.15
         if self.dict_input["condPre"] and not self.dict_input["condTemp"]:
-            self.dict_input["condTemp"] = PropsSI('T', 'P', self.dict_input['condTemp']*1000,
+            self.dict_input["condTemp"] = PropsSI('T', 'P', self.dict_input['condPre']*1000 + 101325,
                                                   'Q', 1, self.dict_input['refrigerant']) - 273.15
+        if self.dict_input["evapTemp"] and not self.dict_input["sucTemp"]:
+            self.dict_input["sucTemp"] = self.dict_input["evapTemp"]
 
     def judge_null(self):
         Num = 0
         self.pre_to_temp()
         for k in self.dict_input:
-            if self.dict_input[k] == '':
+            if self.dict_input[k] == '' or not self.dict_input[k]:
                 Num += 1
         return Num
 
     def cop_calculation(self):
         dtm = DischargeTempModified(self.dict_input)
         self.dict_input = dtm.discharge_temp_modified()
-        pc=PerformanceCalculation(self.dict_input)
+        pc = PerformanceCalculation(self.dict_input)
         self.is_success, self.results_depict, self.results = pc.performance_calculation()
         return None