添加人员导出功能 修改成绩导入导出功能
This commit is contained in:
parent
204dfc11b7
commit
0ed8068f8a
@ -1,18 +1,24 @@
|
||||
package cn.com.tenlion.controller.api.classplan;
|
||||
|
||||
import cn.com.tenlion.pojo.dtos.apply.ApplyDTO;
|
||||
import cn.com.tenlion.pojo.dtos.applystudents.ApplyStudentsDTO;
|
||||
import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO;
|
||||
import cn.com.tenlion.pojo.dtos.classplan.ClassPlanReportExamDTO;
|
||||
import cn.com.tenlion.pojo.dtos.worktype.WorkTypeDTO;
|
||||
import cn.com.tenlion.pojo.vos.classplan.ClassPlanVO;
|
||||
import cn.com.tenlion.service.applystudents.IApplyStudentsService;
|
||||
import cn.com.tenlion.service.classplan.IClassPlanService;
|
||||
import cn.com.tenlion.service.examcheck.IExamCheckService;
|
||||
import cn.com.tenlion.service.worktype.IWorkTypeService;
|
||||
import cn.com.tenlion.uploadlistener.ImportExamScoreListener;
|
||||
import cn.com.tenlion.util.IdCardVerifyUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.dictionary.service.IDataService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.pos.DepartmentPO;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
@ -24,7 +30,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -45,6 +54,12 @@ public class ClassPlanController extends DefaultBaseController {
|
||||
private IClassPlanService classPlanService;
|
||||
@Autowired
|
||||
private IExamCheckService examCheckService;
|
||||
@Autowired
|
||||
private IWorkTypeService workTypeService;
|
||||
@Autowired
|
||||
private IApplyStudentsService applyStudentsService;
|
||||
@Autowired
|
||||
private IDataService dataService;
|
||||
|
||||
@ApiOperation(value = "新增", notes = "新增接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@ -350,8 +365,26 @@ public class ClassPlanController extends DefaultBaseController {
|
||||
@PostMapping("import-exam-score")
|
||||
public SuccessResultData importExamSccore(@RequestParam(value = "file") MultipartFile file,
|
||||
@RequestParam(value = "classPlanId") String classPlanId) throws SearchException, IOException {
|
||||
ClassPlanDTO classPlanDTO = classPlanService.get(classPlanId);
|
||||
String workTypeId = classPlanDTO.getWorkerCatalog();
|
||||
// 1 特种作业 2 主负安管 3 主负安管-非高危
|
||||
int usedTemplateKey = 0;
|
||||
// 判断工种适用成绩表
|
||||
WorkTypeDTO workTypeDTO = workTypeService.get(workTypeId);
|
||||
String parentWorkTypeId = workTypeDTO.getWorkTypeParentId();
|
||||
if(!"530279c5-32a9-44db-bbf0-a04ef1cdae66".equals(parentWorkTypeId)){
|
||||
usedTemplateKey = 1;
|
||||
}
|
||||
if("530279c5-32a9-44db-bbf0-a04ef1cdae66".equals(parentWorkTypeId)
|
||||
&& !"9f1ac1a6-7c17-4e1f-a44b-0d2de9b623ef".equals(workTypeId)){
|
||||
usedTemplateKey = 2;
|
||||
}
|
||||
if("530279c5-32a9-44db-bbf0-a04ef1cdae66".equals(parentWorkTypeId)
|
||||
&& "9f1ac1a6-7c17-4e1f-a44b-0d2de9b623ef".equals(workTypeId)){
|
||||
usedTemplateKey = 3;
|
||||
}
|
||||
EasyExcel.read(file.getInputStream(),
|
||||
new ImportExamScoreListener(classPlanService, classPlanId)).sheet().doRead();
|
||||
new ImportExamScoreListener(classPlanService, classPlanId, usedTemplateKey)).sheet().doRead();
|
||||
return new SuccessResultData("导入完成");
|
||||
}
|
||||
|
||||
@ -402,4 +435,46 @@ public class ClassPlanController extends DefaultBaseController {
|
||||
return classPlanService.getArchivesInfo(params);
|
||||
}
|
||||
|
||||
@GetMapping("export-user-excel")
|
||||
public void exportUserExcel(HttpServletResponse response) throws IOException{
|
||||
Map<String, Object> params = requestParams();
|
||||
params.put("applyClassId",params.get("classPlanId").toString());
|
||||
List<ApplyStudentsDTO> list = applyStudentsService.list(params);
|
||||
String excelName = "人员信息表";
|
||||
String fileName = URLEncoder.encode(excelName, "UTF-8");
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
|
||||
List<List<String>> listHeader = new ArrayList<>();
|
||||
String [] headers = {
|
||||
"姓名","性别","身份证号","联系方式","单位","作业类别","准操项目","初训/复训/换证","学历","复审时间","再培训时间"
|
||||
};
|
||||
for(String item : headers) {
|
||||
List<String> title = new ArrayList<>();
|
||||
title.add(item);
|
||||
listHeader.add(title);
|
||||
}
|
||||
List<List<Object>> listData = new ArrayList<>();
|
||||
for (ApplyStudentsDTO item : list) {
|
||||
List<Object> el = new ArrayList<>();
|
||||
el.add(item.getApplyName());
|
||||
String genderCode = IdCardVerifyUtil.getIdCardGender(item.getApplyCardNumber());
|
||||
el.add("1".equals(genderCode) ? "男" : "0".equals(genderCode) ? "女" : "");
|
||||
el.add(item.getApplyCardNumber());
|
||||
el.add(item.getApplyPhone());
|
||||
el.add(item.getApplyUnitName());
|
||||
WorkTypeDTO workTypeDTO = workTypeService.get(item.getApplyWorkTypeId());
|
||||
el.add(workTypeDTO.getWorkTypeParentName());
|
||||
if(item.getApplyLeiBie() != null && !"".equals(item.getApplyLeiBie())){
|
||||
el.add(workTypeDTO.getWorkTypeName() + "-" + item.getApplyLeiBie());
|
||||
} else {
|
||||
el.add(workTypeDTO.getWorkTypeName());
|
||||
}
|
||||
String fenLei = item.getApplyFenLei();
|
||||
el.add("1".equals(fenLei) ? "初训" : "2".equals(fenLei) ? "复训" : "3".equals(fenLei) ? "换证" : "");
|
||||
el.add(item.getApplyCultureLevel());
|
||||
el.add(item.getRePeiXunDate());
|
||||
el.add(item.getRePeiXunDate());
|
||||
listData.add(el);
|
||||
}
|
||||
EasyExcel.write(response.getOutputStream()).sheet("人员信息表").head(listHeader).doWrite(listData);
|
||||
}
|
||||
}
|
@ -132,6 +132,8 @@ public class ApplyDTO {
|
||||
private String peiXunDate;
|
||||
@ApiModelProperty(name = "examScore", value = "考试成绩")
|
||||
private String examScore;
|
||||
@ApiModelProperty(name = "examScoreHandsOn", value = "实操成绩")
|
||||
private String examScoreHandsOn;
|
||||
@ApiModelProperty(name = "applyHealth", value = "健康状况")
|
||||
private String applyHealth;
|
||||
@ApiModelProperty(name = "idCardFrontPhoto", value = "身份证正面")
|
||||
@ -649,4 +651,12 @@ public class ApplyDTO {
|
||||
public void setGmtModified(String gmtModified) {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
public String getExamScoreHandsOn() {
|
||||
return examScoreHandsOn == null ? "" : examScoreHandsOn;
|
||||
}
|
||||
|
||||
public void setExamScoreHandsOn(String examScoreHandsOn) {
|
||||
this.examScoreHandsOn = examScoreHandsOn;
|
||||
}
|
||||
}
|
||||
|
@ -135,6 +135,8 @@ public class ApplyStudentsDTO {
|
||||
private String peiXunDate;
|
||||
@ApiModelProperty(name = "examScore", value = "考试成绩")
|
||||
private String examScore;
|
||||
@ApiModelProperty(name = "examScoreHandsOn", value = "实操成绩")
|
||||
private String examScoreHandsOn;
|
||||
@ApiModelProperty(name = "applyHealth", value = "健康状况")
|
||||
private String applyHealth;
|
||||
@ApiModelProperty(name = "idCardFrontPhoto", value = "身份证正面")
|
||||
@ -665,4 +667,12 @@ public class ApplyStudentsDTO {
|
||||
public void setApplyParentWorkTypeName(String applyParentWorkTypeName) {
|
||||
this.applyParentWorkTypeName = applyParentWorkTypeName;
|
||||
}
|
||||
|
||||
public String getExamScoreHandsOn() {
|
||||
return examScoreHandsOn == null ? "" : examScoreHandsOn;
|
||||
}
|
||||
|
||||
public void setExamScoreHandsOn(String examScoreHandsOn) {
|
||||
this.examScoreHandsOn = examScoreHandsOn;
|
||||
}
|
||||
}
|
||||
|
@ -94,6 +94,8 @@ public class ApplyVO {
|
||||
private String peiXunDate;
|
||||
@ApiModelProperty(name = "examScore", value = "考试成绩")
|
||||
private String examScore;
|
||||
@ApiModelProperty(name = "examScoreHandsOn", value = "实操成绩")
|
||||
private String examScoreHandsOn;
|
||||
@ApiModelProperty(name = "applyHealth", value = "健康状况")
|
||||
private String applyHealth;
|
||||
@ApiModelProperty(name = "idCardFrontPhoto", value = "身份证正面")
|
||||
@ -438,4 +440,12 @@ public class ApplyVO {
|
||||
public void setEducationPhoto(String educationPhoto) {
|
||||
this.educationPhoto = educationPhoto;
|
||||
}
|
||||
|
||||
public String getExamScoreHandsOn() {
|
||||
return examScoreHandsOn == null ? "" : examScoreHandsOn;
|
||||
}
|
||||
|
||||
public void setExamScoreHandsOn(String examScoreHandsOn) {
|
||||
this.examScoreHandsOn = examScoreHandsOn;
|
||||
}
|
||||
}
|
||||
|
@ -743,24 +743,37 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl
|
||||
List<String> applyAuditStates = new ArrayList<>();
|
||||
applyAuditStates.add("0");
|
||||
query.put("applyAuditStates",applyAuditStates);
|
||||
List<ApplyDTO> all = applyService.list(query);
|
||||
res.put("signUpCounts",all.size());
|
||||
List<ApplyDTO> waitPass = applyService.list(query);
|
||||
// 查询已审人员数量
|
||||
applyAuditStates.clear();
|
||||
applyAuditStates.add("2");
|
||||
query.put("applyAuditStates",applyAuditStates);
|
||||
List<ApplyDTO> pass = applyService.list(query);
|
||||
res.put("signUpPassCounts",pass.size());
|
||||
// 查询不通过人数
|
||||
applyAuditStates.clear();
|
||||
applyAuditStates.add("-1");
|
||||
query.put("applyAuditStates",applyAuditStates);
|
||||
List<ApplyDTO> unPass = applyService.list(query);
|
||||
// 查询总报名人数
|
||||
applyAuditStates.clear();
|
||||
applyAuditStates.add("0");
|
||||
applyAuditStates.add("-1");
|
||||
applyAuditStates.add("2");
|
||||
List<ApplyDTO> all = applyService.list(query);
|
||||
// 计算通过率
|
||||
double ratio = 0L;
|
||||
double x = Double.parseDouble(pass.size() + "");
|
||||
double y = Double.parseDouble(all.size() + "");
|
||||
if(y == 0L){
|
||||
if(y == 0L || x == 0L){
|
||||
res.put("ratio","0.00");
|
||||
} else {
|
||||
BigDecimal bigDecimal = new BigDecimal(( x / y ) * 100);
|
||||
res.put("ratio", bigDecimal.setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||
}
|
||||
res.put("signUpWaitCounts",waitPass.size());
|
||||
res.put("signUpPassCounts",pass.size());
|
||||
res.put("signUpUnPassCounts",unPass.size());
|
||||
res.put("signUpAllCounts",all.size());
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -19,11 +19,13 @@ public class ImportExamScoreListener extends AnalysisEventListener<Map<Integer,
|
||||
private static final int BATCH_COUNT = 3000;
|
||||
private IClassPlanService service;
|
||||
private String classPlanId;
|
||||
private int usedTemplateKey;
|
||||
|
||||
|
||||
public ImportExamScoreListener(IClassPlanService serviceObj, String id){
|
||||
public ImportExamScoreListener(IClassPlanService serviceObj, String id, int usedTemplateKey){
|
||||
this.service = serviceObj;
|
||||
this.classPlanId = id;
|
||||
this.usedTemplateKey = usedTemplateKey;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -33,29 +35,82 @@ public class ImportExamScoreListener extends AnalysisEventListener<Map<Integer,
|
||||
if(data.size() >= 5 && IdCardVerifyUtil.isIDCard(data.get(4) + "")){
|
||||
params.put("classPlanId",classPlanId);
|
||||
params.put("applyCardNumber",data.get(4) + "");
|
||||
// 判断成绩单中K列是否为数字,如果是,则表示是主负安管类成绩单
|
||||
boolean isNumColumn = false;
|
||||
int examScore = 0;
|
||||
int reExamScore = 0;
|
||||
switch (usedTemplateKey){
|
||||
case 1 :
|
||||
// 知识成绩
|
||||
try {
|
||||
BigDecimal bigDecimal = new BigDecimal(data.get(10).toString());
|
||||
isNumColumn = true;
|
||||
BigDecimal examScoreCol = new BigDecimal(data.get(12).toString());
|
||||
examScore = Integer.parseInt(data.get(12).toString());
|
||||
} catch (Exception e){
|
||||
isNumColumn = false;
|
||||
examScore = 0;
|
||||
}
|
||||
if(isNumColumn){
|
||||
params.put("examScore",data.get(10) + "");
|
||||
} else {
|
||||
isNumColumn = false;
|
||||
try {
|
||||
BigDecimal bigDecimal = new BigDecimal(data.get(12).toString());
|
||||
isNumColumn = true;
|
||||
}catch (Exception e){
|
||||
isNumColumn = false;
|
||||
BigDecimal examScoreCol = new BigDecimal(data.get(14).toString());
|
||||
reExamScore = Integer.parseInt(data.get(14).toString());
|
||||
} catch (Exception e){
|
||||
reExamScore = 0;
|
||||
}
|
||||
if(isNumColumn){
|
||||
params.put("examScore",data.get(12) + "");
|
||||
} else {
|
||||
params.put("examScore",data.get(11) + "");
|
||||
if(examScore == reExamScore){
|
||||
params.put("examScore", "");
|
||||
}
|
||||
params.put("examScore", examScore > reExamScore ? examScore : reExamScore);
|
||||
// 实操成绩
|
||||
int examScoreHandsOn = 0;
|
||||
int reExamScoreHandsOn = 0;
|
||||
try {
|
||||
BigDecimal examScoreHandsOnCol = new BigDecimal(data.get(13).toString());
|
||||
examScoreHandsOn = Integer.parseInt(data.get(13).toString());
|
||||
} catch (Exception e){
|
||||
examScoreHandsOn = 0;
|
||||
}
|
||||
try {
|
||||
BigDecimal examScoreHandsOnCol = new BigDecimal(data.get(15).toString());
|
||||
reExamScoreHandsOn = Integer.parseInt(data.get(15).toString());
|
||||
} catch (Exception e){
|
||||
reExamScoreHandsOn = 0;
|
||||
}
|
||||
if(examScoreHandsOn == reExamScoreHandsOn){
|
||||
params.put("examScoreHandsOn", "");
|
||||
}
|
||||
params.put("examScoreHandsOn", examScoreHandsOn > reExamScoreHandsOn ?
|
||||
examScoreHandsOn : reExamScoreHandsOn);
|
||||
break;
|
||||
case 2 :
|
||||
// 知识成绩
|
||||
examScore = 0;
|
||||
reExamScore = 0;
|
||||
try {
|
||||
BigDecimal examScoreCol = new BigDecimal(data.get(11).toString());
|
||||
examScore = Integer.parseInt(data.get(11).toString());
|
||||
} catch (Exception e){
|
||||
examScore = 0;
|
||||
}
|
||||
try {
|
||||
BigDecimal examScoreCol = new BigDecimal(data.get(12).toString());
|
||||
reExamScore = Integer.parseInt(data.get(12).toString());
|
||||
} catch (Exception e){
|
||||
reExamScore = 0;
|
||||
}
|
||||
if(examScore == reExamScore){
|
||||
params.put("examScore", "");
|
||||
}
|
||||
params.put("examScore", examScore > reExamScore ? examScore : reExamScore);
|
||||
break;
|
||||
case 3 :
|
||||
examScore = 0;
|
||||
reExamScore = 0;
|
||||
try {
|
||||
BigDecimal examScoreCol = new BigDecimal(data.get(10).toString());
|
||||
examScore = Integer.parseInt(data.get(10).toString());
|
||||
} catch (Exception e){
|
||||
examScore = 0;
|
||||
}
|
||||
params.put("examScore", examScore);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
service.importExamScore(params);
|
||||
}
|
||||
|
@ -51,6 +51,7 @@
|
||||
<result column="re_pei_xun_date" property="rePeiXunDate"/>
|
||||
<result column="pei_xun_date" property="peiXunDate"/>
|
||||
<result column="exam_score" property="examScore"/>
|
||||
<result column="exam_score_hands_on" property="examScoreHandsOn"/>
|
||||
<result column="apply_health" property="applyHealth"/>
|
||||
<result column="id_card_front_photo" property="idCardFrontPhoto"/>
|
||||
<result column="id_card_back_photo" property="idCardBackPhoto"/>
|
||||
@ -281,6 +282,9 @@
|
||||
<if test="examScore != null and examScore != ''">
|
||||
exam_score = #{examScore},
|
||||
</if>
|
||||
<if test="examScoreHandsOn != null and examScoreHandsOn != ''">
|
||||
exam_score_hands_on = #{examScoreHandsOn},
|
||||
</if>
|
||||
<if test="applyHealth != null and applyHealth != ''">
|
||||
apply_health = #{applyHealth},
|
||||
</if>
|
||||
@ -332,6 +336,7 @@
|
||||
t1.apply_fen_lei, t1.apply_lei_bie, t1.apply_zhi_cheng,
|
||||
t1.apply_school, t1.apply_subject, t1.apply_unit_type, t1.apply_unit_work, t1.apply_unit_belong,
|
||||
t1.take_card_time, t1.card_time_limit, t1.take_card_number, t1.re_pei_xun_date, t1.pei_xun_date, t1.exam_score,t1.apply_health,
|
||||
t1.exam_score_hands_on,
|
||||
t1.id_card_front_photo,
|
||||
t1.id_card_back_photo,
|
||||
t1.education_photo,
|
||||
@ -478,6 +483,7 @@
|
||||
t1.apply_fen_lei, t1.apply_lei_bie, t1.apply_zhi_cheng,
|
||||
t1.apply_school, t1.apply_subject, t1.apply_unit_type, t1.apply_unit_work, t1.apply_unit_belong,
|
||||
t1.take_card_time, t1.card_time_limit, t1.take_card_number, t1.re_pei_xun_date, t1.pei_xun_date, t1.exam_score,t1.apply_health,
|
||||
t1.exam_score_hands_on,
|
||||
t1.id_card_front_photo,
|
||||
t1.id_card_back_photo,
|
||||
t1.education_photo,
|
||||
|
@ -49,6 +49,7 @@
|
||||
<result column="re_pei_xun_date" property="rePeiXunDate"/>
|
||||
<result column="pei_xun_date" property="peiXunDate"/>
|
||||
<result column="exam_score" property="examScore"/>
|
||||
<result column="exam_score_hands_on" property="examScoreHandsOn"/>
|
||||
<result column="apply_health" property="applyHealth"/>
|
||||
<result column="id_card_front_photo" property="idCardFrontPhoto"/>
|
||||
<result column="id_card_back_photo" property="idCardBackPhoto"/>
|
||||
@ -228,6 +229,7 @@
|
||||
t1.apply_fen_lei, t1.apply_lei_bie, t1.apply_zhi_cheng,
|
||||
t1.apply_school, t1.apply_subject, t1.apply_unit_type, t1.apply_unit_work, t1.apply_unit_belong,
|
||||
t1.take_card_time, t1.card_time_limit, t1.take_card_number, t1.re_pei_xun_date, t1.pei_xun_date, t1.exam_score,t1.apply_health,
|
||||
t1.exam_score_hands_on,
|
||||
t1.id_card_front_photo,
|
||||
t1.id_card_back_photo,
|
||||
t1.education_photo,
|
||||
@ -275,7 +277,7 @@
|
||||
t1.apply_user_card_photo, t1.apply_audit_state, t1.bind_user_account,t1.apply_take_card_photo,t1.apply_re_pei_xun_photo,
|
||||
t1.apply_fen_lei,t1.apply_lei_bie,t1.apply_zhi_cheng,t1.apply_school,t1.apply_subject,t1.apply_unit_type,t1.apply_unit_work,
|
||||
t1.apply_unit_belong,t1.take_card_time,t1.card_time_limit,t1.take_card_number,t1.re_pei_xun_date, t1.pei_xun_date,t1.exam_score,
|
||||
t1.apply_health, t1.id_card_front_photo,t1.id_card_back_photo,t1.education_photo, t1.creator, t1.gmt_create, t1.modifier, t1.gmt_modified, t1.is_delete
|
||||
t1.apply_health, t1.exam_score_hands_on,t1.id_card_front_photo,t1.id_card_back_photo,t1.education_photo, t1.creator, t1.gmt_create, t1.modifier, t1.gmt_modified, t1.is_delete
|
||||
FROM
|
||||
e_apply_students t1
|
||||
WHERE
|
||||
|
@ -650,11 +650,11 @@
|
||||
<!-- 导入学员成绩 -->
|
||||
<select id="updateStudentsScore" parameterType="map">
|
||||
UPDATE e_apply_students SET
|
||||
exam_score = #{examScore}
|
||||
exam_score = #{examScore},
|
||||
exam_score_hands_on = #{examScoreHandsOn}
|
||||
WHERE
|
||||
apply_class_id = #{classPlanId}
|
||||
AND apply_card_number = #{applyCardNumber}
|
||||
AND exam_score = ''
|
||||
</select>
|
||||
|
||||
<!-- 更新不合格人员的考试成绩为0分 -->
|
||||
|
@ -146,7 +146,16 @@
|
||||
return '-';
|
||||
}
|
||||
},
|
||||
{field: 'examScore', width: 80, title: '成绩', align:'center',
|
||||
{field: 'examScore', width: 100, title: '知识成绩', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData === '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData + '分';
|
||||
}
|
||||
},
|
||||
{field: 'examScoreHandsOn', width: 100, title: '实操成绩', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData === '') {
|
||||
|
@ -19,23 +19,39 @@
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row layui-col-space10">
|
||||
<div class="layui-col-md4 layui-col-xs4">
|
||||
<div class="layui-col-md3 layui-col-xs3">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header" style="background-color: #d7dee2">
|
||||
待审人员数量
|
||||
<span id="signUpCounts" class="layui-badge layui-bg-blue layuiadmin-badge">0 人</span>
|
||||
总人数
|
||||
<span id="signUpAllCounts" class="layui-badge layui-bg-blue layuiadmin-badge">0 人</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4 layui-col-xs4">
|
||||
<div class="layui-col-md2 layui-col-xs2">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header" style="background-color: #d7dee2">
|
||||
已审人员数量
|
||||
待审数量
|
||||
<span id="signUpWaitCounts" class="layui-badge layui-bg-orange layuiadmin-badge">0 人</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md2 layui-col-xs2">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header" style="background-color: #d7dee2">
|
||||
已审数量
|
||||
<span id="signUpPassCounts" class="layui-badge layui-bg-green layuiadmin-badge">0 人</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4 layui-col-xs4">
|
||||
<div class="layui-col-md2 layui-col-xs2">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header" style="background-color: #d7dee2">
|
||||
不通过数量
|
||||
<span id="signUpUnPassCounts" class="layui-badge layui-bg-red layuiadmin-badge">0 人</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md3 layui-col-xs3">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header" style="background-color: #d7dee2">
|
||||
<span id="totalSignUpUser">通过率</span>
|
||||
@ -176,10 +192,14 @@
|
||||
function getSignUserCounts(){
|
||||
top.restAjax.get(top.restAjax.path('api/classplan/get-sign-user-counts', []),
|
||||
{orgId : orgId,workerCatalog : workerCatalog}, null, function (code, data) {
|
||||
var signUpCounts = data.signUpCounts;
|
||||
var signUpAllCounts = data.signUpAllCounts;
|
||||
var signUpWaitCounts = data.signUpWaitCounts;
|
||||
var signUpUnPassCounts = data.signUpUnPassCounts;
|
||||
var signUpPassCounts = data.signUpPassCounts;
|
||||
var ratio = data.ratio;
|
||||
$('#signUpCounts').html(signUpCounts + " 人");
|
||||
$('#signUpAllCounts').html(signUpAllCounts + " 人");
|
||||
$('#signUpWaitCounts').html(signUpWaitCounts + " 人");
|
||||
$('#signUpUnPassCounts').html(signUpUnPassCounts + " 人");
|
||||
$('#signUpPassCounts').html(signUpPassCounts + " 人");
|
||||
if(typeof (workerCatalog) === 'undefined' || workerCatalog == ''){
|
||||
$('#ratio').text(ratio + '%');
|
||||
@ -299,14 +319,11 @@
|
||||
},
|
||||
{field: 'cz', width: 210, title: '操作', align:'left', fixed: 'right',
|
||||
templet: function(row) {
|
||||
var applyAuditState = row['applyAuditState'];
|
||||
var rowData = '<div class="layui-btn-group">';
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="audit">查审</button>';
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-xs" lay-event="show">详情</button>';
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-warm layui-btn-xs" lay-event="updateApplyUser">补充资料</button>'
|
||||
if(applyAuditState == 2){
|
||||
rowData +='<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="archivesEvent">报名表</button>'
|
||||
}
|
||||
rowData +='</div>';
|
||||
return rowData;
|
||||
}
|
||||
|
@ -97,22 +97,25 @@
|
||||
cols: [
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{width:160, title: '操作', fixed: 'left', align:'left',
|
||||
{width:200, title: '操作', fixed: 'left', align:'left',
|
||||
templet: function(row) {
|
||||
var dom = '';
|
||||
if(row['reportType'] === '0'){
|
||||
dom += '<a type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="signUpUserEvent">参培人员</a>';
|
||||
dom += '<a type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="unPassEvent">修改重申</a>';
|
||||
dom += '<a type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="downloadTemplateEvent">导出名单</a>';
|
||||
return dom;
|
||||
}
|
||||
if(row['reportType'] === '1'){
|
||||
dom += '<a type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="signUpUserEvent">参培人员</a>';
|
||||
dom += '<a type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="showEvent">详情</a>';
|
||||
dom += '<a type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="downloadTemplateEvent">导出名单</a>';
|
||||
return dom;
|
||||
}
|
||||
if(row['reportType'] === '-1'){
|
||||
dom += '<a type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="signUpUserEvent">参培人员</a>';
|
||||
dom += '<a type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="unPassEvent">修改重申</a>';
|
||||
dom += '<a type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="downloadTemplateEvent">导出名单</a>';
|
||||
return dom;
|
||||
}
|
||||
return dom;
|
||||
@ -223,7 +226,6 @@
|
||||
},
|
||||
height: $win.height() - 90,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 初始化日期
|
||||
@ -328,6 +330,9 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
if(layEvent == 'downloadTemplateEvent'){
|
||||
window.open('api/classplan/export-user-excel?classPlanId=' + obj.data.classPlanId);
|
||||
}
|
||||
if(layEvent == 'showReasonEvent') {
|
||||
var reason = obj.data.examReason == '' ? '未填写原因' : obj.data.examReason;
|
||||
layer.open({
|
||||
|
@ -126,12 +126,27 @@
|
||||
return '-';
|
||||
}
|
||||
},
|
||||
{field: 'examScore', width: 180, title: '考试成绩', align:'center',fixed: 'right',
|
||||
{field: 'examScore', width: 100, title: '知识成绩', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
if(rowData == '0'){
|
||||
return '-'
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'examScoreHandsOn', width: 100, title: '实操成绩', align:'center',fixed: 'right',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
if(rowData == '0'){
|
||||
return '-'
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
|
@ -85,7 +85,16 @@
|
||||
},
|
||||
cols: [
|
||||
[
|
||||
{field: 'exam_score', width: 80, title: '成绩', align:'center',
|
||||
{field: 'exam_score', width: 100, title: '知识成绩', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData === '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData + '分';
|
||||
}
|
||||
},
|
||||
{field: 'exam_score_hands_on', width: 100, title: '实操成绩', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData === '') {
|
||||
|
Loading…
Reference in New Issue
Block a user