多语言sql记录 翻译第三次 组织架构图多语言数据接口编写
This commit is contained in:
parent
5deca3460e
commit
1e2b595d99
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,23 @@
|
|||
package com.engine.organization.entity.chart;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2024/6/3 2:57 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class HrmLabelVO {
|
||||
|
||||
private String labelName;
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.organization.service;
|
||||
|
||||
import com.engine.organization.entity.chart.HrmLabelVO;
|
||||
import com.engine.organization.entity.chart.params.StatisticsParam;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -91,4 +92,13 @@ public interface ChartService {
|
|||
* @return: java.util.Map<java.lang.String,java.lang.Object>
|
||||
*/
|
||||
Map<String, Object> recordStatistics(StatisticsParam param);
|
||||
|
||||
/**
|
||||
* @Description: 多语言设置
|
||||
* @Author: liang.cheng
|
||||
* @Date: 2024/6/3 2:59 PM
|
||||
* @param: []
|
||||
* @return: java.util.Map<java.lang.Integer,com.engine.organization.entity.chart.HrmLabelVO>
|
||||
*/
|
||||
Map<Integer, HrmLabelVO> selectLabel();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -625,6 +625,25 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, HrmLabelVO> selectLabel() {
|
||||
RecordSet rs = new RecordSet();
|
||||
Map<Integer, HrmLabelVO> labelData = new HashMap<>();
|
||||
//labelId集合
|
||||
List<Integer> labelIds = Arrays.asList(547194,547196,547282,547283,547284,547285,547286,547287,547292,547293,547294,547296,547298,547299,547300,547301,547302,547303,547304,547305,547307,547310,547313,547314,547315,547316,547317,
|
||||
547318,547319,547320,547321,547322,547323,547324,547326,547327,547328,547329,547330,547331,547332,547333,547334,547473,547475,547476,547477,547478,547478,
|
||||
547480,547481,547482,547483,547484,547485,547486,547487,547488,547489,547490,547491,547492,547493,547494,547495);
|
||||
labelIds.forEach(item -> {
|
||||
rs.executeQuery("select labelName from HtmlLabelInfo where indexid = ? and languageid = ?",item,user.getLanguage());
|
||||
if (rs.next()){
|
||||
labelData.put(item,HrmLabelVO.builder().labelName(Util.null2String(rs.getString("labelName"))).build());
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return labelData;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成人数
|
||||
* @param stp
|
||||
|
|
|
|||
|
|
@ -318,5 +318,18 @@ public class OrgChartController {
|
|||
}
|
||||
|
||||
|
||||
@GET
|
||||
@Path("/i18n")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult selectLabel(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(user,getOrgChartWrapper(user).selectLabel());
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.engine.organization.wrapper;
|
|||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.entity.chart.HrmLabelVO;
|
||||
import com.engine.organization.entity.chart.params.StatisticsParam;
|
||||
import com.engine.organization.service.ChartService;
|
||||
import com.engine.organization.service.OrgChartService;
|
||||
|
|
@ -89,4 +90,8 @@ public class OrgChartWrapper extends Service {
|
|||
public Map<String, Object> recordStatistics(StatisticsParam param) {
|
||||
return getChartService(user).recordStatistics(param);
|
||||
}
|
||||
|
||||
public Map<Integer, HrmLabelVO> selectLabel() {
|
||||
return getChartService(user).selectLabel();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue