修改报名审核字段 缴费证明为非必填项,
修改培训机构统计页面统计项
This commit is contained in:
parent
8bcaf4a982
commit
54b4441e33
@ -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.pojo.dtos.classplan.ClassPlanDTO;
|
||||
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.classplan.IClassPlanService;
|
||||
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.teacher.ITeacherService;
|
||||
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.component.SecurityComponent;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
@ -65,6 +68,8 @@ public class IndexCountController extends DefaultBaseController {
|
||||
private IExamCheckService examCheckService;
|
||||
@Autowired
|
||||
private IExamApplyService examApplyService;
|
||||
@Autowired
|
||||
private ITrainingInstitutionWorkTypeService TrainingInstitutionWorkTypeService;
|
||||
|
||||
|
||||
@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)})
|
||||
@GetMapping("count-plan-apply-user-num")
|
||||
public SuccessResultData<Map<String, Object>> countPlanApplyUserNum(){
|
||||
@GetMapping("count-work-type-apply-user-num")
|
||||
public SuccessResultData<Map<String, Object>> countWorkTypeApplyUserNum(){
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
List<String> title = new ArrayList<>();//计划名称
|
||||
List<String> data0 = new ArrayList<>();//待审核
|
||||
@ -226,11 +231,11 @@ public class IndexCountController extends DefaultBaseController {
|
||||
List<String> data4 = new ArrayList<>();//审核不通过
|
||||
String institutionId = this.getInstitutionId();
|
||||
if(!StringUtils.isBlank(institutionId)){
|
||||
map.put("orgId",institutionId);
|
||||
List<ClassPlanDTO> list = classPlanService.list(map);
|
||||
for (ClassPlanDTO classPlanDTO : list) {
|
||||
Map<String, Object> planMap = applyService.countWeekNum("",institutionId,classPlanDTO.getClassPlanId());
|
||||
title.add(classPlanDTO.getPlanName());
|
||||
map.put("institutionId",institutionId);
|
||||
List<TrainingInstitutionWorkTypeDTO> trainingInstitutionWorkTypeDTOS = TrainingInstitutionWorkTypeService.list(map);
|
||||
for (TrainingInstitutionWorkTypeDTO trainingInstitutionWorkTypeDTO : trainingInstitutionWorkTypeDTOS) {
|
||||
Map<String, Object> planMap = applyService.countWeekNum("",institutionId,trainingInstitutionWorkTypeDTO.getWorkTypeId());
|
||||
title.add(trainingInstitutionWorkTypeDTO.getWorkTypeName());
|
||||
data0.add(planMap.get("0").toString());
|
||||
data1.add(planMap.get("1").toString());
|
||||
data2.add(planMap.get("2").toString());
|
||||
|
@ -118,7 +118,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
||||
if(sourceInstitutionDTO == null){
|
||||
throw new SearchException("未查询到源机构信息");
|
||||
}
|
||||
auditLogVO.setApplyAuditExplain("【因报名人数不足】 报名培训机构 由原【"+sourceInstitutionDTO.getInstitutionName()+"】培训机构 调整到【"+institutionDTO.getInstitutionName()+"】培训机构");
|
||||
auditLogVO.setApplyAuditExplain("【因报名人数不足,无法开班】 报名培训机构 由原【"+sourceInstitutionDTO.getInstitutionName()+"】培训机构 调整到【"+institutionDTO.getInstitutionName()+"】培训机构");
|
||||
applyAuditLogService.save(null,auditLogVO);
|
||||
}
|
||||
}
|
||||
@ -374,7 +374,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
||||
throw new SaveException("您已报名过该机构");
|
||||
}
|
||||
if(checkApplyIsFirst(creator,applyWorkTypeId,null) != 0){
|
||||
throw new SaveException("您选择的工种已报名过其他培训机构");
|
||||
throw new SaveException("您选择的工种已经报名过其他培训机构!请勿重复报名");
|
||||
}
|
||||
if(!examCheckService.getExamCheckFailOrBack(applyWorkTypeId,applyInstitutionId)){
|
||||
throw new SaveException("该机构暂时不能报名");
|
||||
@ -423,9 +423,12 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
||||
if(!(applyDTO.getApplyAuditState() == -1 || applyDTO.getApplyAuditState() == 1)){
|
||||
throw new SearchException("暂不能修改信息");
|
||||
}
|
||||
// if(checkApplyIsFirst(creator,applyWorkTypeId,null) != 0){
|
||||
// throw new SaveException("您选择的工种已报名过其他培训机构");
|
||||
// if(!(applyDTO.getApplyInstitutionId().equals(applyInstitutionId) && applyDTO.getApplyWorkTypeId().equals(applyWorkTypeId))){
|
||||
// throw new SaveException("您选择的工种已经在其他培训机构报名过!请勿重新报名");
|
||||
// }
|
||||
if(checkApplyIsFirst(creator,applyWorkTypeId,null) != 0){
|
||||
throw new SaveException("您选择的工种已经在其他培训机构报名过!请勿重新报名");
|
||||
}
|
||||
|
||||
if(!examCheckService.getExamCheckFailOrBack(applyWorkTypeId,applyInstitutionId)){
|
||||
throw new SaveException("该机构以截止报名");
|
||||
@ -620,9 +623,9 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
||||
params.put("creator",creator);
|
||||
List<String> applyAuditStates = new ArrayList<>();
|
||||
applyAuditStates.add("0");
|
||||
applyAuditStates.add("1");
|
||||
//applyAuditStates.add("1");
|
||||
applyAuditStates.add("2");
|
||||
applyAuditStates.add("-1");
|
||||
//applyAuditStates.add("-1");
|
||||
params.put("applyAuditStates",applyAuditStates);
|
||||
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<>();
|
||||
params.put("weekTime",weekTime);
|
||||
params.put("applyInstitutionId",applyInstitutionId);
|
||||
params.put("applyClassId",applyClassId);
|
||||
params.put("applyWorkTypeId",applyWorkTypeId);
|
||||
Map<String, Object> result = applyDao.countWeekNum(params);
|
||||
|
||||
if(result == null){
|
||||
params.clear();
|
||||
params.put("0",0);
|
||||
|
@ -20,6 +20,14 @@ import java.util.Map;
|
||||
**/
|
||||
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
|
||||
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){
|
||||
List<WorkTypeZTreeDTO> list = workTypeDao.listZTree(params);
|
||||
|
@ -693,6 +693,9 @@
|
||||
<if test="applyClassId != null and applyClassId != ''">
|
||||
AND apply_class_id = #{applyClassId}
|
||||
</if>
|
||||
<if test="applyWorkTypeId != null and applyWorkTypeId != ''">
|
||||
AND apply_work_type_id = #{applyWorkTypeId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
@ -374,10 +374,10 @@
|
||||
// 提交表单
|
||||
form.on('submit(submitForm1)', function(formData) {
|
||||
var applyAuditFileId = formData.field.applyAuditFileId;
|
||||
if(applyAuditFileId == ''){
|
||||
top.dialog.msg('请上传交费凭证')
|
||||
return;
|
||||
}
|
||||
// if(applyAuditFileId == ''){
|
||||
// top.dialog.msg('请上传交费凭证')
|
||||
// return;
|
||||
// }
|
||||
saveDataVal['applyId'] = applyId;
|
||||
saveDataVal['applyAuditExplain'] = formData.field.applyAuditExplain;
|
||||
saveDataVal['applyAuditFileId'] = applyAuditFileId;
|
||||
|
@ -104,7 +104,7 @@
|
||||
</div>
|
||||
<div class="layui-col-sm6 layui-col-md6">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">培训计划报名情况</div>
|
||||
<div class="layui-card-header">工种报名情况</div>
|
||||
<div class="layui-card-body">
|
||||
<div id="planApplyUserNumEChart" style="width: 100%; height: 300px;"></div>
|
||||
</div>
|
||||
@ -372,7 +372,8 @@
|
||||
})
|
||||
},
|
||||
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.setOption(
|
||||
{
|
||||
@ -393,7 +394,11 @@
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: data.data.title //计划名称
|
||||
data: data.data.title, //计划名称
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
rotate: 40
|
||||
}
|
||||
|
||||
},
|
||||
yAxis: {
|
||||
@ -480,7 +485,6 @@
|
||||
$('#applyClassId').append(options);
|
||||
setTimeout(function () {
|
||||
$('#applyClassId').on('change', function () {
|
||||
console.log('123')
|
||||
self.selectedApplyClassId = $(this).value()
|
||||
self.initApplyEChart()
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user