Merge branch 'baotou-signup' of e.coding.net:tsteam/btsaqscksfwpt/system-examination-signup into baotou-signup
This commit is contained in:
commit
120d73be5e
@ -5,6 +5,7 @@ import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO
|
|||||||
import cn.com.tenlion.institutionmanagement.service.institution.IInstitutionService;
|
import cn.com.tenlion.institutionmanagement.service.institution.IInstitutionService;
|
||||||
import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO;
|
import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO;
|
||||||
import cn.com.tenlion.pojo.dtos.examapply.ExamApplyDTO;
|
import cn.com.tenlion.pojo.dtos.examapply.ExamApplyDTO;
|
||||||
|
import cn.com.tenlion.pojo.dtos.traininginstitutionworktype.TrainingInstitutionWorkTypeDTO;
|
||||||
import cn.com.tenlion.service.apply.IApplyService;
|
import cn.com.tenlion.service.apply.IApplyService;
|
||||||
import cn.com.tenlion.service.classplan.IClassPlanService;
|
import cn.com.tenlion.service.classplan.IClassPlanService;
|
||||||
import cn.com.tenlion.service.examapply.IExamApplyService;
|
import cn.com.tenlion.service.examapply.IExamApplyService;
|
||||||
@ -13,6 +14,8 @@ import cn.com.tenlion.service.examinationuser.IExaminationService;
|
|||||||
import cn.com.tenlion.service.lessons.ILessonsService;
|
import cn.com.tenlion.service.lessons.ILessonsService;
|
||||||
import cn.com.tenlion.service.teacher.ITeacherService;
|
import cn.com.tenlion.service.teacher.ITeacherService;
|
||||||
import cn.com.tenlion.service.traininginstitutionuser.ITrainingInstitutionUserService;
|
import cn.com.tenlion.service.traininginstitutionuser.ITrainingInstitutionUserService;
|
||||||
|
import cn.com.tenlion.service.traininginstitutionworktype.ITrainingInstitutionWorkTypeService;
|
||||||
|
import cn.com.tenlion.service.worktype.IWorkTypeService;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.common.component.SecurityComponent;
|
import ink.wgink.common.component.SecurityComponent;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
@ -65,6 +68,8 @@ public class IndexCountController extends DefaultBaseController {
|
|||||||
private IExamCheckService examCheckService;
|
private IExamCheckService examCheckService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IExamApplyService examApplyService;
|
private IExamApplyService examApplyService;
|
||||||
|
@Autowired
|
||||||
|
private ITrainingInstitutionWorkTypeService TrainingInstitutionWorkTypeService;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "统计当前登录机构报名数量", notes = "统计当前登录机构报名数量接口")
|
@ApiOperation(value = "统计当前登录机构报名数量", notes = "统计当前登录机构报名数量接口")
|
||||||
@ -213,10 +218,10 @@ public class IndexCountController extends DefaultBaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "统计当前机构计划报名人数", notes = "统计当前机构计划报名人数")
|
@ApiOperation(value = "统计培训机构绑定工种的报名情况", notes = "统计培训机构绑定工种的报名情况")
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@GetMapping("count-plan-apply-user-num")
|
@GetMapping("count-work-type-apply-user-num")
|
||||||
public SuccessResultData<Map<String, Object>> countPlanApplyUserNum(){
|
public SuccessResultData<Map<String, Object>> countWorkTypeApplyUserNum(){
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
List<String> title = new ArrayList<>();//计划名称
|
List<String> title = new ArrayList<>();//计划名称
|
||||||
List<String> data0 = new ArrayList<>();//待审核
|
List<String> data0 = new ArrayList<>();//待审核
|
||||||
@ -226,11 +231,11 @@ public class IndexCountController extends DefaultBaseController {
|
|||||||
List<String> data4 = new ArrayList<>();//审核不通过
|
List<String> data4 = new ArrayList<>();//审核不通过
|
||||||
String institutionId = this.getInstitutionId();
|
String institutionId = this.getInstitutionId();
|
||||||
if(!StringUtils.isBlank(institutionId)){
|
if(!StringUtils.isBlank(institutionId)){
|
||||||
map.put("orgId",institutionId);
|
map.put("institutionId",institutionId);
|
||||||
List<ClassPlanDTO> list = classPlanService.list(map);
|
List<TrainingInstitutionWorkTypeDTO> trainingInstitutionWorkTypeDTOS = TrainingInstitutionWorkTypeService.list(map);
|
||||||
for (ClassPlanDTO classPlanDTO : list) {
|
for (TrainingInstitutionWorkTypeDTO trainingInstitutionWorkTypeDTO : trainingInstitutionWorkTypeDTOS) {
|
||||||
Map<String, Object> planMap = applyService.countWeekNum("",institutionId,classPlanDTO.getClassPlanId());
|
Map<String, Object> planMap = applyService.countWeekNum("",institutionId,trainingInstitutionWorkTypeDTO.getWorkTypeId());
|
||||||
title.add(classPlanDTO.getPlanName());
|
title.add(trainingInstitutionWorkTypeDTO.getWorkTypeName());
|
||||||
data0.add(planMap.get("0").toString());
|
data0.add(planMap.get("0").toString());
|
||||||
data1.add(planMap.get("1").toString());
|
data1.add(planMap.get("1").toString());
|
||||||
data2.add(planMap.get("2").toString());
|
data2.add(planMap.get("2").toString());
|
||||||
|
@ -118,7 +118,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
|||||||
if(sourceInstitutionDTO == null){
|
if(sourceInstitutionDTO == null){
|
||||||
throw new SearchException("未查询到源机构信息");
|
throw new SearchException("未查询到源机构信息");
|
||||||
}
|
}
|
||||||
auditLogVO.setApplyAuditExplain("【因报名人数不足】 报名培训机构 由原【"+sourceInstitutionDTO.getInstitutionName()+"】培训机构 调整到【"+institutionDTO.getInstitutionName()+"】培训机构");
|
auditLogVO.setApplyAuditExplain("【因报名人数不足,无法开班】 报名培训机构 由原【"+sourceInstitutionDTO.getInstitutionName()+"】培训机构 调整到【"+institutionDTO.getInstitutionName()+"】培训机构");
|
||||||
applyAuditLogService.save(null,auditLogVO);
|
applyAuditLogService.save(null,auditLogVO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -374,7 +374,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
|||||||
throw new SaveException("您已报名过该机构");
|
throw new SaveException("您已报名过该机构");
|
||||||
}
|
}
|
||||||
if(checkApplyIsFirst(creator,applyWorkTypeId,null) != 0){
|
if(checkApplyIsFirst(creator,applyWorkTypeId,null) != 0){
|
||||||
throw new SaveException("您选择的工种已报名过其他培训机构");
|
throw new SaveException("您选择的工种已经报名过其他培训机构!请勿重复报名");
|
||||||
}
|
}
|
||||||
if(!examCheckService.getExamCheckFailOrBack(applyWorkTypeId,applyInstitutionId)){
|
if(!examCheckService.getExamCheckFailOrBack(applyWorkTypeId,applyInstitutionId)){
|
||||||
throw new SaveException("该机构暂时不能报名");
|
throw new SaveException("该机构暂时不能报名");
|
||||||
@ -423,9 +423,12 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
|||||||
if(!(applyDTO.getApplyAuditState() == -1 || applyDTO.getApplyAuditState() == 1)){
|
if(!(applyDTO.getApplyAuditState() == -1 || applyDTO.getApplyAuditState() == 1)){
|
||||||
throw new SearchException("暂不能修改信息");
|
throw new SearchException("暂不能修改信息");
|
||||||
}
|
}
|
||||||
// if(checkApplyIsFirst(creator,applyWorkTypeId,null) != 0){
|
// if(!(applyDTO.getApplyInstitutionId().equals(applyInstitutionId) && applyDTO.getApplyWorkTypeId().equals(applyWorkTypeId))){
|
||||||
// throw new SaveException("您选择的工种已报名过其他培训机构");
|
// throw new SaveException("您选择的工种已经在其他培训机构报名过!请勿重新报名");
|
||||||
// }
|
// }
|
||||||
|
if(checkApplyIsFirst(creator,applyWorkTypeId,null) != 0){
|
||||||
|
throw new SaveException("您选择的工种已经在其他培训机构报名过!请勿重新报名");
|
||||||
|
}
|
||||||
|
|
||||||
if(!examCheckService.getExamCheckFailOrBack(applyWorkTypeId,applyInstitutionId)){
|
if(!examCheckService.getExamCheckFailOrBack(applyWorkTypeId,applyInstitutionId)){
|
||||||
throw new SaveException("该机构以截止报名");
|
throw new SaveException("该机构以截止报名");
|
||||||
@ -620,9 +623,9 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
|||||||
params.put("creator",creator);
|
params.put("creator",creator);
|
||||||
List<String> applyAuditStates = new ArrayList<>();
|
List<String> applyAuditStates = new ArrayList<>();
|
||||||
applyAuditStates.add("0");
|
applyAuditStates.add("0");
|
||||||
applyAuditStates.add("1");
|
//applyAuditStates.add("1");
|
||||||
applyAuditStates.add("2");
|
applyAuditStates.add("2");
|
||||||
applyAuditStates.add("-1");
|
//applyAuditStates.add("-1");
|
||||||
params.put("applyAuditStates",applyAuditStates);
|
params.put("applyAuditStates",applyAuditStates);
|
||||||
return count(params);
|
return count(params);
|
||||||
}
|
}
|
||||||
@ -668,13 +671,12 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Map<String, Object> countWeekNum(String weekTime,String applyInstitutionId,String applyClassId) {
|
public Map<String, Object> countWeekNum(String weekTime,String applyInstitutionId,String applyWorkTypeId) {
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("weekTime",weekTime);
|
params.put("weekTime",weekTime);
|
||||||
params.put("applyInstitutionId",applyInstitutionId);
|
params.put("applyInstitutionId",applyInstitutionId);
|
||||||
params.put("applyClassId",applyClassId);
|
params.put("applyWorkTypeId",applyWorkTypeId);
|
||||||
Map<String, Object> result = applyDao.countWeekNum(params);
|
Map<String, Object> result = applyDao.countWeekNum(params);
|
||||||
|
|
||||||
if(result == null){
|
if(result == null){
|
||||||
params.clear();
|
params.clear();
|
||||||
params.put("0",0);
|
params.put("0",0);
|
||||||
|
@ -20,6 +20,14 @@ import java.util.Map;
|
|||||||
**/
|
**/
|
||||||
public interface IWorkTypeService {
|
public interface IWorkTypeService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询报名工种
|
||||||
|
* @param workTypeParentId
|
||||||
|
* @param resultList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<WorkTypeZTreeDTO> countListWorkType(String workTypeParentId, List<WorkTypeZTreeDTO> resultList);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工种类型树形列表
|
* 工种类型树形列表
|
||||||
|
@ -35,6 +35,28 @@ public class WorkTypeServiceImpl extends DefaultBaseService implements IWorkType
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IWorkTypeDao workTypeDao;
|
private IWorkTypeDao workTypeDao;
|
||||||
|
|
||||||
|
public List<WorkTypeZTreeDTO> countListWorkType(String workTypeParentId, List<WorkTypeZTreeDTO> resultList){
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("workTypeParentId",workTypeParentId);
|
||||||
|
List<WorkTypeZTreeDTO> list = workTypeDao.listZTree(params);
|
||||||
|
for (WorkTypeZTreeDTO workTypeZTreeDTO : list) {
|
||||||
|
Map<String,Object> data = new HashMap<>();
|
||||||
|
data.put("workTypeParentId",workTypeZTreeDTO.getId());
|
||||||
|
Integer count = count(data);
|
||||||
|
if (count > 0){
|
||||||
|
this.countListWorkType(workTypeZTreeDTO.getId(),resultList);
|
||||||
|
}else{
|
||||||
|
resultList.add(workTypeZTreeDTO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<WorkTypeZTreeDTO> listZTree(Map<String, Object> params){
|
public List<WorkTypeZTreeDTO> listZTree(Map<String, Object> params){
|
||||||
List<WorkTypeZTreeDTO> list = workTypeDao.listZTree(params);
|
List<WorkTypeZTreeDTO> list = workTypeDao.listZTree(params);
|
||||||
|
@ -693,6 +693,9 @@
|
|||||||
<if test="applyClassId != null and applyClassId != ''">
|
<if test="applyClassId != null and applyClassId != ''">
|
||||||
AND apply_class_id = #{applyClassId}
|
AND apply_class_id = #{applyClassId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="applyWorkTypeId != null and applyWorkTypeId != ''">
|
||||||
|
AND apply_work_type_id = #{applyWorkTypeId}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
@ -374,10 +374,10 @@
|
|||||||
// 提交表单
|
// 提交表单
|
||||||
form.on('submit(submitForm1)', function(formData) {
|
form.on('submit(submitForm1)', function(formData) {
|
||||||
var applyAuditFileId = formData.field.applyAuditFileId;
|
var applyAuditFileId = formData.field.applyAuditFileId;
|
||||||
if(applyAuditFileId == ''){
|
// if(applyAuditFileId == ''){
|
||||||
top.dialog.msg('请上传交费凭证')
|
// top.dialog.msg('请上传交费凭证')
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
saveDataVal['applyId'] = applyId;
|
saveDataVal['applyId'] = applyId;
|
||||||
saveDataVal['applyAuditExplain'] = formData.field.applyAuditExplain;
|
saveDataVal['applyAuditExplain'] = formData.field.applyAuditExplain;
|
||||||
saveDataVal['applyAuditFileId'] = applyAuditFileId;
|
saveDataVal['applyAuditFileId'] = applyAuditFileId;
|
||||||
|
@ -38,23 +38,15 @@
|
|||||||
<button type="button" class="layui-btn layui-btn-success layui-btn-sm" lay-event="saveEvent">
|
<button type="button" class="layui-btn layui-btn-success layui-btn-sm" lay-event="saveEvent">
|
||||||
<i class="fa fa-lg fa-plus"></i> 新增
|
<i class="fa fa-lg fa-plus"></i> 新增
|
||||||
</button>
|
</button>
|
||||||
</div>
|
|
||||||
<div class="layui-btn-group">
|
|
||||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
||||||
<i class="fa fa-lg fa-edit"></i> 编辑
|
<i class="fa fa-lg fa-edit"></i> 编辑
|
||||||
</button>
|
</button>
|
||||||
</div>
|
|
||||||
<div class="layui-btn-group">
|
|
||||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||||
<i class="fa fa-lg fa-trash"></i> 删除
|
<i class="fa fa-lg fa-trash"></i> 删除
|
||||||
</button>
|
</button>
|
||||||
</div>
|
|
||||||
<div class="layui-btn-group">
|
|
||||||
<button type="button" class="layui-btn layui-btn-success layui-btn-sm" lay-event="institutionButton">
|
<button type="button" class="layui-btn layui-btn-success layui-btn-sm" lay-event="institutionButton">
|
||||||
<i class="fa fa-lg fa-home"></i> 考场管理
|
<i class="fa fa-lg fa-home"></i> 考场管理
|
||||||
</button>
|
</button>
|
||||||
</div>
|
|
||||||
<div class="layui-btn-group">
|
|
||||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="institutionUserButton">
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="institutionUserButton">
|
||||||
<i class="fa fa-lg fa-user"></i> 考试机构人员管理
|
<i class="fa fa-lg fa-user"></i> 考试机构人员管理
|
||||||
</button>
|
</button>
|
||||||
|
@ -104,7 +104,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layui-col-sm6 layui-col-md6">
|
<div class="layui-col-sm6 layui-col-md6">
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-header">培训计划报名情况</div>
|
<div class="layui-card-header">工种报名情况</div>
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<div id="planApplyUserNumEChart" style="width: 100%; height: 300px;"></div>
|
<div id="planApplyUserNumEChart" style="width: 100%; height: 300px;"></div>
|
||||||
</div>
|
</div>
|
||||||
@ -372,7 +372,8 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
initPlanApplyUserNumEChart: function(){
|
initPlanApplyUserNumEChart: function(){
|
||||||
top.restAjax.get('api/indexcount/count-plan-apply-user-num', {}, null, function(code, data) {
|
top.restAjax.get('api/indexcount/count-work-type-apply-user-num', {}, null, function(code, data) {
|
||||||
|
console.log(data.data)
|
||||||
self.planApplyUserNumEChart = echarts.init(document.getElementById('planApplyUserNumEChart'));
|
self.planApplyUserNumEChart = echarts.init(document.getElementById('planApplyUserNumEChart'));
|
||||||
self.planApplyUserNumEChart.setOption(
|
self.planApplyUserNumEChart.setOption(
|
||||||
{
|
{
|
||||||
@ -393,7 +394,11 @@
|
|||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: data.data.title //计划名称
|
data: data.data.title, //计划名称
|
||||||
|
axisLabel: {
|
||||||
|
interval: 0,
|
||||||
|
rotate: 40
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
@ -480,7 +485,6 @@
|
|||||||
$('#applyClassId').append(options);
|
$('#applyClassId').append(options);
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
$('#applyClassId').on('change', function () {
|
$('#applyClassId').on('change', function () {
|
||||||
console.log('123')
|
|
||||||
self.selectedApplyClassId = $(this).value()
|
self.selectedApplyClassId = $(this).value()
|
||||||
self.initApplyEChart()
|
self.initApplyEChart()
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user