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

xujun

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