diff --git a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/impl/EmployeeInformationServiceImpl.java b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/impl/EmployeeInformationServiceImpl.java index 49afa76..5d59d96 100644 --- a/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/impl/EmployeeInformationServiceImpl.java +++ b/jcl-hrmorganization/secondev-jcl-hrmorganization/src/main/java/com/weaver/seconddev/jcl/organization/service/impl/EmployeeInformationServiceImpl.java @@ -30,10 +30,7 @@ import com.weaver.seconddev.jcl.common.service.CommonService; import com.weaver.seconddev.jcl.organization.entity.Employee; import com.weaver.seconddev.jcl.organization.entity.PendingEmployee; import com.weaver.seconddev.jcl.organization.service.EmployeeInformationService; -import com.weaver.seconddev.jcl.organization.util.CommonUtils; -import com.weaver.seconddev.jcl.organization.util.Constants; -import com.weaver.seconddev.jcl.organization.util.DatabaseUtils; -import com.weaver.seconddev.jcl.organization.util.DateUtil; +import com.weaver.seconddev.jcl.organization.util.*; import com.weaver.teams.domain.user.SimpleEmployee; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; @@ -63,12 +60,19 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic private FormFieldManageController fieldManageController; @Autowired private FormAuthenticationService formAuthenticationService; + @Autowired + RecruitModuleUtils recruitModuleUtils; @Override public List> getInformation(Employee employee) { + Map uf_jcl_employee_information_Info = recruitModuleUtils.getEbTableInfo("uf_jcl_employee_information_apptag", "uf_jcl_employee_information_tag"); + String uf_jcl_employee_information = uf_jcl_employee_information_Info.get("table_name"); + Map uf_jcl_lzxxjl_Info = recruitModuleUtils.getEbTableInfo("uf_jcl_employee_information_apptag", "uf_jcl_lzxxjl_tag"); + String uf_jcl_lzxxjl = uf_jcl_lzxxjl_Info.get("table_name"); - String sql = "select * from uf_jcl_employee_information where delete_type='0' and ("; + + String sql = "select * from "+uf_jcl_employee_information+" where delete_type='0' and ("; List paramList = Lists.newArrayList(); if (employee.getMobile() != null && !"".equals(employee.getMobile())){ @@ -95,7 +99,7 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic String ygzt = CommonUtils.null2String(userMap.get("personnel_status")); if (ygzt.equals("5")){ //离职 - sql = "select zhgzr,lzqbm from uf_jcl_lzxxjl where glyg=? and delete_type='0' "; + sql = "select zhgzr,lzqbm from "+uf_jcl_lzxxjl+" where glyg=? and delete_type='0' "; List> resignList = databaseUtils.getSqlList(sql, CommonUtils.getParamList(userMap.get("id").toString())); if (resignList.size() > 0){ userMap.put("zhgzr",resignList.get(0).get("zhgzr")); @@ -103,7 +107,7 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic ssbm = CommonUtils.null2String(resignList.get(0).get("lzqbm")); }else if (ygzt.equals("6")){ //退休 - sql = "select zhgzr,txqbm from uf_jcl_txxxjl where glyg=? and delete_type='0' "; + sql = "select zhgzr,txqbm from "+uf_jcl_lzxxjl+" where glyg=? and delete_type='0' "; List> retireList = databaseUtils.getSqlList(sql, CommonUtils.getParamList(userMap.get("id").toString())); if (retireList.size() > 0){ userMap.put("zhgzr",retireList.get(0).get("zhgzr")); @@ -124,7 +128,10 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic @Override public List> getPendingEmployment(Employee employee) { - String sql = "select * from uf_jcl_rzgl where delete_type ='0' and ("; + Map uf_jcl_rzgl_Info = recruitModuleUtils.getEbTableInfo("uf_jcl_employee_information_apptag", "uf_jcl_rzgl_tag"); + String uf_jcl_rzgl = uf_jcl_rzgl_Info.get("table_name"); + + String sql = "select * from "+uf_jcl_rzgl+" where delete_type ='0' and ("; List paramList = Lists.newArrayList(); if (employee.getMobile() != null && !"".equals(employee.getMobile())){ @@ -157,6 +164,9 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic @Override public void updatePendingEmploy(PendingEmployee pendingEmployee) { + Map uf_jcl_rzgl_Info = recruitModuleUtils.getEbTableInfo("uf_jcl_employee_information_apptag", "uf_jcl_rzgl_tag"); + String uf_jcl_rzgl = uf_jcl_rzgl_Info.get("table_name"); + Map dataMap = CommonUtils.getUpdataParam(pendingEmployee); Map condition = Maps.newHashMap(); condition.put("id",pendingEmployee.getId()); @@ -609,6 +619,10 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic @Override public List> saveQueryCondition(SimpleEmployee simpleEmployee,Map params) { + Map uf_jcl_employee_information_Info = recruitModuleUtils.getEbTableInfo("uf_jcl_employee_information_apptag", "uf_jcl_employee_information_tag"); + String uf_jcl_employee_information = uf_jcl_employee_information_Info.get("table_name"); + + String rootdata = params.get("rootdata"); String sqltj = CommonUtils.null2String(params.get("sqltj")); Map param = Maps.newHashMap(); @@ -617,12 +631,12 @@ public class EmployeeInformationServiceImpl implements EmployeeInformationServic param.put("dataMap",dataMap); dataMap.put("ry",String.valueOf(simpleEmployee.getId())); dataMap.put("sxtj",rootdata); - dataMap.put("bm","uf_jcl_employee_information"); + dataMap.put("bm",uf_jcl_employee_information); String sql = "select id,ry from uf_jcl_querycondition where ry=? and bm=? and delete_type='0'"; - List> dataList = databaseUtils.getSqlList(sql,CommonUtils.getParamList(String.valueOf(simpleEmployee.getId()),"uf_jcl_employee_information")); + List> dataList = databaseUtils.getSqlList(sql,CommonUtils.getParamList(String.valueOf(simpleEmployee.getId()),uf_jcl_employee_information)); if (dataList.size() > 0){ - if (!sqltj.equals("")){ + if (rootdata.equals("")){ sql = "update uf_jcl_querycondition set sqltj=? where id=?"; databaseUtils.execute(sql,CommonUtils.getParamList(sqltj,String.valueOf(dataList.get(0).get("id")))); }else {