多语言支持
This commit is contained in:
parent
0901dc28e2
commit
dd19927376
|
|
@ -51,21 +51,21 @@ public class HrmResourceVO {
|
|||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@OrganizationTableColumn(text = "姓名", width = "25%", column = "lastname")
|
||||
@OrganizationTableColumn(labelId = 547329, text = "姓名", width = "25%", column = "lastname")
|
||||
private String lastName;
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
@OrganizationTableColumn(text = "部门", width = "25%", column = "departmentid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getDepartmentName")
|
||||
@OrganizationTableColumn(labelId = 547331, text = "部门", width = "25%", column = "departmentid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getDepartmentName")
|
||||
private String departmentName;
|
||||
|
||||
/**
|
||||
* 分部
|
||||
*/
|
||||
@OrganizationTableColumn(text = "分部", width = "25%", column = "subcompanyid1", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getCompanyName")
|
||||
@OrganizationTableColumn(labelId = 547332, text = "分部", width = "25%", column = "subcompanyid1", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getCompanyName")
|
||||
private String companyName;
|
||||
|
||||
@OrganizationTableColumn(text = "岗位", width = "25%", column = "jobtitle", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getJobName")
|
||||
@OrganizationTableColumn(labelId = 547333, text = "岗位", width = "25%", column = "jobtitle", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getJobName")
|
||||
private String jobName;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.engine.organization.mapper.hrmresource;
|
|||
|
||||
import com.engine.organization.entity.commom.RecordInfo;
|
||||
import com.engine.organization.entity.jclimport.po.CusFormFieldPO;
|
||||
import com.engine.organization.entity.jclimport.po.JclSelectItem;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -44,19 +43,6 @@ public interface SystemDataMapper {
|
|||
*/
|
||||
int updateResourceJobTitleByIds(@Param("jobTitle") String jobTitle, @Param("ids") Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 人员,hrmResource表字段
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<CusFormFieldPO> getHrmFieldBeanList();
|
||||
|
||||
List<CusFormFieldPO> getHrmFieldBeanListByFields(@Param("fields") Collection<String> fields);
|
||||
|
||||
List<CusFormFieldPO> getHrmCustomFieldList();
|
||||
|
||||
List<JclSelectItem> getSelectItems(@Param("tableName") String tableName, @Param("fieldId") Long fieldId);
|
||||
|
||||
Long getHrmResourceMaxId();
|
||||
|
||||
List<String> getBatchUuidByIds(@Param("tableName") String tableName, @Param("ecIds") List<String> ecIds);
|
||||
|
|
|
|||
|
|
@ -100,57 +100,6 @@
|
|||
where departmentid = #{departmentId}
|
||||
And jobTitle = #{jobTitle}
|
||||
</select>
|
||||
<select id="getHrmFieldBeanList" resultMap="CustomFieldMap">
|
||||
select b.labelname as fieldlable,
|
||||
'0' as scopeid,
|
||||
a.fieldid,
|
||||
a.fieldname,
|
||||
a.ismand,
|
||||
a.fieldhtmltype,
|
||||
a.type,
|
||||
'hrmresource' as tablename
|
||||
from hrm_formfield a
|
||||
inner join htmllabelinfo b on a.fieldlabel = b.indexid and b.languageid = 7
|
||||
where a.fielddbtype != '6'
|
||||
order by groupid, fieldorder
|
||||
</select>
|
||||
<select id="getHrmCustomFieldList" resultMap="CustomFieldMap">
|
||||
select b.labelname as fieldlable,
|
||||
a.scopeid,
|
||||
a.fieldid,
|
||||
a.hrm_fieldlable as fieldname,
|
||||
a.ismand,
|
||||
c.fieldhtmltype,
|
||||
c.type,
|
||||
a.dmlurl,
|
||||
'cus_fielddata' as tablename
|
||||
from cus_formfield a
|
||||
inner join htmllabelinfo b on a.fieldlable = b.indexid and b.languageid = 7
|
||||
inner join cus_formdict c on a.fieldid = c.id and c.fieldhtmltype != '6'
|
||||
order by groupid, fieldorder
|
||||
</select>
|
||||
<select id="getSelectItems" resultMap="SelectItemMap">
|
||||
select fieldid, selectvalue, selectname
|
||||
from ${tableName} and fieldid = #{fieldId}
|
||||
</select>
|
||||
<select id="getHrmFieldBeanListByFields" resultMap="CustomFieldMap">
|
||||
select b.labelname as fieldlable,
|
||||
a.fieldid,
|
||||
a.fieldname,
|
||||
a.ismand,
|
||||
a.fieldhtmltype,
|
||||
a.type,
|
||||
'0' as scopeid,
|
||||
'hrmresource' as tablename
|
||||
from hrm_formfield a
|
||||
inner join htmllabelinfo b on a.fieldlabel = b.indexid and b.languageid = 7
|
||||
where a.fielddbtype != '6' and a.isuse = '1'
|
||||
and a.fieldname in
|
||||
<foreach collection="fields" open="(" item="field" separator="," close=")">
|
||||
#{field}
|
||||
</foreach>
|
||||
order by groupid ,fieldorder
|
||||
</select>
|
||||
<select id="getHrmResourceMaxId" resultType="java.lang.Long">
|
||||
select max(id)
|
||||
from hrmresource
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.engine.organization.mapper.resource;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.engine.organization.entity.hrmresource.param.SearchTemplateParam;
|
||||
import com.engine.organization.entity.hrmresource.po.ResourceChartPO;
|
||||
import com.engine.organization.entity.hrmresource.po.ResourcePO;
|
||||
|
|
@ -74,9 +73,8 @@ public interface HrmResourceMapper {
|
|||
|
||||
Integer deleteCustomTemplate(@Param("id") Integer Id, @Param("userId") Integer userId);
|
||||
|
||||
List<JSONObject> queryAllResColumns(@Param("level") String level, @Param("grade") String grade);
|
||||
|
||||
String queryLabelName(@Param("fieldName") String fieldName, @Param("scopeId") String scopeId);
|
||||
String queryLabelName(@Param("fieldName") String fieldName, @Param("scopeId") String scopeId, @Param("language") Integer language);
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -408,11 +408,7 @@
|
|||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="queryAllResColumns" parameterType="java.lang.String" resultType="com.alibaba.fastjson.JSONObject">
|
||||
select a.fieldid, a.fieldname, b.labelname, a.issystem, a.ismand
|
||||
from hrm_formfield a
|
||||
inner join htmllabelinfo b on a.fieldlabel = b.indexid and b.languageid = 7
|
||||
</select>
|
||||
|
||||
<select id="getSearchTemplateByName"
|
||||
resultType="com.engine.organization.entity.hrmresource.po.SearchTemplatePO">
|
||||
select *
|
||||
|
|
@ -433,12 +429,13 @@
|
|||
from hrm_formfield a
|
||||
inner join htmllabelinfo b on a.fieldlabel = b.indexid
|
||||
where a.FIELDNAME = #{fieldName}
|
||||
and b.LANGUAGEID = '7'
|
||||
and b.LANGUAGEID = ${language}
|
||||
union all
|
||||
SELECT t1.hrm_fieldlable as labelname
|
||||
SELECT t3.LABELNAME as labelname
|
||||
FROM cus_formfield t1,
|
||||
cus_formdict t2
|
||||
WHERE t1.fieldid = t2.id
|
||||
cus_formdict t2,
|
||||
htmllabelinfo t3
|
||||
WHERE t1.fieldid = t2.id and t1.FIELDLABLE = t3.indexid and t3.LANGUAGEID = ${language}
|
||||
AND t1.scope = 'HrmCustomFieldByInfoType'
|
||||
and t1.SCOPEID = #{scopeId}
|
||||
and t2.fieldname = #{fieldName}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import com.engine.organization.entity.department.dto.DepartmentListDTO;
|
|||
import com.engine.organization.entity.department.po.DepartmentPO;
|
||||
import com.engine.organization.entity.hrmresource.po.SearchTemplatePO;
|
||||
import com.engine.organization.entity.hrmresource.vo.HrmResourceVO;
|
||||
import com.engine.organization.mapper.comp.CompMapper;
|
||||
import com.engine.organization.mapper.department.DepartmentMapper;
|
||||
import com.engine.organization.mapper.resource.HrmResourceMapper;
|
||||
import com.engine.organization.mapper.resource.ResourceMapper;
|
||||
|
|
@ -148,7 +147,7 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
|
|||
String scopeId = columnName.split("_")[0];
|
||||
String fieldName = columnName.substring(columnName.lastIndexOf("_") + 1);
|
||||
WeaTableColumn weaTableColumn = new WeaTableColumn();
|
||||
weaTableColumn.setText(MapperProxyFactory.getProxy(HrmResourceMapper.class).queryLabelName(fieldName, scopeId));
|
||||
weaTableColumn.setText(MapperProxyFactory.getProxy(HrmResourceMapper.class).queryLabelName(fieldName, scopeId, user.getLanguage()));
|
||||
weaTableColumn.setColumn(hrmResourceService.buildTableSql(columnName).replace(".", "_"));
|
||||
weaTableColumn.setDisplay(columnList.contains(columnName) ? WeaBoolAttr.TRUE : WeaBoolAttr.FALSE);
|
||||
weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getFieldTrueValue");
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
String scopeId = columnName.split("_")[0];
|
||||
String fieldName = columnName.substring(columnName.lastIndexOf("_") + 1);
|
||||
WeaTableColumn weaTableColumn = new WeaTableColumn();
|
||||
weaTableColumn.setText(getHrmResourceMapper().queryLabelName(fieldName, scopeId));
|
||||
weaTableColumn.setText(getHrmResourceMapper().queryLabelName(fieldName, scopeId,user.getLanguage()));
|
||||
weaTableColumn.setColumn(buildTableSql(columnName).replace(".", "_"));
|
||||
|
||||
weaTableColumn.setDisplay(columnList.contains(columnName) ? WeaBoolAttr.TRUE : WeaBoolAttr.FALSE);
|
||||
|
|
@ -574,7 +574,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建人员").type("BTN_Addnew").build());
|
||||
rightMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建人员").type("BTN_Addnew").build());
|
||||
}
|
||||
topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("customization").menuIcon("icon-coms-task-list").menuName("列定制").type("BTN_COLUMN").build());
|
||||
topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("customization").menuIcon("icon-coms-task-list").menuName(SystemEnv.getHtmlLabelName(547136,user.getLanguage())).type("BTN_COLUMN").build());
|
||||
rightMenuList.add(MenuBtn.rightMenu_btnLog(user.getLanguage()));
|
||||
btnDatas.put("topMenu", topMenuList);
|
||||
btnDatas.put("rightMenu", rightMenuList);
|
||||
|
|
@ -588,64 +588,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
OrganizationAssert.notBlank(viewAttrStr, "未指定操作类型,请确认");
|
||||
String id = Util.null2String(params.get("id"));
|
||||
OrganizationAssert.notBlank(id, "数据有误,请确认");
|
||||
int viewAttr = Integer.parseInt(viewAttrStr);
|
||||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
|
||||
//List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
//SearchConditionItem schemeId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "等级方案", "161", "schemeId", "schemeBrowser");
|
||||
//schemeId.setRules("required");
|
||||
//SearchConditionItem gradeId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "职级", "161", "gradeId", "gradeBrowser");
|
||||
//gradeId.setRules("required");
|
||||
//SearchConditionItem levelId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "职等", "162", "levelId", "levelBrowser");
|
||||
//levelId.setRules("required");
|
||||
//SearchConditionItem sequenceId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "岗位序列", "161", "sequenceId", "sequenceBrowser");
|
||||
//sequenceId.setRules("required");
|
||||
//SearchConditionItem postId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "职务分类", "161", "postId", "postBrowser");
|
||||
//postId.setRules("required");
|
||||
//SearchConditionItem postInfoId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "职务信息", "161", "postInfoId", "postInfoBrowser");
|
||||
//postInfoId.setRules("required");
|
||||
//SearchConditionItem companyId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "分部", "164", "companyId", "");
|
||||
//companyId.setRules("required");
|
||||
//SearchConditionItem departmentId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "部门", "4", "departmentId", "");
|
||||
//departmentId.setRules("required");
|
||||
//SearchConditionItem jobId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "岗位", "161", "jobId", "jobBrowser");
|
||||
//jobId.setRules("required");
|
||||
//
|
||||
//
|
||||
//// 编辑状态下赋值操作
|
||||
//HrmRelationPO relationPO = getHrmRelationMapper().getRelationById(Long.parseLong(id));
|
||||
//if (null != relationPO) {
|
||||
// setBrowserValue(schemeId, relationPO.getSchemeId(), getSchemeMapper().listSchemesByIds(Stream.of(relationPO.getSchemeId()).collect(Collectors.toList())), null, null);
|
||||
// setBrowserValue(gradeId, relationPO.getGradeId(), getGradeMapper().listGradessByIds(Stream.of(relationPO.getGradeId()).collect(Collectors.toList())), "scheme_id", relationPO.getSchemeId());
|
||||
// setBrowserValue(levelId, relationPO.getLevelId(), getLevelMapper().listLevelsByIds(DeleteParam.builder().ids(relationPO.getLevelId()).build().getIds()), "grade_id", relationPO.getGradeId());
|
||||
// setBrowserValue(sequenceId, relationPO.getSequenceId(), getSequenceMapper().listSequencesByIds(Stream.of(relationPO.getSequenceId()).collect(Collectors.toList())), "scheme_id", relationPO.getSchemeId());
|
||||
// setBrowserValue(postId, relationPO.getPostId(), getPostMapper().listPostsByIds(Stream.of(relationPO.getPostId()).collect(Collectors.toList())), null, null);
|
||||
// setBrowserValue(postInfoId, relationPO.getPostInfoId(), getPostInfoMapper().listPostInfosByIds(Stream.of(relationPO.getPostInfoId()).collect(Collectors.toList())), "post_id", relationPO.getPostId());
|
||||
//
|
||||
// List<Map<String, Object>> companyMaps = new ArrayList<>();
|
||||
// String scCompanyNameById = MapperProxyFactory.getProxy(SystemDataMapper.class).getScCompanyNameById(relationPO.getCompanyId().toString());
|
||||
// Map<String, Object> companyMap = new HashMap<>();
|
||||
// companyMap.put(relationPO.getCompanyId().toString(), scCompanyNameById);
|
||||
// companyMaps.add(companyMap);
|
||||
// setBrowserValue(companyId, relationPO.getCompanyId(), companyMaps, null, null);
|
||||
//
|
||||
// List<Map<String, Object>> departmentMaps = new ArrayList<>();
|
||||
// String departmentNameById = MapperProxyFactory.getProxy(SystemDataMapper.class).getScDepartmentNameById(relationPO.getDepartmentId().toString());
|
||||
// Map<String, Object> departmentMap = new HashMap<>();
|
||||
// departmentMap.put(relationPO.getDepartmentId().toString(), departmentNameById);
|
||||
// departmentMaps.add(departmentMap);
|
||||
// setBrowserValue(departmentId, relationPO.getDepartmentId(), departmentMaps, "subcompany1", relationPO.getCompanyId());
|
||||
//
|
||||
// setBrowserValue(jobId, relationPO.getJobId(), getJobMapper().listJobsByIds(Stream.of(relationPO.getJobId()).collect(Collectors.toList())), "departmentid", relationPO.getDepartmentId());
|
||||
//}
|
||||
//
|
||||
//addGroups.add(new SearchConditionGroup("岗职位体系", true, Stream.of(schemeId, gradeId, levelId, sequenceId, postId, postInfoId).collect(Collectors.toList())));
|
||||
//addGroups.add(new SearchConditionGroup("组织机构", true, Stream.of(companyId, departmentId, jobId).collect(Collectors.toList())));
|
||||
//HashMap<String, Object> buttonsMap = new HashMap<>();
|
||||
//buttonsMap.put("hasEdit", true);
|
||||
//buttonsMap.put("hasSave", true);
|
||||
//apiDatas.put("buttons", buttonsMap);
|
||||
//apiDatas.put("conditions", addGroups);
|
||||
return apiDatas;
|
||||
}
|
||||
|
||||
|
|
@ -713,15 +656,6 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
tabInfoMap.put("selectedData", isUsedMap);
|
||||
tabInfoMap.put("isModalEdit", false);
|
||||
return tabInfoMap;
|
||||
|
||||
|
||||
// OrganizationWeaTable<JclOrgCustomTemplateVO> table = new OrganizationWeaTable<>(user, JclOrgCustomTemplateVO.class);
|
||||
// String sqlWhere = buildSqlWhere(params);
|
||||
// table.setSqlwhere(sqlWhere);
|
||||
// WeaResultMsg result = new WeaResultMsg(false);
|
||||
// result.putAll(table.makeDataResult());
|
||||
// result.success();
|
||||
// return new HashMap<>(result.getResultMap());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue