社保档案listPage优化
This commit is contained in:
parent
620193471c
commit
e9ee672a66
|
|
@ -9,7 +9,6 @@ import com.api.browser.bean.SearchConditionItem;
|
|||
import com.api.browser.bean.SearchConditionOption;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.demo.DemoPo;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.siarchives.bo.InsuranceArchivesBO;
|
||||
import com.engine.salary.entity.siarchives.dto.InsuranceArchivesBaseDTO;
|
||||
|
|
@ -42,7 +41,6 @@ import weaver.conn.mybatis.MyBatisFactory;
|
|||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -330,7 +328,8 @@ public class SIArchivesBiz {
|
|||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class);
|
||||
InsuranceArchivesOtherSchemePO insuranceArchivesOtherSchemePO = otherSchemeMapper.getOtherByEmployeeId(Collections.singletonList(employeeId)).get(0);
|
||||
List<InsuranceArchivesOtherSchemePO> otherList = otherSchemeMapper.getOtherByEmployeeId(Collections.singletonList(employeeId));
|
||||
InsuranceArchivesOtherSchemePO insuranceArchivesOtherSchemePO = otherList.size() != 0 ? otherList.get(0) : null;
|
||||
InsuranceArchivesOtherSchemeDTO data = InsuranceArchivesBO.convertOtherPOtoDTO(insuranceArchivesOtherSchemePO, employeeId);
|
||||
if (insuranceArchivesOtherSchemePO == null) {
|
||||
data.setEmployeeId(employeeId);
|
||||
|
|
@ -354,7 +353,8 @@ public class SIArchivesBiz {
|
|||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class);
|
||||
InsuranceArchivesFundSchemePO insuranceArchivesFundSchemePO = fundSchemeMapper.getFundByEmployeeId(Collections.singletonList(employeeId)).get(0);
|
||||
List<InsuranceArchivesFundSchemePO> fundList = fundSchemeMapper.getFundByEmployeeId(Collections.singletonList(employeeId));
|
||||
InsuranceArchivesFundSchemePO insuranceArchivesFundSchemePO = fundList.size() != 0 ? fundList.get(0) : null;
|
||||
InsuranceArchivesFundSchemeDTO data = InsuranceArchivesBO.convertFundPOtoDTO(insuranceArchivesFundSchemePO, employeeId);
|
||||
if (insuranceArchivesFundSchemePO == null) {
|
||||
data.setEmployeeId(employeeId);
|
||||
|
|
@ -393,7 +393,8 @@ public class SIArchivesBiz {
|
|||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class);
|
||||
return socialSchemeMapper.getSocialByEmployeeId(Collections.singletonList(employeeId)).get(0);
|
||||
List<InsuranceArchivesSocialSchemePO> socialList = socialSchemeMapper.getSocialByEmployeeId(Collections.singletonList(employeeId));
|
||||
return socialList.size() != 0 ? socialList.get(0) : null;
|
||||
}finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
|
@ -563,8 +564,8 @@ public class SIArchivesBiz {
|
|||
param.setDimissionDateStart(param.getDimissionDate()[0]);
|
||||
param.setDimissionDateEnd(param.getDimissionDate()[1]);
|
||||
}
|
||||
long current = param.getCurrent() == null ? 1L : param.getCurrent();
|
||||
long pageSize = param.getPageSize() == null ? 10 : param.getPageSize();
|
||||
Integer current = param.getCurrent() == null ? 1 : param.getCurrent();
|
||||
Integer pageSize = param.getPageSize() == null ? 10 : param.getPageSize();
|
||||
long startNum = (current - 1) * pageSize;
|
||||
param.setStartNum(startNum);
|
||||
param.setPageSize(pageSize);
|
||||
|
|
@ -658,6 +659,7 @@ public class SIArchivesBiz {
|
|||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
Map<Integer, Map<String, String>> result = new HashMap<>();
|
||||
try {
|
||||
|
||||
SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class);
|
||||
FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class);
|
||||
OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class);
|
||||
|
|
@ -667,9 +669,12 @@ public class SIArchivesBiz {
|
|||
Set<String> fundSet = new HashSet<>();
|
||||
Set<String> otherSet = new HashSet<>();
|
||||
insuranceArchivesEmployeePOS.forEach(item -> {
|
||||
InsuranceArchivesSocialSchemePO socialItem = socialSchemeMapper.getSocialByEmployeeId(Collections.singletonList(item.getEmployeeId())).get(0);
|
||||
InsuranceArchivesFundSchemePO fundItem = fundSchemeMapper.getFundByEmployeeId(Collections.singletonList(item.getEmployeeId())).get(0);
|
||||
InsuranceArchivesOtherSchemePO otherItem = otherSchemeMapper.getOtherByEmployeeId(Collections.singletonList(item.getEmployeeId())).get(0);
|
||||
List<InsuranceArchivesSocialSchemePO> socialList = socialSchemeMapper.getSocialByEmployeeId(Collections.singletonList(item.getEmployeeId()));
|
||||
InsuranceArchivesSocialSchemePO socialItem = socialList.size() != 0 ? socialList.get(0) : null;
|
||||
List<InsuranceArchivesFundSchemePO> fundList = fundSchemeMapper.getFundByEmployeeId(Collections.singletonList(item.getEmployeeId()));
|
||||
InsuranceArchivesFundSchemePO fundItem = fundList.size() != 0 ? fundList.get(0) : null;
|
||||
List<InsuranceArchivesOtherSchemePO> otherList = otherSchemeMapper.getOtherByEmployeeId(Collections.singletonList(item.getEmployeeId()));
|
||||
InsuranceArchivesOtherSchemePO otherItem = otherList.size() != 0 ? otherList.get(0) : null;
|
||||
if (socialItem != null) {
|
||||
Map<String, Object> socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
public class BaseQueryParam {
|
||||
//当前页码
|
||||
private Long current = 1L;
|
||||
private Integer current = 1;
|
||||
|
||||
//每页数据条数
|
||||
private Long pageSize = 10L;
|
||||
private Integer pageSize = 10;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
<result column="other_start_time" property="otherStartTime"/>
|
||||
<result column="other_end_time" property="otherEndTime"/>
|
||||
<result column="other_scheme_id" property="otherSchemeId"/>
|
||||
<result column="other_account" property="otherAccount"/>
|
||||
<result column="payment_organization" property="paymentOrganization"/>
|
||||
<result column="under_take" property="underTake"/>
|
||||
<result column="other_payment_base_string" property="otherPaymentBaseString"/>
|
||||
|
|
@ -29,7 +28,6 @@
|
|||
, t.other_start_time
|
||||
, t.other_end_time
|
||||
, t.other_scheme_id
|
||||
, t.other_account
|
||||
, t.payment_organization
|
||||
, t.under_take
|
||||
, t.other_payment_base_string
|
||||
|
|
|
|||
|
|
@ -41,4 +41,7 @@ public interface SocialSchemeMapper {
|
|||
* @return
|
||||
*/
|
||||
List<InsuranceArchivesEmployeePO> listPageEmployeePOS(@Param("param") InsuranceArchivesListParam param);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
</select>
|
||||
|
||||
<!-- 根据主键获取名称 -->
|
||||
<select id="querySchemeName">
|
||||
<select id="querySchemeName" resultType="java.lang.String">
|
||||
SELECT
|
||||
scheme_name
|
||||
FROM hrsa_social_security_scheme
|
||||
|
|
|
|||
Loading…
Reference in New Issue