Commit cc1b5f06 authored by wangxl's avatar wangxl

Merge remote-tracking branch 'origin/master'

parents 92bceea0 af6f6370
......@@ -27,6 +27,10 @@ public class ComProjectGroupAssignDTO extends BaseDTO {
@Length(max=36, message = "专家Id不能大于36")
private String expertId;
/** 专家类型(1技术专家、2财务专家) */
@ApiModelProperty(value = "专家类型", position = 3)
private Integer expertType;
/** 备注 */
@ApiModelProperty(value = "备注", position = 3)
@Length(max=65535, message = "备注不能大于65535")
......@@ -92,4 +96,5 @@ public class ComProjectGroupAssignDTO extends BaseDTO {
/** 评审明细 */
@ApiModelProperty(value = "评审明细", position = 14)
private List<ComProjectAssignDTO> projAssignList;
}
......@@ -22,6 +22,13 @@ public interface ComExpertSpecService extends BaseService<ComExpertSpecQueryVO,
*/
List<ComExpertSpecDTO> getListByExpertId(String expertId);
/** 判断是1技术专家、2财务专家
*
* @param expertId
* @return
*/
Integer getExpertTypeByExpertId(String expertId);
/** 插入列表
*
* @param list
......
......@@ -66,6 +66,16 @@ public class ComExpertSpecServiceImpl extends BaseServiceImpl<ComExpertSpecDAO,
return comExpertSpecDAO.getListByExpertId(expertId);
}
public Integer getExpertTypeByExpertId(String expertId) {
List<ComExpertSpecDTO> SpecList = this.getListByExpertId(expertId);
List<ComExpertSpecDTO> FindList = SpecList.stream().filter(e -> e.getSpecId().toLowerCase().equals("a70f06d1-b6aa-11ef-b6cb-0c42a1381189")).collect(Collectors.toList());
//1技术专家、2财务专家
if (null != FindList && FindList.size() > 0)
return 2;
else
return 1;
}
public List<SelectListItem> getExpertListBySpecId(Map<String, Object> specId) {
List<String> idList = null;
if (specId.containsKey("specId")) {
......@@ -128,5 +138,4 @@ public class ComExpertSpecServiceImpl extends BaseServiceImpl<ComExpertSpecDAO,
}
return allItem;
}
}
......@@ -118,7 +118,7 @@ public class ComProjectAssignServiceImpl extends BaseServiceImpl<ComProjectAssig
ComProjectAssign assign = new ComProjectAssign();
assign.setProjId(e);
assign.setExpertId(f);
assign.setExpertType(this.getExpertTypeByExpertId(f));
assign.setExpertType(comExpertSpecService.getExpertTypeByExpertId(f));
assign.setAssignYear(year);
this.insert(assign);
assignCount.incrementAndGet();
......@@ -165,16 +165,6 @@ public class ComProjectAssignServiceImpl extends BaseServiceImpl<ComProjectAssig
return dto;
}
public Integer getExpertTypeByExpertId(String expertId) {
List<ComExpertSpecDTO> SpecList = comExpertSpecService.getListByExpertId(expertId);
List<ComExpertSpecDTO> FindList = SpecList.stream().filter(e -> e.getSpecId().toLowerCase().equals("a70f06d1-b6aa-11ef-b6cb-0c42a1381189")).collect(Collectors.toList());
//1技术专家、2财务专家
if (null != FindList && FindList.size() > 0)
return 2;
else
return 1;
}
public List<AssignCount> getAssignCount(String expertId) {
return comProjectAssignDAO.getAssignCount(expertId);
}
......@@ -268,4 +258,5 @@ public class ComProjectAssignServiceImpl extends BaseServiceImpl<ComProjectAssig
public List<ComProjectGroupDTO> getProjectGroupAssignById(String id, String expertId) {
return comProjectAssignDAO.getProjectGroupAssignById(id, expertId);
}
}
......@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.stream.Collectors;
@Service
@AllArgsConstructor
......@@ -31,7 +32,11 @@ public class ComProjectGroupAssignServiceImpl extends BaseServiceImpl<ComProject
}
public List<ComProjectGroupAssignDTO> getAssignExpertList(String groupId) {
return comProjectGroupAssignDAO.getAssignExpertList(groupId);
List<ComProjectGroupAssignDTO> groupAssignList = comProjectGroupAssignDAO.getAssignExpertList(groupId);
groupAssignList.forEach(e -> {
e.setExpertType(comExpertSpecService.getExpertTypeByExpertId(e.getExpertId()));
});
return groupAssignList;
}
public ComProjectGroupAssignDTO getAssignGroupExpertById(String Id) {
......@@ -46,4 +51,5 @@ public class ComProjectGroupAssignServiceImpl extends BaseServiceImpl<ComProject
return dto;
}
}
......@@ -468,4 +468,5 @@ public class ComProjectGroupServiceImpl extends BaseServiceImpl<ComProjectGroupD
List<ComProjectKnowledgeStatisticDTO> list = comProjectGroupDAO.getProjectKnowledgeStatisticByGroupId(groupId);
return list;
}
}
......@@ -7,7 +7,7 @@
</sql>
<select id="getListByPage" resultType="com.yiboshi.science.param.dto.ComProjectAssignDTO">
SELECT a.*, c.person_name,c.cert_id,c.sex,c.birthday,c.mobile,c.email,c.education,c.title,g.unit_name
,d.name education_name,e.name title_name,f.proj_name,f.app_no,f.proj_no,h.total_funding
,d.name education_name,e.name title_name,f.proj_name,f.app_no,f.proj_no,f.proj_class,h.total_funding
FROM com_project_assign a
LEFT JOIN com_expert b ON a.expert_id = b.id
LEFT JOIN com_person c ON b.person_id = c.id
......
......@@ -42,5 +42,4 @@
#{item}
</foreach>
</select>
</mapper>
\ No newline at end of file
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