Commit fd86a15d authored by 王国存's avatar 王国存

Merge branch 'test' into 'master'

Test

See merge request !34
parents 61306bec 94c8ef59
...@@ -7,10 +7,12 @@ import com.tiptimes.service.FileService; ...@@ -7,10 +7,12 @@ import com.tiptimes.service.FileService;
import com.tiptimes.service.QuestionnaireService; import com.tiptimes.service.QuestionnaireService;
import com.tiptimes.util.*; import com.tiptimes.util.*;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
...@@ -185,19 +187,26 @@ public class QuestionnaireCtrl { ...@@ -185,19 +187,26 @@ public class QuestionnaireCtrl {
map.put("msg", "不存在需要保存的备注"); map.put("msg", "不存在需要保存的备注");
return map; return map;
} }
int result;
//1.通过记录id删除原有备注 try {
this.questionnaireService.delView(review.get(0).getRecordId(),review.get(0).getQuestionsId()); questionnaireService.saveReview(review);
//2.添加新的备注 } catch (Exception e) {
result=this.questionnaireService.insertReview(review,review.get(0).getRecordId());
if(result>0) {
map.put("result", true);
map.put("msg", "操作成功");
} else {
map.put("result", false); map.put("result", false);
map.put("msg", "操作失败"); map.put("msg", "操作失败");
} }
map.put("result", true);
map.put("msg", "操作成功");
//1.通过记录id删除原有备注
//this.questionnaireService.delView(review.get(0).getRecordId(),review.get(0).getQuestionsId());
//2.添加新的备注
//result=this.questionnaireService.insertReview(review,review.get(0).getRecordId());
// if(result>0) {
// map.put("result", true);
// map.put("msg", "操作成功");
// } else {
// map.put("result", false);
// map.put("msg", "操作失败");
// }
return map; return map;
} }
......
...@@ -85,4 +85,10 @@ public interface QuestionnaireDao { ...@@ -85,4 +85,10 @@ public interface QuestionnaireDao {
List<Review> selectAnswerByStatus(@Param("recordId") Long recordId); List<Review> selectAnswerByStatus(@Param("recordId") Long recordId);
List<Integer> selectAnswerByQuestion(@Param("recordId") Long recordId); List<Integer> selectAnswerByQuestion(@Param("recordId") Long recordId);
Review selectOneReviewByRecordIdAndQuestionsId(@Param("recordId") Long recordId,@Param("questionsId") Long questionsId);
Integer updateOneReviewByRecordIdAndQuestionsId(@Param("review") Review review);
Integer insertOneReview(@Param("review") Review review);
} }
...@@ -8,7 +8,7 @@ public class Answer {//上报数据表(每条上报记录的详细数据表) ...@@ -8,7 +8,7 @@ public class Answer {//上报数据表(每条上报记录的详细数据表)
private int recordId;//上报记录id private int recordId;//上报记录id
private String remark;//备注 private String remark;//备注
private int score;//分数 private float score;//分数
public String getRemark() { public String getRemark() {
return remark; return remark;
...@@ -58,11 +58,11 @@ public class Answer {//上报数据表(每条上报记录的详细数据表) ...@@ -58,11 +58,11 @@ public class Answer {//上报数据表(每条上报记录的详细数据表)
this.recordId = recordId; this.recordId = recordId;
} }
public int getScore() { public float getScore() {
return score; return score;
} }
public void setScore(int score) { public void setScore(float score) {
this.score = score; this.score = score;
} }
......
...@@ -6,22 +6,22 @@ public class Review {//评审备注详情表 ...@@ -6,22 +6,22 @@ public class Review {//评审备注详情表
private Long recordId;//记录id private Long recordId;//记录id
private String remark;//驳回原因 private String remark;//驳回原因
private int score; //审批评分 private float score; //审批评分
private int approvalStatus;//审批状态,0-驳回,1-通过 private Integer approvalStatus;//审批状态,0-驳回,1-通过
public int getScore() { public float getScore() {
return score; return score;
} }
public void setScore(int score) { public void setScore(float score) {
this.score = score; this.score = score;
} }
public int getApprovalStatus() { public Integer getApprovalStatus() {
return approvalStatus; return approvalStatus;
} }
public void setApprovalStatus(int approvalStatus) { public void setApprovalStatus(Integer approvalStatus) {
this.approvalStatus = approvalStatus; this.approvalStatus = approvalStatus;
} }
......
package com.tiptimes.model.exportDTO; package com.tiptimes.model.exportDTO;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.NumberFormat;
/** /**
* 2022年10月新增加功能 问卷管理-绩效汇总导出 * 2022年10月新增加功能 问卷管理-绩效汇总导出
...@@ -45,70 +46,91 @@ public class PerformanceSummaryTotal { ...@@ -45,70 +46,91 @@ public class PerformanceSummaryTotal {
private String basisIndexNine; private String basisIndexNine;
@ExcelProperty({"基础指标","分数"}) @ExcelProperty({"基础指标","分数"})
private Integer basisIndexScore; private float basisIndexScore;
@ExcelProperty({"引导指标","引导指标一","面积"}) @ExcelProperty({"引导指标","引导指标一","面积"})
private Integer guideIndexOne; @NumberFormat("#.#")
private float guideIndexOne;
@ExcelProperty({"引导指标","引导指标二","工位"}) @ExcelProperty({"引导指标","引导指标二","工位"})
private Integer guideIndexTwo; @NumberFormat("#.#")
private float guideIndexTwo;
@ExcelProperty({"引导指标","引导指标三","入驻企业总数"}) @ExcelProperty({"引导指标","引导指标三","入驻企业总数"})
private Integer guideIndexThree; @NumberFormat("#.#")
private float guideIndexThree;
@ExcelProperty({"引导指标","引导指标四","新增企业"}) @ExcelProperty({"引导指标","引导指标四","新增企业"})
private Integer guideIndexFour; @NumberFormat("#.#")
private float guideIndexFour;
@ExcelProperty({"引导指标","引导指标五","新增就业"}) @ExcelProperty({"引导指标","引导指标五","新增就业"})
private Integer guideIndexFive; @NumberFormat("#.#")
private float guideIndexFive;
@ExcelProperty({"引导指标","引导指标六","双创课题"}) @ExcelProperty({"引导指标","引导指标六","双创课题"})
private Integer guideIndexSix; @NumberFormat("#.#")
private float guideIndexSix;
@ExcelProperty({"引导指标","引导指标七","国家级双创导师"}) @ExcelProperty({"引导指标","引导指标七","国家级双创导师"})
private Integer guideIndexSeven; @NumberFormat("#.#")
private float guideIndexSeven;
@ExcelProperty({"引导指标","引导指标八","双创活动"}) @ExcelProperty({"引导指标","引导指标八","双创活动"})
private Integer guideIndexEight; @NumberFormat("#.#")
private float guideIndexEight;
@ExcelProperty({"引导指标","引导指标九","销售额"}) @ExcelProperty({"引导指标","引导指标九","销售额"})
private Integer guideIndexNine; @NumberFormat("#.#")
private float guideIndexNine;
@ExcelProperty({"引导指标","引导指标十","融资"}) @ExcelProperty({"引导指标","引导指标十","融资"})
private Integer guideIndexTen; @NumberFormat("#.#")
private float guideIndexTen;
@ExcelProperty({"引导指标","引导指标十一","市级活动"}) @ExcelProperty({"引导指标","引导指标十一","市级活动"})
private Integer guideIndexEleven; @NumberFormat("#.#")
private float guideIndexEleven;
@ExcelProperty({"引导指标","引导指标十二","OTC挂牌"}) @ExcelProperty({"引导指标","引导指标十二","OTC挂牌"})
private Integer guideIndexTwelve; @NumberFormat("#.#")
private float guideIndexTwelve;
@ExcelProperty({"引导指标","引导指标十三","新增知识产权"}) @ExcelProperty({"引导指标","引导指标十三","新增知识产权"})
private Integer guideIndexThirteen; @NumberFormat("#.#")
private float guideIndexThirteen;
@ExcelProperty({"引导指标","分数"}) @ExcelProperty({"引导指标","分数"})
private Integer guideIndexScore; @NumberFormat("#.#")
private float guideIndexScore;
@ExcelProperty({"奖励指标","奖励指标一","“互联网+”大赛"}) @ExcelProperty({"奖励指标","奖励指标一","“互联网+”大赛"})
private Integer rewardIndexOne; @NumberFormat("#.#")
private float rewardIndexOne;
@ExcelProperty({"奖励指标","奖励指标二","市级奖项"}) @ExcelProperty({"奖励指标","奖励指标二","市级奖项"})
private Integer rewardIndexTwo; @NumberFormat("#.#")
private float rewardIndexTwo;
@ExcelProperty({"奖励指标","奖励指标三","拔尖项目"}) @ExcelProperty({"奖励指标","奖励指标三","拔尖项目"})
private Integer rewardIndexThree; @NumberFormat("#.#")
private float rewardIndexThree;
@ExcelProperty({"奖励指标","奖励指标四","国家级众创空间"}) @ExcelProperty({"奖励指标","奖励指标四","国家级众创空间"})
private Integer rewardIndexFour; @NumberFormat("#.#")
private float rewardIndexFour;
@ExcelProperty({"奖励指标","奖励指标五","国家创业孵化示范基地"}) @ExcelProperty({"奖励指标","奖励指标五","国家创业孵化示范基地"})
private Integer rewardIndexFive; @NumberFormat("#.#")
private float rewardIndexFive;
@ExcelProperty({"奖励指标","分数"}) @ExcelProperty({"奖励指标","分数"})
private Integer rewardIndexScore; @NumberFormat("#.#")
private float rewardIndexScore;
@ExcelProperty(value="总分数") @ExcelProperty(value="总分数")
private Integer totalScore; @NumberFormat("#.#")
private float totalScore;
public Integer getIndex() { public Integer getIndex() {
return index; return index;
...@@ -198,180 +220,179 @@ public class PerformanceSummaryTotal { ...@@ -198,180 +220,179 @@ public class PerformanceSummaryTotal {
this.basisIndexNine = basisIndexNine; this.basisIndexNine = basisIndexNine;
} }
public Integer getBasisIndexScore() { public float getBasisIndexScore() {
return basisIndexScore; return basisIndexScore;
} }
public void setBasisIndexScore(Integer basisIndexScore) { public void setBasisIndexScore(float basisIndexScore) {
this.basisIndexScore = basisIndexScore; this.basisIndexScore = basisIndexScore;
} }
public Integer getGuideIndexOne() { public float getGuideIndexOne() {
return guideIndexOne; return guideIndexOne;
} }
public void setGuideIndexOne(Integer guideIndexOne) { public void setGuideIndexOne(float guideIndexOne) {
this.guideIndexOne = guideIndexOne; this.guideIndexOne = guideIndexOne;
} }
public Integer getGuideIndexTwo() { public float getGuideIndexTwo() {
return guideIndexTwo; return guideIndexTwo;
} }
public void setGuideIndexTwo(Integer guideIndexTwo) { public void setGuideIndexTwo(float guideIndexTwo) {
this.guideIndexTwo = guideIndexTwo; this.guideIndexTwo = guideIndexTwo;
} }
public Integer getGuideIndexThree() { public float getGuideIndexThree() {
return guideIndexThree; return guideIndexThree;
} }
public void setGuideIndexThree(Integer guideIndexThree) { public void setGuideIndexThree(float guideIndexThree) {
this.guideIndexThree = guideIndexThree; this.guideIndexThree = guideIndexThree;
} }
public Integer getGuideIndexFour() { public float getGuideIndexFour() {
return guideIndexFour; return guideIndexFour;
} }
public void setGuideIndexFour(Integer guideIndexFour) { public void setGuideIndexFour(float guideIndexFour) {
this.guideIndexFour = guideIndexFour; this.guideIndexFour = guideIndexFour;
} }
public Integer getGuideIndexFive() { public float getGuideIndexFive() {
return guideIndexFive; return guideIndexFive;
} }
public void setGuideIndexFive(Integer guideIndexFive) { public void setGuideIndexFive(float guideIndexFive) {
this.guideIndexFive = guideIndexFive; this.guideIndexFive = guideIndexFive;
} }
public Integer getGuideIndexSix() { public float getGuideIndexSix() {
return guideIndexSix; return guideIndexSix;
} }
public void setGuideIndexSix(Integer guideIndexSix) { public void setGuideIndexSix(float guideIndexSix) {
this.guideIndexSix = guideIndexSix; this.guideIndexSix = guideIndexSix;
} }
public Integer getGuideIndexSeven() { public float getGuideIndexSeven() {
return guideIndexSeven; return guideIndexSeven;
} }
public void setGuideIndexSeven(Integer guideIndexSeven) { public void setGuideIndexSeven(float guideIndexSeven) {
this.guideIndexSeven = guideIndexSeven; this.guideIndexSeven = guideIndexSeven;
} }
public Integer getGuideIndexEight() { public float getGuideIndexEight() {
return guideIndexEight; return guideIndexEight;
} }
public void setGuideIndexEight(Integer guideIndexEight) { public void setGuideIndexEight(float guideIndexEight) {
this.guideIndexEight = guideIndexEight; this.guideIndexEight = guideIndexEight;
} }
public Integer getGuideIndexNine() { public float getGuideIndexNine() {
return guideIndexNine; return guideIndexNine;
} }
public void setGuideIndexNine(Integer guideIndexNine) { public void setGuideIndexNine(float guideIndexNine) {
this.guideIndexNine = guideIndexNine; this.guideIndexNine = guideIndexNine;
} }
public Integer getGuideIndexTen() { public float getGuideIndexTen() {
return guideIndexTen; return guideIndexTen;
} }
public void setGuideIndexTen(Integer guideIndexTen) { public void setGuideIndexTen(float guideIndexTen) {
this.guideIndexTen = guideIndexTen; this.guideIndexTen = guideIndexTen;
} }
public Integer getGuideIndexEleven() { public float getGuideIndexEleven() {
return guideIndexEleven; return guideIndexEleven;
} }
public void setGuideIndexEleven(Integer guideIndexEleven) { public void setGuideIndexEleven(float guideIndexEleven) {
this.guideIndexEleven = guideIndexEleven; this.guideIndexEleven = guideIndexEleven;
} }
public Integer getGuideIndexTwelve() { public float getGuideIndexTwelve() {
return guideIndexTwelve; return guideIndexTwelve;
} }
public void setGuideIndexTwelve(Integer guideIndexTwelve) { public void setGuideIndexTwelve(float guideIndexTwelve) {
this.guideIndexTwelve = guideIndexTwelve; this.guideIndexTwelve = guideIndexTwelve;
} }
public Integer getGuideIndexThirteen() { public float getGuideIndexThirteen() {
return guideIndexThirteen; return guideIndexThirteen;
} }
public void setGuideIndexThirteen(Integer guideIndexThirteen) { public void setGuideIndexThirteen(float guideIndexThirteen) {
this.guideIndexThirteen = guideIndexThirteen; this.guideIndexThirteen = guideIndexThirteen;
} }
public Integer getGuideIndexScore() { public float getGuideIndexScore() {
return guideIndexScore; return guideIndexScore;
} }
public void setGuideIndexScore(Integer guideIndexScore) { public void setGuideIndexScore(float guideIndexScore) {
this.guideIndexScore = guideIndexScore; this.guideIndexScore = guideIndexScore;
} }
public Integer getRewardIndexOne() { public float getRewardIndexOne() {
return rewardIndexOne; return rewardIndexOne;
} }
public void setRewardIndexOne(Integer rewardIndexOne) { public void setRewardIndexOne(float rewardIndexOne) {
this.rewardIndexOne = rewardIndexOne; this.rewardIndexOne = rewardIndexOne;
} }
public Integer getRewardIndexTwo() { public float getRewardIndexTwo() {
return rewardIndexTwo; return rewardIndexTwo;
} }
public void setRewardIndexTwo(Integer rewardIndexTwo) { public void setRewardIndexTwo(float rewardIndexTwo) {
this.rewardIndexTwo = rewardIndexTwo; this.rewardIndexTwo = rewardIndexTwo;
} }
public Integer getRewardIndexThree() { public float getRewardIndexThree() {
return rewardIndexThree; return rewardIndexThree;
} }
public void setRewardIndexThree(Integer rewardIndexThree) { public void setRewardIndexThree(float rewardIndexThree) {
this.rewardIndexThree = rewardIndexThree; this.rewardIndexThree = rewardIndexThree;
} }
public Integer getRewardIndexFour() { public float getRewardIndexFour() {
return rewardIndexFour; return rewardIndexFour;
} }
public void setRewardIndexFour(Integer rewardIndexFour) { public void setRewardIndexFour(float rewardIndexFour) {
this.rewardIndexFour = rewardIndexFour; this.rewardIndexFour = rewardIndexFour;
} }
public Integer getRewardIndexFive() { public float getRewardIndexFive() {
return rewardIndexFive; return rewardIndexFive;
} }
public void setRewardIndexFive(Integer rewardIndexFive) { public void setRewardIndexFive(float rewardIndexFive) {
this.rewardIndexFive = rewardIndexFive; this.rewardIndexFive = rewardIndexFive;
} }
public Integer getRewardIndexScore() { public float getRewardIndexScore() {
return rewardIndexScore; return rewardIndexScore;
} }
public void setRewardIndexScore(Integer rewardIndexScore) { public void setRewardIndexScore(float rewardIndexScore) {
this.rewardIndexScore = rewardIndexScore; this.rewardIndexScore = rewardIndexScore;
} }
public Integer getTotalScore() { public float getTotalScore() {
return totalScore; return totalScore;
} }
public void setTotalScore(Integer totalScore) { public void setTotalScore(float totalScore) {
this.totalScore = totalScore; this.totalScore = totalScore;
} }
} }
...@@ -11,6 +11,7 @@ import org.apache.ibatis.annotations.Param; ...@@ -11,6 +11,7 @@ import org.apache.ibatis.annotations.Param;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Map;
public interface QuestionnaireService { public interface QuestionnaireService {
/** /**
...@@ -104,6 +105,14 @@ public interface QuestionnaireService { ...@@ -104,6 +105,14 @@ public interface QuestionnaireService {
void exportPerformanceSummary(HttpServletRequest request, HttpServletResponse response); void exportPerformanceSummary(HttpServletRequest request, HttpServletResponse response);
Integer updateAnswerScore(Answer answer); Integer updateAnswerScore(Answer answer);
Review selectOneReviewByRecordIdAndQuestionsId( Long recordId, Long questionsId);
Integer updateOneReviewByRecordIdAndQuestionsId(Review review);
Integer insertOneReview(Review review);
Integer saveReview(List<Review> reviews) throws Exception;
} }
...@@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletResponse;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map;
@Service @Service
...@@ -805,27 +806,27 @@ public class QuestionnaireServiceImpl implements QuestionnaireService { ...@@ -805,27 +806,27 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
summaryList.get(i).setIndex(i+1); summaryList.get(i).setIndex(i+1);
//计算引导指标和奖励指标分数 //计算引导指标和奖励指标分数
Integer guideIndexScore = summaryList.get(i).getGuideIndexOne() + summaryList.get(i).getGuideIndexTwo() + summaryList.get(i).getGuideIndexThree() float guideIndexScore = summaryList.get(i).getGuideIndexOne() + summaryList.get(i).getGuideIndexTwo() + summaryList.get(i).getGuideIndexThree()
+ summaryList.get(i).getGuideIndexFour() + summaryList.get(i).getGuideIndexFive() + summaryList.get(i).getGuideIndexSix() + summaryList.get(i).getGuideIndexSeven() + summaryList.get(i).getGuideIndexFour() + summaryList.get(i).getGuideIndexFive() + summaryList.get(i).getGuideIndexSix() + summaryList.get(i).getGuideIndexSeven()
+ summaryList.get(i).getGuideIndexEight() + summaryList.get(i).getGuideIndexNine() + summaryList.get(i).getGuideIndexTen() + summaryList.get(i).getGuideIndexEleven() + summaryList.get(i).getGuideIndexEight() + summaryList.get(i).getGuideIndexNine() + summaryList.get(i).getGuideIndexTen() + summaryList.get(i).getGuideIndexEleven()
+ summaryList.get(i).getGuideIndexTwelve() + summaryList.get(i).getGuideIndexThirteen(); + summaryList.get(i).getGuideIndexTwelve() + summaryList.get(i).getGuideIndexThirteen();
if(guideIndexScore >= 50){ if(guideIndexScore >= 50.0){
summaryList.get(i).setGuideIndexScore(50); summaryList.get(i).setGuideIndexScore(50);
}else{ }else{
summaryList.get(i).setGuideIndexScore(guideIndexScore); summaryList.get(i).setGuideIndexScore(guideIndexScore);
} }
//计算奖励指标分数 //计算奖励指标分数
Integer rewardIndexScore = summaryList.get(i).getRewardIndexOne() + summaryList.get(i).getRewardIndexTwo() + summaryList.get(i).getRewardIndexThree() float rewardIndexScore = summaryList.get(i).getRewardIndexOne() + summaryList.get(i).getRewardIndexTwo() + summaryList.get(i).getRewardIndexThree()
+ summaryList.get(i).getRewardIndexFour() + summaryList.get(i).getRewardIndexFive(); + summaryList.get(i).getRewardIndexFour() + summaryList.get(i).getRewardIndexFive();
if(rewardIndexScore >= 10){ if(rewardIndexScore >= 10.0){
summaryList.get(i).setRewardIndexScore(10); summaryList.get(i).setRewardIndexScore(10);
}else{ }else{
summaryList.get(i).setRewardIndexScore(rewardIndexScore); summaryList.get(i).setRewardIndexScore(rewardIndexScore);
} }
//总分数 //总分数
Integer totalScore = summaryList.get(i).getBasisIndexScore() + summaryList.get(i).getGuideIndexScore() + summaryList.get(i).getRewardIndexScore(); float totalScore = summaryList.get(i).getBasisIndexScore() + summaryList.get(i).getGuideIndexScore() + summaryList.get(i).getRewardIndexScore();
summaryList.get(i).setTotalScore(totalScore); summaryList.get(i).setTotalScore(totalScore);
} }
//生成excel //生成excel
...@@ -844,4 +845,41 @@ public class QuestionnaireServiceImpl implements QuestionnaireService { ...@@ -844,4 +845,41 @@ public class QuestionnaireServiceImpl implements QuestionnaireService {
public Integer updateAnswerScore(Answer answer){ public Integer updateAnswerScore(Answer answer){
return questionnaireDao.updateAnswerScore(answer); return questionnaireDao.updateAnswerScore(answer);
} }
@Override
public Review selectOneReviewByRecordIdAndQuestionsId(Long recordId, Long questionsId) {
return questionnaireDao.selectOneReviewByRecordIdAndQuestionsId(recordId,questionsId);
}
@Override
public Integer updateOneReviewByRecordIdAndQuestionsId(Review review) {
return questionnaireDao.updateOneReviewByRecordIdAndQuestionsId(review);
}
@Override
public Integer insertOneReview(Review review) {
return questionnaireDao.insertOneReview(review);
}
@Override
@Transactional(rollbackFor = Exception.class)
public Integer saveReview(List<Review> reviews) throws Exception {
//结果
Integer result=0;
//遍历存在则更新,不存在则新增
for (Review reviewItem: reviews) {
if(questionnaireDao.selectOneReviewByRecordIdAndQuestionsId(reviewItem.getRecordId(),reviewItem.getQuestionsId())==null){
//新增
result+=questionnaireDao.insertOneReview(reviewItem);
}else {
//更新
result+= questionnaireDao.updateOneReviewByRecordIdAndQuestionsId(reviewItem);
}
}
if(reviews.size()==result){
return result;
}else {
throw new Exception();
}
}
} }
...@@ -604,4 +604,21 @@ ...@@ -604,4 +604,21 @@
and questions_id BETWEEN 1 AND 27 and questions_id BETWEEN 1 AND 27
ORDER BY questions_id asc ORDER BY questions_id asc
</select> </select>
<select id="selectOneReviewByRecordIdAndQuestionsId" resultType="com.tiptimes.model.Review">
select id,questions_id,record_id,remark,approval_status,score
from t_review
where questions_id=#{questionsId} and record_id=#{recordId}
</select>
<update id="updateOneReviewByRecordIdAndQuestionsId" parameterType="com.tiptimes.model.Review" >
update t_review
set remark=#{review.remark}
where questions_id=#{review.questionsId} and record_id=#{review.recordId}
</update>
<insert id="insertOneReview" parameterType="com.tiptimes.model.Review" >
insert into t_review(questions_id,record_id,remark)
values (#{review.questionsId},#{review.recordId},#{review.remark})
</insert>
</mapper> </mapper>
\ No newline at end of file
...@@ -20,6 +20,18 @@ ...@@ -20,6 +20,18 @@
<link href="<%=request.getContextPath()%>/res/css/style.css?v=4.1.0" rel="stylesheet"> <link href="<%=request.getContextPath()%>/res/css/style.css?v=4.1.0" rel="stylesheet">
<link href="<%=request.getContextPath()%>/res/js/plugins/highlight/highlight.css" rel="stylesheet"> <link href="<%=request.getContextPath()%>/res/js/plugins/highlight/highlight.css" rel="stylesheet">
<style type="text/css">
.shadowlight{
border-top: 9px solid #00ff00;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
}
.shadow{
border-top: 9px solid black;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
}
</style>
</head> </head>
<body> <body>
<script type="text/javascript"> <script type="text/javascript">
...@@ -56,17 +68,16 @@ ...@@ -56,17 +68,16 @@
<td>引导指标得分</td> <td>引导指标得分</td>
<td>奖励指标得分</td> <td>奖励指标得分</td>
<td> <td>
<div style="text-align: left;"> <div style="display: flex;align-items: center;justify-content: center;height: 30px;">
<div style="display: inline-block;padding-bottom: 22px;margin-right: 10px"> <div style="display: inline-block;margin-right: 10px">
合计得分 合计得分
</div> </div>
<div style="display: inline-block;padding-top: 18px"> <div >
<div onclick="sortAsc()" <%-- <div onclick="sortAsc()"--%>
style=" width: 0px;height: 0px; border-bottom: 9px solid black;border-left: 10px solid transparent; border-right: 10px solid transparent;"> <%-- style=" border-bottom: 9px solid black;border-left: 10px solid transparent; border-right: 10px solid transparent;">--%>
</div> <%-- </div>--%>
<div style="height: 18px"></div> <%-- <div style="height: 14px"></div>--%>
<div onclick="sortDesc()" <div id="boxShadow" class="shadow" onclick="sortDesc()">
style=" width: 0px;height: 0px; border-top: 9px solid black;border-left: 10px solid transparent; border-right: 10px solid transparent;">
</div> </div>
</div> </div>
</div> </div>
......
...@@ -279,9 +279,9 @@ ...@@ -279,9 +279,9 @@
</div> </div>
<div class="form-group" id="submit2"> <div class="form-group" id="submit2">
<p> <p>
<input id="list" onclick="acheck1()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="1">驳回 name="list" value="1">驳回
<input id="list" onclick="acheck2()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="2">通过 name="list" value="2">通过
</p> </p>
<textarea name="question_2" cols="30" rows="3"></textarea> <textarea name="question_2" cols="30" rows="3"></textarea>
...@@ -368,9 +368,9 @@ ...@@ -368,9 +368,9 @@
</div> </div>
<div class="form-group" id="submit3"> <div class="form-group" id="submit3">
<p> <p>
<input id="list" onclick="acheck1()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="1">驳回 name="list" value="1">驳回
<input id="list" onclick="acheck2()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="2">通过 name="list" value="2">通过
</p> </p>
<textarea name="question_3" cols="30" rows="3"></textarea> <textarea name="question_3" cols="30" rows="3"></textarea>
...@@ -468,9 +468,9 @@ ...@@ -468,9 +468,9 @@
</div> </div>
<div class="form-group" id="submit4"> <div class="form-group" id="submit4">
<p> <p>
<input id="list" onclick="acheck1()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="1">驳回 name="list" value="1">驳回
<input id="list" onclick="acheck2()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="2">通过 name="list" value="2">通过
</p> </p>
<textarea name="question_4" cols="30" rows="3"></textarea> <textarea name="question_4" cols="30" rows="3"></textarea>
...@@ -613,9 +613,9 @@ ...@@ -613,9 +613,9 @@
</div> </div>
<div class="form-group" id="submit5"> <div class="form-group" id="submit5">
<p> <p>
<input id="list" onclick="acheck1()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="1">驳回 name="list" value="1">驳回
<input id="list" onclick="acheck2()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="2">通过 name="list" value="2">通过
</p> </p>
<textarea name="question_5" cols="30" rows="3"></textarea> <textarea name="question_5" cols="30" rows="3"></textarea>
...@@ -816,9 +816,9 @@ ...@@ -816,9 +816,9 @@
</div> </div>
<div class="form-group" id="submit6"> <div class="form-group" id="submit6">
<p> <p>
<input id="list" onclick="acheck1()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="1">驳回 name="list" value="1">驳回
<input id="list" onclick="acheck2()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="2">通过 name="list" value="2">通过
</p> </p>
<textarea name="question_6" cols="30" rows="3"></textarea> <textarea name="question_6" cols="30" rows="3"></textarea>
...@@ -910,9 +910,9 @@ ...@@ -910,9 +910,9 @@
</div> </div>
<div class="form-group" id="submit7"> <div class="form-group" id="submit7">
<p> <p>
<input id="list" onclick="acheck1()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="1">驳回 name="list" value="1">驳回
<input id="list" onclick="acheck2()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="2">通过 name="list" value="2">通过
</p> </p>
<textarea name="question_7" cols="30" rows="3"></textarea> <textarea name="question_7" cols="30" rows="3"></textarea>
...@@ -984,9 +984,9 @@ ...@@ -984,9 +984,9 @@
</div> </div>
<div class="form-group" id="submit8"> <div class="form-group" id="submit8">
<p> <p>
<input id="list" onclick="acheck1()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="1">驳回 name="list" value="1">驳回
<input id="list" onclick="acheck2()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="2">通过 name="list" value="2">通过
</p> </p>
<textarea name="question_8" cols="30" rows="3"></textarea> <textarea name="question_8" cols="30" rows="3"></textarea>
...@@ -1031,9 +1031,9 @@ ...@@ -1031,9 +1031,9 @@
</div> </div>
<div class="form-group" id="submit9"> <div class="form-group" id="submit9">
<p> <p>
<input id="list" onclick="acheck1()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="1">驳回 name="list" value="1">驳回
<input id="list" onclick="acheck2()" type="radio" <input id="list" onclick="" type="radio"
name="list" value="2">通过 name="list" value="2">通过
</p> </p>
<textarea name="question_9" cols="30" rows="3"></textarea> <textarea name="question_9" cols="30" rows="3"></textarea>
......
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
<ul class="nav nav-second-level"> <ul class="nav nav-second-level">
<li><a class="J_menuItem" <li><a class="J_menuItem"
href="<%=request.getContextPath()%>/goto/space/questionnaire_information" href="<%=request.getContextPath()%>/goto/space/questionnaire_information"
>2021年天津市高校众创空间绩效评估</a></li> >2022年天津市高校众创空间绩效评估</a></li>
</ul> </ul>
</li> </li>
<%-- <li><a class="J_menuItem" href="<%=request.getContextPath()%>/goto/space/space_change_password" data-index="0"> <i class="fa fa-rotate-left"></i> <span class="nav-label">修改密码</span></a></li> <%-- <li><a class="J_menuItem" href="<%=request.getContextPath()%>/goto/space/space_change_password" data-index="0"> <i class="fa fa-rotate-left"></i> <span class="nav-label">修改密码</span></a></li>
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<div class="col-sm-12"> <div class="col-sm-12">
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<h5 style="margin-left: 20px; font-size: 20px;text-align: center">2021年度天津市高校众创空间绩效评估</h5> <h5 style="margin-left: 20px; font-size: 20px;text-align: center">2022年度天津市高校众创空间绩效评估</h5>
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<form method="get" class="form-horizontal"> <form method="get" class="form-horizontal">
......
...@@ -4,38 +4,46 @@ $(function () { ...@@ -4,38 +4,46 @@ $(function () {
//降序排列 //降序排列
function sortDesc() { function sortDesc() {
var sorting='desc' if ($("#boxShadow").hasClass('shadowlight')) {
if ($("#title").val().length > 50) { $("#boxShadow").removeAttr('class')
swal("失败!",'输入字符过多!', "error") $("#boxShadow").attr('class','shadow')
} else { getTableData()
$.ajax({ }else {
url: webroot + "questionnaire/selectPerformanceSummaryList", $("#boxShadow").removeAttr('class')
method: "GET", $("#boxShadow").attr('class','shadowlight')
datatype: "json", var sorting='desc'
data: { if ($("#title").val().length > 50) {
"optinName": $("#title").val(), swal("失败!",'输入字符过多!', "error")
"sorting":sorting } else {
}, $.ajax({
success: (res) => { url: webroot + "questionnaire/selectPerformanceSummaryList",
$("tbody").empty() method: "GET",
for (let i = 0; i < res.data.performanceSummaryList.length; i++) { datatype: "json",
$("tbody").append( data: {
"<tr>" + "optinName": $("#title").val(),
"<td>" + (i + 1) + "</td>" + "sorting":sorting
"<td>" + res.data.performanceSummaryList[i].optinName + "</td>" + },
"<td>" + res.data.performanceSummaryList[i].basicIndicators + "</td>" + success: (res) => {
"<td>" + res.data.performanceSummaryList[i].guideIndicators + "</td>" + $("tbody").empty()
"<td>" + res.data.performanceSummaryList[i].rewardIndicators + "</td>" + for (let i = 0; i < res.data.performanceSummaryList.length; i++) {
"<td>" + res.data.performanceSummaryList[i].totalScore + "</td>" + $("tbody").append(
"</tr>" "<tr>" +
) "<td>" + (i + 1) + "</td>" +
} "<td>" + res.data.performanceSummaryList[i].optinName + "</td>" +
"<td>" + res.data.performanceSummaryList[i].basicIndicators + "</td>" +
"<td>" + res.data.performanceSummaryList[i].guideIndicators + "</td>" +
"<td>" + res.data.performanceSummaryList[i].rewardIndicators + "</td>" +
"<td>" + res.data.performanceSummaryList[i].totalScore + "</td>" +
"</tr>"
)
}
}, },
error: () => { error: () => {
swal("失败!",'网络有问题,稍后再试', "error") swal("失败!",'网络有问题,稍后再试', "error")
} }
}) })
}
} }
} }
......
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