Commit 22ca3211 authored by gaodongdong's avatar gaodongdong

添加接口

parent f3ae53b4
...@@ -49,6 +49,8 @@ public class OrgPersonFormVo extends BaseEntity{ ...@@ -49,6 +49,8 @@ public class OrgPersonFormVo extends BaseEntity{
@ApiModelProperty(value = "归属机构/部门/人员") @ApiModelProperty(value = "归属机构/部门/人员")
private String parentId; private String parentId;
@ApiModelProperty(value = "归属机构/部门/人员")
private String parentName;
@ApiModelProperty(value = "动态表单值") @ApiModelProperty(value = "动态表单值")
private List<FormValue> dynamicFormAlert; private List<FormValue> dynamicFormAlert;
......
...@@ -126,9 +126,22 @@ public class OrgPersonController { ...@@ -126,9 +126,22 @@ public class OrgPersonController {
List<FormValue> formValue = iOrgUsrService.getFormValue(id); List<FormValue> formValue = iOrgUsrService.getFormValue(id);
OrgPersonFormVo orgPersonFormVo = new OrgPersonFormVo(formValue); OrgPersonFormVo orgPersonFormVo = new OrgPersonFormVo(formValue);
BeanUtils.copyProperties(orgUsr, orgPersonFormVo); BeanUtils.copyProperties(orgUsr, orgPersonFormVo);
orgPersonFormVo.setParentName(iOrgUsrService.getById(orgUsr.getParentId()).getBizOrgName());
return ResponseHelper.buildResponse(orgPersonFormVo); return ResponseHelper.buildResponse(orgPersonFormVo);
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}/detail", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取人员详情", notes = "获取人员详情")
public ResponseModel selectByIdDetail(HttpServletRequest request, @PathVariable Long id) throws Exception {
OrgUsr orgUsr = iOrgUsrService.getById(id);
// 动态表单数据
List<FormValue> formValue = iOrgUsrService.getFormValueDetail(id);
OrgPersonFormVo orgPersonFormVo = new OrgPersonFormVo(formValue);
BeanUtils.copyProperties(orgUsr, orgPersonFormVo);
orgPersonFormVo.setParentName(iOrgUsrService.getById(orgUsr.getParentId()).getBizOrgName());
return ResponseHelper.buildResponse(orgPersonFormVo);
}
/** /**
* 根据id查询人员 * 根据id查询人员
......
...@@ -320,6 +320,18 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMappe ...@@ -320,6 +320,18 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMappe
} }
return formValue; return formValue;
} }
public List<FormValue> getFormValueDetail(Long id) throws Exception {
// 动态表单数据
List<AlertFormValueVo> list = iAlertFromValueService.listByCalledId(id);
List<FormValue> formValue = new ArrayList();
for (AlertFormValueVo alertFormValue : list) {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), alertFormValue.getFieldType(),
alertFormValue.getFieldValue(), alertFormValue.getIsBlock());
formValue.add(value);
}
return formValue;
}
@Override @Override
public void saveOrgUsr(OrgUsr oriOrgUsr,Long id) throws Exception { public void saveOrgUsr(OrgUsr oriOrgUsr,Long id) throws Exception {
......
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