添加川大查询项目管理列表接口

master
zhiyong.ning 4 years ago
parent 8e55a349ac
commit c7cc76c799
  1. 18
      src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java
  2. 6
      src/main/java/com/yipin/liuwanr/service/ProjectManagementService.java

@ -1,10 +1,15 @@
package com.yipin.liuwanr.mapper; package com.yipin.liuwanr.mapper;
import com.yipin.liuwanr.entity.*;
import org.apache.ibatis.annotations.*;
import java.util.List; import java.util.List;
import com.yipin.liuwanr.entity.*;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
/** /**
* 项目管理系统 项目管理表 * 项目管理系统 项目管理表
* *
@ -18,7 +23,7 @@ public interface ProjectManagementMapper {
* @param projectName * @param projectName
* @return * @return
*/ */
@Select("select count(*) from hr_project_management where projectName=#{projectName} and isdel=0") @Select("select count(*) from hr_project_management where projectName=#{projectName}")
Integer getByprojectName(String projectName); Integer getByprojectName(String projectName);
/** /**
@ -71,8 +76,7 @@ public interface ProjectManagementMapper {
"select * from hr_project_management where 1 = 1",//(roleId NOT LIKE '%3%' AND isdel = 0 AND projectPermissions != 0)", "select * from hr_project_management where 1 = 1",//(roleId NOT LIKE '%3%' AND isdel = 0 AND projectPermissions != 0)",
"<if test='userId==null'>AND roleId NOT LIKE '%3%' AND isdel = 0 AND projectPermissions != 0</if>", "<if test='userId==null'>AND roleId NOT LIKE '%3%' AND isdel = 0 AND projectPermissions != 0</if>",
" <if test='userId!=null'>AND ((roleId NOT LIKE '%3%' AND isdel = 0 AND projectPermissions != 0) OR ( isdel = 0 AND projectPermissions != 0 AND userId = #{userId} ))</if>",//教师端,一开始进入项目管理,看见自己创建的和其他人看见的 " <if test='userId!=null'>AND ((roleId NOT LIKE '%3%' AND isdel = 0 AND projectPermissions != 0) OR ( isdel = 0 AND projectPermissions != 0 AND userId = #{userId} ))</if>",//教师端,一开始进入项目管理,看见自己创建的和其他人看见的
"<if test='systemId!=null'> and systemId=#{systemId}</if>", " <if test='systemId!=null'> and systemId=#{systemId}</if>",
"<if test='projectName!=null'> and projectName like '%' #{projectName} '%'</if>",
" ORDER BY creationTime desc", " ORDER BY creationTime desc",
"</script>"}) "</script>"})
List<ProjectManagement> queryManagementsExportTest(ProjectManagement management); List<ProjectManagement> queryManagementsExportTest(ProjectManagement management);
@ -198,7 +202,7 @@ public interface ProjectManagementMapper {
* @return * @return
*/ */
@Select({"<script>", @Select({"<script>",
"select * from hr_judgment_points where find_in_set(#{projectId},projectId)", "select * from hr_trading_judgment_points where find_in_set(#{projectId},project_id)",
"</script>"}) "</script>"})
List<JudgmentPoints> getJudgmentPointsPs(@Param("projectId") Integer projectId); List<JudgmentPoints> getJudgmentPointsPs(@Param("projectId") Integer projectId);

@ -456,11 +456,11 @@ public class ProjectManagementService {
}*/ }*/
//根据projectId查询判分点信息 //根据projectId查询判分点信息
List<JudgmentPoints> judgmentPointsList = mapper.getJudgmentPointsPs(projectId); List<TradingJudgmentPoints> judgmentPointsList = mapper.getJudgmentPoints(projectId);
Integer size = judgmentPointsList.size(); Integer size = judgmentPointsList.size();
for (int i = 0; i<size; i++){ for (int i = 0; i<size; i++){
JudgmentPoints tradingJudgmentPoints = judgmentPointsList.get(i); TradingJudgmentPoints tradingJudgmentPoints = judgmentPointsList.get(i);
Integer judgmentPointsId = tradingJudgmentPoints.getJudgmentPointsId(); Integer judgmentPointsId = tradingJudgmentPoints.getId();
Integer systemId = tradingJudgmentPoints.getSystemId(); Integer systemId = tradingJudgmentPoints.getSystemId();
scoreIndexList = mapper.getScore(judgmentPointsId,systemId,projectId); scoreIndexList = mapper.getScore(judgmentPointsId,systemId,projectId);
score.put("scoreIndexList"+i,scoreIndexList); score.put("scoreIndexList"+i,scoreIndexList);

Loading…
Cancel
Save