Commit 03292e86 by 宋祥

Merge branch 'dev' of http://129.211.46.84:8800/platform/hg-smart into dev-sx

parents 87208322 c1f3fe4f
......@@ -15,7 +15,7 @@
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>hggp_dev-sx</name>
<name>hggp</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
......
......@@ -175,13 +175,7 @@ public class ServiceHGXSOrg extends ServiceBase {
dbOrg.setOrgId(orgId);
this.syncDcDeptAdd(accountCode, dcDeptList, dbOrg, dbPz009);
} else {
Map updateMap = new HashMap();
updateMap.put(Org.FIELD_ORG_ID, orgId);
updateMap.put(Org.FIELD_ORG_CNAME, dcDeptList.getNodeText());
updateMap.put(Org.FIELD_REC_REVISOR, "System");
updateMap.put(Org.FIELD_REC_REVISE_TIME, DateUtils.shortDateTime());
updateMap.put(Org.FIELD_IS_DELETED, DeleteFlagEnum.UN_REMOVE.getCode().toString());
dao.update(HgXsSqlConstant.HgXsOrg.UPDATE_ORG_CNAME, updateMap);
this.syncDcDeptModify(dcDeptList, orgId);
}
}
}
......@@ -199,7 +193,9 @@ public class ServiceHGXSOrg extends ServiceBase {
dbOrg.setAccountCode(accountCode);
dbOrg.setOrgEname(orgId);
dbOrg.setOrgCname(dcDeptList.getNodeText());
dbOrg.setOrgType(OrgTypeEnum.DEPT.getCode());
// parentId=-1:表示是组织机构顶级
dbOrg.setOrgType("-1".equals(dcDeptList.getParentId()) ? OrgTypeEnum.COMPANY.getCode()
: OrgTypeEnum.DEPT.getCode());
dbOrg.setParentOrgId("-1".equals(dcDeptList.getParentId())
? accountCode : dbPz009.getLoginPrefix() + dcDeptList.getParentId());
dbOrg.setEstablishDate("20240101");
......@@ -212,4 +208,20 @@ public class ServiceHGXSOrg extends ServiceBase {
dao.insert("XSOG01.insert", dbOrg);
}
/**
* 修改
*
* @param dcDeptList
* @param orgId
*/
private void syncDcDeptModify(DcDeptList dcDeptList, String orgId) {
Map updateMap = new HashMap();
updateMap.put(Org.FIELD_ORG_ID, orgId);
updateMap.put(Org.FIELD_ORG_CNAME, dcDeptList.getNodeText());
updateMap.put(Org.FIELD_REC_REVISOR, "System");
updateMap.put(Org.FIELD_REC_REVISE_TIME, DateUtils.shortDateTime());
updateMap.put(Org.FIELD_IS_DELETED, DeleteFlagEnum.UN_REMOVE.getCode().toString());
dao.update(HgXsSqlConstant.HgXsOrg.UPDATE_ORG_CNAME, updateMap);
}
}
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