新增根据表名获得e-builder信息接口,将人力资源字段同步给员工信息
parent
21aa5f19e1
commit
0823f962a6
@ -0,0 +1,36 @@
|
||||
package com.weaver.seconddev.jcl.common;
|
||||
|
||||
import com.weaver.common.authority.annotation.WeaPermission;
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.seconddev.jcl.common.service.CommonService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 聚才林公共接口
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/secondev/jcl/common")
|
||||
public class JclCommonController {
|
||||
|
||||
@Autowired
|
||||
CommonService commonService;
|
||||
/**
|
||||
* 根据表名获得模块id、应用id及模块下的表单视图id
|
||||
* @return
|
||||
*/
|
||||
@WeaPermission(publicPermission = true)
|
||||
@GetMapping("/getTableContainInformation")
|
||||
@ResponseBody
|
||||
public WeaResult<Map<String, Object>> getTableContainInformation(@RequestParam("tableNames") String tableNames){
|
||||
Map<String, Object> tableInfomationmap = commonService.getTableContainInformation(tableNames);
|
||||
|
||||
return WeaResult.success(tableInfomationmap);
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.weaver.seconddev.jcl.organization.esb;
|
||||
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.esb.api.rpc.EsbServerlessRpcRemoteInterface;
|
||||
import com.weaver.seconddev.jcl.organization.service.EmployeeInformationService;
|
||||
import com.weaver.teams.domain.user.SimpleEmployee;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 初始化员工信息和人力资源基本信息以及个人信息自定义字段的同步
|
||||
*/
|
||||
@Service("synchronousFieldInitialization_jcl")
|
||||
public class SynchronousFieldInitialization implements EsbServerlessRpcRemoteInterface {
|
||||
|
||||
@Autowired
|
||||
EmployeeInformationService employeeInformationService;
|
||||
@Override
|
||||
public WeaResult<Map<String, Object>> execute(Map<String, Object> params) {
|
||||
List<String> errorList = employeeInformationService.synchronousField(new SimpleEmployee());
|
||||
|
||||
if (errorList.size() > 0){
|
||||
return WeaResult.fail(errorList.toString(),true);
|
||||
}else {
|
||||
return WeaResult.success();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.weaver.seconddev.jcl.organization.importAdvice;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.weaver.ebuilder.form.client.service.batch.advice.ImportDataAdvice;
|
||||
import com.weaver.ebuilder.form.client.service.batch.dto.BaseImportDataAdviceDto;
|
||||
import com.weaver.ebuilder.form.client.service.batch.dto.DataForImportEntity;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class ImportEmployeeAdvice implements ImportDataAdvice {
|
||||
@Override
|
||||
public void dataAdvice(BaseImportDataAdviceDto req) {
|
||||
List<List<DataForImportEntity>> dataList = req.getDataList();
|
||||
Gson gson = new Gson();
|
||||
log.error("ImportEmployeeAdvice info :[{}] ",gson.toJson(dataList));
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue