字段同步
This commit is contained in:
parent
2317a690cb
commit
91117d43c2
|
|
@ -290,7 +290,7 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic
|
|||
paramMap.put("formMap",formMap);
|
||||
paramMap.put("allSubFormList",allSubFormList);
|
||||
paramMap.put("mapping",mapping);
|
||||
paramMap.put("detailFormDataList",dataList);
|
||||
paramMap.put("detailFormDataList",dataGroup);
|
||||
|
||||
List<String> errorMessageList = synchronousOurForm(paramMap);
|
||||
if (errorMessageList.size() >0){
|
||||
|
|
@ -428,6 +428,8 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic
|
|||
//同步员工信息变更表和入职管理
|
||||
sql = "select b.id formtableid,a.* from sub_form a left join form_table b on a.id=b.form_id where a.form_id in ("+String.join(",",formIdParamList)+") and a.delete_type='0'";
|
||||
List<Map<String, Object>> dataList = databaseUtils.getSqlList(sql);
|
||||
Map<String,List<Map<String, Object>>> dataGroup = dataList.stream().collect(Collectors.groupingBy(e->e.get("form_id").toString()));
|
||||
|
||||
|
||||
Map<String,Object> paramMap = Maps.newHashMap();
|
||||
paramMap.put("employee",employee);
|
||||
|
|
@ -436,7 +438,7 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic
|
|||
paramMap.put("formMap",formMap);
|
||||
paramMap.put("allSubFormList",allSubFormList);
|
||||
paramMap.put("mapping",mapping);
|
||||
paramMap.put("detailFormDataList",dataList);
|
||||
paramMap.put("detailFormDataList",dataGroup);
|
||||
|
||||
List<String> errorMessageList = synchronousOurForm(paramMap);
|
||||
if (errorMessageList.size() >0){
|
||||
|
|
@ -553,7 +555,7 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic
|
|||
paramMap.put("formMap",formMap);
|
||||
paramMap.put("allSubFormList",allSubFormList);
|
||||
paramMap.put("mapping",mapping);
|
||||
paramMap.put("detailFormDataList",dataList);
|
||||
paramMap.put("detailFormDataList",dataGroup);
|
||||
|
||||
List<String> errorMessageList = synchronousOurForm(paramMap);
|
||||
if (errorMessageList.size() >0){
|
||||
|
|
@ -738,11 +740,11 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic
|
|||
Map<String,String> hireManageMentFieldGroup = fieldGroupBy.get(formMap.get(Constants.UF_JCL_RZGL)).stream().collect(Collectors.toMap(e->e.get("group_name").toString(),e->e.get("id").toString()));
|
||||
|
||||
|
||||
Map<String,Object> result1 = packageBatchSaveParamHaveDelete(hireManageMentFieldList,mainFormBasicFieldList,hireManageMentFieldGroup.get(Constants.BASIC_INFORMATION),mapping,employeeBasicFieldList,allSubFormList);
|
||||
Map<String,Object> result1 = packageBatchSaveParamHaveDelete(hireManageMentFieldList,mainFormBasicFieldList,hireManageMentFieldGroup.get(Constants.BASIC_INFORMATION),null,employeeBasicFieldList,allSubFormList);
|
||||
List<Long> hireManageMentdeleteIds = (List<Long>)result1.get("deleteIds");
|
||||
List<Map<String, String>> hireManageMentPersonAddForms = (List<Map<String, String>>)result1.get("forms");
|
||||
|
||||
Map<String,Object> result2 = packageBatchSaveParamHaveDelete(hireManageMentFieldList,mainFormPersonFieldList,hireManageMentFieldGroup.get(Constants.PERSONAL_INFORMATION),mapping,employeePesonFieldList,allSubFormList);
|
||||
Map<String,Object> result2 = packageBatchSaveParamHaveDelete(hireManageMentFieldList,mainFormPersonFieldList,hireManageMentFieldGroup.get(Constants.PERSONAL_INFORMATION),null,employeePesonFieldList,allSubFormList);
|
||||
List<Long> deleteIds2 = (List<Long>)result2.get("deleteIds");
|
||||
List<Map<String, String>> personAddForms2 = (List<Map<String, String>>)result2.get("forms");
|
||||
hireManageMentdeleteIds.addAll(deleteIds2);
|
||||
|
|
@ -758,11 +760,11 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic
|
|||
Map<String,String> informationChangeFieldGroup = fieldGroupBy.get(formMap.get(Constants.EMPLOYEE_XXBGSQ)).stream().collect(Collectors.toMap(e->e.get("group_name").toString(),e->e.get("id").toString()));
|
||||
|
||||
|
||||
Map<String,Object> informationChangeResult1 = packageBatchSaveParamHaveDelete(informationChangeFieldList,mainFormBasicFieldList,informationChangeFieldGroup.get(Constants.BASIC_INFORMATION),mapping,employeeBasicFieldList,allSubFormList);
|
||||
Map<String,Object> informationChangeResult1 = packageBatchSaveParamHaveDelete(informationChangeFieldList,mainFormBasicFieldList,informationChangeFieldGroup.get(Constants.BASIC_INFORMATION),null,employeeBasicFieldList,allSubFormList);
|
||||
List<Long> informationChangedeleteIds = (List<Long>)informationChangeResult1.get("deleteIds");
|
||||
List<Map<String, String>> informationChangeAddForms = (List<Map<String, String>>)informationChangeResult1.get("forms");
|
||||
|
||||
Map<String,Object> informationChangeResult2 = packageBatchSaveParamHaveDelete(hireManageMentFieldList,mainFormPersonFieldList,informationChangeFieldGroup.get(Constants.PERSONAL_INFORMATION),mapping,employeePesonFieldList,allSubFormList);
|
||||
Map<String,Object> informationChangeResult2 = packageBatchSaveParamHaveDelete(informationChangeFieldList,mainFormPersonFieldList,informationChangeFieldGroup.get(Constants.PERSONAL_INFORMATION),null,employeePesonFieldList,allSubFormList);
|
||||
List<Long> informationChangeDeleteIds2 = (List<Long>)informationChangeResult2.get("deleteIds");
|
||||
List<Map<String, String>> informationChangeddForms2 = (List<Map<String, String>>)informationChangeResult2.get("forms");
|
||||
informationChangedeleteIds.addAll(informationChangeDeleteIds2);
|
||||
|
|
@ -772,12 +774,12 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic
|
|||
List<String> errorMessage = Lists.newArrayList();
|
||||
|
||||
//保存入职管理
|
||||
WeaResult<Map<String, Object>> result = batchSaveInformation(CommonUtils.null2String(formMap.get(Constants.UF_JCL_RZGL)),employeeFieldList,detailFormDataList.get(formMap.get(Constants.UF_JCL_RZGL)),ModuleSource.ebuilderform,null,hireManageMentdeleteIds,employee,hireManageMentPersonAddForms);
|
||||
WeaResult<Map<String, Object>> result = batchSaveInformation(CommonUtils.null2String(formMap.get(Constants.UF_JCL_RZGL)),hireManageMentFieldList,detailFormDataList.get(formMap.get(Constants.UF_JCL_RZGL)),ModuleSource.ebuilderform,null,hireManageMentdeleteIds,employee,hireManageMentPersonAddForms);
|
||||
if (result.getCode() != 200){
|
||||
errorMessage.add("入职管理"+result.getMsg());
|
||||
}
|
||||
//保存信息变更
|
||||
WeaResult<Map<String, Object>> informationChangeResult = batchSaveInformation(CommonUtils.null2String(formMap.get(Constants.UF_JCL_RZGL)),employeeFieldList,detailFormDataList.get(formMap.get(Constants.UF_JCL_RZGL)),ModuleSource.ebuilderform,null,hireManageMentdeleteIds,employee,hireManageMentPersonAddForms);
|
||||
WeaResult<Map<String, Object>> informationChangeResult = batchSaveInformation(CommonUtils.null2String(formMap.get(Constants.EMPLOYEE_XXBGSQ)),informationChangeFieldList,detailFormDataList.get(formMap.get(Constants.EMPLOYEE_XXBGSQ)),ModuleSource.ebuilderform,null,informationChangedeleteIds,employee,informationChangeAddForms);
|
||||
if (informationChangeResult.getCode() != 200){
|
||||
errorMessage.add("信息变更申请表"+informationChangeResult.getMsg());
|
||||
}
|
||||
|
|
@ -1082,7 +1084,7 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic
|
|||
for (Map<Object, Object> packageMap :packageList){
|
||||
String dataKey = CommonUtils.null2String(packageMap.get("dataKey"));
|
||||
String conditionKey = CommonUtils.null2String(customField.get("dataKey"));
|
||||
if (mapping.get(conditionKey) != null && !"".equals(mapping.get(conditionKey))){
|
||||
if (mapping !=null && mapping.get(conditionKey) != null && !"".equals(mapping.get(conditionKey))){
|
||||
conditionKey = mapping.get(conditionKey);
|
||||
}
|
||||
if (dataKey.equals(conditionKey)){
|
||||
|
|
@ -1095,7 +1097,7 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic
|
|||
for (Map<Object, Object> packageMap :packageList){
|
||||
String dataKey = CommonUtils.null2String(packageMap.get("dataKey"));
|
||||
String conditionKey = CommonUtils.null2String(customField.get("dataKey"));
|
||||
if (mapping.get(dataKey) != null && !"".equals(mapping.get(dataKey))){
|
||||
if (mapping !=null && mapping.get(dataKey) != null && !"".equals(mapping.get(dataKey))){
|
||||
dataKey = mapping.get(dataKey);
|
||||
}
|
||||
if (dataKey.equals(conditionKey)){
|
||||
|
|
@ -1134,7 +1136,7 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic
|
|||
for (Map<Object, Object> customField :conditionList){
|
||||
String dataKey = CommonUtils.null2String(packageMap.get("dataKey"));
|
||||
String conditionKey = CommonUtils.null2String(customField.get("dataKey"));
|
||||
if (mapping.get(conditionKey) != null && !"".equals(mapping.get(conditionKey))){
|
||||
if (mapping != null && mapping.get(conditionKey) != null && !"".equals(mapping.get(conditionKey))){
|
||||
conditionKey = mapping.get(conditionKey);
|
||||
}
|
||||
if (dataKey.equals(conditionKey)){
|
||||
|
|
@ -1147,7 +1149,7 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic
|
|||
for (Map<Object, Object> customField :conditionList){
|
||||
String dataKey = CommonUtils.null2String(packageMap.get("dataKey"));
|
||||
String conditionKey = CommonUtils.null2String(customField.get("dataKey"));
|
||||
if (mapping.get(dataKey) != null && !"".equals(mapping.get(dataKey))){
|
||||
if (mapping !=null && mapping.get(dataKey) != null && !"".equals(mapping.get(dataKey))){
|
||||
dataKey = mapping.get(dataKey);
|
||||
}
|
||||
if (dataKey.equals(conditionKey)){
|
||||
|
|
|
|||
Loading…
Reference in New Issue