Commit 4acab9b9 authored by gaodongdong's avatar gaodongdong

添加编码生成

parent dfdeb2c3
......@@ -332,9 +332,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
orgUsr.setRecUserName(oriOrgUsr.getRecUserName());
orgUsr.setAmosOrgId(oriOrgUsr.getAmosOrgId());
orgUsr.setAmosOrgCode(oriOrgUsr.getAmosOrgCode());
if (orgUsr.getParentId() != null && "-1".equals(orgUsr.getParentId())) {
OrgUsr parent = getById(orgUsr.getParentId());
if (parent != null) {
if (oriOrgUsr.getParentId() != null && !"-1".equals(oriOrgUsr.getParentId())) {
OrgUsr parent = getById(oriOrgUsr.getParentId());
if (parent != null && ObjectUtils.isEmpty(oriOrgUsr.getBizOrgCode())) {
orgUsr.setBizOrgCode(parent.getBizOrgCode() + getOrgCodeStr());
}
} else {
......@@ -404,6 +404,11 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
alertFormValueServiceImpl.saveBatch(creatList);
}
List<AlertFormValue> creatList = alertFromValuelist.stream().filter(v -> v.getSequenceNbr() == null || v.getSequenceNbr() == 0).collect(Collectors.toList());
if (creatList != null && creatList.size() > 0) {
alertFormValueServiceImpl.saveBatch(creatList);
}
} else {
// 保存动态表单数据
alertFormValueServiceImpl.saveBatch(alertFromValuelist);
......@@ -440,9 +445,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsr orgUsr = new OrgUsr();
BeanUtils.copyProperties(OrgUsrVo, orgUsr);
orgUsr.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_COMPANY);
if (OrgUsrVo.getParentId() != null && "-1".equals(OrgUsrVo.getParentId())) {
if (OrgUsrVo.getParentId() != null && !"-1".equals(OrgUsrVo.getParentId())) {
OrgUsr parent = getById(OrgUsrVo.getParentId());
if (parent != null) {
if (parent != null && ObjectUtils.isEmpty(OrgUsrVo.getBizOrgCode())) {
orgUsr.setBizOrgCode(parent.getBizOrgCode() + getOrgCodeStr());
}
} else {
......@@ -456,9 +461,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsr orgUsr = new OrgUsr();
BeanUtils.copyProperties(OrgPersonVo, orgUsr);
orgUsr.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_PERSON);
if (OrgPersonVo.getParentId() != null && "-1".equals(OrgPersonVo.getParentId())) {
if (OrgPersonVo.getParentId() != null && !"-1".equals(OrgPersonVo.getParentId())) {
OrgUsr parent = getById(OrgPersonVo.getParentId());
if (parent != null) {
if (parent != null && ObjectUtils.isEmpty(OrgPersonVo.getBizOrgCode())) {
orgUsr.setBizOrgCode(parent.getBizOrgCode() + getOrgCodeStr());
}
} else {
......@@ -480,9 +485,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsr orgUsr = new OrgUsr();
OrgUsr oriOrgUsr = getById(id);
BeanUtils.copyProperties(OrgUsrVo, orgUsr);
if (orgUsr.getParentId() != null && "-1".equals(orgUsr.getParentId())) {
if (orgUsr.getParentId() != null && !"-1".equals(orgUsr.getParentId())) {
OrgUsr parent = getById(orgUsr.getParentId());
if (parent != null) {
if (parent != null && ObjectUtils.isEmpty(OrgUsrVo.getBizOrgCode())) {
orgUsr.setBizOrgCode(parent.getBizOrgCode() + getOrgCodeStr());
}
} else {
......@@ -612,9 +617,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsr orgUsr = new OrgUsr();
BeanUtils.copyProperties(OrgDepartmentVo, orgUsr);
orgUsr.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_DEPARTMENT);
if (OrgDepartmentVo.getParentId() != null && "-1".equals(OrgDepartmentVo.getParentId())) {
if (OrgDepartmentVo.getParentId() != null && !"-1".equals(OrgDepartmentVo.getParentId())) {
OrgUsr parent = getById(OrgDepartmentVo.getParentId());
if (parent != null) {
if (parent != null && ObjectUtils.isEmpty(OrgDepartmentVo.getBizOrgCode())) {
orgUsr.setBizOrgCode(parent.getBizOrgCode() + getOrgCodeStr());
}
} else {
......@@ -629,9 +634,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
OrgUsr orgUsr = new OrgUsr();
OrgUsr oriOrgUsr = getById(id);
BeanUtils.copyProperties(OrgDepartmentVo, orgUsr);
if (orgUsr.getParentId() != null && "-1".equals(orgUsr.getParentId())) {
if (orgUsr.getParentId() != null && !"-1".equals(orgUsr.getParentId())) {
OrgUsr parent = getById(orgUsr.getParentId());
if (parent != null) {
if (parent != null && ObjectUtils.isEmpty(OrgDepartmentVo.getBizOrgCode())) {
orgUsr.setBizOrgCode(parent.getBizOrgCode() + getOrgCodeStr());
}
} else {
......
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