小程序数据统计小数点处理
This commit is contained in:
parent
30bc3affd9
commit
3d0d4d3256
|
|
@ -446,7 +446,8 @@
|
||||||
|
|
||||||
<!--履职详情-->
|
<!--履职详情-->
|
||||||
<select id="factorDetail" resultMap="ResultMapWithBLOBs">
|
<select id="factorDetail" resultMap="ResultMapWithBLOBs">
|
||||||
SELECT * FROM ListDetail ld
|
SELECT ld.*,ot.Subject taskName FROM ListDetail ld
|
||||||
|
left join oatask ot on ld.task_id = ot.OATaskId
|
||||||
WHERE ld.ListFactorId = #{listFactorId}
|
WHERE ld.ListFactorId = #{listFactorId}
|
||||||
and ld.del_state = 1
|
and ld.del_state = 1
|
||||||
ORDER BY ld.EndTime ASC
|
ORDER BY ld.EndTime ASC
|
||||||
|
|
@ -478,7 +479,9 @@
|
||||||
|
|
||||||
<!--履职记录详情-->
|
<!--履职记录详情-->
|
||||||
<select id="findById" resultMap="ResultMapWithBLOBs">
|
<select id="findById" resultMap="ResultMapWithBLOBs">
|
||||||
SELECT * FROM ListDetail ld WHERE ld.`ListDetailId` = #{listDetailId}
|
SELECT ld.*,ot.Subject taskName FROM ListDetail ld
|
||||||
|
left join oatask ot on ld.task_id = ot.OATaskId
|
||||||
|
WHERE ld.`ListDetailId` = #{listDetailId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--履职记录-->
|
<!--履职记录-->
|
||||||
|
|
|
||||||
|
|
@ -832,7 +832,7 @@ public class PcBusinessService extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public SingleResult entPostListPercentStatistic(String enterpriseId,String listId,Integer year){
|
public SingleResult entPostListPercentStatistic(String enterpriseId,String listId,Integer year)throws Exception{
|
||||||
SingleResult singleResult = new SingleResult();
|
SingleResult singleResult = new SingleResult();
|
||||||
HashMap map = new HashMap();
|
HashMap map = new HashMap();
|
||||||
long total = entPostTaskMapper.selectEntPostTaskTotal(enterpriseId,listId,year);
|
long total = entPostTaskMapper.selectEntPostTaskTotal(enterpriseId,listId,year);
|
||||||
|
|
@ -840,10 +840,13 @@ public class PcBusinessService extends BaseController {
|
||||||
EntPostTaskStatistic entPostTaskStatistic = entPostTaskMapper.selectEntPostTaskByState(enterpriseId,listId,year);
|
EntPostTaskStatistic entPostTaskStatistic = entPostTaskMapper.selectEntPostTaskByState(enterpriseId,listId,year);
|
||||||
if (null != entPostTaskStatistic){
|
if (null != entPostTaskStatistic){
|
||||||
double finishPercent = Arith.div(entPostTaskStatistic.getFinished(),total) * 100;
|
double finishPercent = Arith.div(entPostTaskStatistic.getFinished(),total) * 100;
|
||||||
|
finishPercent = TypeConversion.decimalFormat(finishPercent,2);
|
||||||
map.put("finished",finishPercent);
|
map.put("finished",finishPercent);
|
||||||
double unfinishedPercent = Arith.div(entPostTaskStatistic.getOvertime(),total) * 100;
|
double unfinishedPercent = Arith.div(entPostTaskStatistic.getOvertime(),total) * 100;
|
||||||
|
unfinishedPercent = TypeConversion.decimalFormat(unfinishedPercent,2);
|
||||||
map.put("unfinished",unfinishedPercent);
|
map.put("unfinished",unfinishedPercent);
|
||||||
double haveInHand = Arith.div(entPostTaskStatistic.getHaveInHand(),total) * 100;
|
double haveInHand = Arith.div(entPostTaskStatistic.getHaveInHand(),total) * 100;
|
||||||
|
haveInHand = TypeConversion.decimalFormat(haveInHand,2);
|
||||||
map.put("haveInHand",haveInHand);
|
map.put("haveInHand",haveInHand);
|
||||||
//数量
|
//数量
|
||||||
map.put("finishNumber",entPostTaskStatistic.getFinished());
|
map.put("finishNumber",entPostTaskStatistic.getFinished());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user