Commit 9e626999 authored by 熊海's avatar 熊海

修改页面显示年份问题,汇总页面排序问题,审核结束逻辑问题

parent da36997e
......@@ -108,11 +108,12 @@ public class QuestionnaireCtrl {
@RequestMapping({"/checkReject"})
@ResponseBody
public Map<String, Object> checkReject(@RequestBody Record record){
int result=0;
if(record.getReviews()!=null) {
//1.通过记录id删除原有备注
this.questionnaireService.delView(record.getReviews().get(0).getRecordId(),record.getReviews().get(0).getQuestionsId());
//2.添加新的备注
this.questionnaireService.insertReview(record.getReviews(), record.getReviews().get(0).getRecordId());
result=this.questionnaireService.insertReview(record.getReviews(), record.getReviews().get(0).getRecordId());
//更新t_answer表里的分数字段,用户绩效统计使用
......@@ -122,7 +123,7 @@ public class QuestionnaireCtrl {
answer.setOptionsId(record.getReviews().get(0).getQuestionsId());
questionnaireService.updateAnswerScore(answer);
}
int result=this.questionnaireService.updateRecord(record);
//int result=this.questionnaireService.updateRecord(record);
Map<String, Object> map = new HashMap();
if(result>0) {
map.put("result", true);
......@@ -391,9 +392,9 @@ public class QuestionnaireCtrl {
if(StringUtils.isEmpty(performanceSummary.getSorting())){
sorting = "tr.id asc";
} else if(performanceSummary.getSorting().equals("desc")){
sorting = "tr.id asc";
}else{
sorting = "basicIndicators desc,guideIndicators desc,rewardIndicators desc";
}else{
sorting = "tr.id asc";
}
performanceSummary.setSorting(sorting);
......@@ -435,4 +436,16 @@ public class QuestionnaireCtrl {
public void exportPerformanceSummary(HttpServletRequest request, HttpServletResponse response) {
questionnaireService.exportPerformanceSummary(request,response);
}
@RequestMapping(value = "/checkComplete")
@ResponseBody
public Map<String,Object> modifyRecordStatusByRecordId(Long recordId){
Map<String,Object> map=new HashMap<>();
if(recordId!=null){
return questionnaireService.modifyRecordStatusByRecordId(recordId);
}
map.put("result",false);
map.put("msg","审核出错稍后再试!");
return map;
}
}
\ No newline at end of file
......@@ -91,4 +91,6 @@ public interface QuestionnaireDao {
Integer updateOneReviewByRecordIdAndQuestionsId(@Param("review") Review review);
Integer insertOneReview(@Param("review") Review review);
List<Review> selectReviewListByRecordId(@Param("recordId") Long recordId);
}
......@@ -113,6 +113,8 @@ public interface QuestionnaireService {
Integer insertOneReview(Review review);
Integer saveReview(List<Review> reviews) throws Exception;
Map<String,Object> modifyRecordStatusByRecordId(Long recordId);
}
......@@ -25,10 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.*;
@Service
......@@ -882,4 +879,41 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
throw new Exception();
}
}
@Override
public Map<String, Object> modifyRecordStatusByRecordId(Long recordId) {
Map<String,Object> map=new HashMap<>();
Record record=new Record();
record .setId(recordId);
List<Review> reviews=questionnaireDao.selectReviewListByRecordId(recordId);
if(reviews.size()!=27){
//还未审核完 状态改为1待审核
record.setProcessStatus(1);
map.put("result",false);
map.put("msg","审核还未完成");
}else {
for (Review review:reviews) {
if (review.getApprovalStatus()==0){
//有驳回 状态改为2 驳回
record.setProcessStatus(2);
map.put("result",true);
map.put("msg","审核完成");
break;
}else {
//全部审核结束并且状态未通过 改为3
record.setProcessStatus(3);
map.put("result",true);
map.put("msg","审核完成");
}
}
}
int result= questionnaireDao.updateRecord(record);
if(result>0){
return map;
}else {
map.put("result",false);
map.put("msg","审核出错稍后再试!");
return map;
}
}
}
......@@ -145,7 +145,7 @@
LEFT JOIN t_options AS o ON o.question_id = tq.id AND o.id = '1'
LEFT JOIN t_answer AS ta ON ta.options_id = o.id AND ta.`group` = '1'
LEFT JOIN t_record AS tr ON tr.id = ta.record_id and ta.`group` BETWEEN 1 and 11
WHERE o.`status` = 1 and tq.`status` = 1
WHERE o.`status` = 1 and tq.`status` = 1 and tr.process_status=3 or tr.process_status=2
<if test=" optinName!= null and optinName !=''">
AND ta.value LIKE CONCAT('%', #{optinName}, '%')
</if>
......@@ -621,4 +621,10 @@
insert into t_review(questions_id,record_id,remark)
values (#{review.questionsId},#{review.recordId},#{review.remark})
</insert>
<select id="selectReviewListByRecordId" resultType="com.tiptimes.model.Review" parameterType="long">
select id,questions_id,record_id,remark,approval_status,score
from t_review
where record_id=#{recordId} and approval_status is not null
</select>
</mapper>
\ No newline at end of file
......@@ -169,9 +169,9 @@
</a>
<ul class="nav nav-second-level">
<li><a class="J_menuItem"
href="<%=request.getContextPath()%>/goto/education/questionnaire_Information_list">2021年天津市高校众创空间绩效评估</a></li>
href="<%=request.getContextPath()%>/goto/education/questionnaire_Information_list">2022年天津市高校众创空间绩效评估</a></li>
<li><a class="J_menuItem"
href="<%=request.getContextPath()%>/goto/education/questionnaire_Administration_list">天津市高校众创空间绩效汇总</a></li>
href="<%=request.getContextPath()%>/goto/education/questionnaire_Administration_list">2022年天津市高校众创空间绩效汇总</a></li>
</ul></li>
<%-- <li><a class="J_menuItem" href="<%=request.getContextPath()%>/goto/education/space_change_password" data-index="0"> <i class="fa fa-rotate-left"></i> <span class="nav-label">修改密码</span></a></li>
......
......@@ -92,7 +92,7 @@
<div class="ibox float-e-margins">
<div class="ibox-title">
<h4 style="margin-left: 20px;margin-top: 50px ; font-size: 18px ;text-align: center">
2021年度天津市高校众创空间绩效评估</h4>
2022年度天津市高校众创空间绩效评估</h4>
<div class="divider"></div>
</div>
<div class="ibox-content" style="margin-top: 50px">
......@@ -2749,7 +2749,7 @@
<%-- <a class="btn btn-primary" id="goback_btn" onclick="gobcak()">返回</a>--%>
<a class="btn btn-primary" id="tempSave_btn"
onclick="saveQuestionnaire()">暂存返回</a>
<a class="btn btn-primary" id="pass_btn" onclick="gobcak()">审核结束</a>
<a class="btn btn-primary" id="pass_btn" onclick="checkComplete()">审核结束</a>
<%-- <a class="btn btn-primary" id="reject_btn"--%>
<%-- onclick="rejectQuestionnaire()">驳回</a>--%>
</div>
......
......@@ -606,8 +606,19 @@ function saveQuestionnaire(isAuto){
if (isAuto === 1) {
layer.msg('已自动暂存');
} else {
swal("成功!", '暂存成功', "success");
history.go(-1);
swal({
title: "暂存成功",
type: "success",
showCancelButton: false,
confirmButtonColor: "#10d572",
confirmButtonText: "确定",
cancelButtonText: "取消",
closeOnConfirm: false,
closeOnCancel: false
},
function (isConfirm) {
history.go(-1)
});
}
}else {
swal("成功!", '没有要暂存的备注', "success");
......@@ -716,6 +727,35 @@ function gobcak(){
history.go(-1);
}
function checkComplete() {
$.ajax({
type : "GET",
url : webroot+"questionnaire/checkComplete",
data : {recordId:recordId},
async:false,
contentType:'application/json;charset=UTF-8',
success : function(result) {
if(result.result){
swal({
title: "审核成功",
type: "success",
showCancelButton: false,
confirmButtonColor: "#10d572",
confirmButtonText: "确定",
cancelButtonText: "取消",
closeOnConfirm: false,
closeOnCancel: false
},
function (isConfirm) {
history.go(-1)
});
}else {
swal("失败!", result.msg, "error");
}
}
});
}
//页面回显
function synchronizeUpperAndLowerFormContents() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment