更新部分表单
This commit is contained in:
parent
bc9ca7caa4
commit
cbe93c4f53
@ -6,12 +6,14 @@ 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.apply.IApplyService;
|
||||
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 cn.com.tenlion.util.ImportErrorData;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
@ -59,6 +61,8 @@ public class ClassPlanController extends DefaultBaseController {
|
||||
@Autowired
|
||||
private IApplyStudentsService applyStudentsService;
|
||||
@Autowired
|
||||
private IApplyService applyService;
|
||||
@Autowired
|
||||
private IDataService dataService;
|
||||
|
||||
@ApiOperation(value = "新增", notes = "新增接口")
|
||||
@ -477,4 +481,45 @@ public class ClassPlanController extends DefaultBaseController {
|
||||
}
|
||||
EasyExcel.write(response.getOutputStream()).sheet("人员信息表").head(listHeader).doWrite(listData);
|
||||
}
|
||||
|
||||
@GetMapping("export-apply-user-excel")
|
||||
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");
|
||||
List<List<String>> listHeader = new ArrayList<>();
|
||||
for(String item : headers) {
|
||||
List<String> title = new ArrayList<>();
|
||||
title.add(item);
|
||||
listHeader.add(title);
|
||||
}
|
||||
if(params.get("applyAuditStates") != null
|
||||
&& params.get("applyAuditStates").toString().length() > 0){
|
||||
params.put("applyAuditStates", Arrays.asList(params.get("applyAuditStates").toString().split(",")));
|
||||
}
|
||||
List<List<Object>> listData = new ArrayList<>();
|
||||
List<ApplyDTO> list = applyService.list(params);
|
||||
for (ApplyDTO item : list) {
|
||||
List<Object> el = new ArrayList<>();
|
||||
el.add(item.getApplyName());
|
||||
String gender = IdCardVerifyUtil.getIdCardGender(item.getApplyCardNumber());
|
||||
el.add("1".equals(gender) ? "男" : "0".equals(gender) ? "女" : "");
|
||||
el.add(item.getApplyCardNumber());
|
||||
el.add(item.getApplyPhone());
|
||||
el.add(item.getApplyCultureLevelName());
|
||||
WorkTypeDTO workTypeDTO = workTypeService.get(item.getApplyWorkTypeId());
|
||||
el.add(workTypeDTO.getWorkTypeParentName());
|
||||
el.add(workTypeDTO.getWorkTypeName());
|
||||
el.add(item.getApplyUnitName());
|
||||
String fenLei = item.getApplyFenLei();
|
||||
el.add("1".equals(fenLei) ? "初训" : "2".equals(fenLei) ? "复训" : "3".equals(fenLei) ? "换证" : "");
|
||||
Integer applyAuditState = item.getApplyAuditState();
|
||||
el.add(applyAuditState == -1 ? "审核不通过" : applyAuditState == 0 ? "待审核" : applyAuditState == 2 ? "审核通过" : "");
|
||||
listData.add(el);
|
||||
}
|
||||
EasyExcel.write(response.getOutputStream()).sheet("人员基础信息异常数据").head(listHeader).doWrite(listData);
|
||||
}
|
||||
}
|
@ -508,6 +508,8 @@
|
||||
t1.apply_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t1.apply_card_number LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t1.apply_unit_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
|
@ -396,7 +396,7 @@
|
||||
}
|
||||
if(data['applyFenLei'] == '3'){
|
||||
$('.fuxun-upload').show();
|
||||
$('.zaipei-upload').hide();
|
||||
$('.zaipei-upload').show();
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
|
@ -63,7 +63,7 @@
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="keywords" class="layui-input search-item"
|
||||
style="width: 150px" autocomplete="off" placeholder="姓名|手机号|身份证">
|
||||
style="width: 170px" autocomplete="off" placeholder="姓名|手机号|身份证|单位">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="startTime" class="layui-input search-item"
|
||||
@ -102,6 +102,9 @@
|
||||
<button type="button" id="add-apply-user" class="layui-btn layui-btn-sm layui-btn-normal">
|
||||
<i class="fa fa-lg fa-plus"></i> 手动报名
|
||||
</button>
|
||||
<button type="button" id="downloadInfo" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-download"></i> 导出信息
|
||||
</button>
|
||||
</div>
|
||||
<script type="text/html" id="headerToolBar">
|
||||
<div class="layui-btn-group">
|
||||
@ -145,6 +148,24 @@
|
||||
}
|
||||
init();
|
||||
|
||||
$(document).on('click', '#downloadInfo', function() {
|
||||
if(orgId == ''){
|
||||
return;
|
||||
}
|
||||
var url = 'api/classplan/export-apply-user-excel?t=' + new Date();
|
||||
url += '&keywords=' + encodeURI($('#keywords').val());
|
||||
if($('#applyAuditStates').val() == ''){
|
||||
url += '&applyAuditStates=-1,0,2';
|
||||
} else {
|
||||
url += '&applyAuditStates=' + $('#applyAuditStates').val();
|
||||
}
|
||||
url += '&applyFenLei=' + $('#applyFenLei').val();
|
||||
url += '&applyInstitutionId=' + orgId;
|
||||
url += '&applyWorkTypeId=' + workerCatalog;
|
||||
window.open(url);
|
||||
return;
|
||||
});
|
||||
|
||||
// 查询机构信息
|
||||
function getOrgInfo(){
|
||||
top.restAjax.get(top.restAjax.path('api/teacher/getorginfo', []), {}, null, function (code, data) {
|
||||
|
@ -451,7 +451,7 @@
|
||||
}
|
||||
if(val == 3){
|
||||
$('.fuxun-upload').show();
|
||||
$('.zaipei-upload').hide();
|
||||
$('.zaipei-upload').show();
|
||||
initApplyTakeCardPhotoUploadFile();
|
||||
initApplyRePeiXunPhotoUploadFile();
|
||||
}
|
||||
|
@ -122,7 +122,7 @@
|
||||
type: 'time',
|
||||
trigger: 'click',
|
||||
min: '08:00:00',
|
||||
max: '21:00:00'
|
||||
max: '23:00:00'
|
||||
});
|
||||
laydate.render({
|
||||
format : 'HH:mm',
|
||||
@ -130,7 +130,7 @@
|
||||
type: 'time',
|
||||
trigger: 'click',
|
||||
min: '08:00:00',
|
||||
max: '21:00:00'
|
||||
max: '23:00:00'
|
||||
});
|
||||
initLessons();
|
||||
laytpl(document.getElementById('teacherTemplate').innerHTML).render([], function(html) {
|
||||
|
@ -392,7 +392,7 @@
|
||||
}
|
||||
if(data['applyFenLei'] == '3'){
|
||||
$('.fuxun-upload').show();
|
||||
$('.zaipei-upload').hide();
|
||||
$('.zaipei-upload').show();
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
|
@ -432,7 +432,7 @@
|
||||
}
|
||||
if(data['applyFenLei'] == '3'){
|
||||
$('.fuxun-upload').show();
|
||||
$('.zaipei-upload').hide();
|
||||
$('.zaipei-upload').show();
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
|
@ -113,7 +113,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=oWU9RD4ihDHAafexgI6XOrTK8lDatRju"></script>
|
||||
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=oWU9RD4ihDHAafexgI6XOrTK8lDatRju"></script>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
||||
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user