考试计划字段新增。
This commit is contained in:
parent
9f84f9204e
commit
b4344d623b
@ -34,6 +34,7 @@ public class ExamPlanBO {
|
||||
private String site;
|
||||
private String roomName;
|
||||
private String siteName;
|
||||
private String signupTime;
|
||||
private String creator;
|
||||
private String gmtCreate;
|
||||
private String modifier;
|
||||
@ -232,6 +233,14 @@ public class ExamPlanBO {
|
||||
this.siteName = siteName;
|
||||
}
|
||||
|
||||
public String getSignupTime() {
|
||||
return signupTime;
|
||||
}
|
||||
|
||||
public void setSignupTime(String signupTime) {
|
||||
this.signupTime = signupTime;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator == null ? "" : creator.trim();
|
||||
}
|
||||
|
@ -80,6 +80,8 @@ public class ExamPlanDTO {
|
||||
private Integer surplusCount;
|
||||
@ApiModelProperty(name = "btnStatus", value = "按钮状态")
|
||||
private String btnStatus;
|
||||
@ApiModelProperty(name = "signupTime", value = "报名截止时间")
|
||||
private String signupTime;
|
||||
|
||||
public String getExamPlanId() {
|
||||
return examPlanId == null ? "" : examPlanId.trim();
|
||||
@ -344,4 +346,12 @@ public class ExamPlanDTO {
|
||||
public void setBtnStatus(String btnStatus) {
|
||||
this.btnStatus = btnStatus;
|
||||
}
|
||||
|
||||
public String getSignupTime() {
|
||||
return signupTime;
|
||||
}
|
||||
|
||||
public void setSignupTime(String signupTime) {
|
||||
this.signupTime = signupTime;
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ public class ExamPlanPO {
|
||||
private String site;
|
||||
private String roomName;
|
||||
private String siteName;
|
||||
private String signupTime;
|
||||
private String creator;
|
||||
private String gmtCreate;
|
||||
private String modifier;
|
||||
@ -232,6 +233,14 @@ public class ExamPlanPO {
|
||||
this.siteName = siteName;
|
||||
}
|
||||
|
||||
public String getSignupTime() {
|
||||
return signupTime;
|
||||
}
|
||||
|
||||
public void setSignupTime(String signupTime) {
|
||||
this.signupTime = signupTime;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator == null ? "" : creator.trim();
|
||||
}
|
||||
|
@ -28,10 +28,10 @@ public class ExamPlanVO {
|
||||
@CheckNumberAnnotation(name = "1:知识;2:实操;3:补考")
|
||||
private Integer examType;
|
||||
@ApiModelProperty(name = "startTime", value = "考试开始时间")
|
||||
@CheckEmptyAnnotation(name = "考试开始时间", verifyType = "datetime")
|
||||
// @CheckEmptyAnnotation(name = "考试开始时间", verifyType = "datetime")
|
||||
private String startTime;
|
||||
@ApiModelProperty(name = "endTime", value = "考试结束时间")
|
||||
@CheckEmptyAnnotation(name = "考试结束时间", verifyType = "datetime")
|
||||
// @CheckEmptyAnnotation(name = "考试结束时间", verifyType = "datetime")
|
||||
private String endTime;
|
||||
@ApiModelProperty(name = "examCount", value = "考试人数")
|
||||
private String examCount;
|
||||
@ -65,6 +65,8 @@ public class ExamPlanVO {
|
||||
private String roomName;
|
||||
@ApiModelProperty(name = "siteName", value = "考点名称")
|
||||
private String siteName;
|
||||
@ApiModelProperty(name = "signupTime", value = "报名截止时间")
|
||||
private String signupTime;
|
||||
|
||||
public String getName() {
|
||||
return name == null ? "" : name.trim();
|
||||
@ -249,4 +251,12 @@ public class ExamPlanVO {
|
||||
public void setSiteName(String siteName) {
|
||||
this.siteName = siteName;
|
||||
}
|
||||
|
||||
public String getSignupTime() {
|
||||
return signupTime;
|
||||
}
|
||||
|
||||
public void setSignupTime(String signupTime) {
|
||||
this.signupTime = signupTime;
|
||||
}
|
||||
}
|
||||
|
@ -125,10 +125,11 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist
|
||||
}
|
||||
/**
|
||||
* 判断考试时间是否为空
|
||||
* renpc2021-06-17注释掉此段内容
|
||||
*/
|
||||
if (StringUtils.isEmpty(dDistributionSaveVO.getDistributionTime())) {
|
||||
/*if (StringUtils.isEmpty(dDistributionSaveVO.getDistributionTime())) {
|
||||
throw new SaveException("考试时间不能为空");
|
||||
}
|
||||
}*/
|
||||
/**
|
||||
* 判断计划名称是否为空
|
||||
*/
|
||||
@ -143,10 +144,11 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist
|
||||
}
|
||||
/**
|
||||
* 判断考试人数是否为空
|
||||
* renpc2021-06-17注释掉此段内容
|
||||
*/
|
||||
if (dDistributionSaveVO.getDistributionNumber() == null || dDistributionSaveVO.getDistributionNumber() < 1) {
|
||||
/*if (dDistributionSaveVO.getDistributionNumber() == null || dDistributionSaveVO.getDistributionNumber() < 1) {
|
||||
throw new SaveException("考试人数不合法");
|
||||
}
|
||||
}*/
|
||||
/**
|
||||
* 判断预计考试时间是否为空是否大于今天
|
||||
*/
|
||||
@ -166,9 +168,10 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist
|
||||
for (OrganizationDTO dto : orgList) {
|
||||
totalNumber = totalNumber + dto.getOrganizationUserNum();
|
||||
}
|
||||
if(totalNumber < dDistributionSaveVO.getDistributionNumber()) {
|
||||
// renpc2021-06-17注释掉此段内容
|
||||
/*if(totalNumber < dDistributionSaveVO.getDistributionNumber()) {
|
||||
throw new SaveException("该考点无法容纳本次考试的人数");
|
||||
}
|
||||
}*/
|
||||
Map<String, Object> save = HashMapUtil.beanToMap(dDistributionSaveVO);
|
||||
save.put("distributionAllotTime", "");
|
||||
save.put("distributionFields", "");
|
||||
|
@ -151,7 +151,7 @@ public class ExamPlanServiceImpl extends DefaultBaseService implements IExamPlan
|
||||
distributionSaveVO.setPlanName(examPlanVO.getName());
|
||||
distributionSaveVO.setDistributionTime(examPlanVO.getStartTime());
|
||||
distributionSaveVO.setDistributionEndTime(examPlanVO.getEndTime());
|
||||
distributionSaveVO.setDistributionNumber(Integer.valueOf(examPlanVO.getExamCount()));
|
||||
// distributionSaveVO.setDistributionNumber(Integer.valueOf(examPlanVO.getExamCount()));
|
||||
distributionSaveVO.setStationId(examPlanVO.getSite());
|
||||
distributionService.saveReturnId(distributionSaveVO);
|
||||
}
|
||||
@ -245,7 +245,7 @@ public class ExamPlanServiceImpl extends DefaultBaseService implements IExamPlan
|
||||
String nowTime = simpleDateFormat.format(new Date());
|
||||
for(ExamPlanDTO examPlanDTO: list) {
|
||||
examPlanDTO.setBtnStatus("确认报考");
|
||||
Integer count = Integer.valueOf(examPlanDTO.getExamCount());
|
||||
// Integer count = Integer.valueOf(examPlanDTO.getExamCount());
|
||||
params = new HashMap<>(1);
|
||||
params.put("classPlanId", examPlanDTO.getExamPlanId());
|
||||
// 查找并判断当前用户是否可以报考
|
||||
@ -270,9 +270,9 @@ public class ExamPlanServiceImpl extends DefaultBaseService implements IExamPlan
|
||||
Integer overCount = applyStudentsNewDTOList1.size();
|
||||
examPlanDTO.setOverCount(overCount);
|
||||
// 是否可以继续申报按钮控制
|
||||
if(overCount >= count) {
|
||||
/*if(overCount >= count) {
|
||||
examPlanDTO.setBtnStatus("暂停申报");
|
||||
}
|
||||
}*/
|
||||
}
|
||||
// 查找审核通过人数
|
||||
params.put("checkStatus", 1);
|
||||
@ -281,24 +281,25 @@ public class ExamPlanServiceImpl extends DefaultBaseService implements IExamPlan
|
||||
Integer passCount = applyStudentsNewDTOList2.size();
|
||||
examPlanDTO.setPassCount(passCount);
|
||||
// 计算剩余未报人数
|
||||
examPlanDTO.setSurplusCount(count - passCount);
|
||||
// examPlanDTO.setSurplusCount(count - passCount);
|
||||
// 是否可以继续申报按钮控制
|
||||
if(passCount >= count) {
|
||||
/*if(passCount >= count) {
|
||||
examPlanDTO.setBtnStatus("暂停申报");
|
||||
}*/
|
||||
}
|
||||
String endTime = examPlanDTO.getSignupTime();
|
||||
if(!StringUtils.isEmpty(endTime)) {
|
||||
try{
|
||||
// 时间比较
|
||||
Date nowDate = simpleDateFormat.parse(nowTime);
|
||||
Date endDate = simpleDateFormat.parse(endTime);
|
||||
if(nowDate.getTime() >= endDate.getTime()) {
|
||||
examPlanDTO.setBtnStatus("报名截止");
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
String endTime = examPlanDTO.getStartTime();
|
||||
try{
|
||||
// 时间比较
|
||||
Date nowDate = simpleDateFormat.parse(nowTime);
|
||||
Date endDate = simpleDateFormat.parse(endTime);
|
||||
if(nowDate.getTime() >= endDate.getTime()) {
|
||||
examPlanDTO.setBtnStatus("报名截止");
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
@ -27,6 +27,7 @@
|
||||
<result column="site" property="site"/>
|
||||
<result column="room_name" property="roomName"/>
|
||||
<result column="site_name" property="siteName"/>
|
||||
<result column="signup_time" property="signupTime"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
<result column="modifier" property="modifier"/>
|
||||
@ -59,6 +60,7 @@
|
||||
<result column="site" property="site"/>
|
||||
<result column="room_name" property="roomName"/>
|
||||
<result column="site_name" property="siteName"/>
|
||||
<result column="signup_time" property="signupTime"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
<result column="modifier" property="modifier"/>
|
||||
@ -91,6 +93,7 @@
|
||||
<result column="site" property="site"/>
|
||||
<result column="room_name" property="roomName"/>
|
||||
<result column="site_name" property="siteName"/>
|
||||
<result column="signup_time" property="signupTime"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
<result column="modifier" property="modifier"/>
|
||||
@ -125,6 +128,7 @@
|
||||
site,
|
||||
room_name,
|
||||
site_name,
|
||||
signup_time,
|
||||
creator,
|
||||
gmt_create,
|
||||
modifier,
|
||||
@ -155,6 +159,7 @@
|
||||
#{site},
|
||||
#{roomName},
|
||||
#{siteName},
|
||||
#{signupTime},
|
||||
#{creator},
|
||||
#{gmtCreate},
|
||||
#{modifier},
|
||||
@ -262,6 +267,9 @@
|
||||
</if>
|
||||
<if test="siteName != null and siteName != ''">
|
||||
site_name = #{siteName},
|
||||
</if>
|
||||
<if test="signupTime != null and signupTime != ''">
|
||||
signup_time = #{signupTime},
|
||||
</if>
|
||||
gmt_modified = #{gmtModified},
|
||||
modifier = #{modifier},
|
||||
@ -296,6 +304,7 @@
|
||||
t1.site,
|
||||
t1.room_name,
|
||||
t1.site_name,
|
||||
t1.signup_time,
|
||||
t1.exam_plan_id
|
||||
FROM
|
||||
e_exam_plan t1
|
||||
@ -338,6 +347,7 @@
|
||||
t1.site,
|
||||
t1.room_name,
|
||||
t1.site_name,
|
||||
t1.signup_time,
|
||||
t1.creator,
|
||||
t1.gmt_create,
|
||||
t1.modifier,
|
||||
@ -380,6 +390,7 @@
|
||||
t1.site,
|
||||
t1.room_name,
|
||||
t1.site_name,
|
||||
t1.signup_time,
|
||||
t1.creator,
|
||||
t1.gmt_create,
|
||||
t1.modifier,
|
||||
@ -422,6 +433,7 @@
|
||||
t1.site,
|
||||
t1.room_name,
|
||||
t1.site_name,
|
||||
t1.signup_time,
|
||||
1
|
||||
FROM
|
||||
e_exam_plan t1
|
||||
@ -489,6 +501,7 @@
|
||||
t1.site,
|
||||
t1.room_name,
|
||||
t1.site_name,
|
||||
t1.signup_time,
|
||||
t1.creator,
|
||||
t1.gmt_create,
|
||||
t1.modifier,
|
||||
@ -548,6 +561,7 @@
|
||||
t1.site,
|
||||
t1.room_name,
|
||||
t1.site_name,
|
||||
t1.signup_time,
|
||||
t1.creator,
|
||||
t1.gmt_create,
|
||||
t1.modifier,
|
||||
|
@ -77,7 +77,7 @@
|
||||
<input type="radio" name="examType" value="3" title="补考">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row">
|
||||
<!--<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label" style="width: 120px;">考试开始时间</label>
|
||||
<div class="layui-input-block" style="margin-left: 120px;">
|
||||
@ -90,13 +90,19 @@
|
||||
<input type="text" id="endTime" name="endTime" class="layui-input" value="" placeholder="请选择考试结束时间" readonly style="cursor: pointer;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg6">
|
||||
<!--<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">考试人数<span style="color: red;vertical-align: middle;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" id="examCount" name="examCount" class="layui-input" value="" placeholder="请输入考试人数" maxlength="10" lay-verify="required">
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="layui-col-lg6" pane>
|
||||
<label class="layui-form-label" style="width: 120px;">报名截止时间</label>
|
||||
<div class="layui-input-block" style="margin-left: 120px;">
|
||||
<input type="text" id="signupTime" name="signupTime" class="layui-input" value="" placeholder="请选择考试开始时间" readonly style="cursor: pointer;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">考试等级</label>
|
||||
@ -418,6 +424,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 报名截止时间
|
||||
function initSignupTimeDateTime() {
|
||||
laydate.render({
|
||||
elem: '#signupTime',
|
||||
type: 'datetime',
|
||||
value: new Date(),
|
||||
trigger: 'click'
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化考试开始时间时间戳
|
||||
function initStartTimeDateTime() {
|
||||
laydate.render({
|
||||
@ -537,6 +553,7 @@
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
initSignupTimeDateTime();
|
||||
initStartTimeDateTime();
|
||||
initEndTimeDateTime();
|
||||
initPictureUploadFile();
|
||||
|
@ -77,7 +77,7 @@
|
||||
<input type="radio" name="examType" value="3" title="补考">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row">
|
||||
<!--<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label" style="width: 120px;">考试开始时间</label>
|
||||
<div class="layui-input-block" style="margin-left: 120px;">
|
||||
@ -90,13 +90,19 @@
|
||||
<input type="text" id="endTime" name="endTime" class="layui-input" value="" placeholder="请选择考试结束时间" readonly style="cursor: pointer;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="layui-form-item layui-row">
|
||||
<div class="layui-col-lg6">
|
||||
<!--<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">考试人数<span style="color: red;vertical-align: middle;">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" id="examCount" name="examCount" class="layui-input" value="" placeholder="请输入考试人数" maxlength="10" lay-verify="required">
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="layui-col-lg6" pane>
|
||||
<label class="layui-form-label" style="width: 120px;">报名截止时间</label>
|
||||
<div class="layui-input-block" style="margin-left: 120px;">
|
||||
<input type="text" id="signupTime" name="signupTime" class="layui-input" value="" placeholder="请选择考试开始时间" readonly style="cursor: pointer;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6">
|
||||
<label class="layui-form-label">考试等级</label>
|
||||
@ -442,6 +448,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化考试开始时间时间戳
|
||||
function initSignupTimeDateTime() {
|
||||
laydate.render({
|
||||
elem: '#signupTime',
|
||||
type: 'datetime',
|
||||
value: new Date(),
|
||||
trigger: 'click'
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化考试开始时间时间戳
|
||||
function initStartTimeDateTime() {
|
||||
laydate.render({
|
||||
@ -569,6 +585,7 @@
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
initSignupTimeDateTime();
|
||||
initStartTimeDateTime();
|
||||
initEndTimeDateTime();
|
||||
initPictureUploadFile();
|
||||
|
Loading…
Reference in New Issue
Block a user