diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index 7bef40209..8949c1fa2 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -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 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 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 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> 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 fundSet = new HashSet<>(); Set 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 socialList = socialSchemeMapper.getSocialByEmployeeId(Collections.singletonList(item.getEmployeeId())); + InsuranceArchivesSocialSchemePO socialItem = socialList.size() != 0 ? socialList.get(0) : null; + List fundList = fundSchemeMapper.getFundByEmployeeId(Collections.singletonList(item.getEmployeeId())); + InsuranceArchivesFundSchemePO fundItem = fundList.size() != 0 ? fundList.get(0) : null; + List otherList = otherSchemeMapper.getOtherByEmployeeId(Collections.singletonList(item.getEmployeeId())); + InsuranceArchivesOtherSchemePO otherItem = otherList.size() != 0 ? otherList.get(0) : null; if (socialItem != null) { Map socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference>() { }); diff --git a/src/com/engine/salary/common/BaseQueryParam.java b/src/com/engine/salary/common/BaseQueryParam.java index 5af5ca205..67089469a 100644 --- a/src/com/engine/salary/common/BaseQueryParam.java +++ b/src/com/engine/salary/common/BaseQueryParam.java @@ -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; } diff --git a/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml b/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml index 22b141c50..e30a30ff8 100644 --- a/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml +++ b/src/com/engine/salary/mapper/siarchives/OtherSchemeMapper.xml @@ -9,7 +9,6 @@ - @@ -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 diff --git a/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.java b/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.java index 31dbfd490..21776becc 100644 --- a/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.java +++ b/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.java @@ -41,4 +41,7 @@ public interface SocialSchemeMapper { * @return */ List listPageEmployeePOS(@Param("param") InsuranceArchivesListParam param); + + + } diff --git a/src/com/engine/salary/mapper/sischeme/InsuranceSchemeMapper.xml b/src/com/engine/salary/mapper/sischeme/InsuranceSchemeMapper.xml index 25eb20730..86fbdc683 100644 --- a/src/com/engine/salary/mapper/sischeme/InsuranceSchemeMapper.xml +++ b/src/com/engine/salary/mapper/sischeme/InsuranceSchemeMapper.xml @@ -42,7 +42,7 @@ - SELECT scheme_name FROM hrsa_social_security_scheme