Merge pull request 'feature/cl' (#300) from feature/cl into develop
Reviewed-on: http://221.226.25.34:3000/liang.cheng/weaver-hrm-organization/pulls/300
This commit is contained in:
commit
520329406c
|
|
@ -1,6 +1,7 @@
|
||||||
package com.engine.organization.enums;
|
package com.engine.organization.enums;
|
||||||
|
|
||||||
import com.engine.organization.exception.OrganizationRunTimeException;
|
import com.engine.organization.exception.OrganizationRunTimeException;
|
||||||
|
import com.engine.organization.util.saveimport.JobInfoImportUtil;
|
||||||
import com.engine.organization.util.saveimport.PostInfoImportUtil;
|
import com.engine.organization.util.saveimport.PostInfoImportUtil;
|
||||||
import com.engine.organization.util.saveimport.SequenceImportUtil;
|
import com.engine.organization.util.saveimport.SequenceImportUtil;
|
||||||
import com.engine.organization.util.saveimport.StaffInfoImportUtil;
|
import com.engine.organization.util.saveimport.StaffInfoImportUtil;
|
||||||
|
|
@ -30,6 +31,22 @@ public enum OrgImportEnum implements OrgImportAdapter {
|
||||||
return StaffInfoImportUtil.importForm(user);
|
return StaffInfoImportUtil.importForm(user);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
JOB("job") {
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> orgImport(Map<String, Object> params, User user) {
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
String excelFile = (String) params.get("excelfile");
|
||||||
|
resultMap.put("pId", JobInfoImportUtil.saveImport("add", excelFile, user));
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> orgForm(User user) {
|
||||||
|
return JobInfoImportUtil.importForm(user);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
SEQUENCE("sequence"){
|
SEQUENCE("sequence"){
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> orgImport(Map<String, Object> params, User user) {
|
public Map<String, Object> orgImport(Map<String, Object> params, User user) {
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@
|
||||||
groupid,
|
groupid,
|
||||||
#{scopeId} as scopeId,
|
#{scopeId} as scopeId,
|
||||||
'hrm' as tablename
|
'hrm' as tablename
|
||||||
FROM hrm_formfield) hrmallfield
|
FROM hrm_formfield where isuse = 1) hrmallfield
|
||||||
WHERE FIELDHTMLTYPE != '6' and groupid IN (SELECT id FROM hrm_fieldgroup WHERE grouptype = #{scopeId})
|
WHERE FIELDHTMLTYPE != '6' and groupid IN (SELECT id FROM hrm_fieldgroup WHERE grouptype = #{scopeId})
|
||||||
ORDER BY hrmallfield.groupid, hrmallfield.fieldorder
|
ORDER BY hrmallfield.groupid, hrmallfield.fieldorder
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -148,6 +148,8 @@ public interface JobMapper {
|
||||||
|
|
||||||
int selectByConditions(@Param("resourcePO") ResourcePO resourcePO);
|
int selectByConditions(@Param("resourcePO") ResourcePO resourcePO);
|
||||||
|
|
||||||
|
int selectByE9(@Param("jobTitleName") String jobTitleName,@Param("jobactivitymark") String jobactivitymark,@Param("jobgroupremark") String jobgroupremark);
|
||||||
|
|
||||||
List<String> listUsedId();
|
List<String> listUsedId();
|
||||||
|
|
||||||
List<String> isAllowDelete(@Param("jobId") Long jobId);
|
List<String> isAllowDelete(@Param("jobId") Long jobId);
|
||||||
|
|
|
||||||
|
|
@ -482,6 +482,16 @@
|
||||||
and delete_type = 0
|
and delete_type = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectByE9" resultType="java.lang.Integer">
|
||||||
|
select h.id from hrmjobtitles h
|
||||||
|
left join hrmjobactivities j on h.jobactivityid = j.id
|
||||||
|
left join hrmjobgroups f on j.jobgroupid = f.id
|
||||||
|
where j.jobactivitymark = #{jobactivitymark}
|
||||||
|
and f.jobgroupremark = #{jobgroupremark}
|
||||||
|
and h.JOBTITLENAME = #{jobTitleName}
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="getIdByNameAndPid" resultMap="BaseResultMap">
|
<select id="getIdByNameAndPid" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
<include refid="baseColumns"/>
|
<include refid="baseColumns"/>
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,9 @@ public class FunctionOutStaffServiceImpl {
|
||||||
Integer sum = numberF.stream()
|
Integer sum = numberF.stream()
|
||||||
.mapToInt(Integer::intValue)
|
.mapToInt(Integer::intValue)
|
||||||
.sum();
|
.sum();
|
||||||
|
Integer sums = sum + staffPO.getPermanentNum();
|
||||||
if (staffPO.getControlPolicy().equals(HARDCONTROLLER)) {
|
if (staffPO.getControlPolicy().equals(HARDCONTROLLER)) {
|
||||||
OrganizationAssert.isFalse(sum.compareTo(staffPO.getStaffNum()) > 0, SystemEnv.getHtmlLabelName(547469,user.getLanguage()));
|
OrganizationAssert.isFalse(sums.compareTo(staffPO.getStaffNum()) > 0, SystemEnv.getHtmlLabelName(547469,user.getLanguage()));
|
||||||
}
|
}
|
||||||
staffPO.setFreezeNum(sum);
|
staffPO.setFreezeNum(sum);
|
||||||
buildStaffPO(staffPO);
|
buildStaffPO(staffPO);
|
||||||
|
|
|
||||||
|
|
@ -207,6 +207,9 @@ public class JobServiceImpl extends Service implements JobService {
|
||||||
// 批量删除
|
// 批量删除
|
||||||
topMenuList.add(MenuBtn.topMenu_batchDelete(userLanguage));
|
topMenuList.add(MenuBtn.topMenu_batchDelete(userLanguage));
|
||||||
topMenuList.add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("refresh").menuIcon("icon-coms-Refresh").menuName(SystemEnv.getHtmlLabelName(547432,userLanguage)).type("BTN_REFRESH").build());
|
topMenuList.add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("refresh").menuIcon("icon-coms-Refresh").menuName(SystemEnv.getHtmlLabelName(547432,userLanguage)).type("BTN_REFRESH").build());
|
||||||
|
// 批量导入
|
||||||
|
topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("batchImport").menuIcon("icon-coms-leading-in").menuName(SystemEnv.getHtmlLabelName(547242,user.getLanguage())).type("BTN_BatchImport").build());
|
||||||
|
|
||||||
topMenuList.add(MenuBtn.topMenu_addNew(userLanguage));
|
topMenuList.add(MenuBtn.topMenu_addNew(userLanguage));
|
||||||
btnDatas.put("topMenu", topMenuList);
|
btnDatas.put("topMenu", topMenuList);
|
||||||
// 日志
|
// 日志
|
||||||
|
|
|
||||||
|
|
@ -245,9 +245,9 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
|
||||||
*/
|
*/
|
||||||
public static List<Integer> getJclRoleLevels(Integer uId) {
|
public static List<Integer> getJclRoleLevels(Integer uId) {
|
||||||
List<Integer> ecRoleLevels = new ArrayList<>();
|
List<Integer> ecRoleLevels = new ArrayList<>();
|
||||||
ManagerDetachMapper mangeDetachMapper = MapperProxyFactory.getProxy(ManagerDetachMapper.class);
|
// ManagerDetachMapper mangeDetachMapper = MapperProxyFactory.getProxy(ManagerDetachMapper.class);
|
||||||
//人员
|
//人员
|
||||||
List<ManagerDetachPO> detachListById = new ArrayList<>(mangeDetachMapper.getDetachListById(uId,0));
|
List<ManagerDetachPO> detachListById = new ArrayList<>(MapperProxyFactory.getProxy(ManagerDetachMapper.class).getDetachListById(uId,0));
|
||||||
//角色
|
//角色
|
||||||
HrmCommonService hrmCommonService = new HrmCommonServiceImpl();
|
HrmCommonService hrmCommonService = new HrmCommonServiceImpl();
|
||||||
List<String> roleIds = new ArrayList<>(Arrays.asList(hrmCommonService.getRoleIds(uId).split(",")));
|
List<String> roleIds = new ArrayList<>(Arrays.asList(hrmCommonService.getRoleIds(uId).split(",")));
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,11 @@ public class DetachUtil {
|
||||||
private final List<Integer> jclRoleLevels;
|
private final List<Integer> jclRoleLevels;
|
||||||
|
|
||||||
public DetachUtil(User user) {
|
public DetachUtil(User user) {
|
||||||
if (1 == user.getUID() || user.isAdmin()) {
|
// if (1 == user.getUID() || user.isAdmin()) {
|
||||||
|
// DETACH = false;
|
||||||
|
// }
|
||||||
|
//分权管理员支持分权
|
||||||
|
if (1 == user.getUID()) {
|
||||||
DETACH = false;
|
DETACH = false;
|
||||||
}
|
}
|
||||||
if (DETACH) {
|
if (DETACH) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,268 @@
|
||||||
|
package com.engine.organization.util.saveimport;
|
||||||
|
|
||||||
|
|
||||||
|
import com.engine.organization.entity.extend.po.ExtendInfoPO;
|
||||||
|
import com.engine.organization.entity.hrmresource.po.ResourcePO;
|
||||||
|
import com.engine.organization.entity.jclimport.po.JclImportHistoryDetailPO;
|
||||||
|
import com.engine.organization.entity.job.po.JobPO;
|
||||||
|
import com.engine.organization.mapper.comp.CompMapper;
|
||||||
|
import com.engine.organization.mapper.department.DepartmentMapper;
|
||||||
|
import com.engine.organization.mapper.job.JobMapper;
|
||||||
|
import com.engine.organization.util.OrganizationAssert;
|
||||||
|
import com.engine.organization.util.db.MapperProxyFactory;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFCell;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFRow;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
import weaver.file.ImageFileManager;
|
||||||
|
import weaver.general.Util;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
import weaver.hrm.job.JobTitlesComInfo;
|
||||||
|
import weaver.systeminfo.SystemEnv;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2022/09/15
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class JobInfoImportUtil {
|
||||||
|
static Map<String, ExtendInfoPO> importFieldsMap;
|
||||||
|
|
||||||
|
static {
|
||||||
|
importFieldsMap = new HashMap<>();
|
||||||
|
importFieldsMap.put("岗位名称", ExtendInfoPO.builder().tableName("jcl_org_job").fieldName("ec_jobTitle").fieldNameDesc("岗位名称").isrequired(1).controlType(1).browserType("1").customValue("[\"input\",\"text\",\"100\"]").build());
|
||||||
|
importFieldsMap.put("所属分部", ExtendInfoPO.builder().tableName("jcl_org_job").fieldName("ec_company").fieldNameDesc("所属分部").isrequired(1).controlType(1).browserType("1").customValue("[\"input\",\"text\",\"100\"]").build());
|
||||||
|
importFieldsMap.put("所属部门", ExtendInfoPO.builder().tableName("jcl_org_job").fieldName("ec_department").fieldNameDesc("所属部门").isrequired(1).controlType(1).browserType("1").customValue("[\"input\",\"text\",\"100\"]").build());
|
||||||
|
importFieldsMap.put("职务类别", ExtendInfoPO.builder().tableName("hrmjobgroups").fieldName("jobgroupname").fieldNameDesc("职务类别").isrequired(1).controlType(1).browserType("1").customValue("[\"input\",\"text\",\"100\"]").build());
|
||||||
|
importFieldsMap.put("所属职务", ExtendInfoPO.builder().tableName("hrmjobactivities").fieldName("jobactivityname").fieldNameDesc("所属职务").isrequired(1).controlType(1).browserType("1").customValue("[\"input\",\"text\",\"100\"]").build());
|
||||||
|
importFieldsMap.put("是否关键岗", ExtendInfoPO.builder().tableName("jcl_org_job").fieldName("is_key").fieldNameDesc("是否关键岗").isrequired(1).controlType(1).browserType("1").customValue("[\"input\",\"text\",\"100\"]").build());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Long saveImport(String operateType, String excelFile, User user) {
|
||||||
|
Long importHistoryId = OrgImportUtil.saveImportLog("job_info", operateType, user);
|
||||||
|
JclImportHistoryDetailPO historyDetailPO;
|
||||||
|
|
||||||
|
ImageFileManager manager = new ImageFileManager();
|
||||||
|
manager.getImageFileInfoById(Util.getIntValue(excelFile));
|
||||||
|
XSSFWorkbook workbook;
|
||||||
|
try {
|
||||||
|
workbook = new XSSFWorkbook(manager.getInputStream());
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
// 当前sheet
|
||||||
|
XSSFSheet sheetAt = workbook.getSheetAt(0);
|
||||||
|
int lastRow = sheetAt.getLastRowNum();
|
||||||
|
OrganizationAssert.isTrue(lastRow > 0, "导入数据为空");
|
||||||
|
short lastCellNum = sheetAt.getRow(0).getLastCellNum();
|
||||||
|
List<ExtendInfoPO> extendInfoPOS = new ArrayList<>();
|
||||||
|
JobTitlesComInfo jobTitlesComInfo = new JobTitlesComInfo();
|
||||||
|
// 遍历每一行数据
|
||||||
|
nextRow:
|
||||||
|
for (int i = 0; i <= lastRow; i++) {
|
||||||
|
historyDetailPO = new JclImportHistoryDetailPO();
|
||||||
|
historyDetailPO.setPid(importHistoryId);
|
||||||
|
XSSFRow row = sheetAt.getRow(i);
|
||||||
|
if (null == row) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 组装待处理数据
|
||||||
|
Integer subCompanyId = null;
|
||||||
|
Integer departmentId = null;
|
||||||
|
String departmentname = "";
|
||||||
|
Integer jobTitleId = null;
|
||||||
|
Integer isKey = null;
|
||||||
|
|
||||||
|
|
||||||
|
String jobactivitymark = "";
|
||||||
|
String jobgroupremark = "";
|
||||||
|
|
||||||
|
historyDetailPO.setRowNums(String.valueOf(i + 1));
|
||||||
|
for (int cellIndex = 0; cellIndex < lastCellNum; cellIndex++) {
|
||||||
|
XSSFCell cell = row.getCell((short) cellIndex);
|
||||||
|
String cellValue = OrgImportUtil.getCellValue(cell).trim();
|
||||||
|
if (i == 0) {
|
||||||
|
// 首行 初始化字段信息
|
||||||
|
ExtendInfoPO extendInfoPO = importFieldsMap.get(cellValue);
|
||||||
|
extendInfoPOS.add(extendInfoPO);
|
||||||
|
} else {
|
||||||
|
ExtendInfoPO infoPO = extendInfoPOS.get(cellIndex);
|
||||||
|
// 数据校验
|
||||||
|
if (infoPO.getIsrequired() == 1 && StringUtils.isBlank(cellValue)) {
|
||||||
|
historyDetailPO.setOperateDetail(infoPO.getFieldNameDesc() + "为必填项");
|
||||||
|
historyDetailPO.setStatus("0");
|
||||||
|
OrgImportUtil.saveImportDetailLog(historyDetailPO);
|
||||||
|
continue nextRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
Object reallyValue;
|
||||||
|
try {
|
||||||
|
reallyValue = OrgImportUtil.getReallyValue(infoPO, cellValue);
|
||||||
|
} catch (Exception e) {
|
||||||
|
historyDetailPO.setOperateDetail(cellValue + "转换失败");
|
||||||
|
historyDetailPO.setStatus("0");
|
||||||
|
OrgImportUtil.saveImportDetailLog(historyDetailPO);
|
||||||
|
continue nextRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(cellValue) && StringUtils.isBlank(Util.null2String(reallyValue))) {
|
||||||
|
historyDetailPO.setOperateDetail(infoPO.getFieldNameDesc() + "数据转换失败,未找到对应数据");
|
||||||
|
historyDetailPO.setStatus("0");
|
||||||
|
OrgImportUtil.saveImportDetailLog(historyDetailPO);
|
||||||
|
continue nextRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 分部
|
||||||
|
if ("ec_company".equals(infoPO.getFieldName())) {
|
||||||
|
String[] split = cellValue.split(">");
|
||||||
|
if (split.length > 0 && StringUtils.isNotBlank(cellValue)) {
|
||||||
|
if (split.length > 8) {
|
||||||
|
historyDetailPO.setOperateDetail("分部层级不能大于10");
|
||||||
|
historyDetailPO.setStatus("0");
|
||||||
|
OrgImportUtil.saveImportDetailLog(historyDetailPO);
|
||||||
|
continue nextRow;
|
||||||
|
}
|
||||||
|
for (String s : split) {
|
||||||
|
subCompanyId = MapperProxyFactory.getProxy(CompMapper.class).getIdByNameAndPid(s, subCompanyId == null ? 0 : subCompanyId);
|
||||||
|
if (null == subCompanyId) {
|
||||||
|
historyDetailPO.setOperateDetail(cellValue + "分部未找到对应数据");
|
||||||
|
historyDetailPO.setStatus("0");
|
||||||
|
OrgImportUtil.saveImportDetailLog(historyDetailPO);
|
||||||
|
continue nextRow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 部门
|
||||||
|
if ("ec_department".equals(infoPO.getFieldName())) {
|
||||||
|
String[] split = cellValue.split(">");
|
||||||
|
if (split.length > 0 && StringUtils.isNotBlank(cellValue)) {
|
||||||
|
if (split.length > 8) {
|
||||||
|
historyDetailPO.setOperateDetail("部门层级不能大于10");
|
||||||
|
historyDetailPO.setStatus("0");
|
||||||
|
OrgImportUtil.saveImportDetailLog(historyDetailPO);
|
||||||
|
continue nextRow;
|
||||||
|
}
|
||||||
|
for (String s : split) {
|
||||||
|
departmentId = MapperProxyFactory.getProxy(DepartmentMapper.class).getIdByNameAndPid(s, subCompanyId, departmentId == null ? 0 : departmentId);
|
||||||
|
departmentname = s;
|
||||||
|
if (null == departmentId) {
|
||||||
|
historyDetailPO.setOperateDetail(cellValue + "部门未找到对应数据");
|
||||||
|
historyDetailPO.setStatus("0");
|
||||||
|
OrgImportUtil.saveImportDetailLog(historyDetailPO);
|
||||||
|
continue nextRow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//职务类别
|
||||||
|
if ("jobgroupname".equals(infoPO.getFieldName()) && StringUtils.isNotBlank(cellValue)) {
|
||||||
|
jobgroupremark = cellValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//所属职务
|
||||||
|
if ("jobactivityname".equals(infoPO.getFieldName()) && StringUtils.isNotBlank(cellValue)) {
|
||||||
|
jobactivitymark = cellValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//是否关键岗
|
||||||
|
if ("is_key".equals(infoPO.getFieldName()) && StringUtils.isNotBlank(cellValue)) {
|
||||||
|
isKey = "是".equals(cellValue) ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 岗位
|
||||||
|
if ("ec_jobTitle".equals(infoPO.getFieldName()) && StringUtils.isNotBlank(cellValue)) {
|
||||||
|
|
||||||
|
String jobTitleName = cellValue;
|
||||||
|
//1.岗位在所属职务下是否存在
|
||||||
|
jobTitleId = MapperProxyFactory.getProxy(JobMapper.class).selectByE9(jobTitleName, jobactivitymark, jobgroupremark);
|
||||||
|
if (null == jobTitleId) {
|
||||||
|
historyDetailPO.setOperateDetail(cellValue + "在系统岗职位体系中未匹配到数据,请检查职务和类别是否正确");
|
||||||
|
historyDetailPO.setStatus("0");
|
||||||
|
OrgImportUtil.saveImportDetailLog(historyDetailPO);
|
||||||
|
continue nextRow;
|
||||||
|
}
|
||||||
|
//2.岗位数据在聚才林岗位管理中是否重复
|
||||||
|
ResourcePO build = ResourcePO.builder().subcompanyid1(subCompanyId).departmentid(departmentId).jobtitle(jobTitleId).build();
|
||||||
|
int count = MapperProxyFactory.getProxy(JobMapper.class).selectByConditions(build);
|
||||||
|
if (count > 0) {
|
||||||
|
historyDetailPO.setOperateDetail(departmentname +"下 <"+ cellValue + ">岗位在聚才林岗位管理中已存在,请勿重复导入");
|
||||||
|
historyDetailPO.setStatus("0");
|
||||||
|
OrgImportUtil.saveImportDetailLog(historyDetailPO);
|
||||||
|
continue nextRow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 校验、数据交互
|
||||||
|
if (i == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
String jobNo = jobTitlesComInfo.getJobTitlescode(String.valueOf(jobTitleId)) + "-" +departmentId;
|
||||||
|
JobPO jobPO = JobPO.builder()
|
||||||
|
.jobNo(jobNo)
|
||||||
|
.isKey(isKey)
|
||||||
|
.deleteType(0)
|
||||||
|
.createTime(new Date())
|
||||||
|
.ecCompany(subCompanyId)
|
||||||
|
.ecDepartment(departmentId)
|
||||||
|
.ecJobTitle(jobTitleId)
|
||||||
|
.build();
|
||||||
|
MapperProxyFactory.getProxy(JobMapper.class).insertIgnoreNull(jobPO);
|
||||||
|
|
||||||
|
|
||||||
|
historyDetailPO.setOperateDetail("添加成功");
|
||||||
|
historyDetailPO.setStatus("1");
|
||||||
|
OrgImportUtil.saveImportDetailLog(historyDetailPO);
|
||||||
|
|
||||||
|
}
|
||||||
|
return importHistoryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static List<Map<String, Object>> importForm(User user) {
|
||||||
|
// 返回导入数据
|
||||||
|
List<Map<String, Object>> lsGroup = new ArrayList<>();
|
||||||
|
Map<String, Object> groupItem = new HashMap<>(3);
|
||||||
|
List<Object> itemList = new ArrayList<>();
|
||||||
|
groupItem.put("title", SystemEnv.getHtmlLabelName(33803, Util.getIntValue(user.getLanguage())));
|
||||||
|
groupItem.put("defaultshow", true);
|
||||||
|
List<Integer> lsPromptLabel = new ArrayList<>();
|
||||||
|
lsPromptLabel.add(34275);
|
||||||
|
lsPromptLabel.add(125452);
|
||||||
|
|
||||||
|
for (int i = 0; i < lsPromptLabel.size(); i++) {
|
||||||
|
Map<String, Object> item = new HashMap<>();
|
||||||
|
item.put("index", (i + 1));
|
||||||
|
String value = Util.toScreen(SystemEnv.getHtmlLabelName(lsPromptLabel.get(i), user.getLanguage()), user.getLanguage());
|
||||||
|
if (i == 0) {
|
||||||
|
value += SystemEnv.getHtmlLabelName(28576, user.getLanguage());
|
||||||
|
item.put("link", "/hrm/import/template/job.xls");
|
||||||
|
}
|
||||||
|
item.put("value", value);
|
||||||
|
itemList.add(item);
|
||||||
|
}
|
||||||
|
Map<String, Object> other = new HashMap<>();
|
||||||
|
other.put("index", (lsPromptLabel.size() + 1));
|
||||||
|
other.put("value", "注意:分部和部门存在多层级时候用 > 分割");
|
||||||
|
itemList.add(other);
|
||||||
|
Map<String, Object> other1 = new HashMap<>();
|
||||||
|
other1.put("index", (lsPromptLabel.size() + 2));
|
||||||
|
other1.put("value", "注意:如果必填字段存在多语言不支持导入");
|
||||||
|
itemList.add(other1);
|
||||||
|
groupItem.put("items", itemList);
|
||||||
|
lsGroup.add(groupItem);
|
||||||
|
return lsGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -119,7 +119,7 @@ public class WorkflowStaffOperateAction implements Action {
|
||||||
MapperProxyFactory.getProxy(StaffMapper.class).insertIgnoreNull(staffPO);
|
MapperProxyFactory.getProxy(StaffMapper.class).insertIgnoreNull(staffPO);
|
||||||
});
|
});
|
||||||
|
|
||||||
return Action.FAILURE_AND_CONTINUE;
|
return Action.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue