更新报名信息管理人数统计情况
This commit is contained in:
parent
120d73be5e
commit
a51c49e2f6
@ -44,6 +44,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@ -724,6 +725,7 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl
|
|||||||
query.put("applyWorkTypeId",workerCatalog);
|
query.put("applyWorkTypeId",workerCatalog);
|
||||||
List<String> applyAuditStates = new ArrayList<>();
|
List<String> applyAuditStates = new ArrayList<>();
|
||||||
applyAuditStates.add("0");
|
applyAuditStates.add("0");
|
||||||
|
applyAuditStates.add("-1");
|
||||||
applyAuditStates.add("2");
|
applyAuditStates.add("2");
|
||||||
query.put("applyAuditStates",applyAuditStates);
|
query.put("applyAuditStates",applyAuditStates);
|
||||||
List<ApplyDTO> all = applyService.list(query);
|
List<ApplyDTO> all = applyService.list(query);
|
||||||
@ -734,6 +736,16 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl
|
|||||||
query.put("applyAuditStates",applyAuditStates);
|
query.put("applyAuditStates",applyAuditStates);
|
||||||
List<ApplyDTO> pass = applyService.list(query);
|
List<ApplyDTO> pass = applyService.list(query);
|
||||||
res.put("signUpPassCounts",pass.size());
|
res.put("signUpPassCounts",pass.size());
|
||||||
|
// 计算通过率
|
||||||
|
double ratio = 0L;
|
||||||
|
double x = Double.parseDouble(pass.size() + "");
|
||||||
|
double y = Double.parseDouble(all.size() + "");
|
||||||
|
if(y == 0L){
|
||||||
|
res.put("ratio","0.00");
|
||||||
|
} else {
|
||||||
|
BigDecimal bigDecimal = new BigDecimal(( x / y ) * 100);
|
||||||
|
res.put("ratio", bigDecimal.setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -38,8 +38,8 @@
|
|||||||
<div class="layui-col-md4 layui-col-xs4">
|
<div class="layui-col-md4 layui-col-xs4">
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-header" style="background-color: #d7dee2">
|
<div class="layui-card-header" style="background-color: #d7dee2">
|
||||||
<span id="totalSignUpUser">总计人数</span>
|
<span id="totalSignUpUser">通过率</span>
|
||||||
<span id="totalSignUpUserNumber" class="layui-badge layui-bg-cyan layuiadmin-badge">- 人</span>
|
<span id="ratio" class="layui-badge layui-bg-cyan layuiadmin-badge">-</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -111,7 +111,9 @@
|
|||||||
var loadIndex = layer.load(1);
|
var loadIndex = layer.load(1);
|
||||||
top.restAjax.get(top.restAjax.path('api/classplan/get-exam-check-type', []),
|
top.restAjax.get(top.restAjax.path('api/classplan/get-exam-check-type', []),
|
||||||
{orgId: orgId, workerCatalog : workerCatalog}, null, function (code, data) {
|
{orgId: orgId, workerCatalog : workerCatalog}, null, function (code, data) {
|
||||||
if(data.checkType != '1'){
|
if(data.checkType == '1'){
|
||||||
|
$('#class-plan-btn-event').show();
|
||||||
|
} else {
|
||||||
$('#class-plan-btn-event').hide();
|
$('#class-plan-btn-event').hide();
|
||||||
}
|
}
|
||||||
layer.close(loadIndex);
|
layer.close(loadIndex);
|
||||||
@ -144,14 +146,13 @@
|
|||||||
{orgId : orgId,workerCatalog : workerCatalog}, null, function (code, data) {
|
{orgId : orgId,workerCatalog : workerCatalog}, null, function (code, data) {
|
||||||
var signUpCounts = data.signUpCounts;
|
var signUpCounts = data.signUpCounts;
|
||||||
var signUpPassCounts = data.signUpPassCounts;
|
var signUpPassCounts = data.signUpPassCounts;
|
||||||
|
var ratio = data.ratio;
|
||||||
$('#signUpCounts').html(signUpCounts + " 人");
|
$('#signUpCounts').html(signUpCounts + " 人");
|
||||||
$('#signUpPassCounts').html(signUpPassCounts + " 人");
|
$('#signUpPassCounts').html(signUpPassCounts + " 人");
|
||||||
if(typeof (workerCatalog) === 'undefined' || workerCatalog == ''){
|
if(typeof (workerCatalog) === 'undefined' || workerCatalog == ''){
|
||||||
$('#totalSignUpUser').text('总计人数');
|
$('#ratio').text(ratio + '%');
|
||||||
$('#totalSignUpUserNumber').text(signUpCounts + signUpPassCounts + ' 人');
|
|
||||||
} else {
|
} else {
|
||||||
$('#totalSignUpUser').text('预计人数');
|
$('#ratio').text(ratio + '%');
|
||||||
$('#totalSignUpUserNumber').text('50 人');
|
|
||||||
}
|
}
|
||||||
}, function (code, data) {
|
}, function (code, data) {
|
||||||
top.dialog.msg(data.msg);
|
top.dialog.msg(data.msg);
|
||||||
@ -337,6 +338,7 @@
|
|||||||
height: $win.height() - 115,
|
height: $win.height() - 115,
|
||||||
});
|
});
|
||||||
getExamCheckType();
|
getExamCheckType();
|
||||||
|
getSignUserCounts();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化日期
|
// 初始化日期
|
||||||
|
Loading…
Reference in New Issue
Block a user