修改考场分配页面
This commit is contained in:
parent
e7d9df37bd
commit
4e649f5c1a
@ -283,6 +283,8 @@ public class ClassPlanServiceImpl extends DefaultBaseService implements IClassPl
|
||||
|
||||
@Override
|
||||
public List<ClassPlanDTO> list(Map<String, Object> params) {
|
||||
String[] classPlanIdListIds = params.get("classPlanIdListIds") == null ? null : params.get("classPlanIdListIds").toString().split(",");
|
||||
params.put("classPlanIdList", classPlanIdListIds);
|
||||
return classPlanDao.list(params);
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,8 @@ import cn.com.tenlion.service.examination.stationuser.IStationUserService;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.exceptions.UpdateException;
|
||||
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||
import ink.wgink.module.dictionary.service.IDataService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.util.map.HashMapUtil;
|
||||
@ -64,11 +66,13 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist
|
||||
@Autowired
|
||||
private IApplyService iApplyService;
|
||||
@Autowired
|
||||
private IClassPlanService iClassPlanService;
|
||||
@Autowired
|
||||
private IDistributionCardService iDistributionCardService;
|
||||
@Autowired
|
||||
private IApplyStudentsService applyStudentsService;
|
||||
@Autowired
|
||||
private IClassPlanService iClassPlanService;
|
||||
@Autowired
|
||||
private IDataService dataDictionaryServiceImpl;
|
||||
|
||||
@Override
|
||||
public void save(DistributionSaveVO dstributionSaveVO) {
|
||||
@ -242,19 +246,15 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist
|
||||
if(userTotalNumber > fieldTotalNumber ) {
|
||||
throw new UpdateException("当前分配的考场无法容纳考试人数");
|
||||
}
|
||||
/**
|
||||
* 遍历保存所有的考试申请分配信息
|
||||
*/
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(distributionVO);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setUpdateInfo(params);
|
||||
} else {
|
||||
setAppUpdateInfo(token, params);
|
||||
}
|
||||
int index = 0;
|
||||
int subNumber = 0;
|
||||
int currentNumber = 0;
|
||||
String currentFieldId = "";
|
||||
for(String classPlanId : distributionIdArray) {
|
||||
DistributionDTO distributionDTO = get(classPlanId);
|
||||
if(distributionDTO != null) {
|
||||
throw new UpdateException("非法操作.");
|
||||
}
|
||||
// 共分配的多个考场ID
|
||||
ArrayList<OrganizationDTO> fieldList = new ArrayList<OrganizationDTO>();
|
||||
// 是否存在跨考点, 做记录
|
||||
@ -291,6 +291,7 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist
|
||||
if(distributionDTOS != null && distributionDTOS.size() > 0) {
|
||||
throw new UpdateException(organizationDTO.getOrganizationName() + "该时段已被(" + distributionDTOS.get(0).getPlanName() + ")占用");
|
||||
}
|
||||
currentNumber = 0;
|
||||
}
|
||||
/**
|
||||
* 保存card表
|
||||
@ -298,12 +299,13 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist
|
||||
DistributionCardVO distributionCardVO = new DistributionCardVO();
|
||||
distributionCardVO.setDistributionCardUserId(userList.get(i).getCreator());
|
||||
distributionCardVO.setDistributionCardUserName(userList.get(i).getApplyName());
|
||||
distributionCardVO.setDistributionCardNumber(subNumber+"");
|
||||
distributionCardVO.setDistributionCardNumber( (++currentNumber ) + "" );
|
||||
distributionCardVO.setDistributionFieldId(currentFieldId);
|
||||
distributionCardVO.setClassPlanId(classPlanId);
|
||||
distributionCardVO.setDistributionId(classPlanId);
|
||||
distributionCardVO.setDistributionCardPictures("");
|
||||
distributionCardVO.setDistributionCardUserSex(userList.get(i).getApplySex());
|
||||
DataDTO dataDTO = dataDictionaryServiceImpl.get(userList.get(i).getApplySex());
|
||||
distributionCardVO.setDistributionCardUserSex(dataDTO.getDataName());
|
||||
distributionCardVO.setDistributionCardUserIdentity(userList.get(i).getApplyCardNumber());
|
||||
distributionCardVO.setDistributionCardUserResult("");
|
||||
distributionCardVO.setDistributionCardUserStatus("0");
|
||||
@ -325,6 +327,12 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist
|
||||
/**
|
||||
* 保存考试申请
|
||||
*/
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(distributionVO);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setUpdateInfo(params);
|
||||
} else {
|
||||
setAppUpdateInfo(token, params);
|
||||
}
|
||||
params.put("stationId", stationId.length() > 0 ? stationId.substring(1, stationId.length()) : "");
|
||||
params.put("planId", classPlanId);
|
||||
params.put("planName", classPlanDTO.getPlanName());
|
||||
@ -341,6 +349,7 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist
|
||||
ExamApplyVO vo = new ExamApplyVO();
|
||||
vo.setExamId(distributionId);
|
||||
vo.setStatus(1);
|
||||
vo.setCheckStatus(1);
|
||||
vo.setPracticeExamStartTime(distributionVO.getDistributionAllotTime());
|
||||
vo.setPracticeExamEndTime(distributionVO.getDistributionAllotEndTime());
|
||||
iExamApplyService.updateStatus(distributionId, vo);
|
||||
|
@ -317,6 +317,13 @@
|
||||
#{classPlanIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="classPlanIdList!= null">
|
||||
AND
|
||||
t1.class_plan_id IN
|
||||
<foreach collection="classPlanIdList" index="index" open="(" separator="," close=")">
|
||||
#{classPlanIdList[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
|
@ -461,7 +461,6 @@
|
||||
var ids = '';
|
||||
var planIds = '';
|
||||
for(var i = 0, item; item = checkDatas[i++];) {
|
||||
debugger
|
||||
if(item.checkStatus === 0) {
|
||||
if (i > 1) {
|
||||
ids += '_';
|
||||
|
@ -26,13 +26,14 @@
|
||||
<div class="layui-form-item" style="text-align: center;width:100% !important;font-size: 17px">
|
||||
<b>考试计划申请</b>
|
||||
</div>
|
||||
<div class="layui-input-block layui-form" id="distributionClassPlansBox" lay-filter="distributionClassPlansBox" pane="" style="margin-left: 0px !important;" ></div>
|
||||
<script id="distributionClassPlansBoxTemplate" type="text/html">
|
||||
{{# for(var j = 0, classPlan; classPlan = d[j++];) { }}
|
||||
<div class="layui-form-item layui-row ">
|
||||
<div class="layui-col-lg2" >
|
||||
<label class="layui-form-label">序号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly class="layui-input" value="{{j+1}}" placeholder="" lay-verify="required">
|
||||
<input type="text" readonly class="layui-input" value="{{j}}" placeholder="" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg2" >
|
||||
@ -47,16 +48,16 @@
|
||||
<input type="text" readonly class="layui-input" value="{{classPlan.planName}}" placeholder="" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg2">
|
||||
<label class="layui-form-label">班级人数</label>
|
||||
<div class="layui-col-lg2" >
|
||||
<label class="layui-form-label">参加考试</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly class="layui-input" value="22" placeholder="{{classPlan.applyCount}}" lay-verify="required">
|
||||
<input type="text" readonly class="layui-input" value="{{classPlan.applyCount}}人" placeholder="" lay-verify="required" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg3">
|
||||
<label class="layui-form-label">培训项目</label>
|
||||
<label class="layui-form-label">培训地址</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly class="layui-input" value="2019-05-03 18:00:00" placeholder="{{classPlan.projectCatalogName}}" lay-verify="required">
|
||||
<input type="text" readonly class="layui-input" value="{{classPlan.planAddress}}" placeholder="" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -155,7 +156,7 @@
|
||||
// 初始化开班计划
|
||||
function initDistributionClassPlans() {
|
||||
classPlanArray = new Array();
|
||||
top.restAjax.get(top.restAjax.path('api/classplan/list?classPlanIds={classPlanIds}', [ planId ]), {}, null, function (code, data, args) {
|
||||
top.restAjax.get(top.restAjax.path('api/classplan/list?classPlanIdListIds={classPlanIds}', [ planId ]), {}, null, function (code, data, args) {
|
||||
planLength = data.length;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var planData = {index: i, data: data[i]};
|
||||
@ -189,6 +190,7 @@
|
||||
top.restAjax.get(top.restAjax.path('api/organization/list?organizationType={organizationType}', [data[i].institutionId]), {}, institutionData, function(code, orgData, args) {
|
||||
// 回显 , 选中
|
||||
for(var a = 0 ; a < orgData.length; a++) {
|
||||
console.log(dataForm);
|
||||
for(var j = 0 ; j < dataForm.distributionFieldList.length; j++) {
|
||||
if(orgData[a].organizationId == dataForm.distributionFieldList[j].fieldId) {
|
||||
orgData[a].checked = 'checked="checked"';
|
||||
@ -286,6 +288,7 @@
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/distribution/get/{planId}', [planId]), {}, null, function(code, data) {
|
||||
console.log(data);
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
|
@ -17,7 +17,7 @@
|
||||
<div class="layui-card-header">
|
||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
||||
<a href="javascript:void(0);"><cite>分配考场与考试时间</cite></a>
|
||||
<a href="javascript:void(0);"><cite>查看考场分配与考试时间</cite></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
@ -26,13 +26,14 @@
|
||||
<div class="layui-form-item" style="text-align: center;width:100% !important;font-size: 17px">
|
||||
<b>考试计划申请</b>
|
||||
</div>
|
||||
<div class="layui-input-block layui-form" id="distributionClassPlansBox" lay-filter="distributionClassPlansBox" pane="" style="margin-left: 0px !important;" ></div>
|
||||
<script id="distributionClassPlansBoxTemplate" type="text/html">
|
||||
{{# for(var j = 0, classPlan; classPlan = d[j++];) { }}
|
||||
<div class="layui-form-item layui-row ">
|
||||
<div class="layui-col-lg2" >
|
||||
<label class="layui-form-label">序号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly class="layui-input" value="{{j+1}}" placeholder="" lay-verify="required">
|
||||
<input type="text" readonly class="layui-input" value="{{j}}" placeholder="" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg2" >
|
||||
@ -48,15 +49,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg2">
|
||||
<label class="layui-form-label">班级人数</label>
|
||||
<label class="layui-form-label">参加考试</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly class="layui-input" value="22" placeholder="{{classPlan.applyCount}}" lay-verify="required">
|
||||
<input type="text" readonly class="layui-input" value="{{classPlan.applyCount}}人" placeholder="" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg3">
|
||||
<label class="layui-form-label">培训项目</label>
|
||||
<label class="layui-form-label">培训地址</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly class="layui-input" value="2019-05-03 18:00:00" placeholder="{{classPlan.projectCatalogName}}" lay-verify="required">
|
||||
<input type="text" readonly class="layui-input" value="{{classPlan.planAddress}}" placeholder="" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -114,7 +115,7 @@
|
||||
<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>
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">审核确认分配</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -155,7 +156,7 @@
|
||||
// 初始化开班计划
|
||||
function initDistributionClassPlans() {
|
||||
classPlanArray = new Array();
|
||||
top.restAjax.get(top.restAjax.path('api/classplan/list?classPlanIds={classPlanIds}', [ planId ]), {}, null, function (code, data, args) {
|
||||
top.restAjax.get(top.restAjax.path('api/classplan/list?classPlanIdListIds={classPlanIds}', [ planId ]), {}, null, function (code, data, args) {
|
||||
planLength = data.length;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var planData = {index: i, data: data[i]};
|
||||
|
Loading…
Reference in New Issue
Block a user