|
|
|
@ -37,6 +37,7 @@ import com.engine.organization.util.db.MapperProxyFactory;
|
|
|
|
|
import com.engine.organization.util.page.Column;
|
|
|
|
|
import com.engine.organization.util.page.PageInfo;
|
|
|
|
|
import com.engine.organization.util.page.PageUtil;
|
|
|
|
|
import com.engine.organization.util.relation.EcHrmRelationUtil;
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
|
import weaver.general.StringUtil;
|
|
|
|
@ -161,6 +162,11 @@ public class CompServiceImpl extends Service implements CompService {
|
|
|
|
|
}
|
|
|
|
|
params.put("show_order", maxShowOrder + 1);
|
|
|
|
|
}
|
|
|
|
|
// 赋值上级分部
|
|
|
|
|
String ecCompany = Util.null2String(params.get("ec_company"));
|
|
|
|
|
if (StringUtils.isNotBlank(ecCompany)) {
|
|
|
|
|
params.put("parent_company", EcHrmRelationUtil.getJclCompanyId(ecCompany).getId());
|
|
|
|
|
}
|
|
|
|
|
Map<String, Object> syncMap = new OrganizationSyncEc(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.ADD, params).sync();
|
|
|
|
|
String ecCompanyID = Util.null2String(syncMap.get("id"));
|
|
|
|
|
OrganizationAssert.isTrue(StringUtils.isNotBlank(ecCompanyID), syncMap.get("message").toString());
|
|
|
|
@ -196,6 +202,11 @@ public class CompServiceImpl extends Service implements CompService {
|
|
|
|
|
compNo = repeatDetermine(compNo);
|
|
|
|
|
params.put("comp_no", compNo);
|
|
|
|
|
}
|
|
|
|
|
// 上级分部
|
|
|
|
|
String ecCompany = Util.null2String(params.get("ec_company"));
|
|
|
|
|
if (StringUtils.isNotBlank(ecCompany)) {
|
|
|
|
|
params.put("parent_company", EcHrmRelationUtil.getJclCompanyId(ecCompany).getId());
|
|
|
|
|
}
|
|
|
|
|
new OrganizationSyncEc(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, params).sync();
|
|
|
|
|
// 更新主表数据
|
|
|
|
|
getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_COMP, params, "", searchParam.getId());
|
|
|
|
@ -234,7 +245,7 @@ public class CompServiceImpl extends Service implements CompService {
|
|
|
|
|
// 简称
|
|
|
|
|
SearchConditionItem compNameShortItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "简称", "compNameShort");
|
|
|
|
|
// 上级公司
|
|
|
|
|
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "上级公司", "161", "parentCompany", "compBrowser");
|
|
|
|
|
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "上级公司", "164", "ecCompany", "");
|
|
|
|
|
// 组织机构代码
|
|
|
|
|
SearchConditionItem orgCodeItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "组织机构代码", "orgCode");
|
|
|
|
|
// 行业
|
|
|
|
@ -379,7 +390,7 @@ public class CompServiceImpl extends Service implements CompService {
|
|
|
|
|
&& StringUtil.isEmpty(compPO.getCompNo())
|
|
|
|
|
&& StringUtil.isEmpty(compPO.getCompNameShort())
|
|
|
|
|
&& StringUtil.isEmpty(compPO.getOrgCode())
|
|
|
|
|
&& null == compPO.getParentCompany()
|
|
|
|
|
&& null == compPO.getEcCompany()
|
|
|
|
|
&& null == compPO.getIndustry()
|
|
|
|
|
&& null == compPO.getCompPrincipal()
|
|
|
|
|
&& null == compPO.getForbiddenTag());
|
|
|
|
|