修修补补 QAQ

This commit is contained in:
wans 2022-03-31 16:52:19 +08:00
parent 8a7c42b4d8
commit a7547e84c8
22 changed files with 641 additions and 145 deletions

View File

@ -175,6 +175,13 @@
<artifactId>easypoi-spring-boot-starter</artifactId>
<version>4.1.0</version>
</dependency>
<!-- OAuth2单点登录认证 -->
<!--<dependency>
<groupId>ink.wgink</groupId>
<artifactId>login-oauth2-server</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>-->
</dependencies>
<build>

View File

@ -101,6 +101,12 @@ public class ApplyStudentsController extends DefaultBaseController {
return applyStudentsService.get(applyStudentsId);
}
@GetMapping("get")
public ApplyStudentsDTO getInfo() {
Map<String, Object> params = requestParams();
return applyStudentsService.get(params);
}
@ApiOperation(value = "班级学生表列表", notes = "班级学生表列表接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list")

View File

@ -486,7 +486,7 @@ public class ClassPlanController extends DefaultBaseController {
public void exportApplyUserExcel(HttpServletResponse response) throws IOException {
Map<String, Object> params = requestParams();
String [] headers = {
"姓名","性别","身份证号","手机号码","学历","作业类别","准操项目","单位","初训/复训/换证","审核状态"};
"姓名","性别","身份证号","手机号码","学历","作业类别","准操项目","培训类别","单位","初训/复训/换证","审核状态"};
String excelName = "报名信息表";
String fileName = URLEncoder.encode(excelName, "UTF-8");
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
@ -501,6 +501,9 @@ public class ClassPlanController extends DefaultBaseController {
params.put("applyAuditStates", Arrays.asList(params.get("applyAuditStates").toString().split(",")));
}
List<List<Object>> listData = new ArrayList<>();
if(params.get("applyIds") != null){
params.put("applyIds", Arrays.asList(params.get("applyIds").toString().split(",")));
}
List<ApplyDTO> list = applyService.list(params);
for (ApplyDTO item : list) {
List<Object> el = new ArrayList<>();
@ -513,6 +516,7 @@ public class ClassPlanController extends DefaultBaseController {
WorkTypeDTO workTypeDTO = workTypeService.get(item.getApplyWorkTypeId());
el.add(workTypeDTO.getWorkTypeParentName());
el.add(workTypeDTO.getWorkTypeName());
el.add(item.getApplyLeiBie());
el.add(item.getApplyUnitName());
String fenLei = item.getApplyFenLei();
el.add("1".equals(fenLei) ? "初训" : "2".equals(fenLei) ? "复训" : "3".equals(fenLei) ? "换证" : "");
@ -520,6 +524,6 @@ public class ClassPlanController extends DefaultBaseController {
el.add(applyAuditState == -1 ? "审核不通过" : applyAuditState == 0 ? "待审核" : applyAuditState == 2 ? "审核通过" : "");
listData.add(el);
}
EasyExcel.write(response.getOutputStream()).sheet("人员基础信息异常数据").head(listHeader).doWrite(listData);
EasyExcel.write(response.getOutputStream()).sheet("异常数据").head(listHeader).doWrite(listData);
}
}

View File

@ -1,12 +1,14 @@
package cn.com.tenlion.controller.api.indexcount;
import cn.com.tenlion.dao.apply.IApplyDao;
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.applystudents.IApplyStudentsService;
import cn.com.tenlion.service.classplan.IClassPlanService;
import cn.com.tenlion.service.examapply.IExamApplyService;
import cn.com.tenlion.service.examcheck.IExamCheckService;
@ -20,6 +22,7 @@ import ink.wgink.common.component.SecurityComponent;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResultData;
import ink.wgink.service.user.service.IUserService;
import ink.wgink.util.date.DateUtil;
import io.swagger.annotations.*;
import org.apache.commons.lang3.StringUtils;
@ -69,6 +72,10 @@ public class IndexCountController extends DefaultBaseController {
private IExamApplyService examApplyService;
@Autowired
private ITrainingInstitutionWorkTypeService TrainingInstitutionWorkTypeService;
@Autowired
private IApplyStudentsService studentsService;
@Autowired
private IUserService userService;
@ApiOperation(value = "统计当前登录机构报名数量", notes = "统计当前登录机构报名数量接口")
@ -353,8 +360,25 @@ public class IndexCountController extends DefaultBaseController {
return new SuccessResultData<>(list);
}
@GetMapping("get-register-num")
public Object getRegisterNum(){
Map<String, Object> query = new HashMap<>(8);
// 注册人数
Integer registerCount = userService.count(null);
// 培训人数
Integer trainingCount = studentsService.count(null);
Map<String, Object> res = new HashMap<>();
// 开班申请
query.put("checkStatus", "1");
Integer classPlanCount = examCheckService.count(query);
// 考试申请
Integer examCount = examApplyService.count(query);
res.put("registerCount", registerCount);
res.put("trainingCount", trainingCount);
res.put("classPlanCount", classPlanCount);
res.put("examCount", examCount);
return res;
}
public String getInstitutionId(){
InstitutionDTO institutionDTO = trainingInstitutionUserService.getByUserId(securityComponent.getCurrentUser().getUserId());

View File

@ -0,0 +1,35 @@
package cn.com.tenlion.controller.app.api.btyjaccountsync;
import cn.com.tenlion.service.btyjaccountsync.IBTYJUserAccountSyncService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 包头应急-万安众联-账号同步接口
* @author xwangs
* @create 2022-02-21 15:06
* @description
*/
@RestController
@RequestMapping(ISystemConstant.APP_PREFIX + "/release/account-sync")
public class BTYJAccountSyncAppController extends DefaultBaseController {
@Autowired
private IBTYJUserAccountSyncService userAccountSyncService;
@PostMapping("btyj-user-account")
public List<Map<String, Object>> btyjUserAccount(){
Map<String, Object> query = requestParams();
// 只查询注册学员信息
List<Map<String, Object>> userAccountList = userAccountSyncService.listUserAccountInfo(query);
return userAccountList;
}
}

View File

@ -0,0 +1,22 @@
package cn.com.tenlion.dao.btyjaccountsync;
import cn.com.tenlion.pojo.dtos.applystudents.ApplyStudentsDTO;
import cn.com.tenlion.pojo.dtos.btyjuseraccountsync.BTYJUserAccountSyncDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-02-21 15:25
* @description
*/
@Repository
public interface IBTYJUserAccountSyncDao {
List<BTYJUserAccountSyncDTO> listUserAccountInfo(Map<String, Object> query);
List<Map<String, Object>> listClassPlan(Map<String, Object> query);
}

View File

@ -0,0 +1,29 @@
package cn.com.tenlion.pojo.dtos.btyjuseraccountsync;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-02-21 15:32
* @description
*/
@Data
public class BTYJUserAccountSyncDTO {
// 账号
private String userAccount;
// 昵称
private String nickName;
// 真实姓名
private String realName;
// 联系电话
private String telephone;
// 身份证号
private String idCardNumber;
// 培训类型
private String trainingType;
}

View File

@ -1,6 +1,7 @@
package cn.com.tenlion.service.apply.impl;
import cn.com.tenlion.dao.apply.IApplyDao;
import cn.com.tenlion.dao.basicuserinfo.IBasicUserInfoDao;
import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO;
import cn.com.tenlion.institutionmanagement.service.institution.IInstitutionService;
import cn.com.tenlion.pojo.bos.apply.ApplyBO;
@ -18,6 +19,7 @@ import cn.com.tenlion.pojo.vos.applyauditlog.ApplyAuditLogVO;
import cn.com.tenlion.service.apply.IApplyService;
import cn.com.tenlion.service.applyauditlog.IApplyAuditLogService;
import cn.com.tenlion.service.applystudents.IApplyStudentsService;
import cn.com.tenlion.service.basicuserinfo.IBasicUserInfoService;
import cn.com.tenlion.service.classplan.IClassPlanService;
import cn.com.tenlion.service.examcheck.IExamCheckService;
import cn.com.tenlion.service.examination.distributioncard.IDistributionCardService;
@ -98,6 +100,8 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
private IWorkTypeService workTypeService;
@Autowired
private ITrainingInstitutionServiceUserService trainingInstitutionServiceUserService;
@Autowired
private IBasicUserInfoDao basicUserInfoDao;
/**
@ -141,7 +145,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
@Override
public String saveRelationReturnId(ApplyVO applyVO){
String applyId = UUIDUtil.getUUID();
String userId = "";
@ -160,6 +164,18 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
userVO.setUserType(1);
userVO.setUserState(0);
userId = userService.saveAndReturnId(userVO,false);
Map<String, Object> basic = new HashMap<>();
basic.put("bindUserAccount", userId);
basic.put("userPhotoId", applyVO.getApplyUserCardPhoto());
basic.put("fullName", applyVO.getApplyName());
basic.put("gender", applyVO.getApplySex());
basic.put("cardType", '0');
basic.put("idCardNumber", applyVO.getApplyCardNumber());
basic.put("telephone", applyVO.getApplyPhone());
basic.put("gmtCreate", DateUtil.getTime());
basic.put("gmtModified", DateUtil.getTime());
basic.put("isDelete", "0");
basicUserInfoDao.save(basic);
}else{
userId = userDTO.getUserId();
}
@ -784,6 +800,4 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
result.put("weekTime",weekTime);
return result;
}
}

View File

@ -0,0 +1,21 @@
package cn.com.tenlion.service.btyjaccountsync;
import cn.com.tenlion.pojo.dtos.btyjuseraccountsync.BTYJUserAccountSyncDTO;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-02-21 15:27
* @description
*/
public interface IBTYJUserAccountSyncService {
/**
* 查询系统中所有注册学员信息
* @param query
* @return
*/
List<Map<String, Object>> listUserAccountInfo(Map<String, Object> query);
}

View File

@ -0,0 +1,97 @@
package cn.com.tenlion.service.btyjaccountsync.impl;
import cn.com.tenlion.dao.btyjaccountsync.IBTYJUserAccountSyncDao;
import cn.com.tenlion.pojo.dtos.applystudents.ApplyStudentsDTO;
import cn.com.tenlion.pojo.dtos.btyjuseraccountsync.BTYJUserAccountSyncDTO;
import cn.com.tenlion.pojo.dtos.worktype.WorkTypeDTO;
import cn.com.tenlion.service.applystudents.IApplyStudentsService;
import cn.com.tenlion.service.btyjaccountsync.IBTYJUserAccountSyncService;
import cn.com.tenlion.service.worktype.IWorkTypeService;
import ink.wgink.exceptions.ParamsException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2022-02-21 15:28
* @description
*/
@Service
public class BTYJAccountSyncServiceImpl implements IBTYJUserAccountSyncService {
@Autowired
private IBTYJUserAccountSyncDao accountSyncDao;
@Autowired
private IWorkTypeService workTypeService;
@Override
public List<Map<String, Object>> listUserAccountInfo(Map<String, Object> query) {
if(query.get("queryDate") == null || query.get("queryDate").toString().length() == 0){
throw new ParamsException("查询参数缺失queryDate");
}
query.put("queryDate", query.get("queryDate").toString().substring(0,10));
List<Map<String, Object>> classQueryList = accountSyncDao.listClassPlan(query);
query.clear();
List<Map<String, Object>> classList = new ArrayList<>();
for (Map<String, Object> item : classQueryList) {
Map<String, Object> classInfo = new HashMap<>(8);
classInfo.put("orgName", item.get("institution_name").toString());
classInfo.put("parentWorkName", "");
classInfo.put("workName", "");
if(item.get("worker_catalog") != null){
String workIds[] = item.get("worker_catalog").toString().split(",");
if("".equals(workIds[0])){
classInfo.put("parentWorkName", item.get("parentWorkName"));
classInfo.put("workName", item.get("workName"));
} else {
String workName = "";
String parentWorkName = "";
for (int i = 0; i < workIds.length; i++){
WorkTypeDTO workTypeDTO = workTypeService.get(workIds[i]);
if(i + 1 == workIds.length){
workName += workTypeDTO.getWorkTypeName();
parentWorkName = workTypeDTO.getWorkTypeParentName();
} else {
workName += workTypeDTO.getWorkTypeName() + ",";
}
}
classInfo.put("parentWorkName", parentWorkName);
classInfo.put("workName", workName);
}
}
classInfo.put("trainingPlanNumber", item.get("plan_number").toString());
classInfo.put("trainingPlanName", item.get("plan_name").toString());
classInfo.put("chargePerson", item.get("charge_person").toString());
classInfo.put("chargePersonTel", item.get("charge_person_tel").toString());
classInfo.put("trainingSTime", item.get("plan_start_time").toString().substring(0, 10));
classInfo.put("trainingETime", item.get("plan_end_time").toString().substring(0, 10));
query.put("classPlanId", item.get("class_plan_id").toString());
List<BTYJUserAccountSyncDTO> userList = accountSyncDao.listUserAccountInfo(query);
for (BTYJUserAccountSyncDTO u : userList) {
String trainingType = u.getTrainingType();
switch (trainingType) {
case "1":
u.setTrainingType("初训");
break;
case "2":
u.setTrainingType("复训");
break;
case "3":
u.setTrainingType("换证");
break;
default:
u.setTrainingType("");
}
}
classInfo.put("userAccountList", userList);
classList.add(classInfo);
}
return classList;
}
}

View File

@ -1220,33 +1220,49 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl
private void changeDataFormDict(ApplyDTO applyDTO){
// 处理性别
if(applyDTO.getApplySex() != null && !"".equals(applyDTO.getApplySex())){
DataDTO applySexName = dataService.get(applyDTO.getApplySex());
applyDTO.setApplySexName(applySexName.getDataName());
}
// 处理学历
if(applyDTO.getApplyCultureLevel() != null && !"".equals(applyDTO.getApplyCultureLevel())) {
DataDTO applyCultureLevelName = dataService.get(applyDTO.getApplyCultureLevel());
applyDTO.setApplyCultureLevelName(applyCultureLevelName.getDataName());
}
// 工种名称
if(applyDTO.getApplyWorkTypeId() != null && !"".equals(applyDTO.getApplyWorkTypeId())){
WorkTypeDTO workTypeDTO = workTypeService.get(applyDTO.getApplyWorkTypeId());
applyDTO.setApplyWorkTypeName(workTypeDTO.getWorkTypeName());
}
// 机构名称
if(applyDTO.getApplyInstitutionId() != null && !"".equals(applyDTO.getApplyInstitutionId())){
InstitutionDTO institutionDTO = iInstitutionService.get(applyDTO.getApplyInstitutionId());
applyDTO.setApplyInstitutionName(institutionDTO.getInstitutionName());
}
}
private void changeDataFormDict(ApplyStudentsDTO applyDTO){
// 处理性别
if(applyDTO.getApplySex() != null && !"".equals(applyDTO.getApplySex())){
DataDTO applySexName = dataService.get(applyDTO.getApplySex());
applyDTO.setApplySexName(applySexName.getDataName());
}
// 处理学历
if(applyDTO.getApplyCultureLevel() != null && !"".equals(applyDTO.getApplyCultureLevel())) {
DataDTO applyCultureLevelName = dataService.get(applyDTO.getApplyCultureLevel());
applyDTO.setApplyCultureLevelName(applyCultureLevelName.getDataName());
}
// 工种名称
if(applyDTO.getApplyWorkTypeId() != null && !"".equals(applyDTO.getApplyWorkTypeId())){
WorkTypeDTO workTypeDTO = workTypeService.get(applyDTO.getApplyWorkTypeId());
applyDTO.setApplyWorkTypeName(workTypeDTO.getWorkTypeName());
}
// 机构名称
if(applyDTO.getApplyInstitutionId() != null && !"".equals(applyDTO.getApplyInstitutionId())){
InstitutionDTO institutionDTO = iInstitutionService.get(applyDTO.getApplyInstitutionId());
applyDTO.setApplyInstitutionName(institutionDTO.getInstitutionName());
}
}
@Override
public List<Map<String, Object>> listMyExamScore(Map<String, Object> params) {

View File

@ -3,11 +3,13 @@ package cn.com.tenlion.systemexaminationsignup;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableSwagger2
@SpringBootApplication(scanBasePackages = {"cn.com.tenlion", "ink.wgink"})
@MapperScan(basePackages = {"cn.com.tenlion.**.dao", "ink.wgink.**.dao"})
@ServletComponentScan(basePackages = "cn.com.tenlion")
public class SystemExaminationSignupApplication {
public static void main(String[] args) {

View File

@ -100,3 +100,19 @@ logging:
root: error
ink.wgink: debug
cn.com.tenlion: debug
open-platform:
wechat:
# 小程序
mini-app:
# 激活状态
active: true
api-url: https://api.weixin.qq.com
# 认证地址,固定
authorizeUrl: ${open-platform.wechat.mini-app.api-url}/sns/jscode2session
# 认证方式,固定
grantType: authorization_code
# 小程序的appKey
app-key: wx9f627e69ba43e6a2
# 小程序秘钥
app-secret: bbdb7f9ee8f5cf7b4439a3cd79a01000

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.com.tenlion.dao.btyjaccountsync.IBTYJUserAccountSyncDao">
<resultMap id="BTYJUserAccountSyncDTO" type="cn.com.tenlion.pojo.dtos.btyjuseraccountsync.BTYJUserAccountSyncDTO">
<result column="userAccount" property="userAccount"/>
<result column="nickName" property="nickName"/>
<result column="realName" property="realName"/>
<result column="telephone" property="telephone"/>
<result column="idCardNumber" property="idCardNumber"/>
<result column="trainingType" property="trainingType"/>
</resultMap>
<select id="listUserAccountInfo" parameterType="map" resultMap="BTYJUserAccountSyncDTO">
SELECT
t3.user_username userAccount,
t3.user_name nickName,
t2.full_name realName,
t2.telephone,
t2.id_card_number idCardNumber,
t1.apply_fen_lei trainingType
FROM
e_apply_students t1
LEFT JOIN e_basic_user_info t2 ON t1.apply_card_number = t2.id_card_number
LEFT JOIN sys_user t3 ON t2.bind_user_account = t3.user_id
WHERE
t2.id IS NOT NULL
AND t1.apply_class_id = #{classPlanId}
</select>
<select id="listClassPlan" parameterType="map" resultType="map">
SELECT
t1.class_plan_id,
t1.worker_catalog,
t2.institution_name,
t1.plan_number,
t1.plan_name,
t1.charge_person,
t1.charge_person_tel,
t1.plan_start_time,
t1.plan_end_time,
t5.gmt_modified,
t5.check_status
FROM
e_class_plan t1
LEFT JOIN m_institution t2 ON t1.org_id = t2.institution_id
LEFT JOIN management_exam_check t5 ON t1.class_plan_id = t5.plan_id
WHERE
t1.is_delete = '0'
AND t5.check_status = '1'
AND LEFT(t5.gmt_modified, 10) = #{queryDate}
ORDER BY t1.plan_start_time DESC
</select>
</mapper>

View File

@ -383,6 +383,7 @@
#{classPlanIdList[${index}]}
</foreach>
</if>
ORDER BY t1.gmt_create DESC
</select>
<!-- 列表 -->

View File

@ -534,6 +534,9 @@
management_exam_apply t1
WHERE
t1.is_delete = 0
<if test="checkStatus != null and checkStatus != ''">
AND t1.check_status = #{checkStatus}
</if>
</select>
<!-- 考试申请统计 -->

View File

@ -405,6 +405,9 @@
management_exam_check t1
WHERE
t1.is_delete = 0
<if test="checkStatus != null and checkStatus != ''">
AND t1.check_status = #{checkStatus}
</if>
</select>
<!-- 开班计划统计 -->

View File

@ -152,7 +152,7 @@
if(orgId == ''){
return;
}
var url = 'api/classplan/export-apply-user-excel?t=' + new Date();
var url = 'api/classplan/export-apply-user-excel?t=747101512';
url += '&keywords=' + encodeURI($('#keywords').val());
if($('#applyAuditStates').val() == ''){
url += '&applyAuditStates=-1,0,2';
@ -162,6 +162,19 @@
url += '&applyFenLei=' + $('#applyFenLei').val();
url += '&applyInstitutionId=' + orgId;
url += '&applyWorkTypeId=' + workerCatalog;
var checkStatus = table.checkStatus('dataTable');
var checkDatas = checkStatus.data;
if(checkDatas.length > 0){
var applyIds = "";
for (var i = 0,item; item = checkDatas[i++];){
if(i == checkDatas.length){
applyIds += item.applyId;
} else {
applyIds += item.applyId + ','
}
}
url += '&applyIds=' + applyIds;
}
window.open(url);
return;
});
@ -398,13 +411,6 @@
});
}
// 事件 - 页面变化
$win.on('resize', function() {
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(function() {
reloadTable();
}, 500);
});
// 事件 - 搜索
$(document).on('click', '#search', function() {
reloadTable(1);

View File

@ -16,6 +16,28 @@
<div class="layui-card">
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-row">
<div class="layui-col-md12">
<input type="text" class="layui-input" id="keywords" value="" style="width: 200px;height: 30px;display: inline-block;" placeholder="身份证|手机号">
<button type="button" id="checkResultBtn" class="layui-btn layui-btn-sm layui-btn-normal" style="display: inline-block;">检索</button>
<div class="layui-form-item" style="display: inline-block;">
<label class="layui-form-label">检索结果:</label>
<div class="layui-input-block layui-form" id="check-result-box"></div>
<script type="text/html" id="check-result-template">
<select id="check-result-select" lay-search lay-filter="checkChange">
{{# if(d.length == 0){ }}
<option value="">未检索到学员</option>
{{# }else { }}
<option value="">检索到{{ d.length }}名学员</option>
{{# } }}
{{# for(var i = 0, item; item = d[i++];){ }}
<option value="{{item.applyId}}">{{item.applyName}}[{{item.applyPhone}}]</option>
{{# } }}
</select>
</script>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md2 layui-col-sm2">
<div class="layui-form-item layui-form-text">
@ -343,8 +365,11 @@
var orgId = top.restAjax.params(window.location.href).orgId;
var workerCatalog = top.restAjax.params(window.location.href).workerCatalog;
$('.layui-card').height($(window).height());
// 初始化内容
function initData() {
clearCheckResultSelect();
if(typeof (orgId) === 'undefined' || orgId == ''){
top.dialog.msg('机构参数缺失');
closeBox();
@ -364,6 +389,78 @@
}
initData();
$(document).on('click', '#checkResultBtn', function(){
var keyWords = $('#keywords').val();
if(keyWords == ""){
clearCheckResultSelect();
clearFrom();
return;
}
top.restAjax.get(top.restAjax.path('api/applystudents/list', []), {keywords : keyWords}, null, function(code, data) {
laytpl(document.getElementById('check-result-template').innerHTML).render(data, function(html) {
document.getElementById('check-result-box').innerHTML = html;
form.render();
});
}, function(code, data) {
top.dialog.msg(data.msg);
});
});
form.on('select(checkChange)', function(data){
if(typeof (data.value) == 'undefined' || data.value == ''){
clearFrom();
return;
}
top.restAjax.get(top.restAjax.path('api/applystudents/get/{arg}', [data.value]), {}, null, function(code, data) {
$('#applyUserCardPhoto').val(data['applyUserCardPhoto']);
$('#idCardFrontPhoto').val(data['idCardFrontPhoto']);
$('#idCardBackPhoto').val(data['idCardBackPhoto']);
$('#educationPhoto').val(data['educationPhoto']);
$('#applyTakeCardPhoto').val(data['applyTakeCardPhoto']);
initApplyUserCardPhotoUploadFile();
initIdCardFrontPhotoUploadFile();
initIdCardBackPhotoUploadFile();
initEducationPhotoUploadFile();
initApplyTakeCardPhotoUploadFile();
$('#applyName').val(data['applyName']);
$('#applySex').val(data['applySex']);
$('#applyCultureLevel').val(data['applyCultureLevel']);
$('#applyCardNumber').val(data['applyCardNumber']);
$('#applyPhone').val(data['applyPhone']);
$('#applyUnitName').val(data['applyUnitName']);
form.render();
}, function(code, data) {
top.dialog.msg(data.msg);
});
});
function clearCheckResultSelect(){
laytpl(document.getElementById('check-result-template').innerHTML).render([], function(html) {
document.getElementById('check-result-box').innerHTML = html;
form.render();
});
}
function clearFrom(){
$('#applyUserCardPhoto').val('');
$('#idCardFrontPhoto').val('');
$('#idCardBackPhoto').val('');
$('#educationPhoto').val('');
$('#applyTakeCardPhoto').val('');
initApplyUserCardPhotoUploadFile();
initIdCardFrontPhotoUploadFile();
initIdCardBackPhotoUploadFile();
initEducationPhotoUploadFile();
initApplyTakeCardPhotoUploadFile();
$('#applyName').val('');
$('#applySex').val('');
$('#applyCultureLevel').val('');
$('#applyCardNumber').val('');
$('#applyPhone').val('');
$('#applyUnitName').val('');
form.render();
}
function initWorkTypeName(){
top.restAjax.get(top.restAjax.path('api/classplan/get-work-type-name', []), {workerCatalog : workerCatalog}, null, function(code, data) {
$('#parentWorkName').val(data.parentWorkName);

View File

@ -16,6 +16,28 @@
<div class="layui-card">
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-row">
<div class="layui-col-md12">
<input type="text" class="layui-input" id="keywords" value="" style="width: 200px;height: 30px;display: inline-block;" placeholder="身份证|手机号">
<button type="button" id="checkResultBtn" class="layui-btn layui-btn-sm layui-btn-normal" style="display: inline-block;">检索</button>
<div class="layui-form-item" style="display: inline-block;">
<label class="layui-form-label">检索结果:</label>
<div class="layui-input-block layui-form" id="check-result-box"></div>
<script type="text/html" id="check-result-template">
<select id="check-result-select" lay-search lay-filter="checkChange">
{{# if(d.length == 0){ }}
<option value="">未检索到学员</option>
{{# }else { }}
<option value="">检索到{{ d.length }}名学员</option>
{{# } }}
{{# for(var i = 0, item; item = d[i++];){ }}
<option value="{{item.applyId}}">{{item.applyName}}[{{item.applyPhone}}]</option>
{{# } }}
</select>
</script>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md2 layui-col-sm2">
<div class="layui-form-item layui-form-text">
@ -222,10 +244,11 @@
</div>
</div>
<div class="layui-col-md6 layui-col-sm6">
<div class="layui-form-item">
<div class="layui-form-item" pane>
<label class="layui-form-label"><span style="color: red">*</span>培训类别</label>
<div class="layui-input-block">
<input type="text" id="applyLeiBie" name="applyLeiBie" class="layui-input" value="" placeholder="例如:负责人 或 安全员" maxlength="100" >
<input type="radio" name="applyLeiBie" value="企业主要负责人" title="企业主要负责人" checked>
<input type="radio" name="applyLeiBie" value="安全管理人员" title="安全管理人员">
</div>
</div>
</div>
@ -345,8 +368,8 @@
<div class="layui-row">
<div class="layui-col-md12 layui-col-sm12">
<div class="layui-form-item">
<label class="layui-form-label" style="width: 190px">单位所在区域或隶属部门</label>
<div class="layui-input-block" style="margin-left: 190px;">
<label class="layui-form-label" style="width: 200px">单位所在区域或隶属部门</label>
<div class="layui-input-block" style="margin-left: 200px;">
<input type="text" id="applyUnitBelong" name="applyUnitBelong" class="layui-input" value="" placeholder="单位所在区域或隶属部门" maxlength="100" >
</div>
</div>
@ -416,8 +439,11 @@
var orgId = top.restAjax.params(window.location.href).orgId;
var workerCatalog = top.restAjax.params(window.location.href).workerCatalog;
$('.layui-card').height($(window).height());
// 初始化内容
function initData() {
clearCheckResultSelect();
if(typeof (orgId) === 'undefined' || orgId == ''){
top.dialog.msg('机构参数缺失');
closeBox();
@ -437,6 +463,94 @@
}
initData();
$(document).on('click', '#checkResultBtn', function(){
var keyWords = $('#keywords').val();
if(keyWords == ""){
clearCheckResultSelect();
clearFrom();
return;
}
top.restAjax.get(top.restAjax.path('api/applystudents/list', []), {keywords : keyWords}, null, function(code, data) {
laytpl(document.getElementById('check-result-template').innerHTML).render(data, function(html) {
document.getElementById('check-result-box').innerHTML = html;
form.render();
});
}, function(code, data) {
top.dialog.msg(data.msg);
});
});
form.on('select(checkChange)', function(data){
if(typeof (data.value) == 'undefined' || data.value == ''){
clearFrom();
return;
}
top.restAjax.get(top.restAjax.path('api/applystudents/get/{arg}', [data.value]), {}, null, function(code, data) {
$('#applyUserCardPhoto').val(data['applyUserCardPhoto']);
$('#idCardFrontPhoto').val(data['idCardFrontPhoto']);
$('#idCardBackPhoto').val(data['idCardBackPhoto']);
$('#educationPhoto').val(data['educationPhoto']);
$('#applyTakeCardPhoto').val(data['applyTakeCardPhoto']);
$('#applyRePeiXunPhoto').val(data['applyRePeiXunPhoto']);
initApplyUserCardPhotoUploadFile();
initIdCardFrontPhotoUploadFile();
initIdCardBackPhotoUploadFile();
initEducationPhotoUploadFile();
initApplyTakeCardPhotoUploadFile();
initApplyRePeiXunPhotoUploadFile();
$('#applyName').val(data['applyName']);
$('#applySex').val(data['applySex']);
$('#applyPhone').val(data['applyPhone']);
$('#applyCultureLevel').val(data['applyCultureLevel']);
$('#applyCardNumber').val(data['applyCardNumber']);
$('#applyZhiCheng').val(data['applyZhiCheng']);
$('#applySchool').val(data['applySchool']);
$('#applySubject').val(data['applySubject']);
$('#applyUnitName').val(data['applyUnitName']);
$('#applyUnitType').val(data['applyUnitType']);
$('#applyUnitWork').val(data['applyUnitWork']);
$('#applyUnitBelong').val(data['applyUnitBelong']);
form.render();
}, function(code, data) {
top.dialog.msg(data.msg);
});
});
function clearCheckResultSelect(){
laytpl(document.getElementById('check-result-template').innerHTML).render([], function(html) {
document.getElementById('check-result-box').innerHTML = html;
form.render();
});
}
function clearFrom(){
$('#applyUserCardPhoto').val('');
$('#idCardFrontPhoto').val('');
$('#idCardBackPhoto').val('');
$('#educationPhoto').val('');
$('#applyTakeCardPhoto').val('');
$('#applyRePeiXunPhoto').val('');
initApplyUserCardPhotoUploadFile();
initIdCardFrontPhotoUploadFile();
initIdCardBackPhotoUploadFile();
initEducationPhotoUploadFile();
initApplyTakeCardPhotoUploadFile();
initApplyRePeiXunPhotoUploadFile();
$('#applyName').val('');
$('#applySex').val('');
$('#applyPhone').val('');
$('#applyCultureLevel').val('');
$('#applyCardNumber').val('');
$('#applyZhiCheng').val('');
$('#applySchool').val('');
$('#applySubject').val('');
$('#applyUnitName').val('');
$('#applyUnitType').val('');
$('#applyUnitWork').val('');
$('#applyUnitBelong').val('');
form.render();
}
form.on('radio(applyFenLeiFilter)', function(data){
var val = data.value;//被点击的radio的value值
if(val == 1){

View File

@ -222,10 +222,11 @@
</div>
</div>
<div class="layui-col-md6 layui-col-sm6">
<div class="layui-form-item">
<div class="layui-form-item" pane>
<label class="layui-form-label"><span style="color: red">*</span>培训类别</label>
<div class="layui-input-block">
<input type="text" id="applyLeiBie" name="applyLeiBie" class="layui-input" value="" placeholder="例如:负责人 或 安全员" maxlength="100" >
<input type="radio" name="applyLeiBie" value="企业主要负责人" title="企业主要负责人" checked>
<input type="radio" name="applyLeiBie" value="安全管理人员" title="安全管理人员">
</div>
</div>
</div>

View File

@ -17,109 +17,37 @@
<div class="layui-row layui-col-space15">
<div class="layui-col-md8">
<div class="layui-row layui-col-space15">
<div class="layui-col-md6">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-header">快捷方式</div>
<div class="layui-card-body">
<div class="layui-carousel layadmin-carousel layadmin-shortcut" id="quickButtons" lay-anim="" lay-indicator="inside" lay-arrow="none" style="width: 100%; height: 280px;">
<div carousel-item="">
<ul class="layui-row layui-col-space10 layui-this">
<li class="layui-col-xs3">
<a lay-href="/route/worktype/tree.html" lay-open-type="1">
<i class="layui-icon layui-icon-console"></i>
<cite>工种管理</cite>
</a>
</li>
<li class="layui-col-xs3">
<a lay-href="/route/traininginstitution/list.html" lay-open-type="1">
<i class="layui-icon layui-icon-chart"></i>
<cite>培训机构管理</cite>
</a>
</li>
<li class="layui-col-xs3">
<a lay-href="/route/examination/station/list.html" lay-open-type="1">
<i class="layui-icon layui-icon-template-1"></i>
<cite>考试机构管理</cite>
</a>
</li>
<!--<li class="layui-col-xs3">
<a lay-href="/route/examinationuser/list.html" lay-open-type="1">
<i class="layui-icon layui-icon-chat"></i>
<cite>考务人员管理</cite>
</a>
</li>-->
<li class="layui-col-xs3">
<a lay-href="/route/examcheck/list.html" lay-open-type="1">
<i class="layui-icon layui-icon-find-fill"></i>
<cite>开班计划审核</cite>
</a>
</li>
<li class="layui-col-xs3">
<a lay-href="/route/examapply/list-check.html" lay-open-type="1">
<i class="layui-icon layui-icon-survey"></i>
<cite>考试申请审核</cite>
</a>
</li>
<!--<li class="layui-col-xs3">
<a lay-href="/route/examapply/list.html" lay-open-type="1">
<i class="layui-icon layui-icon-user"></i>
<cite>考试信息分配</cite>
</a>
</li>-->
</ul>
<!--<ul class="layui-row layui-col-space10"></ul>-->
</div>
<div class="layui-carousel-ind">
<ul>
<li class="layui-this"></li>
<!--<li class=""></li>-->
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="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 class="layui-carousel layadmin-carousel layadmin-backlog" lay-anim="" id="typeCount" lay-indicator="inside" lay-arrow="none" style="width: 100%; height: 280px;">
<div carousel-item="">
<ul class="layui-row layui-col-space10 layui-this">
<li class="layui-col-xs6">
<a lay-href="" class="layadmin-backlog-body">
<h3>培训机构</h3>
<p><cite id="trainingInstitutionNum">0</cite></p>
<h2>注册人数</h2>
<p><cite id="registerCount">0</cite></p>
</a>
</li>
<li class="layui-col-xs6">
<a lay-href="" class="layadmin-backlog-body">
<h3>考试机构</h3>
<p><cite id="stationInstitutionNum">0</cite></p>
<h2>参培人数</h2>
<p><cite id="trainingCount">0</cite></p>
</a>
</li>
<!--<li class="layui-col-xs6">
<li class="layui-col-xs6">
<a lay-href="" class="layadmin-backlog-body">
<h3>考务人员</h3>
<p><cite id="examinationNum">0</cite></p>
<h2>开班申请</h2>
<p><cite id="classPlanCount">0</cite></p>
</a>
</li>-->
<!--<li class="layui-col-xs6">-->
<!--&lt;!&ndash;onclick="layer.tips('不跳转', this, {tips: 3});"&ndash;&gt;-->
<!--<a href="javascript:;" class="layadmin-backlog-body">-->
<!--<h3>工种</h3>-->
<!--<p><cite>20</cite></p>-->
<!--</a>-->
<!--</li>-->
</ul>
<!--<ul class="layui-row layui-col-space10">-->
<!--</ul>-->
</div>
<div class="layui-carousel-ind">
<ul>
<li class="layui-this"></li>
<!--<li class=""></li>-->
</li>
<li class="layui-col-xs6">
<a lay-href="" class="layadmin-backlog-body">
<h2>考试申请</h2>
<p><cite id="examCount">0</cite></p>
</a>
</li>
</ul>
</div>
</div>
@ -189,30 +117,27 @@
new Vue({
el: '#LAY-app',
data: {
trainingInstitutionNum:0,
stationInstitutionNum:0,
registerCount:0,
trainingCount:0,
classPlanCount:0,
examCount:0,
examinationNum:0,
eChart0:null,
eChart1:null,
},
methods: {
initTrainingInstitutionNum:function(){
initRegisterCount:function(){
var self = this;
top.restAjax.get('api/indexcount/count-training-institution-num', {}, null, function(code, data) {
self.trainingInstitutionNum = data.data['num'];
top.restAjax.get('api/indexcount/get-register-num', {}, null, function(code, data) {
self.registerCount = data['registerCount'];
self.trainingCount = data['trainingCount'];
self.classPlanCount = data['classPlanCount'];
self.examCount = data['examCount'];
self.$nextTick(function() {
$('#trainingInstitutionNum').animateNumbers(self.trainingInstitutionNum);
});
}, function(code, data) {
top.dialog.msg(data.msg);
});
},
initStationInstitutionNum:function(){
var self = this;
top.restAjax.get('api/indexcount/count-station-institution-num', {}, null, function(code, data) {
self.stationInstitutionNum = data.data['num'];
self.$nextTick(function() {
$('#stationInstitutionNum').animateNumbers(self.stationInstitutionNum);
$('#registerCount').animateNumbers(self.registerCount);
$('#trainingCount').animateNumbers(self.trainingCount);
$('#classPlanCount').animateNumbers(self.classPlanCount);
$('#examCount').animateNumbers(self.examCount);
});
}, function(code, data) {
top.dialog.msg(data.msg);
@ -394,8 +319,7 @@
var self = this;
$('#eChart0').width($('#layu-col-md4-panel').width());
$('#eChart1').width($('#layu-col-md4-panel').width());
self.initTrainingInstitutionNum();
self.initStationInstitutionNum();
self.initRegisterCount();
self.initExaminationNum();
self.initFullCalendar();
self.initEChart0();