|
@ -12,6 +12,7 @@ import com.epmet.datareport.service.evaluationindex.screen.AgencyService; |
|
|
import com.epmet.datareport.service.evaluationindex.screen.GrassrootsPartyDevService; |
|
|
import com.epmet.datareport.service.evaluationindex.screen.GrassrootsPartyDevService; |
|
|
import com.epmet.datareport.utils.DateUtils; |
|
|
import com.epmet.datareport.utils.DateUtils; |
|
|
import com.epmet.datareport.utils.ModuleConstant; |
|
|
import com.epmet.datareport.utils.ModuleConstant; |
|
|
|
|
|
import com.epmet.evaluationindex.screen.constant.ScreenConstant; |
|
|
import com.epmet.evaluationindex.screen.dto.form.BranchBuildRankFormDTO; |
|
|
import com.epmet.evaluationindex.screen.dto.form.BranchBuildRankFormDTO; |
|
|
import com.epmet.evaluationindex.screen.dto.form.BranchBuildTrendFormDTO; |
|
|
import com.epmet.evaluationindex.screen.dto.form.BranchBuildTrendFormDTO; |
|
|
import com.epmet.evaluationindex.screen.dto.form.ParymemberFormDTO; |
|
|
import com.epmet.evaluationindex.screen.dto.form.ParymemberFormDTO; |
|
@ -78,7 +79,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService |
|
|
if(null == result.getPlatFormTotal() || NumConstant.ZERO == result.getPlatFormTotal()){ |
|
|
if(null == result.getPlatFormTotal() || NumConstant.ZERO == result.getPlatFormTotal()){ |
|
|
result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); |
|
|
result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); |
|
|
}else{ |
|
|
}else{ |
|
|
result.setPercentInPlatForm(convertPercentStr(new BigDecimal((result.getPartyMemberTotal().doubleValue()/result.getPlatFormTotal().doubleValue())))); |
|
|
result.setPercentInPlatForm(getRatio(result.getPartyMemberTotal(),result.getPlatFormTotal())); |
|
|
} |
|
|
} |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
@ -96,11 +97,21 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService |
|
|
if(null == result.getPlatFormTotal() || NumConstant.ZERO == result.getPlatFormTotal()){ |
|
|
if(null == result.getPlatFormTotal() || NumConstant.ZERO == result.getPlatFormTotal()){ |
|
|
result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); |
|
|
result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); |
|
|
}else{ |
|
|
}else{ |
|
|
result.setPercentInPlatForm(convertPercentStr(new BigDecimal((result.getPartyMemberTotal().doubleValue()/result.getPlatFormTotal().doubleValue())))); |
|
|
result.setPercentInPlatForm(getRatio(result.getPartyMemberTotal(),result.getPlatFormTotal())); |
|
|
} |
|
|
} |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getRatio(Integer partyMemberTotal, Integer platFormTotal){ |
|
|
|
|
|
if (null == partyMemberTotal || null == platFormTotal || partyMemberTotal == NumConstant.ZERO || platFormTotal == NumConstant.ZERO){ |
|
|
|
|
|
return "0.00%"; |
|
|
|
|
|
} |
|
|
|
|
|
BigDecimal aDecimal = new BigDecimal(partyMemberTotal); |
|
|
|
|
|
BigDecimal bDecimal = new BigDecimal(platFormTotal); |
|
|
|
|
|
BigDecimal result = aDecimal.divide(bDecimal, NumConstant.FOUR, BigDecimal.ROUND_HALF_UP); |
|
|
|
|
|
return result.multiply(NumConstant.ONE_HUNDRED_DECIMAL).setScale(NumConstant.TWO,BigDecimal.ROUND_HALF_UP).toPlainString().concat(ScreenConstant.RATIO); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @Description 2、党员基本情况-年龄分布 |
|
|
* @Description 2、党员基本情况-年龄分布 |
|
|
* @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321980
|
|
|
* @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321980
|
|
|