Commit 82f0df5e authored by 徐俊's avatar 徐俊

xujun

parent d7e7792d
......@@ -135,4 +135,7 @@ public class ComExpertDTO extends BaseDTO {
/** 用户角色状态*/
@ApiModelProperty(value = "用户角色状态", position = 30)
private String stateName;
/** 是否财务专家 */
@ApiModelProperty(value = "是否财务专家", position = 30)
private Integer isFinance;
}
......@@ -109,7 +109,6 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
@Transactional
public String insert(ComExpertDTO dto) {
dto.setReportState(1);
dto.setCertId(dto.getCertId().toLowerCase());
ComPerson comPerson = comPersonService.getPersonByCertId(dto.getCertId());
ComExpert comExpert = new ComExpert();
......@@ -214,13 +213,21 @@ public class ComExpertServiceImpl extends BaseServiceImpl<ComExpertDAO, ComExper
e.setEducation(findList1.stream().findFirst().get().getId());
}
if (null != e.getSpecName()) {
List<SystemParameter> findList2 = specList.stream().filter(p -> e.getSpecName().equals(p.getName())).collect(Collectors.toList());
if (findList2.size() > 0) {
if (e.getIsFinance() == 1) {
List<ComExpertSpecDTO> audtiSpecList = new ArrayList<>();
ComExpertSpecDTO w= new ComExpertSpecDTO();
w.setSpecId(findList2.stream().findFirst().get().getId());
ComExpertSpecDTO w = new ComExpertSpecDTO();
w.setSpecId("a70f06d1-b6aa-11ef-b6cb-0c42a1381189");
audtiSpecList.add(w);
e.setSpecList(audtiSpecList);
} else {
List<SystemParameter> findList2 = specList.stream().filter(p -> e.getSpecName().equals(p.getName())).collect(Collectors.toList());
if (findList2.size() > 0) {
List<ComExpertSpecDTO> audtiSpecList = new ArrayList<>();
ComExpertSpecDTO w = new ComExpertSpecDTO();
w.setSpecId(findList2.stream().findFirst().get().getId());
audtiSpecList.add(w);
e.setSpecList(audtiSpecList);
}
}
}
if (SecurityUserHolder.getRoles().contains(CommonEnum.systemRole.unit.getCode().toString())) {
......
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