Merge remote-tracking branch 'origin/feat_chievements_dev' into feat_chievements_dev
This commit is contained in:
commit
cca9296f5b
|
@ -84,8 +84,11 @@ public class AchievementsServiceImpl implements IAchievementsService {
|
|||
}
|
||||
}
|
||||
a.setUserImg(img);
|
||||
|
||||
a.setImages(buildFileInfoByIdents(a.getImages(), a.getSource()));
|
||||
a.setAttachments(buildFileInfoByIdents(a.getAttachments(), a.getSource()));
|
||||
}
|
||||
return achievementsMapper.selectAchievementsById(id);
|
||||
return a;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,10 +8,12 @@ import java.util.stream.Collectors;
|
|||
|
||||
import com.microservices.common.core.exception.ServiceException;
|
||||
import com.microservices.common.core.utils.DateUtils;
|
||||
import com.microservices.common.security.utils.SecurityUtils;
|
||||
import com.microservices.dms.achievementLibrary.domain.Achievements;
|
||||
import com.microservices.dms.achievementLibrary.mapper.AchievementTeamMapper;
|
||||
import com.microservices.dms.achievementLibrary.mapper.AchievementsMapper;
|
||||
import com.microservices.dms.achievementLibrary.service.IAchievementsService;
|
||||
import com.microservices.system.api.model.LoginUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.microservices.dms.achievementLibrary.mapper.SchoolEnterpriseAchievementsMapper;
|
||||
|
@ -59,6 +61,11 @@ public class SchoolEnterpriseAchievementsServiceImpl implements ISchoolEnterpris
|
|||
@Override
|
||||
public List<SchoolEnterpriseAchievements> selectSchoolEnterpriseAchievementsList(SchoolEnterpriseAchievements schoolEnterpriseAchievements)
|
||||
{
|
||||
// LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
// if (loginUser != null){
|
||||
// String username = loginUser.getUsername();
|
||||
// schoolEnterpriseAchievements.setCreateBy(username);
|
||||
// }
|
||||
List<SchoolEnterpriseAchievements> list = schoolEnterpriseAchievementsMapper.selectSchoolEnterpriseAchievementsList(schoolEnterpriseAchievements);
|
||||
for (SchoolEnterpriseAchievements a : list) {
|
||||
a.setImages(achievementsService.buildFileInfoByIdents(a.getImages(), "4"));
|
||||
|
@ -76,6 +83,11 @@ public class SchoolEnterpriseAchievementsServiceImpl implements ISchoolEnterpris
|
|||
@Override
|
||||
public Long insertSchoolEnterpriseAchievements(SchoolEnterpriseAchievements schoolEnterpriseAchievements)
|
||||
{
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null){
|
||||
String username = loginUser.getUsername();
|
||||
schoolEnterpriseAchievements.setCreateBy(username);
|
||||
}
|
||||
schoolEnterpriseAchievements.setCreateTime(DateUtils.getNowDate());
|
||||
schoolEnterpriseAchievementsMapper.insertSchoolEnterpriseAchievements(schoolEnterpriseAchievements);
|
||||
return schoolEnterpriseAchievements.getId();
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.microservices.common.core.web.domain.BaseEntity;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
|
||||
|
@ -42,6 +43,7 @@ public class CompetitionResourceLibrary extends BaseEntity {
|
|||
/**
|
||||
* 作品提交时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date submissionTime;
|
||||
/**
|
||||
* 提交者
|
||||
|
@ -78,6 +80,7 @@ public class CompetitionResourceLibrary extends BaseEntity {
|
|||
/**
|
||||
* 转入成果库时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date transferredToResultLibraryTime;
|
||||
/**
|
||||
* 是否精选成果
|
||||
|
@ -95,6 +98,24 @@ public class CompetitionResourceLibrary extends BaseEntity {
|
|||
* 附件
|
||||
*/
|
||||
private String attachment;
|
||||
private String leader;
|
||||
private String identifier;
|
||||
|
||||
public String getIdentifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
public void setIdentifier(String identifier) {
|
||||
this.identifier = identifier;
|
||||
}
|
||||
|
||||
public String getLeader() {
|
||||
return leader;
|
||||
}
|
||||
|
||||
public void setLeader(String leader) {
|
||||
this.leader = leader;
|
||||
}
|
||||
|
||||
private List<KeyValVo<String, String>> attachmentList = new ArrayList<>();
|
||||
|
||||
|
|
|
@ -76,6 +76,15 @@ public class ExpertResourceLibrary extends BaseEntity {
|
|||
|
||||
private String userImg;
|
||||
private String userNickName;
|
||||
private String otherAttachments;
|
||||
|
||||
public String getOtherAttachments() {
|
||||
return otherAttachments;
|
||||
}
|
||||
|
||||
public void setOtherAttachments(String otherAttachments) {
|
||||
this.otherAttachments = otherAttachments;
|
||||
}
|
||||
|
||||
public String getUserImg() {
|
||||
return userImg;
|
||||
|
|
|
@ -25,6 +25,7 @@ public class ProjectResourceLibrary extends BaseEntity {
|
|||
private String projectDomainName;
|
||||
//
|
||||
private String identifier;
|
||||
private String userIdentifier;
|
||||
//开源项目ID
|
||||
private Long projectId;
|
||||
//仓库ID
|
||||
|
@ -65,6 +66,14 @@ public class ProjectResourceLibrary extends BaseEntity {
|
|||
private String attachments;
|
||||
private List<KeyValVo<String, String>> attachmentList = new ArrayList<>();
|
||||
|
||||
public String getUserIdentifier() {
|
||||
return userIdentifier;
|
||||
}
|
||||
|
||||
public void setUserIdentifier(String userIdentifier) {
|
||||
this.userIdentifier = userIdentifier;
|
||||
}
|
||||
|
||||
public String getProjectDomain() {
|
||||
return projectDomain;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ public class TaskResourceLibrary extends BaseEntity {
|
|||
//胜出交稿名称
|
||||
private String submissionName;
|
||||
//交稿时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date submissionDate;
|
||||
//交稿人
|
||||
private String submitterName;
|
||||
|
@ -51,6 +52,7 @@ public class TaskResourceLibrary extends BaseEntity {
|
|||
//是否已转入成果库
|
||||
private Long isTransferredToResultsLibrary;
|
||||
//转入成果库时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date transferToResultsDate;
|
||||
//是否精选成果 0否 1是
|
||||
private Long isSelectedResult;
|
||||
|
|
|
@ -92,7 +92,7 @@ public interface TaskResourceLibraryMapper {
|
|||
*
|
||||
* @return 任务金额
|
||||
*/
|
||||
long getTaskAmount();
|
||||
Double getTaskAmount();
|
||||
|
||||
/**
|
||||
* 获取需评审任务数
|
||||
|
|
|
@ -83,7 +83,7 @@ public class ProjectResourceLibraryService {
|
|||
if (v.startsWith("http")) {
|
||||
String urlPath = getUrlPath(v);
|
||||
if (StringUtils.isNotEmpty(urlPath)) {
|
||||
if (urlPath.startsWith("/")) {
|
||||
if (urlPath.startsWith("/api")) {
|
||||
a.setV(gitLinkUrl + urlPath);
|
||||
}else {
|
||||
a.setV(gitLinkUrl +"/api"+ urlPath);
|
||||
|
|
|
@ -166,7 +166,7 @@ public class TaskResourceLibraryService {
|
|||
*
|
||||
* @return 任务金额
|
||||
*/
|
||||
public Long getTaskAmount() {
|
||||
public Double getTaskAmount() {
|
||||
return taskResourceLibraryMapper.getTaskAmount();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.microservices.dms.resourceLibrary.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.microservices.common.core.utils.DateUtils;
|
||||
import com.microservices.common.core.utils.StringUtils;
|
||||
import com.microservices.dms.behaviorImage.domain.AchievementBehaviorSumVo;
|
||||
|
@ -11,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -38,7 +40,16 @@ public class ExpertResourceLibraryServiceImpl implements IExpertResourceLibraryS
|
|||
@Override
|
||||
public ExpertResourceLibrary selectExpertResourceLibraryById(Long id) {
|
||||
ExpertResourceLibrary res = expertResourceLibraryMapper.selectExpertResourceLibraryById(id);
|
||||
// getSomeAttaches(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
private ExpertResourceLibrary getSomeAttaches(ExpertResourceLibrary res) {
|
||||
List<Map<String, Object>> mmp = new ArrayList<>();
|
||||
ExpertAttachmentVo attachmentVo = expertResourceLibraryMapper.getExpertInfoById(res.getExpertId());
|
||||
if (attachmentVo == null) {
|
||||
return res;
|
||||
}
|
||||
Map<String, Object> honorsAttachments = expertResourceLibraryMapper.getAttachmentInfo(attachmentVo.getHonorsAttachments());
|
||||
buildFullUrl(honorsAttachments);
|
||||
Map<String, Object> resumeAttachments = expertResourceLibraryMapper.getAttachmentInfo(attachmentVo.getResumeAttachments());
|
||||
|
@ -51,6 +62,12 @@ public class ExpertResourceLibraryServiceImpl implements IExpertResourceLibraryS
|
|||
res.getParams().put("honorsAttachments", honorsAttachments);
|
||||
res.getParams().put("resumeAttachments", resumeAttachments);
|
||||
res.getParams().put("titleCertificateAttachments", titleCertificateAttachments);
|
||||
|
||||
mmp.add(academicAchievementsAttachments);
|
||||
mmp.add(honorsAttachments);
|
||||
mmp.add(resumeAttachments);
|
||||
mmp.add(titleCertificateAttachments);
|
||||
res.setOtherAttachments(JSON.toJSONString(mmp));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -77,6 +94,8 @@ public class ExpertResourceLibraryServiceImpl implements IExpertResourceLibraryS
|
|||
img = "images/avatars/User/girl.jpg";
|
||||
}
|
||||
a.setUserImg(img);
|
||||
|
||||
getSomeAttaches(a);
|
||||
}
|
||||
return expertResourceLibraryList;
|
||||
}
|
||||
|
|
|
@ -77,10 +77,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectAchievementsById" parameterType="Long" resultType="com.microservices.dms.achievementLibrary.domain.Achievements">
|
||||
select a.id,a.achievement_name,a.hot_rank,a.field_1,a.field_2,a.field_3,a.attachment_count,a.is_expert_audit,a.achievement_type,a.source,a.source_id
|
||||
,u.login as "userLogin",u.nickname as "userNickName",ue.gender as "gender",
|
||||
,u.login as "userLogin",IFNULL(u.nickname,owner_name) as "userNickName",ue.gender as "gender",
|
||||
a.source_link,a.tags,a.summary,a.publishing_unit,a.address,a.is_featured,a.contact_person,a.contact_number,a.owner_id,a.owner_name, a.status,a.details,
|
||||
a.reviewer,a.review_date,a.review_comments, a.images,a.attachments,a.create_by,a.create_time,a.update_by,a.update_time,
|
||||
(select IFNULL(nickname,login) from users where login=owner_name) as remark
|
||||
a.reviewer,a.review_date,a.review_comments, a.images,a.attachments,a.create_by,a.create_time,a.update_by,a.update_time
|
||||
from achievements a
|
||||
left join users u on a.owner_name = u.login
|
||||
left join user_extensions ue on u.id = ue.user_id
|
||||
|
@ -363,17 +362,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<select id="indexTaskStatistic" resultType="java.util.Map">
|
||||
select COUNT(*) as taskCount,
|
||||
select (select count(distinct trl.task_id) from achievements a join task_resource_library trl on a.source_id = trl.id where a.source='2') as taskCount,
|
||||
(select count(1) from clickers c inner join achievements a ON a.id = c.click_id where click_type = 'Achievements' and a.source='2') as clickCount,
|
||||
IFNULL(SUM(is_expert_audit), 0) as expertAuditCount
|
||||
COUNT(*) as expertAuditCount
|
||||
from achievements
|
||||
where source = '2'
|
||||
</select>
|
||||
<select id="indexCompetitionStatistic" resultType="java.util.Map">
|
||||
select COUNT(*) as CompetitionCount,
|
||||
select COUNT(*) as CompetitionCountAchievementCount,
|
||||
IFNULL(SUM(is_expert_audit), 0) as expertAuditCount,
|
||||
(select count(1) from clickers c inner join achievements a ON a.id = c.click_id where click_type = 'Achievements' and a.source='3') as clickCount,
|
||||
(select COUNT(distinct open_competition_id) from competition_resource_library) as CompetitionCountAchievementCount
|
||||
(select COUNT(distinct open_competition_id) from competition_resource_library) as CompetitionCount
|
||||
from achievements
|
||||
where source = '3'
|
||||
</select>
|
||||
|
|
|
@ -133,9 +133,11 @@
|
|||
cu.leader as submitter,
|
||||
submission_type,
|
||||
cu.org_name as submitting_unit,
|
||||
cu.sub_item as submission_summary,
|
||||
cu.sub_item as submission_details,
|
||||
IFNULL(crl.submission_summary,cu.sub_item) as submission_summary,
|
||||
IFNULL(crl.submission_details,cu.sub_item) as submission_details,
|
||||
cu.leader as contact_person,
|
||||
cu.leader as leader,
|
||||
ci.identifier as identifier,
|
||||
cu.phone as contact_phone,
|
||||
is_transferred_to_result_library,
|
||||
transferred_to_result_library_time,
|
||||
|
|
|
@ -79,8 +79,8 @@
|
|||
expert_domain,u.authentication as expertAuth,
|
||||
e.title_rank, erl.status, e.review_area_one, e.review_area_two, e.review_area_three, e.is_delete, erl.create_by,
|
||||
erl.create_time,
|
||||
(select COUNT(*) from task_expert where expert_id = e.id and container_type = 1) as taskAuditCount,
|
||||
(select COUNT(*) from task_expert where expert_id = e.id and container_type = 2) as competitionAuditCount,
|
||||
(select COUNT(*) from task_expert where expert_id = e.id and container_type = 1 and `status` in (1,2)) as taskAuditCount,
|
||||
(select COUNT(*) from task_expert where expert_id = e.id and container_type = 2 and `status` in (1,2)) as competitionAuditCount,
|
||||
erl.update_by, erl.update_time,erl.sort_no
|
||||
from experts e
|
||||
inner join users u on e.user_id = u.id
|
||||
|
@ -126,8 +126,8 @@
|
|||
expert_domain,images, attachments,
|
||||
e.title_rank, erl.status, e.review_area_one, e.review_area_two, e.review_area_three, e.is_delete, erl.create_by,
|
||||
erl.create_time,
|
||||
(select COUNT(*) from task_expert where expert_id = e.id and container_type = 1) as taskAuditCount,
|
||||
(select COUNT(*) from task_expert where expert_id = e.id and container_type = 2) as competitionAuditCount,
|
||||
(select COUNT(distinct container_id) from task_expert where expert_id = e.id and container_type = 1 and `status` in (1,2)) as taskAuditCount,
|
||||
(select COUNT(distinct container_id) from task_expert where expert_id = e.id and container_type = 2 and `status` in (1,2)) as competitionAuditCount,
|
||||
(select count(*) as watchSum from watchers where watchable_type = 'Experts' and watchable_id = erl.id) as watcherSum,
|
||||
(select count(*) as favoriteSum from favorites where favorite_type = 'Experts' and favorite_id = erl.id) as favoriteSum,
|
||||
erl.update_by, erl.update_time,erl.sort_no
|
||||
|
@ -167,11 +167,11 @@
|
|||
|
||||
<select id="auditExpertCount" resultType="java.lang.Long">
|
||||
select COUNT(*)
|
||||
from (select (select COUNT(*) from task_expert where expert_id = e.id and container_type = 1) as taskAuditCount,
|
||||
(select COUNT(*)
|
||||
from (select (select COUNT(distinct container_id) from task_expert where expert_id = e.id and container_type = 1 and `status` in (1,2)) as taskAuditCount,
|
||||
(select COUNT(distinct container_id)
|
||||
from task_expert
|
||||
where expert_id = e.id
|
||||
and container_type = 2) as competitionAuditCount
|
||||
and container_type = 2 and `status` in (1,2)) as competitionAuditCount
|
||||
from experts e where is_delete = '0' and status = 1) tmp
|
||||
where tmp.taskAuditCount > 0
|
||||
OR tmp.competitionAuditCount > 0
|
||||
|
@ -179,21 +179,21 @@
|
|||
|
||||
<select id="competitionAuditCount" resultType="java.lang.Long">
|
||||
select IFNULL(SUM(competitionAuditCount), 0)
|
||||
from (select (select COUNT(*)
|
||||
from (select (select COUNT(distinct container_id)
|
||||
from task_expert
|
||||
where expert_id = e.id and container_type = 2) as competitionAuditCount
|
||||
where expert_id = e.id and container_type = 2 and `status` in (1,2)) as competitionAuditCount
|
||||
from experts e) tmp
|
||||
</select>
|
||||
<select id="taskAuditCount" resultType="java.lang.Long">
|
||||
select IFNULL(SUM(taskAuditCount), 0)
|
||||
from (select (select COUNT(*) from task_expert where expert_id = e.id and container_type = 1) as taskAuditCount
|
||||
from (select (select COUNT(distinct container_id) from task_expert where expert_id = e.id and container_type = 1 and `status` in (1,2)) as taskAuditCount
|
||||
from experts e) tmp
|
||||
</select>
|
||||
<select id="auditCompetitionAuditExpertCount" resultType="java.lang.Long">
|
||||
select count(*)
|
||||
from expert_resource_library erl
|
||||
join
|
||||
(select expert_id from task_expert where container_type = 2 group by expert_id having count(*) > 0) as tmp
|
||||
(select expert_id from task_expert where container_type = 2 and `status` in (1,2) group by expert_id having count(*) > 0) as tmp
|
||||
on erl.expert_id = tmp.expert_id
|
||||
</select>
|
||||
<select id="expertResourceCount" resultType="java.lang.Long">
|
||||
|
@ -204,7 +204,7 @@
|
|||
select count(*)
|
||||
from expert_resource_library erl
|
||||
join
|
||||
(select expert_id from task_expert where container_type = 1 group by expert_id having count(*) > 0) as tmp
|
||||
(select expert_id from task_expert where container_type = 1 and `status` in (1,2) group by expert_id having count(*) > 0) as tmp
|
||||
on erl.expert_id = tmp.expert_id
|
||||
</select>
|
||||
|
||||
|
@ -423,11 +423,11 @@
|
|||
tmp.competitionAuditCount as "competitionAuditSum",
|
||||
(tmp.taskAuditCount + tmp.competitionAuditCount) as "total"
|
||||
from (select e.expert_name,
|
||||
(select COUNT(*) from task_expert where expert_id = e.id and container_type = 1) as taskAuditCount,
|
||||
(select COUNT(*)
|
||||
(select COUNT(distinct container_id) from task_expert where expert_id = e.id and container_type = 1 and `status` in (1,2)) as taskAuditCount,
|
||||
(select COUNT(distinct container_id)
|
||||
from task_expert
|
||||
where expert_id = e.id
|
||||
and container_type = 2) as competitionAuditCount
|
||||
and container_type = 2 and `status` in (1,2)) as competitionAuditCount
|
||||
from experts e
|
||||
inner join users u on e.user_id = u.id
|
||||
left join expert_resource_library erl on e.id = erl.user_id
|
||||
|
|
|
@ -125,6 +125,7 @@
|
|||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="projectDomain" column="project_domain"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
@ -151,7 +152,7 @@
|
|||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
update_time,project_domain
|
||||
from project_resource_library
|
||||
</sql>
|
||||
|
||||
|
@ -167,9 +168,13 @@
|
|||
v.name as release_name,
|
||||
v.updated_at as release_date,
|
||||
(select login from users where id=v.user_id) as release_person,
|
||||
p.project_category_id as project_domain,
|
||||
(select login from users where id=v.user_id) as user_identifier,
|
||||
IFNULL(pl.project_domain,p.project_category_id) as project_domain,
|
||||
pl.release_type,
|
||||
pl.release_unit,
|
||||
v.body,
|
||||
IFNULL( pl.release_summary,v.body) as release_summary,
|
||||
IFNULL( pl.release_details,v.body) as release_details,
|
||||
p.description as release_summary,
|
||||
p.description as release_details,
|
||||
pl.contact_person,
|
||||
|
@ -209,6 +214,7 @@
|
|||
<if test="isSelectedAchievement != null ">and is_selected_achievement = #{isSelectedAchievement}</if>
|
||||
<if test="images != null and images != ''">and images = #{images}</if>
|
||||
<if test="attachments != null and attachments != ''">and attachments = #{attachments}</if>
|
||||
<if test="projectDomain != null and projectDomain != ''">and project_domain = #{projectDomain}</if>
|
||||
</where>
|
||||
order by is_transferred_to_achievement
|
||||
</select>
|
||||
|
@ -245,6 +251,7 @@
|
|||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="projectDomain != null">project_domain,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
|
||||
|
@ -270,6 +277,7 @@
|
|||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="projectDomain != null">#{projectDomain},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
@ -300,6 +308,7 @@
|
|||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="projectDomain != null">project_domain = #{projectDomain},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
|
@ -443,15 +443,15 @@
|
|||
t.id as task_id,
|
||||
pd.paper_id as paper_id,
|
||||
t.name as task_name,
|
||||
t.category_id as task_domain,
|
||||
IFNULL(ts.task_domain, t.category_id) as task_domain,
|
||||
t.bounty as task_amount,
|
||||
p.number as submission_name,
|
||||
p.created_at as submission_date,
|
||||
(select u.login from users u where u.id = p.user_id) as submitter_name,
|
||||
submission_type,
|
||||
submission_organization,
|
||||
pd.content as submission_summary,
|
||||
pd.content as release_details,
|
||||
IFNULL(ts.submission_summary,pd.content) as submission_summary,
|
||||
IFNULL(ts.release_details,pd.content) as release_details,
|
||||
t.contact_name,
|
||||
t.contact_phone,
|
||||
is_transferred_to_results_library,
|
||||
|
@ -516,7 +516,7 @@
|
|||
</select>
|
||||
|
||||
<select id="getTotalTasks" resultType="java.lang.Long">
|
||||
select count(*)
|
||||
select count(distinct task_id)
|
||||
from tasks t
|
||||
join (select * from papers where status = 2) p on t.id = p.task_id
|
||||
</select>
|
||||
|
@ -537,10 +537,10 @@
|
|||
where is_transferred_to_results_library = 1
|
||||
</select>
|
||||
|
||||
<select id="getTaskAmount" resultType="java.lang.Long">
|
||||
<select id="getTaskAmount" resultType="java.lang.Double">
|
||||
select IFNULL(sum(t.bounty), 0)
|
||||
from tasks t
|
||||
join (select * from papers where status = 2) p on t.id = p.task_id
|
||||
join (select distinct task_id from papers where status = 2) p on t.id = p.task_id
|
||||
</select>
|
||||
|
||||
<select id="getReviewTaskCount" resultType="java.lang.Long">
|
||||
|
|
Loading…
Reference in New Issue