Merge pull request '用户需求、需求规格统计完成率修正' (#801) from wanjia9506/microservices:kanban_refact into product_refact
This commit is contained in:
commit
9a43dd80fe
|
|
@ -312,9 +312,11 @@ public class PmsDashboardController extends BaseController {
|
|||
resVo.setRatio(0);
|
||||
//计算 各自的比率
|
||||
int sum = statusStatVos.stream().mapToInt(ReqStatusStatVo::getNum).sum();
|
||||
if (sum > 0){
|
||||
Integer reviewedUserReqCount = status2NumMap.getOrDefault(productReqStatus.getName(), 0);
|
||||
resVo.setRatio(reviewedUserReqCount/sum * 100);
|
||||
if (sum > 0) {
|
||||
Integer completedReqSpecsCount = status2NumMap.getOrDefault(productReqStatus.getKey(), 0);
|
||||
double ratioDouble = (double) completedReqSpecsCount / sum * 100;
|
||||
int ratio = (int) Math.round(ratioDouble);
|
||||
resVo.setRatio(ratio);
|
||||
}
|
||||
return resVo;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue