| | |
| | | a.basic_mtbf_regulate_tmp |
| | | WHEN a.reliab_distrib_type = 3 THEN |
| | | a.basic_unit_num * a.basic_mtbf_operating_ratio / |
| | | a.basic_mtbf_regul_succ_rate |
| | | a.basic_mtbf_regulate_tmp |
| | | ELSE 0 END |
| | | ) AS WeightedFailure, |
| | | sum( |
| | |
| | | a.basic_mtbf_regulate_tmp |
| | | WHEN a.repairable = 1 and a.reliab_distrib_type = 3 THEN |
| | | a.basic_unit_num * a.basic_mtbf_operating_ratio * a.repair_mttcr / |
| | | a.basic_mtbf_regul_succ_rate |
| | | a.basic_mtbf_regulate_tmp |
| | | ELSE 0 |
| | | END |
| | | ) AS WeightedMttr |
| | |
| | | where b.ship_id = ${shipId}; |
| | | |
| | | UPDATE param_data a, product_model b |
| | | SET basic_mtbf_regulate_tmp = basic_runs_num / basic_mtbf_regul_succ_rate |
| | | SET basic_mtbf_regulate_tmp = basic_mtbf_regul_succ_rate/(1-basic_mtbf_regul_succ_rate) |
| | | where b.ship_id = ${shipId} |
| | | and reliab_distrib_type = 3 |
| | | </update> |
| | |
| | | where b.ship_id = ${shipId} |
| | | and a.product_id = b.id |
| | | and a.basic_join_compute = 1 |
| | | and b.product_type = 5 |
| | | group by b.pid |
| | | ) b |
| | | set a.basic_join_compute = b.basic_join_compute |
| | | where a.product_id = b.pid; |
| | | |
| | | UPDATE param_data a,( |
| | | select pid, case when count(1) > 0 then 1 else 0 end as basic_join_compute |
| | | from param_data a, |
| | | product_model b |
| | | where b.ship_id = ${shipId} |
| | | and a.product_id = b.id |
| | | and a.basic_join_compute = 1 |
| | | and b.product_type = 4 |
| | | group by b.pid |
| | | ) b |
| | | set a.basic_join_compute = b.basic_join_compute |
| | | where a.product_id = b.pid; |
| | | |
| | | UPDATE param_data a,( |
| | | select pid, case when count(1) > 0 then 1 else 0 end as basic_join_compute |
| | | from param_data a, |
| | | product_model b |
| | | where b.ship_id = ${shipId} |
| | | and a.product_id = b.id |
| | | and a.basic_join_compute = 1 |
| | | and b.product_type = 3 |
| | | group by b.pid |
| | | ) b |
| | | set a.basic_join_compute = b.basic_join_compute |