|
|
|
@ -351,14 +351,14 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Integer saveCustomTemplate(SearchTemplateParam params) {
|
|
|
|
|
public Map<String, Object> saveCustomTemplate(SearchTemplateParam params) {
|
|
|
|
|
// 重复名称校验
|
|
|
|
|
Map<String, Object> data = new HashMap<>();
|
|
|
|
|
SearchTemplatePO searchTemplateByName = getHrmResourceMapper().getCustomTemplateByName(user.getUID(), params.getShowname());
|
|
|
|
|
OrganizationAssert.isFalse("默认模板".equals(params.getShowname()) || null != searchTemplateByName, SystemEnv.getHtmlLabelName(547439, user.getLanguage()));
|
|
|
|
|
SearchTemplatePO templatePO = buildSearchTemplateByFields(params.getFields());
|
|
|
|
|
if (null == templatePO) {
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
OrganizationAssert.notNull(templatePO,"模板存储失败");
|
|
|
|
|
|
|
|
|
|
templatePO.setName(params.getShowname());
|
|
|
|
|
templatePO.setCreator(user.getUID());
|
|
|
|
|
templatePO.setIsused("0");
|
|
|
|
@ -366,7 +366,12 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|
|
|
|
templatePO.setUpdateTime(new Date());
|
|
|
|
|
templatePO.setOverall(0);
|
|
|
|
|
getHrmResourceMapper().insertCustomTemplate(templatePO);
|
|
|
|
|
return templatePO.getId();
|
|
|
|
|
|
|
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
|
|
|
param.put("type","custom");
|
|
|
|
|
param.put("id",templatePO.getId());
|
|
|
|
|
data.put("result",getSearchTemplate(param));
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|