Commit c4364fb1 authored by wangxl's avatar wangxl

77

parent 7940206f
......@@ -19,4 +19,7 @@ public class ComExpertSpec extends BaseEntity {
@ApiModelProperty(value = "专业Id", position = 2)
@Length(max=36, message = "专业Id不能大于36")
private String specId;
/** 排序 */
@ApiModelProperty(value = "排序", position = 5)
private Integer showIndex;
}
......@@ -106,12 +106,8 @@ public class ComExpertDTO extends BaseDTO {
@ApiModelProperty(value = "项目分配信息", position = 23)
private List<AssignCount> assignInfo;
/** 评审专业 */
@ApiModelProperty(value = "评审专业", position = 24)
private List<String> auditSpecList;
/** 评审专业 */
@ApiModelProperty(value = "评审专业", position = 25)
private List<ComExpertSpecDTO> specList;
/** 用户Id*/
@ApiModelProperty(value = "用户Id", position = 30)
private String userId;
......
package com.yiboshi.science.param.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yiboshi.science.base.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -8,8 +7,6 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
@Data
@EqualsAndHashCode(callSuper=true)
@ApiModel(description = "专家项目分配表DTO")
......@@ -27,4 +24,8 @@ public class ComExpertSpecDTO extends BaseDTO {
@ApiModelProperty(value = "专业名称", position = 4)
@Length(max=200, message = "专业名称不能大于200")
private String specName;
/** 排序 */
@ApiModelProperty(value = "排序", position = 5)
private Integer showIndex;
}
......@@ -327,6 +327,8 @@ public class ComProjectDTO extends BaseDTO {
private ProjectKPIStatisticDTO projectKPI;
/** 购置设备预算明细表 */
private List<ComProjectEquipmentDTO> equipments;
/** 购置设备预算明细表 */
private List<ComProjectEquipmentDTO> deviceList;
/** 附件列表 */
private List<ComFileDTO> fileList;
/** 审核列表 */
......
......@@ -22,4 +22,7 @@ public class ComExpertSpecQueryVO extends PaginationVO {
@ApiModelProperty(value = "专业Id", position = 2)
@Length(max=36, message = "专业Id不能大于36")
private String specId;
/** 排序 */
@ApiModelProperty(value = "排序", position = 5)
private Integer showIndex;
}
......@@ -27,7 +27,7 @@ public interface ComExpertSpecService extends BaseService<ComExpertSpecQueryVO,
* @param list
* @param expertId
*/
void insertSpecList(List<String> list, String expertId);
void insertSpecList(List<ComExpertSpecDTO> list, String expertId);
/**
* 根据参数获取参数列表
*
......
......@@ -9,6 +9,7 @@ import com.yiboshi.science.dao.ComExpertDAO;
import com.yiboshi.science.entity.*;
import com.yiboshi.science.enumeration.CommonEnum;
import com.yiboshi.science.param.dto.ComExpertDTO;
import com.yiboshi.science.param.dto.ComExpertSpecDTO;
import com.yiboshi.science.param.query.ComExpertQueryVO;
import com.yiboshi.science.service.*;
import com.yiboshi.science.utils.ChineseToPinyin;
......@@ -98,7 +99,6 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
ComExpertDTO dto = comExpertDAO.getExpertById(id);
if (null != dto) {
dto.setSpecList(comExpertSpecService.getListByExpertId(id));
dto.setAuditSpecList(comExpertSpecService.getIdListByExpertId(id));
dto.setCertId(hideAllIdCardNum(dto.getCertId()));
// if (Objects.nonNull(dto.getMobile()))
// dto.setMobile(hideAllPhoneNum(dto.getMobile()));
......@@ -146,7 +146,7 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
comExpert.setReportState(dto.getReportState());
String id = this.insert(comExpert);
dto.setId(comExpert.getId());
comExpertSpecService.insertSpecList(dto.getAuditSpecList(), id);
comExpertSpecService.insertSpecList(dto.getSpecList(), id);
return dto.getId();
}
......@@ -170,7 +170,7 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
this.update(comExpert);
comPersonService.updateById(comPerson);
comExpertSpecService.insertSpecList(dto.getAuditSpecList(), dto.getId());
comExpertSpecService.insertSpecList(dto.getSpecList(), dto.getId());
return dto.getId();
}
......@@ -208,9 +208,11 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
if (null != e.getSpecName()) {
List<SystemParameter> findList2 = specList.stream().filter(p -> e.getSpecName().equals(p.getName())).collect(Collectors.toList());
if (findList2.size() > 0) {
List<String> audtiSpecList = new ArrayList<>();
audtiSpecList.add(findList2.stream().findFirst().get().getId());
e.setAuditSpecList(audtiSpecList);
List<ComExpertSpecDTO> audtiSpecList = new ArrayList<>();
ComExpertSpecDTO w= new ComExpertSpecDTO();
w.setSpecId(findList2.stream().findFirst().get().getId());
audtiSpecList.add(w);
e.setSpecList(audtiSpecList);
}
}
e.setWorkUnit(e.getUnitName());
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yiboshi.science.base.BaseServiceImpl;
import com.yiboshi.science.dao.ComExpertSpecDAO;
import com.yiboshi.science.entity.ComExpertSpec;
import com.yiboshi.science.entity.ComFile;
import com.yiboshi.science.entity.SystemMenu;
import com.yiboshi.science.entity.SelectListItem;
import com.yiboshi.science.param.dto.ComExpertDTO;
......@@ -40,19 +41,20 @@ public class ComExpertSpecServiceImpl extends BaseServiceImpl<ComExpertSpecDAO,
}
}
public void insertSpecList(List<String> list, String expertId) {
public void insertSpecList(List<ComExpertSpecDTO> list, String expertId) {
if (list != null && list.size() > 0) {
ComExpertSpec comExpertSpec = new ComExpertSpec();
comExpertSpec.setExpertId(expertId);
this.delete(comExpertSpec);
list.forEach((e) -> {
if (!isNull(e)) {
for (int i = 0; i < list.size(); i++) {
if (!isObjectNull(list.get(i))) {
ComExpertSpec expertSpec = new ComExpertSpec();
expertSpec.setExpertId(expertId);
expertSpec.setSpecId(e);
expertSpec.setSpecId(list.get(i).getSpecId());
list.get(i).setShowIndex(i + 1);
this.insert(expertSpec);
}
});
}
}
}
......
......@@ -8,13 +8,13 @@
<select id="getIdListByExpertId" parameterType="java.lang.String" resultType="java.lang.String">
SELECT a.spec_id
FROM com_expert_spec a
where expert_id=#{expertId}
where expert_id=#{expertId} order by a.show_index
</select>
<select id="getListByExpertId" parameterType="java.lang.String" resultType="com.yiboshi.science.param.dto.ComExpertSpecDTO">
SELECT a.spec_id,b.name specName
FROM com_expert_spec a
left join system_parameter b on a.spec_id=b.id and b.type_id=57
where expert_id=#{expertId}
where expert_id=#{expertId} order by a.show_index
</select>
<select id="getExpertListBySpecId" resultType="com.yiboshi.science.param.dto.ComExpertDTO">
select distinct a.expert_id id,c.person_name,c.cert_id,c.sex,c.birthday,e.unit_name as work_unit
......
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