回溯人员架构图接口开发

danikor
dxfeng 2 years ago
parent abb3d04953
commit 877fb368a8

@ -53,4 +53,13 @@ public interface DanikorResourceMapper {
* @return
*/
Integer summaryDepartmentData(@Param("tableName") String tableName, @Param("syncDate") String syncDate);
/**
*
*
* @param fieldName
* @param scopeId
* @return
*/
String getFieldLabel(@Param("fieldName") String fieldName, @Param("scopeId") String scopeId);
}

@ -71,4 +71,17 @@
and sync_date = #{syncDate}
</if>
</select>
<select id="getFieldLabel" resultType="java.lang.String">
select a.fieldlabel
from hrm_formfield a
where a.FIELDNAME = #{fieldName}
union all
SELECT t1.fieldlable
FROM cus_formfield t1,
cus_formdict t2
WHERE t1.fieldid = t2.id
AND t1.scope = 'HrmCustomFieldByInfoType'
and t1.SCOPEID = #{scopeId}
and t2.fieldname = #{fieldName}
</select>
</mapper>

@ -14,7 +14,6 @@ import com.engine.organization.entity.danikor.param.ChartParam;
import com.engine.organization.entity.danikor.vo.ResourceBackVO;
import com.engine.organization.manager.DanikorOrgChartManager;
import com.engine.organization.mapper.danikor.DanikorResourceMapper;
import com.engine.organization.mapper.resource.HrmResourceMapper;
import com.engine.organization.service.DanikorResourceBackService;
import com.engine.organization.util.MenuBtn;
import com.engine.organization.util.OrganizationFormItemUtil;
@ -23,6 +22,7 @@ import org.apache.commons.lang3.StringUtils;
import weaver.common.DateUtil;
import weaver.common.StringUtil;
import weaver.conn.RecordSet;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.hrm.appdetach.AppDetachComInfo;
import weaver.hrm.chart.domain.HrmChartSet;
@ -45,9 +45,6 @@ import java.util.stream.Collectors;
* @version: 1.0
*/
public class DanikorResourceBackServiceImpl extends Service implements DanikorResourceBackService {
private HrmResourceMapper getHrmResourceMapper() {
return MapperProxyFactory.getProxy(HrmResourceMapper.class);
}
private DanikorResourceMapper getDanikorResourceMapper() {
return MapperProxyFactory.getProxy(DanikorResourceMapper.class);
@ -92,7 +89,13 @@ public class DanikorResourceBackServiceImpl extends Service implements DanikorRe
fields.add(resourceService.buildTableSql(columnName) + " as " + resourceService.buildTableSql(columnName).replace(".", "_"));
WeaTableColumn weaTableColumn = new WeaTableColumn();
weaTableColumn.setText(getHrmResourceMapper().queryLabelName(fieldName, scopeId));
String fieldLabel = getDanikorResourceMapper().getFieldLabel(fieldName, scopeId);
try {
fieldLabel = Util.toScreen(SystemEnv.getHtmlLabelName(Integer.parseInt(fieldLabel), user.getLanguage()), user.getLanguage());
} catch (Exception e) {
new BaseBean().errorLog("数据转换异常", e);
}
weaTableColumn.setText(fieldLabel);
weaTableColumn.setColumn(resourceService.buildTableSql(columnName).replace(".", "_"));
weaTableColumn.setDisplay(columnList.contains(columnName) ? WeaBoolAttr.TRUE : WeaBoolAttr.FALSE);

@ -86,8 +86,8 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
private static final String RIGHT_NAME = "Roster:All";
private static final String level = getFieldName("职等");
private static final String grade = getFieldName("职级");
//private static final String level = getFieldName("职等");
//private static final String grade = getFieldName("职级");
private HrmRelationMapper getHrmRelationMapper() {
return MapperProxyFactory.getProxy(HrmRelationMapper.class);
@ -1197,13 +1197,13 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
return selectKeys;
}
private static String getFieldName(String fieldabel) {
RecordSet recordSet = new RecordSet();
String fieldname = null;
recordSet.executeQuery("select fieldname from jcl_org_field where fieldlabel='" + fieldabel + "'");
if (recordSet.next()) {
fieldname = recordSet.getString("fieldname");
}
return fieldname;
}
//private static String getFieldName(String fieldabel) {
// RecordSet recordSet = new RecordSet();
// String fieldname = null;
// recordSet.executeQuery("select fieldname from jcl_org_field where fieldlabel='" + fieldabel + "'");
// if (recordSet.next()) {
// fieldname = recordSet.getString("fieldname");
// }
// return fieldname;
//}
}

Loading…
Cancel
Save