|
|
|
@ -6,7 +6,6 @@ import com.api.browser.bean.SearchConditionOption;
|
|
|
|
|
import com.api.browser.util.ConditionType;
|
|
|
|
|
import com.api.hrm.bean.HrmFieldBean;
|
|
|
|
|
import com.api.hrm.util.HrmFieldSearchConditionComInfo;
|
|
|
|
|
import com.api.hrm.util.HrmTransMethod;
|
|
|
|
|
import com.cloudstore.eccom.constant.WeaBoolAttr;
|
|
|
|
|
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
|
|
|
|
import com.cloudstore.eccom.result.WeaResultMsg;
|
|
|
|
@ -792,6 +791,13 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|
|
|
|
// sb.append(" and t.status = 1");
|
|
|
|
|
sb.append(" and t.status < 4");
|
|
|
|
|
}
|
|
|
|
|
if (params.containsKey("-1_hrm_subcompanyid1")) {
|
|
|
|
|
String value = Util.null2String(params.get("-1_hrm_subcompanyid1"));
|
|
|
|
|
if (StringUtils.isNotBlank(value)) {
|
|
|
|
|
sb.append(" and t.subcompanyid1 in(").append(value).append(")");
|
|
|
|
|
}
|
|
|
|
|
params.remove("-1_hrm_subcompanyid1");
|
|
|
|
|
}
|
|
|
|
|
for (Map.Entry<String, Object> entry : params.entrySet()) {
|
|
|
|
|
String key = entry.getKey();
|
|
|
|
|
String value = Util.null2String(entry.getValue());
|
|
|
|
@ -1010,6 +1016,8 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|
|
|
|
List<CusFormFieldPO> hrmFieldsByScopeId = getSystemDataMapper().getHrmFieldsByScopeId(HrmGroupEnum.HRM_BASIC.getGroupType().toString());
|
|
|
|
|
createConditionItems(hrmFieldSearchConditionComInfo, hrmFieldsByScopeId, basicConditionItems);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(basicConditionItems)) {
|
|
|
|
|
SearchConditionItem searchConditionItem = buildSubCompanyCondition(hrmFieldSearchConditionComInfo);
|
|
|
|
|
basicConditionItems.add(0,searchConditionItem);
|
|
|
|
|
addGroups.add(new SearchConditionGroup(SystemEnv.getHtmlLabelName(547175, user.getLanguage()), true, basicConditionItems));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1029,6 +1037,22 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|
|
|
|
return addGroups;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private SearchConditionItem buildSubCompanyCondition(HrmFieldSearchConditionComInfo hrmFieldSearchConditionComInfo) {
|
|
|
|
|
HrmFieldBean hrmFieldBean = new HrmFieldBean();
|
|
|
|
|
hrmFieldBean.setFieldid("");
|
|
|
|
|
hrmFieldBean.setFieldname("-1_hrm_subcompanyid1");
|
|
|
|
|
hrmFieldBean.setFieldlabel("-82515");
|
|
|
|
|
hrmFieldBean.setFieldhtmltype("3");
|
|
|
|
|
hrmFieldBean.setType("170");
|
|
|
|
|
hrmFieldBean.setIsQuickSearch(false);
|
|
|
|
|
hrmFieldBean.setIsScope(false);
|
|
|
|
|
hrmFieldBean.setDmlurl("");
|
|
|
|
|
hrmFieldBean.setIssystem("1");
|
|
|
|
|
hrmFieldBean.setIsFormField(true);
|
|
|
|
|
SearchConditionItem searchConditionItem = hrmFieldSearchConditionComInfo.getSearchConditionItem(hrmFieldBean, user);
|
|
|
|
|
return searchConditionItem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 构建查询条件Item
|
|
|
|
|
*
|
|
|
|
@ -1081,32 +1105,37 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|
|
|
|
HrmFieldManager hfm = new HrmFieldManager("HrmCustomFieldByInfoType", scopeid);
|
|
|
|
|
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
|
|
|
|
for (String field : fieldNames) {
|
|
|
|
|
String fieldName = field.substring(field.lastIndexOf("_") + 1);
|
|
|
|
|
JSONObject hrmFieldConf = hfm.getHrmFieldConf(fieldName);
|
|
|
|
|
if (null == hrmFieldConf) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
boolean baseField = hfm.isBaseField(fieldName);
|
|
|
|
|
HrmFieldBean hrmFieldBean = new HrmFieldBean();
|
|
|
|
|
hrmFieldBean.setFieldid(Util.null2String(hrmFieldConf.getString("id")));
|
|
|
|
|
hrmFieldBean.setFieldname(scopeid + "_" + (baseField ? "hrm" : "cus") + "_" + fieldName);
|
|
|
|
|
hrmFieldBean.setFieldlabel(hrmFieldConf.getString("fieldlabel"));
|
|
|
|
|
hrmFieldBean.setFieldhtmltype(hrmFieldConf.getString("fieldhtmltype"));
|
|
|
|
|
hrmFieldBean.setType(hrmFieldConf.getString("type"));
|
|
|
|
|
hrmFieldBean.setDmlurl(hrmFieldConf.getString("dmlurl"));
|
|
|
|
|
hrmFieldBean.setIssystem(baseField ? "1" : "0");
|
|
|
|
|
hrmFieldBean.setIsFormField(true);
|
|
|
|
|
hrmFieldBean.setIsQuickSearch(false);
|
|
|
|
|
hrmFieldBean.setIsScope(false);
|
|
|
|
|
if ("jobactivity".equals(fieldName)) {
|
|
|
|
|
// 职务:282
|
|
|
|
|
hrmFieldBean.setType("282");
|
|
|
|
|
}
|
|
|
|
|
SearchConditionItem searchConditionItem = hrmFieldSearchConditionComInfo.getSearchConditionItem(hrmFieldBean, user);
|
|
|
|
|
conditionItems.add(searchConditionItem);
|
|
|
|
|
// 如果为下拉框,添加一条空选项
|
|
|
|
|
if (searchConditionItem.getConditionType().equals(ConditionType.SELECT)) {
|
|
|
|
|
addEmptyForSelect(searchConditionItem);
|
|
|
|
|
if ("-1_hrm_subcompanyid1".equals(field)) {
|
|
|
|
|
SearchConditionItem searchConditionItem = buildSubCompanyCondition(hrmFieldSearchConditionComInfo);
|
|
|
|
|
conditionItems.add(searchConditionItem);
|
|
|
|
|
} else {
|
|
|
|
|
String fieldName = field.substring(field.lastIndexOf("_") + 1);
|
|
|
|
|
JSONObject hrmFieldConf = hfm.getHrmFieldConf(fieldName);
|
|
|
|
|
if (null == hrmFieldConf) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
boolean baseField = hfm.isBaseField(fieldName);
|
|
|
|
|
HrmFieldBean hrmFieldBean = new HrmFieldBean();
|
|
|
|
|
hrmFieldBean.setFieldid(Util.null2String(hrmFieldConf.getString("id")));
|
|
|
|
|
hrmFieldBean.setFieldname(scopeid + "_" + (baseField ? "hrm" : "cus") + "_" + fieldName);
|
|
|
|
|
hrmFieldBean.setFieldlabel(hrmFieldConf.getString("fieldlabel"));
|
|
|
|
|
hrmFieldBean.setFieldhtmltype(hrmFieldConf.getString("fieldhtmltype"));
|
|
|
|
|
hrmFieldBean.setType(hrmFieldConf.getString("type"));
|
|
|
|
|
hrmFieldBean.setDmlurl(hrmFieldConf.getString("dmlurl"));
|
|
|
|
|
hrmFieldBean.setIssystem(baseField ? "1" : "0");
|
|
|
|
|
hrmFieldBean.setIsFormField(true);
|
|
|
|
|
hrmFieldBean.setIsQuickSearch(false);
|
|
|
|
|
hrmFieldBean.setIsScope(false);
|
|
|
|
|
if ("jobactivity".equals(fieldName)) {
|
|
|
|
|
// 职务:282
|
|
|
|
|
hrmFieldBean.setType("282");
|
|
|
|
|
}
|
|
|
|
|
SearchConditionItem searchConditionItem = hrmFieldSearchConditionComInfo.getSearchConditionItem(hrmFieldBean, user);
|
|
|
|
|
conditionItems.add(searchConditionItem);
|
|
|
|
|
// 如果为下拉框,添加一条空选项
|
|
|
|
|
if (searchConditionItem.getConditionType().equals(ConditionType.SELECT)) {
|
|
|
|
|
addEmptyForSelect(searchConditionItem);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (CollectionUtils.isNotEmpty(conditionItems)) {
|
|
|
|
|