报名信息 新增自定义添加报名信息接口
This commit is contained in:
parent
bd1d51f4db
commit
a4b5fbc9a1
@ -0,0 +1,58 @@
|
|||||||
|
package cn.com.tenlion.controller.api.applyconfig;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.com.tenlion.pojo.vos.apply.ApplyVO;
|
||||||
|
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||||
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
|
import ink.wgink.interfaces.manager.ISystemConfigManager;
|
||||||
|
import ink.wgink.login.base.manager.ConfigManager;
|
||||||
|
import ink.wgink.login.base.service.config.IConfigService;
|
||||||
|
import ink.wgink.pojo.result.ErrorResult;
|
||||||
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: ApplyController
|
||||||
|
* @Description: 报名配置
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2021-05-01 18:49:41
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "报名配置接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(ISystemConstant.API_PREFIX + "/applyconfig")
|
||||||
|
public class ApplyConfigController {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IConfigService configService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改报名信息", notes = "修改报名信息接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "applyId", value = "报名信息ID", paramType = "path")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@PutMapping("update")
|
||||||
|
@CheckRequestBodyAnnotation
|
||||||
|
public SuccessResult update(@RequestBody Map<String,Object> params) {
|
||||||
|
configService.updateConfig("",params.get(""));
|
||||||
|
configService.updateConfig("",params.get(""));
|
||||||
|
configService.updateConfig("",params.get(""));
|
||||||
|
return new SuccessResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// public void a (){
|
||||||
|
// ConfigManager.getInstance().getConfig().
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -1,8 +1,10 @@
|
|||||||
package cn.com.tenlion.controller.app.route.trainingInstitution;
|
package cn.com.tenlion.controller.app.route.trainingInstitution;
|
||||||
|
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
|
import ink.wgink.properties.ServerProperties;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
@ -15,12 +17,16 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
@RequestMapping(ISystemConstant.APP_ROUTE_PREFIX + "/traininginstitutionroute")
|
@RequestMapping(ISystemConstant.APP_ROUTE_PREFIX + "/traininginstitutionroute")
|
||||||
public class TrainingInstitutionRouteController {
|
public class TrainingInstitutionRouteController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ServerProperties serverProperties;
|
||||||
|
|
||||||
@ApiOperation(value = "角色统计页面", notes = "角色统计页面接口")
|
|
||||||
|
@ApiOperation(value = "机构二维码查看页面", notes = "机构二维码查看页面接口")
|
||||||
@GetMapping("get-qrcode-view/{institutionId}")
|
@GetMapping("get-qrcode-view/{institutionId}")
|
||||||
public ModelAndView getqrCodeView(@PathVariable("institutionId") String institutionId){
|
public ModelAndView getqrCodeView(@PathVariable("institutionId") String institutionId){
|
||||||
ModelAndView mv = new ModelAndView("trainingInstitution/qrcode-view");
|
ModelAndView mv = new ModelAndView("trainingInstitution/qrcode-view");
|
||||||
mv.addObject("institutionId",institutionId);
|
mv.addObject("institutionId",institutionId);
|
||||||
|
mv.addObject("systemUrl",serverProperties.getUrl());
|
||||||
return mv;
|
return mv;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ public class ApplyWorkTypeInstitutionDTO extends InstitutionDTO {
|
|||||||
private Integer applyUserNum2;
|
private Integer applyUserNum2;
|
||||||
@ApiModelProperty(name = "applyUserNum3", value = "已通过审核人数")
|
@ApiModelProperty(name = "applyUserNum3", value = "已通过审核人数")
|
||||||
private Integer applyUserNum3;
|
private Integer applyUserNum3;
|
||||||
@ApiModelProperty(name = "QrCode", value = "机构二维码")
|
@ApiModelProperty(name = "qrCode", value = "机构二维码")
|
||||||
private String qrCode;
|
private String qrCode;
|
||||||
@ApiModelProperty(name = "applyStatus", value = "是否可以进行报名 true 可以 false 不可以")
|
@ApiModelProperty(name = "applyStatus", value = "是否可以进行报名 true 可以 false 不可以")
|
||||||
private boolean applyStatus;
|
private boolean applyStatus;
|
||||||
|
@ -32,6 +32,7 @@ import ink.wgink.pojo.ListPage;
|
|||||||
import ink.wgink.pojo.app.AppTokenUser;
|
import ink.wgink.pojo.app.AppTokenUser;
|
||||||
import ink.wgink.pojo.dtos.user.UserDTO;
|
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
|
import ink.wgink.properties.ServerProperties;
|
||||||
import ink.wgink.service.user.pojo.vos.UserVO;
|
import ink.wgink.service.user.pojo.vos.UserVO;
|
||||||
import ink.wgink.service.user.service.IUserService;
|
import ink.wgink.service.user.service.IUserService;
|
||||||
import ink.wgink.util.QRCodeUtil;
|
import ink.wgink.util.QRCodeUtil;
|
||||||
@ -81,6 +82,11 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
|||||||
private IUserService userService;
|
private IUserService userService;
|
||||||
@Value("${user.default-password:" + ISystemConstant.DEFAULT_PASSWORD + "}")
|
@Value("${user.default-password:" + ISystemConstant.DEFAULT_PASSWORD + "}")
|
||||||
private String defaultPassword;
|
private String defaultPassword;
|
||||||
|
@Autowired
|
||||||
|
private ServerProperties serverProperties;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private ISystemConfigManager systemConfigManager;
|
private ISystemConfigManager systemConfigManager;
|
||||||
|
|
||||||
@ -163,7 +169,7 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
|||||||
if(applyDTO.getApplyAuditState() != 0){
|
if(applyDTO.getApplyAuditState() != 0){
|
||||||
throw new SearchException("报名信息已审核");
|
throw new SearchException("报名信息已审核");
|
||||||
}
|
}
|
||||||
if(!examCheckService.getExamCheck(applyDTO.getApplyWorkTypeId(),applyDTO.getApplyInstitutionId())){
|
if(!examCheckService.getExamCheckFailOrBack(applyDTO.getApplyWorkTypeId(),applyDTO.getApplyInstitutionId())){
|
||||||
throw new SaveException("该人员报名的班级已提交开班审核");
|
throw new SaveException("该人员报名的班级已提交开班审核");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,16 +250,17 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
|
|||||||
}else{
|
}else{
|
||||||
trainingInstitutionWorkTypeDTO.setApplyStatus(examCheckService.getExamCheck(workTypeId,row.getInstitutionId()));
|
trainingInstitutionWorkTypeDTO.setApplyStatus(examCheckService.getExamCheck(workTypeId,row.getInstitutionId()));
|
||||||
}
|
}
|
||||||
trainingInstitutionWorkTypeDTO.setQrCode("123");
|
trainingInstitutionWorkTypeDTO.setQrCode(createQrCode(row.getInstitutionId()));
|
||||||
|
|
||||||
list.add(trainingInstitutionWorkTypeDTO);
|
list.add(trainingInstitutionWorkTypeDTO);
|
||||||
}
|
}
|
||||||
return new SuccessResultList<>(list, trainingInstitutionWorkTypeList.getPage(), trainingInstitutionWorkTypeList.getTotal());
|
return new SuccessResultList<>(list, trainingInstitutionWorkTypeList.getPage(), trainingInstitutionWorkTypeList.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
public String createQrCode(String iId) throws Exception{
|
public String createQrCode(String id) throws Exception{
|
||||||
|
String content = serverProperties.getUrl()+"/approute/traininginstitutionroute/get-qrcode-view/"+id;
|
||||||
ByteArrayOutputStream stream = new ByteArrayOutputStream();
|
ByteArrayOutputStream stream = new ByteArrayOutputStream();
|
||||||
ImageIO.write(QRCodeUtil.createQrCode(60,60,"12313",null), "png", stream);
|
ImageIO.write(QRCodeUtil.createQrCode(150,150,content,null), "png", stream);
|
||||||
// 对字节数组Base64编码
|
// 对字节数组Base64编码
|
||||||
Base64 base = new Base64();
|
Base64 base = new Base64();
|
||||||
String base64 = base.encodeToString(stream.toByteArray());
|
String base64 = base.encodeToString(stream.toByteArray());
|
||||||
|
@ -5,4 +5,8 @@ p{
|
|||||||
font-size: .32rem;
|
font-size: .32rem;
|
||||||
color: #000;
|
color: #000;
|
||||||
line-height: .6rem;
|
line-height: .6rem;
|
||||||
|
}
|
||||||
|
img{
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: .3rem;
|
||||||
}
|
}
|
160
src/main/resources/static/route/applyconfig/show.html
Normal file
160
src/main/resources/static/route/applyconfig/show.html
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<base href="/signup/">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="renderer" content="webkit">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||||
|
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||||
|
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||||
|
<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-card">
|
||||||
|
<div class="layui-card-header">
|
||||||
|
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||||
|
<a href="javascript:void(0);"><cite>开班人数设置</cite></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="layui-card-body" style="padding: 15px;">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="number" name="changePasswordNoticeDays" lay-verify="required" placeholder="人数" class="layui-input">
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-mid layui-word-aux">人数</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-header">
|
||||||
|
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||||
|
<a href="javascript:void(0);"><cite>开班自动报备小时设置</cite></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="layui-card-body" style="padding: 15px;">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="number" name="changePasswordNoticeDays" lay-verify="required" placeholder="小时" class="layui-input">
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-mid layui-word-aux">小时</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-header">
|
||||||
|
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||||
|
<a href="javascript:void(0);"><cite>未开班人数不变提醒天数</cite></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="layui-card-body" style="padding: 15px;">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="number" name="changePasswordNoticeDays" lay-verify="required" placeholder="天数" class="layui-input">
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-mid layui-word-aux">天数</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-layout-admin">
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<div class="layui-footer" style="left: 0;">
|
||||||
|
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交修改</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||||
|
<script>
|
||||||
|
layui.config({
|
||||||
|
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||||
|
}).extend({
|
||||||
|
index: 'lib/index' //主入口模块
|
||||||
|
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||||
|
var $ = layui.$;
|
||||||
|
var form = layui.form;
|
||||||
|
var laytpl = layui.laytpl;
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
var applyAuditLogId = top.restAjax.params(window.location.href).applyAuditLogId;
|
||||||
|
|
||||||
|
var wangEditor = window.wangEditor;
|
||||||
|
var wangEditorObj = {};
|
||||||
|
var viewerObj = {};
|
||||||
|
|
||||||
|
function closeBox() {
|
||||||
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 初始化内容
|
||||||
|
function initData() {
|
||||||
|
var loadLayerIndex;
|
||||||
|
top.restAjax.get(top.restAjax.path('api/applyauditlog/get/{applyAuditLogId}', [applyAuditLogId]), {}, null, function(code, data) {
|
||||||
|
var dataFormData = {};
|
||||||
|
for(var i in data) {
|
||||||
|
dataFormData[i] = data[i] +'';
|
||||||
|
}
|
||||||
|
form.val('dataForm', dataFormData);
|
||||||
|
form.render(null, 'dataForm');
|
||||||
|
initApplyAuditTimeDateTime();
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||||
|
}, function() {
|
||||||
|
top.dialog.close(loadLayerIndex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//initData();
|
||||||
|
|
||||||
|
// 提交表单
|
||||||
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
|
top.dialog.close(index);
|
||||||
|
var loadLayerIndex;
|
||||||
|
top.restAjax.put(top.restAjax.path('api/applyauditlog/update/{applyAuditLogId}', [applyAuditLogId]), formData.field, null, function(code, data) {
|
||||||
|
var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, {
|
||||||
|
time: 0,
|
||||||
|
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||||
|
shade: 0.3,
|
||||||
|
yes: function(index) {
|
||||||
|
top.dialog.close(index);
|
||||||
|
window.location.reload();
|
||||||
|
},
|
||||||
|
btn2: function() {
|
||||||
|
closeBox();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||||
|
}, function() {
|
||||||
|
top.dialog.close(loadLayerIndex);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.close').on('click', function() {
|
||||||
|
closeBox();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 校验
|
||||||
|
form.verify({
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -6,38 +6,45 @@
|
|||||||
<title>安全生产三项人员考试服务平台</title>
|
<title>安全生产三项人员考试服务平台</title>
|
||||||
<link rel="stylesheet" href="assets/qrcodeview/css/reset.css">
|
<link rel="stylesheet" href="assets/qrcodeview/css/reset.css">
|
||||||
<link rel="stylesheet" href="assets/qrcodeview/css/style.css">
|
<link rel="stylesheet" href="assets/qrcodeview/css/style.css">
|
||||||
|
|
||||||
<script src="assets/qrcodeview/js/rem.js"></script>
|
<script src="assets/qrcodeview/js/rem.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
|
<input id="institutionId" type="hidden" th:value="${institutionId}">
|
||||||
|
<input id="systemPath" type="hidden" th:value="${systemUrl}">
|
||||||
<div class="main" v-cloak>
|
<div class="main" v-cloak>
|
||||||
<p>机构名称:{{orgInfo.institutionName}}</p>
|
<p>机构名称:{{orgInfo.institutionName}}</p>
|
||||||
<p>机构地址:{{orgInfo.institutionAddress}}</p>
|
<p>机构地址:{{orgInfo.institutionAddress}}</p>
|
||||||
<p>机构简介:{{orgInfo.institutionDesc}}</p>
|
<p>机构简介:{{orgInfo.institutionDesc}}</p>
|
||||||
<p>负责人:{{orgInfo.institutionPrincipal}}</p>
|
<p>负责人:{{orgInfo.institutionPrincipal}}</p>
|
||||||
<p>联系方式:{{orgInfo.institutionContact}}</p>
|
<p>联系方式:{{orgInfo.institutionContact}}</p>
|
||||||
|
<img :src="url + '/route/file/download/true/' + img" alt="" v-for="img in orgInfo.institutionImage">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="js/jquery-2.1.4.min.js"></script>
|
<script src="assets/qrcodeview/js/jquery-2.1.4.min.js"></script>
|
||||||
<script src="js/vue.js"></script>
|
<script src="assets/qrcodeview/js/vue.js"></script>
|
||||||
<script src="js/ajax.js"></script>
|
<script src="assets/qrcodeview/js/ajax.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var vue = new Vue({
|
var vue = new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
data: {
|
data: {
|
||||||
url: 'http://192.168.0.120:7009/signup/',
|
url: '',
|
||||||
orgInfo: {},
|
orgInfo: {},
|
||||||
orgId: '${institutionId}'
|
orgId: ''
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getOrgDetail: function () {
|
getOrgDetail: function () {
|
||||||
var self = this
|
var self = this
|
||||||
doGetForm(self.url + 'app/traininginstitution/get/release/' + self.orgId, {}, null, function (code, data) {
|
doGetForm(self.url + '/app/traininginstitution/get/release/' + self.orgId, {}, null, function (code, data) {
|
||||||
|
data.institutionImage = data.institutionImage.split(',')
|
||||||
self.orgInfo = data
|
self.orgInfo = data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
|
this.orgId = $("#institutionId").val()
|
||||||
|
this.url = $("#systemPath").val()
|
||||||
this.getOrgDetail()
|
this.getOrgDetail()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user