프로젝트

일반

사용자정보

개정판 c27f9302

IDc27f930283d19746c2f904f36b9d1be97710c585
상위 61414b0f
하위 16ad12a7

김연진이(가) 약 4년 전에 추가함

issue #1060 ValidationCheck 강화

Change-Id: I6f1fc5f412f53e13c9a4f0ee20e5e522009070cd

차이점 보기:

HYTOS/HYTOS/Shapes/EngineeringStreamlineItem.py
173 173
            if self.data.phase_type == 'Mixed':
174 174
                res = None if self.mixed_pressure_variation else [[self, 'need to check pressure variation']]
175 175
            elif self.data.phase_type == 'Liquid':
176
                res = None if self.data.flowrate_volume or self.data.density or self.data.viscosity else \
176
                res = None if self.data.flowrate_volume and self.data.density and self.data.viscosity else \
177 177
                    [[self, 'need to check process data']]
178

  
179
                if not self.data.roughness:
180
                    if res:
181
                        res.append([self, 'need to check roughness data'])
182
                    else:
183
                        res = [[self, 'need to check roughness data']]
178 184
            elif self.data.phase_type == 'Vapor':
179
                res = None if self.data.flowrate_mass or self.data.viscosity else [[self, 'need to check process data']]
185
                    res = None if self.data.flowrate_mass and self.data.viscosity else [[self, 'need to check process data']]
186

  
187
                    if not self.data.roughness:
188
                        if res:
189
                            res.append([self, 'need to check roughness data'])
190
                        else:
191
                            res = [[self, 'need to check roughness data']]
180 192
            else:
181 193
                res = [[self, 'please check phase type']]
182 194

  
HYTOS/HYTOS/StreamDataDialog.py
1838 1838
        # Mixed Type Check
1839 1839
        phase_type = self.ui.comboBox_PhaseType.currentData()
1840 1840
        if phase_type == 'Liquid':
1841
            if is_not_blank(self.ui.lineEdit_Flowrate_Mass_Liquid.text()) and is_not_blank(self.ui.lineEdit_Flowrate_Volume.text()):
1841
            if is_blank(self.ui.lineEdit_Roughness.text()):
1842
                QMessageBox.information(self, self.tr("Information Data Error"), self.tr('Please Input [Roughness]'))
1843
                return
1844
            elif is_not_blank(self.ui.lineEdit_Flowrate_Mass_Liquid.text()) and is_not_blank(self.ui.lineEdit_Flowrate_Volume.text()):
1842 1845
                QMessageBox.information(self, self.tr("Information Data Error"), self.tr("Input only one of Mass Flowrate or Vol. Flowrate"))
1843 1846
                return
1847
        elif phase_type == 'Vapor':
1848
            if is_blank(self.ui.lineEdit_Roughness.text()):
1849
                QMessageBox.information(self, self.tr("Information Data Error"), self.tr('Please Input [Roughness]'))
1850
                return
1844 1851
        elif phase_type == 'Mixed':
1845 1852
            if self.item.mixed_pressure_variation is None:
1846 1853
                QMessageBox.information(self, self.tr("Information"), self.tr("Calculate this line !"))

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)