考试修改
This commit is contained in:
parent
799cff0823
commit
9e16cf5a15
@ -89,6 +89,7 @@ public class ExamTrainController {
|
|||||||
@PostMapping(value = "/list")
|
@PostMapping(value = "/list")
|
||||||
public Result<List<ExamTrain>> queryList(@RequestBody ExamTrain examTrain) {
|
public Result<List<ExamTrain>> queryList(@RequestBody ExamTrain examTrain) {
|
||||||
QueryWrapper<ExamTrain> queryWrapper = QueryGenerator.initQueryWrapper(examTrain);
|
QueryWrapper<ExamTrain> queryWrapper = QueryGenerator.initQueryWrapper(examTrain);
|
||||||
|
queryWrapper.orderByDesc("create_time");
|
||||||
List<ExamTrain> list = examTrainService.pageList(new Page(-1, -1), queryWrapper).getRecords();
|
List<ExamTrain> list = examTrainService.pageList(new Page(-1, -1), queryWrapper).getRecords();
|
||||||
return Result.success(list);
|
return Result.success(list);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -122,10 +122,14 @@ public class ExamWorkerController {
|
|||||||
if (examTrainRecordEntity == null) {
|
if (examTrainRecordEntity == null) {
|
||||||
result.error500("未找到对应实体");
|
result.error500("未找到对应实体");
|
||||||
} else {
|
} else {
|
||||||
examTrainRecordEntity.setStartExamTime(new Date());
|
if (examTrainRecordEntity.getExamCount() == 0) {
|
||||||
examTrainRecordEntity.setExamCount(examTrainRecordEntity.getExamCount() - 1);
|
result.error500("您已没有考试的次数!");
|
||||||
result.setResult(examTrainRecordService.updateById(examTrainRecordEntity));
|
} else {
|
||||||
result.setSuccess(true);
|
examTrainRecordEntity.setStartExamTime(new Date());
|
||||||
|
examTrainRecordEntity.setExamCount(examTrainRecordEntity.getExamCount() - 1);
|
||||||
|
result.setResult(examTrainRecordService.updateById(examTrainRecordEntity));
|
||||||
|
result.setSuccess(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -103,4 +103,34 @@ public class XzVisitorManageRecord implements Serializable {
|
|||||||
@Excel(name = "车牌号", width = 15)
|
@Excel(name = "车牌号", width = 15)
|
||||||
@ApiModelProperty(value = "车牌号")
|
@ApiModelProperty(value = "车牌号")
|
||||||
private String carNumber;
|
private String carNumber;
|
||||||
|
/**
|
||||||
|
* 来访人单位
|
||||||
|
*/
|
||||||
|
@Excel(name = "来访人单位", width = 15)
|
||||||
|
@ApiModelProperty(value = "来访人单位")
|
||||||
|
private String visitUnit;
|
||||||
|
/**
|
||||||
|
* 接送人姓名
|
||||||
|
*/
|
||||||
|
@Excel(name = "接送人姓名", width = 15)
|
||||||
|
@ApiModelProperty(value = "接送人姓名")
|
||||||
|
private String takeName;
|
||||||
|
/**
|
||||||
|
* 接送人手机号
|
||||||
|
*/
|
||||||
|
@Excel(name = "接送人手机号", width = 15)
|
||||||
|
@ApiModelProperty(value = "接送人手机号")
|
||||||
|
private String takePhone;
|
||||||
|
/**
|
||||||
|
* 接送人单位
|
||||||
|
*/
|
||||||
|
@Excel(name = "接送人单位", width = 15)
|
||||||
|
@ApiModelProperty(value = "接送人单位")
|
||||||
|
private String takeUnit;
|
||||||
|
/**
|
||||||
|
* 接送人职务
|
||||||
|
*/
|
||||||
|
@Excel(name = "接送人职务", width = 15)
|
||||||
|
@ApiModelProperty(value = "接送人职务")
|
||||||
|
private String takeJob;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user