From c0563114beaca22beb8299ff5d19b58a43627451 Mon Sep 17 00:00:00 2001 From: wans <747101512@qq.com> Date: Sat, 15 May 2021 22:57:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ApplyStudentsServiceImpl.java | 38 +++++++++---------- .../static/route/examcheck/update.html | 8 +++- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/main/java/cn/com/tenlion/service/applystudents/impl/ApplyStudentsServiceImpl.java b/src/main/java/cn/com/tenlion/service/applystudents/impl/ApplyStudentsServiceImpl.java index 80439cb..76b98ce 100644 --- a/src/main/java/cn/com/tenlion/service/applystudents/impl/ApplyStudentsServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/applystudents/impl/ApplyStudentsServiceImpl.java @@ -1,29 +1,30 @@ package cn.com.tenlion.service.applystudents.impl; -import cn.com.tenlion.pojo.dtos.apply.ApplyDTO; -import cn.com.tenlion.pojo.pos.apply.ApplyPO; -import cn.com.tenlion.service.apply.IApplyService; -import ink.wgink.common.base.DefaultBaseService; -import ink.wgink.exceptions.ParamsException; -import ink.wgink.pojo.ListPage; -import ink.wgink.pojo.result.SuccessResult; -import ink.wgink.pojo.result.SuccessResultList; -import ink.wgink.util.map.HashMapUtil; -import ink.wgink.util.UUIDUtil; import cn.com.tenlion.dao.applystudents.IApplyStudentsDao; -import cn.com.tenlion.pojo.dtos.applystudents.ApplyStudentsDTO; -import cn.com.tenlion.pojo.vos.applystudents.ApplyStudentsVO; import cn.com.tenlion.pojo.bos.applystudents.ApplyStudentsBO; +import cn.com.tenlion.pojo.dtos.applystudents.ApplyStudentsDTO; +import cn.com.tenlion.pojo.pos.apply.ApplyPO; import cn.com.tenlion.pojo.pos.applystudents.ApplyStudentsPO; +import cn.com.tenlion.pojo.vos.applystudents.ApplyStudentsVO; +import cn.com.tenlion.service.apply.IApplyService; import cn.com.tenlion.service.applystudents.IApplyStudentsService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import ink.wgink.common.base.DefaultBaseService; +import ink.wgink.exceptions.ParamsException; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.SuccessResultList; +import ink.wgink.util.UUIDUtil; +import ink.wgink.util.map.HashMapUtil; import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * @ClassName: ApplyStudentsServiceImpl @@ -40,7 +41,6 @@ public class ApplyStudentsServiceImpl extends DefaultBaseService implements IApp @Autowired private IApplyService applyService; - public String saveRelationReturnId(ApplyStudentsVO applyStudentsVO){ String applyId = UUIDUtil.getUUID(); applyStudentsVO.setApplyId(applyId); @@ -61,11 +61,11 @@ public class ApplyStudentsServiceImpl extends DefaultBaseService implements IApp List deleteIdList = new ArrayList<>(); List applyPOList = applyService.listByInstitutionIdAndWorkTypeId(institutionId,workTypeId); for (ApplyPO applyPO : applyPOList) { - ApplyStudentsVO vo = new ApplyStudentsVO(); - BeanUtils.copyProperties(vo,applyPO); - vo.setApplyClassId(classId); - Map params = HashMapUtil.beanToMap(vo); - applyStudentsDao.save(params);; + ApplyStudentsPO po = new ApplyStudentsPO(); + BeanUtils.copyProperties(po,applyPO); + po.setApplyClassId(classId); + Map params = HashMapUtil.beanToMap(po); + applyStudentsDao.save(params); deleteIdList.add(applyPO.getApplyId()); } applyService.delete(deleteIdList); diff --git a/src/main/resources/static/route/examcheck/update.html b/src/main/resources/static/route/examcheck/update.html index 9344158..45fbccb 100644 --- a/src/main/resources/static/route/examcheck/update.html +++ b/src/main/resources/static/route/examcheck/update.html @@ -286,6 +286,8 @@ // 提交表单 form.on('submit(submitForm)', function(formData) { + var successMsg = '审核通过'; + var errorMsg = '审核失败'; if(3 == formData.field.checkStatus) { if(null == formData.field.reason || '' == formData.field.reason || typeof(formData.field.reason) == "undefined") { top.dialog.msg('退回原因必填'); @@ -299,6 +301,8 @@ var nextTime = new Date(); nextTime.setDate(nextTime.getDate() + $('#nextNum').val()); formData.field.nextCommitTime = nextTime.format("yyyy-MM-dd hh:mm:ss"); + successMsg = '退回成功'; + errorMsg = '退回失败'; } formData.field.planId = classPlanId; top.dialog.confirm(top.dataMessage.commit, function(index) { @@ -306,10 +310,10 @@ var loadLayerIndex; top.restAjax.put(top.restAjax.path('api/examcheck/update/{examCheckId}', [examCheckId]), formData.field, null, function(code, data) { if('200' == code) { - top.dialog.msg('退回成功'); + top.dialog.msg(successMsg); closeBox(); }else { - top.dialog.msg('退回失败'); + top.dialog.msg(errorMsg); closeBox(); } }, function(code, data) {