|
@@ -4,6 +4,7 @@ import java.util.Iterator;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
+import org.fouram.constants.WebConstants;
|
|
|
import org.fouram.core.base.service.BaseService;
|
|
|
import org.fouram.core.base.service.RequestService;
|
|
|
import org.fouram.core.plugin.weixin.cp.util.WXCpDepartUtil;
|
|
@@ -94,7 +95,7 @@ public class SapOrgService extends BaseService {
|
|
|
String firstOrgId = null;
|
|
|
if (Tools.notEmpty(businessUnitCode)) {
|
|
|
sapUser.setFirstOrgName(businessUnitMap.get(businessUnitCode));
|
|
|
- firstOrgId = saveOrUpdateSapOrg("0", businessUnitCode, sapUser.getFirstOrgName(), "1");
|
|
|
+ firstOrgId = saveOrUpdateSapOrg(WebConstants.TOP_DEPART, businessUnitCode, sapUser.getFirstOrgName(), "1");
|
|
|
sapUser.setFirstOrgId(firstOrgId);
|
|
|
}
|
|
|
String secondOrgId = null;
|
|
@@ -122,7 +123,7 @@ public class SapOrgService extends BaseService {
|
|
|
|
|
|
public Map<String, Long> updateAllWxDepartId() throws Exception {
|
|
|
Map<String, Long> result = Maps.newHashMap();
|
|
|
- List<SapOrg> firstOrgs = findListByParentId("0");
|
|
|
+ List<SapOrg> firstOrgs = findListByParentId(WebConstants.TOP_DEPART);
|
|
|
List<SapOrg> allOrgs = Lists.newArrayList();
|
|
|
for (SapOrg firstOrg : firstOrgs) {
|
|
|
firstOrg.setWxDepartId(WXCpDepartUtil.createOrUpdate(firstOrg.getWxDepartId(), 1L, firstOrg.getSapName()));
|