diff --git a/src/com/engine/salary/biz/EmployBiz.java b/src/com/engine/salary/biz/EmployBiz.java index 5b2e288ba..4b04e4d01 100644 --- a/src/com/engine/salary/biz/EmployBiz.java +++ b/src/com/engine/salary/biz/EmployBiz.java @@ -17,6 +17,16 @@ import java.util.List; public class EmployBiz extends BaseBean { + public List listAll(){ + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + EmployMapper mapper = sqlSession.getMapper(EmployMapper.class); + return mapper.listAll(); + } finally { + sqlSession.close(); + } + } + /** * 查询人员列表 * @@ -70,24 +80,6 @@ public class EmployBiz extends BaseBean { } } - public List getAdminEmployeeByIds(List list) { - if (CollectionUtils.isEmpty(list)) { - return new ArrayList<>(); - } - SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); - try { - EmployMapper mapper = sqlSession.getMapper(EmployMapper.class); - List employeeList = Lists.newArrayList(); - List> partition = Lists.partition(list, 1000); - for (List longs : partition) { - employeeList.addAll(mapper.getAdminEmployeeByIds(longs)); - } - return employeeList; - } finally { - sqlSession.close(); - } - } - /** * 岗位信息 @@ -158,4 +150,14 @@ public class EmployBiz extends BaseBean { sqlSession.close(); } } + + public List listAllForReport() { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + EmployMapper mapper = sqlSession.getMapper(EmployMapper.class); + return mapper.listAllForReport(); + } finally { + sqlSession.close(); + } + } } diff --git a/src/com/engine/salary/biz/SIAccountBiz.java b/src/com/engine/salary/biz/SIAccountBiz.java index a567d2f78..c9625c079 100644 --- a/src/com/engine/salary/biz/SIAccountBiz.java +++ b/src/com/engine/salary/biz/SIAccountBiz.java @@ -9,7 +9,6 @@ import com.engine.salary.cache.SalaryCacheKey; import com.engine.salary.constant.SalaryDefaultTenantConstant; import com.engine.salary.encrypt.AESEncryptUtil; import com.engine.salary.encrypt.EncryptUtil; -import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.salaryacct.dto.SalaryAcctProgressDTO; import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO; import com.engine.salary.entity.siaccount.dto.SIAccountUtilDTO; @@ -22,7 +21,6 @@ import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.enums.siaccount.*; import com.engine.salary.enums.sicategory.*; import com.engine.salary.exception.SalaryRunTimeException; -import com.engine.salary.mapper.datacollection.EmployMapper; import com.engine.salary.mapper.siaccount.*; import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper; import com.engine.salary.mapper.sicategory.ICategoryMapper; @@ -117,6 +115,11 @@ public class SIAccountBiz extends Service { return (SalaryAcctProgressService) ServiceUtil.getService(SalaryAcctProgressServiceImpl.class, user); } + private SalaryEmployeeService getSalaryEmployeeService(User user) { + return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); + } + + public PageInfo listPage(InsuranceAccountBatchParam queryParam) { List list = getInsuranceAccountBatchMapper().list(queryParam); PageInfo page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), @@ -1102,7 +1105,6 @@ public class SIAccountBiz extends Service { InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, param.getPaymentOrganization()); encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class); - DataCollectionEmployee simpleEmployee = MapperProxyFactory.getProxy(EmployMapper.class).getEmployeeById(employeeId); insuranceAccountBatchPO.setAccountant(currentUserName); insuranceAccountBatchPO.setUpdateTime(new Date()); insuranceAccountBatchPO.setSocialPay(socialSum.toPlainString()); diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.java b/src/com/engine/salary/mapper/datacollection/EmployMapper.java index 496f00ed0..d73cef7ba 100644 --- a/src/com/engine/salary/mapper/datacollection/EmployMapper.java +++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.java @@ -14,20 +14,34 @@ import java.util.List; public interface EmployMapper { + /** - * 获取所有员工 + * 只查人力资源表 + * @return + */ + List listAll(); + + /** + * 获取所有员工,关联部门 * * @return */ List listEmployee(); + /** + * 单表查询 + * @param ids + * @return + */ List getEmployeeByIds(@Param("collection") List ids); + /** + * 多表联查 + * @param ids + * @return + */ List getEmployeeByIdsAll(@Param("collection") List ids); - List getAdminEmployeeByIds(@Param("collection") List list); - - List getEmployeeIdsByUserName(@Param("userName") String userName); /** * 根据薪资账套的人员范围转换而成的查询参数查询人员 @@ -37,24 +51,40 @@ public interface EmployMapper { */ List listByParams(@Param("params") Collection queryParams); + /** + * 多表,详细信息 + * @param employeeId + * @return + */ DataCollectionEmployee getEmployeeById(Long employeeId); - List listAllFields(); - /** * 报表专用 * @return */ List listAllForReport(); + /** + * 所以岗位 + * @param ids + * @return + */ List listPositionInfo(@Param("collection") List ids); + /** + * 所以部门 + * @param departmentIds + * @return + */ List getDeptInfoList(@Param("departmentIds") List departmentIds); + /** + * 所以分部 + * @param subDepartmentIds + * @return + */ List getSubCompanyInfoList(@Param("subDepartmentIds") List subDepartmentIds); - List listAll(); - List listHrmInfoByIdAndName(@Param("param") HrmQueryParam param); } \ No newline at end of file diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml index 806a1bf2d..7e5fce302 100644 --- a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml @@ -81,19 +81,6 @@ - - - select - a.LASTNAME as username - from hrmresource a - where - e.status not in (7) - and (e.accounttype is null or e.accounttype = 0) - -