福利档案获取baseForm

Merge pull request  from reset/archive
This commit is contained in:
reset 2022-03-15 09:41:43 +00:00 committed by Gitee
commit 112e8e9c32
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
26 changed files with 824 additions and 71 deletions

View File

@ -34,4 +34,15 @@ public class EmployBiz extends BaseBean {
sqlSession.close();
}
}
public List<DataCollectionEmployee> getEmployeeByIdsAll(List<Long> list) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
return mapper.getEmployeeByIdsAll(list);
} finally {
sqlSession.close();
}
}
}

View File

@ -1,11 +1,29 @@
package com.engine.salary.biz;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.sicategory.dto.ICategoryFormDTO;
import com.engine.salary.entity.siarchives.bo.InsuranceArchivesBO;
import com.engine.salary.entity.siarchives.dto.InsuranceArchivesBaseDTO;
import com.engine.salary.entity.siarchives.dto.InsuranceArchivesFundSchemeDTO;
import com.engine.salary.entity.siarchives.dto.InsuranceArchivesOtherSchemeDTO;
import com.engine.salary.entity.siarchives.dto.InsuranceArchivesSocialSchemeDTO;
import com.engine.salary.entity.siarchives.po.InsuranceArchivesFundSchemePO;
import com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO;
import com.engine.salary.entity.siarchives.po.InsuranceArchivesSocialSchemePO;
import com.engine.salary.entity.sischeme.po.InsuranceSchemePO;
import com.engine.salary.enums.sicategory.UndertakerEnum;
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
import com.engine.salary.mapper.archives.FundSchemeMapper;
import com.engine.salary.mapper.archives.OtherSchemeMapper;
import com.engine.salary.mapper.archives.SocialSchemeMapper;
import com.engine.salary.util.SalaryAssert;
import com.engine.salary.util.SalaryDateUtil;
import org.apache.ibatis.session.SqlSession;
import weaver.conn.mybatis.MyBatisFactory;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
@ -16,13 +34,146 @@ import java.util.List;
**/
public class SIArchivesBiz {
public ICategoryFormDTO getBaseForm(Integer welfareType, Long employeeId) {
public Map<String,Object> getBaseForm(WelfareTypeEnum welfareType, Long employeeId, Long operateId) {
Map<String, Object> data = new HashMap<>(16);
SalaryAssert.notNull(employeeId, "员工id不可为空");
EmployBiz employBiz = new EmployBiz();
List<DataCollectionEmployee> employeeByIds = employBiz.getEmployeeByIds(Collections.singletonList(employeeId));
List<DataCollectionEmployee> employeeByIds = employBiz.getEmployeeByIdsAll(Collections.singletonList(employeeId));
SalaryAssert.notEmpty(employeeByIds,"员工信息不存在");
DataCollectionEmployee item = employeeByIds.get(0);
return null;
if (welfareType == null) {
//基础信息表单
InsuranceArchivesBaseDTO insuranceArchivesBaseDTO = InsuranceArchivesBaseDTO.builder().department(item.getDepartmentName())
.hiredate(SalaryDateUtil.getFormatLocalDate(item.getCompanystartdate()))
.position(item.getJobtitleName())
.username(item.getUsername())
.telephone(item.getMobile())
.dimissionDate(SalaryDateUtil.getFormatLocalDate(item.getDissmissdate()))
.build();
// if (item.getStatus() == UserStatus.unavailable) {
// InsuranceArchivesListParam insuranceArchivesListParam = new InsuranceArchivesListParam();
// insuranceArchivesListParam.setEmployeeIds(Collections.singletonList(employeeId));
// List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS = siArchivesSocialMapper.queryEmployeeList(insuranceArchivesListParam, tenantKey);
// if (CollectionUtils.isNotEmpty(insuranceArchivesEmployeePOS)) {
// insuranceArchivesBaseDTO.setDimissionDate(SalaryDateUtil.getFormatLocalDate(insuranceArchivesEmployeePOS.get(0).getDimissionDate()));
// }
// }
//WeaForm weaForm = SalaryFormatUtil.<InsuranceArchivesBaseDTO>getInstance().buildForm(InsuranceArchivesBaseDTO.class, insuranceArchivesBaseDTO);
// weaForm.getGroups().add(new WeaFormGroup("g1", "员工信息"));
// weaForm.getLayout().forEach(items -> items.forEach(e -> e.setGroupId("g1")));
data.put("data",insuranceArchivesBaseDTO);
return data;
}
SISchemeBiz siSchemeBiz = new SISchemeBiz();
List<InsuranceSchemePO> list = siSchemeBiz.listAll();
//返回组件
//返回数据
switch (welfareType) {
case SOCIAL_SECURITY:
InsuranceArchivesSocialSchemeDTO insuranceArchivesSocialSchemeDTO = buildSocialForm(list, employeeId, operateId );
data.put("data",insuranceArchivesSocialSchemeDTO);
break;
case ACCUMULATION_FUND:
InsuranceArchivesFundSchemeDTO insuranceArchivesFundSchemeDTO = buildFundForm(list, employeeId, operateId);
data.put("data",insuranceArchivesFundSchemeDTO);
break;
case OTHER:
InsuranceArchivesOtherSchemeDTO insuranceArchivesOtherSchemeDTO = buildOtherForm(list, employeeId, operateId);
data.put("data",insuranceArchivesOtherSchemeDTO);
break;
default:
data.put("data","");
}
return data;
}
/**
* 其它基础表单
* @param list
* @param employeeId
* @param operateId
* @return
*/
public InsuranceArchivesOtherSchemeDTO buildOtherForm(List<InsuranceSchemePO> list, Long employeeId, Long operateId) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
OtherSchemeMapper otherSchemeMapper = sqlSession.getMapper(OtherSchemeMapper.class);
InsuranceArchivesOtherSchemePO insuranceArchivesOtherSchemePO = otherSchemeMapper.getOtherByEmployeeId(employeeId);
InsuranceArchivesOtherSchemeDTO data = InsuranceArchivesBO.convertOtherPOtoDTO(insuranceArchivesOtherSchemePO, employeeId);
if (insuranceArchivesOtherSchemePO == null) {
data.setEmployeeId(employeeId);
data.setUnderTake(UndertakerEnum.SCOPE_COMPANY);
}
return data;
}finally {
sqlSession.close();
}
}
/**
* 公积金基础表单
* @param list
* @param employeeId
* @param operateId
* @return
*/
public InsuranceArchivesFundSchemeDTO buildFundForm(List<InsuranceSchemePO> list, Long employeeId, Long operateId) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
FundSchemeMapper fundSchemeMapper = sqlSession.getMapper(FundSchemeMapper.class);
InsuranceArchivesFundSchemePO insuranceArchivesFundSchemePO = fundSchemeMapper.getFundByEmployeeId(employeeId);
InsuranceArchivesFundSchemeDTO data = InsuranceArchivesBO.convertFundPOtoDTO(insuranceArchivesFundSchemePO, employeeId);
if (insuranceArchivesFundSchemePO == null) {
data.setEmployeeId(employeeId);
data.setUnderTake(UndertakerEnum.SCOPE_COMPANY);
}
return data;
}finally {
sqlSession.close();
}
}
/**
* 社保基础表单
* @param list
* @param employeeId
* @param operateId
* @return
*/
public InsuranceArchivesSocialSchemeDTO buildSocialForm(List<InsuranceSchemePO> list, Long employeeId, Long operateId) {
InsuranceArchivesSocialSchemePO insuranceArchivesSocialSchemePO = getSocialByEmployeeId(employeeId);
InsuranceArchivesSocialSchemeDTO data = InsuranceArchivesBO.convertSocialPOtoDTO(insuranceArchivesSocialSchemePO, employeeId);
if (insuranceArchivesSocialSchemePO == null) {
data.setEmployeeId(employeeId);
data.setUnderTake(UndertakerEnum.SCOPE_COMPANY);
}
return data;
}
/**
* 获取社保档案表
* @param employeeId
* @return
*/
public InsuranceArchivesSocialSchemePO getSocialByEmployeeId(Long employeeId) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class);
return socialSchemeMapper.getSocialByEmployeeId(employeeId);
}finally {
sqlSession.close();
}
}
}

View File

@ -58,7 +58,7 @@ public class SISchemeBiz {
* @param id 方案主键id
* @return form
*/
private List<InsuranceSchemeDetailDTO> getSchemeDetailFormDTO(WelfareTypeEnum welfareTypeEnum, Long id) {
public List<InsuranceSchemeDetailDTO> getSchemeDetailFormDTO(WelfareTypeEnum welfareTypeEnum, Long id) {
List<ICategoryPO> insuranceCategoryPOS = listByWelfareType(welfareTypeEnum.getValue());
List<InsuranceSchemeDetailDTO> insuranceSchemeDetailDTOList = new ArrayList<>();
insuranceCategoryPOS.forEach(item -> {
@ -125,7 +125,7 @@ public class SISchemeBiz {
* @param welfareType
* @return
*/
private List<ICategoryPO> listByWelfareType(Integer welfareType) {
public List<ICategoryPO> listByWelfareType(Integer welfareType) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
ICategoryMapper iCategoryMapper = sqlSession.getMapper(ICategoryMapper.class);
@ -193,6 +193,25 @@ public class SISchemeBiz {
}
}
/**
* 获取所有方案
* @return
*/
public List<InsuranceSchemePO> listAll() {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
InsuranceSchemeMapper insuranceSchemeMapper = sqlSession.getMapper(InsuranceSchemeMapper.class);
List<InsuranceSchemePO> insuranceSchemePOList = insuranceSchemeMapper.listAll();
return insuranceSchemePOList;
} finally {
sqlSession.close();
}
}
/**
* 社保方案基础信息明细表
* @param primaryId

View File

@ -1,50 +0,0 @@
package com.engine.salary.cmd.archives;
import com.api.browser.bean.SearchConditionItem;
import com.api.browser.util.ConditionFactory;
import com.engine.common.biz.AbstractCommonCommand;
import com.engine.common.entity.BizLogContext;
import com.engine.core.interceptor.CommandContext;
import com.engine.salary.biz.SIArchivesBiz;
import com.engine.salary.biz.SICategoryBiz;
import com.engine.salary.entity.sicategory.dto.ICategoryFormDTO;
import weaver.hrm.User;
import java.util.HashMap;
import java.util.Map;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/3/12
* @Version V1.0
**/
public class SIArchivesGetBaseFormCmd extends AbstractCommonCommand<Map<String, Object>> {
public SIArchivesGetBaseFormCmd(Map<String, Object> params, User user) {
this.user = user;
this.params = params;
}
@Override
public BizLogContext getLogContext() {
return null;
}
@Override
public Map<String, Object> execute(CommandContext commandContext) {
Map<String, Object> apidatas = new HashMap<>(16);
SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
Integer welfareType = (Integer) params.get("welfareType");
Long employeeId = (Long) params.get("employeeId");
ICategoryFormDTO form = siArchivesBiz.getBaseForm(welfareType,employeeId);
apidatas.put("form",form);
ConditionFactory conditionFactory = new ConditionFactory(user);
Map<String, SearchConditionItem> items = new HashMap<>();
return apidatas;
}
}

View File

@ -122,7 +122,7 @@ public class AddUpDeductionImportCmd extends AbstractCommonCommand<Map<String, O
String userName = dto.getUsername();
String deparmentName = dto.getDepartmentName();
List<Long> employeeSameIds = employees.stream().filter(e -> (StringUtils.isBlank(userName) || Objects.equals(e.getUsername(), userName))
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDeparmentName(), deparmentName))).map(DataCollectionEmployee::getEmployeeId)
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDepartmentName(), deparmentName))).map(DataCollectionEmployee::getEmployeeId)
.collect(Collectors.toList());

View File

@ -117,7 +117,7 @@ public class AddUpSituationImportCmd extends AbstractCommonCommand<Map<String, O
String userName = dto.getUsername();
String deparmentName = dto.getDepartmentName();
List<Long> employeeSameIds = employees.stream().filter(e -> (StringUtils.isBlank(userName) || Objects.equals(e.getUsername(), userName))
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDeparmentName(), deparmentName))).map(DataCollectionEmployee::getEmployeeId)
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDepartmentName(), deparmentName))).map(DataCollectionEmployee::getEmployeeId)
.collect(Collectors.toList());

View File

@ -119,7 +119,7 @@ public class OtherDeductionImportCmd extends AbstractCommonCommand<Map<String, O
String userName = dto.getUsername();
String deparmentName = dto.getDepartmentName();
List<Long> employeeSameIds = employees.stream().filter(e -> (StringUtils.isBlank(userName) || Objects.equals(e.getUsername(), userName))
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDeparmentName(), deparmentName))).map(DataCollectionEmployee::getEmployeeId)
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDepartmentName(), deparmentName))).map(DataCollectionEmployee::getEmployeeId)
.collect(Collectors.toList());

View File

@ -5,6 +5,8 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @Description: 员工基本信息
* @Author: wangxiangzhong
@ -24,5 +26,18 @@ public class DataCollectionEmployee {
private String username;
// //部门")
private String deparmentName;
private String departmentName;
//岗位
private String jobtitleName;
//入职日期
private Date companystartdate;
//手机号
private String mobile;
//离职日期
private Date dissmissdate;
}

View File

@ -0,0 +1,82 @@
package com.engine.salary.entity.siarchives.bo;
import com.engine.salary.entity.siarchives.dto.InsuranceArchivesFundSchemeDTO;
import com.engine.salary.entity.siarchives.dto.InsuranceArchivesOtherSchemeDTO;
import com.engine.salary.entity.siarchives.dto.InsuranceArchivesSocialSchemeDTO;
import com.engine.salary.entity.siarchives.po.InsuranceArchivesFundSchemePO;
import com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO;
import com.engine.salary.entity.siarchives.po.InsuranceArchivesSocialSchemePO;
import com.engine.salary.enums.sicategory.UndertakerEnum;
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
import com.engine.salary.util.SalaryEnumUtil;
import java.util.Objects;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/3/15
* @Version V1.0
**/
public class InsuranceArchivesBO {
public static InsuranceArchivesSocialSchemeDTO convertSocialPOtoDTO(InsuranceArchivesSocialSchemePO po, Long employeeId) {
if (Objects.isNull(po)) {
return InsuranceArchivesSocialSchemeDTO.builder().build();
}
return InsuranceArchivesSocialSchemeDTO.builder()
.socialName(po.getSocialSchemeId() == null ? null : String.valueOf(po.getSocialSchemeId()))
.welfareType(SalaryEnumUtil.enumMatchByValue(po.getWelfareType(), WelfareTypeEnum.values(), WelfareTypeEnum.class))
.id(po.getId())
.employeeId(po.getEmployeeId())
.nonPayment(po.getNonPayment())
.paymentOrganization(po.getPaymentOrganization())
.socialEndTime(po.getSocialEndTime())
.socialStartTime(po.getSocialStartTime())
.schemeAccount(po.getSocialAccount())
.schemePaymentBaseString(po.getSocialPaymentBaseString())
.underTake(SalaryEnumUtil.enumMatchByValue(po.getUnderTake(), UndertakerEnum.values(), UndertakerEnum.class))
.build();
}
public static InsuranceArchivesFundSchemeDTO convertFundPOtoDTO(InsuranceArchivesFundSchemePO po, Long employeeId) {
if (Objects.isNull(po)) {
return InsuranceArchivesFundSchemeDTO.builder().build();
}
return InsuranceArchivesFundSchemeDTO.builder()
.id(po.getId())
.employeeId(po.getEmployeeId())
.fundAccount(po.getFundAccount())
.fundEndTime(po.getFundEndTime())
.fundSchemeId(po.getFundSchemeId())
.paymentOrganization(po.getPaymentOrganization())
.fundPaymentBaseString(po.getFundPaymentBaseString())
.fundStartTime(po.getFundStartTime())
.supplementFundAccount(po.getSupplementFundAccount())
.nonPayment(po.getNonPayment())
.underTake(SalaryEnumUtil.enumMatchByValue(po.getUnderTake(), UndertakerEnum.values(), UndertakerEnum.class))
.welfareType(SalaryEnumUtil.enumMatchByValue(po.getWelfareType(), WelfareTypeEnum.values(), WelfareTypeEnum.class))
.build();
}
public static InsuranceArchivesOtherSchemeDTO convertOtherPOtoDTO(InsuranceArchivesOtherSchemePO po, Long employeeId) {
if (Objects.isNull(po)) {
return InsuranceArchivesOtherSchemeDTO.builder().build();
}
return InsuranceArchivesOtherSchemeDTO.builder()
.id(po.getId())
.employeeId(po.getEmployeeId())
.underTake(SalaryEnumUtil.enumMatchByValue(po.getUnderTake(), UndertakerEnum.values(), UndertakerEnum.class))
.nonPayment(po.getNonPayment())
.otherName(po.getOtherSchemeId() == null ? null : String.valueOf(po.getOtherSchemeId()))
.otherSchemeId(po.getOtherSchemeId())
.otherPaymentBaseString(po.getOtherPaymentBaseString())
.otherStartTime(po.getOtherStartTime())
.otherEndTime(po.getOtherEndTime())
.paymentOrganization(po.getPaymentOrganization())
.welfareType(SalaryEnumUtil.enumMatchByValue(po.getWelfareType(), WelfareTypeEnum.values(), WelfareTypeEnum.class))
.build();
}
}

View File

@ -0,0 +1,49 @@
package com.engine.salary.entity.siarchives.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author weaver_cl
* @Description: TODO 员工档案基础信息
* @Date 2022/3/15
* @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InsuranceArchivesBaseDTO {
/**
* 姓名
*/
private String username;
/**
* 部门
*/
private String department;
/**
* 岗位
*/
private String position;
/**
* 入职时间
*/
private String hiredate;
/**
* 手机号
*/
private String telephone;
/**
* 离职时间
*/
private String dimissionDate;
}

View File

@ -0,0 +1,69 @@
package com.engine.salary.entity.siarchives.dto;
import com.engine.salary.enums.sicategory.UndertakerEnum;
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author weaver_cl
* @Description: TODO 员工福利档案公积金
* @Date 2022/3/15
* @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InsuranceArchivesFundSchemeDTO {
//主键id
private Long id;
//员工id
private Long employeeId;
//暂不缴纳
private Integer nonPayment;
//福利类型
private WelfareTypeEnum welfareType;
//公积金起始缴纳月
private String fundStartTime;
//公积金最后缴纳月
private String fundEndTime;
//公积金方案名称
private Long fundName;
//公积金方案id
private Long fundSchemeId;
//private List<WeaSearchConditionOption> siFundList;
//公积金账号
private String fundAccount;
//补充公积金账号
private String supplementFundAccount;
//公积金缴纳组织
private Long paymentOrganization;
//private List<WeaSearchConditionOption> paymentOrganizationList;
// 公积金个人实际承担方
private UndertakerEnum underTake;
//缴纳基数
private String fundPaymentBaseString;
}

View File

@ -0,0 +1,61 @@
package com.engine.salary.entity.siarchives.dto;
import com.engine.salary.enums.sicategory.UndertakerEnum;
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author weaver_cl
* @Description: TODO 员工福利档案其他福利
* @Date 2022/3/15
* @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InsuranceArchivesOtherSchemeDTO {
//主键id
private Long id;
//员工id
private Long employeeId;
//暂不缴纳
private Integer nonPayment;
//福利类型
private WelfareTypeEnum welfareType;
//其他福利起始缴纳月
private String otherStartTime;
//其他福利最后缴纳月
private String otherEndTime;
//其他福利方案名称
private String otherName;
//其他福利方案id
private Long otherSchemeId;
//private List<WeaSearchConditionOption> siOtherList;
//其他福利缴纳组织
private Long paymentOrganization;
//private List<WeaSearchConditionOption> paymentOrganizationList;
//其他福利个人实际承担方
private UndertakerEnum underTake;
private String otherPaymentBaseString;
//private WeaForm otherPaymentBase;
}

View File

@ -0,0 +1,63 @@
package com.engine.salary.entity.siarchives.dto;
import com.engine.salary.enums.sicategory.UndertakerEnum;
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author weaver_cl
* @Description: TODO 员工福利档案社保
* @Date 2022/3/15
* @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InsuranceArchivesSocialSchemeDTO {
//主键id
private Long id;
//员工id
private Long employeeId;
//暂不缴纳
private Integer nonPayment;
//福利类型
private WelfareTypeEnum welfareType;
//社保起始缴纳月
private String socialStartTime;
//社保最后缴纳月
private String socialEndTime;
//社保方案名称
private String socialName;
//社保方案id
private String socialSchemeId;
//private List<WeaSearchConditionOption> siSocialList;
//社保账号
private String schemeAccount;
//社保缴纳组织
private Long paymentOrganization;
//private List<WeaSearchConditionOption> paymentOrganizationList;
//社保个人实际承担方
private UndertakerEnum underTake;
//社保缴纳基数
private String schemePaymentBaseString;
}

View File

@ -0,0 +1,20 @@
package com.engine.salary.mapper.archives;
import com.engine.salary.entity.siarchives.po.InsuranceArchivesFundSchemePO;
import org.apache.ibatis.annotations.Param;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/3/15
* @Version V1.0
**/
public interface FundSchemeMapper {
/**
* 根据员工id获取
* @param employeeId
* @return
*/
InsuranceArchivesFundSchemePO getFundByEmployeeId(@Param("employeeId")Long employeeId);
}

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.engine.salary.mapper.archives.FundSchemeMapper">
<resultMap id="BaseResultMap" type="com.engine.salary.entity.siarchives.po.InsuranceArchivesFundSchemePO">
<result column="id" property="id"/>
<result column="employee_id" property="employeeId"/>
<result column="non_payment" property="nonPayment"/>
<result column="welfare_type" property="welfareType"/>
<result column="fund_start_time" property="fundStartTime"/>
<result column="fund_end_time" property="fundEndTime"/>
<result column="fund_scheme_id" property="fundSchemeId"/>
<result column="fund_account" property="fundAccount"/>
<result column="supplement_fund_account" property="supplementFundAccount"/>
<result column="payment_organization" property="paymentOrganization"/>
<result column="under_take" property="underTake"/>
<result column="fund_payment_base_string" property="fundPaymentBaseString"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/>
<result column="tenant_key" property="tenantKey"/>
</resultMap>
<!-- 表字段 -->
<sql id="baseColumns">
t.id
, t.employee_id
, t.non_payment
, t.welfare_type
, t.fund_start_time
, t.fund_end_time
, t.fund_scheme_id
, t.fund_account
, t.supplement_fund_account
, t.payment_organization
, t.under_take
, t.fund_payment_base_string
, t.create_time
, t.update_time
, t.creator
, t.delete_type
, t.tenant_key
</sql>
<!-- 根据人员获取单条记录 -->
<select id="getFundByEmployeeId" resultMap="BaseResultMap" >
SELECT
<include refid="baseColumns"/>
FROM hrsa_fund_archives t
WHERE employee_id = #{employeeId} AND delete_type = 0
</select>
</mapper>

View File

@ -0,0 +1,20 @@
package com.engine.salary.mapper.archives;
import com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO;
import org.apache.ibatis.annotations.Param;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/3/15
* @Version V1.0
**/
public interface OtherSchemeMapper {
/**
* 根据员工id获取
* @param employeeId
* @return
*/
InsuranceArchivesOtherSchemePO getOtherByEmployeeId(@Param("employeeId")Long employeeId);
}

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.engine.salary.mapper.archives.OtherSchemeMapper">
<resultMap id="BaseResultMap" type="com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO">
<result column="id" property="id"/>
<result column="employee_id" property="employeeId"/>
<result column="non_payment" property="nonPayment"/>
<result column="welfare_type" property="welfareType"/>
<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"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/>
<result column="tenant_key" property="tenantKey"/>
</resultMap>
<!-- 表字段 -->
<sql id="baseColumns">
t.id
, t.employee_id
, t.non_payment
, t.welfare_type
, 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
, t.create_time
, t.update_time
, t.creator
, t.delete_type
, t.tenant_key
</sql>
<!-- 根据人员获取单条记录 -->
<select id="getOtherByEmployeeId" resultMap="BaseResultMap" >
SELECT
<include refid="baseColumns"/>
FROM hrsa_other_archives t
WHERE employee_id = #{employeeId} AND delete_type = 0
</select>
</mapper>

View File

@ -0,0 +1,20 @@
package com.engine.salary.mapper.archives;
import com.engine.salary.entity.siarchives.po.InsuranceArchivesSocialSchemePO;
import org.apache.ibatis.annotations.Param;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/3/15
* @Version V1.0
**/
public interface SocialSchemeMapper {
/**
* 根据员工id获取
* @param employeeId
* @return
*/
InsuranceArchivesSocialSchemePO getSocialByEmployeeId(@Param("employeeId")Long employeeId);
}

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.engine.salary.mapper.archives.SocialSchemeMapper">
<resultMap id="BaseResultMap" type="com.engine.salary.entity.siarchives.po.InsuranceArchivesSocialSchemePO">
<result column="id" property="id"/>
<result column="employee_id" property="employeeId"/>
<result column="non_payment" property="nonPayment"/>
<result column="welfare_type" property="welfareType"/>
<result column="social_start_time" property="socialStartTime"/>
<result column="social_end_time" property="socialEndTime"/>
<result column="social_scheme_id" property="socialSchemeId"/>
<result column="social_account" property="socialAccount"/>
<result column="payment_organization" property="paymentOrganization"/>
<result column="under_take" property="underTake"/>
<result column="social_payment_base_string" property="socialPaymentBaseString"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/>
<result column="tenant_key" property="tenantKey"/>
</resultMap>
<!-- 表字段 -->
<sql id="baseColumns">
t.id
, t.employee_id
, t.non_payment
, t.welfare_type
, t.social_start_time
, t.social_end_time
, t.social_scheme_id
, t.social_account
, t.payment_organization
, t.under_take
, t.social_payment_base_string
, t.create_time
, t.update_time
, t.creator
, t.delete_type
, t.tenant_key
</sql>
<!-- 根据人员获取单条记录 -->
<select id="getSocialByEmployeeId" resultMap="BaseResultMap" >
SELECT
<include refid="baseColumns"/>
FROM hrsa_social_archives t
WHERE employee_id = #{employeeId} AND delete_type = 0
</select>
</mapper>

View File

@ -15,4 +15,7 @@ public interface EmployMapper {
List<DataCollectionEmployee> listEmployee();
List<DataCollectionEmployee> getEmployeeByIds(@Param("collection") List<Long> ids);
List<DataCollectionEmployee> getEmployeeByIdsAll(@Param("collection") List<Long> ids);
}

View File

@ -13,7 +13,7 @@
<select id="getEmployeeByIds" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
select e.ID as employeeId,
e.LASTNAME as username
e.LASTNAME as username,
from hrmresource e
where e.status not in (7)
<if test="collection != null and collection.size()>0">
@ -25,4 +25,26 @@
</select>
<select id="getEmployeeByIdsAll" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
select e.id as employeeId,
e.lastname as username,
d.departmentname as departmentName,
c.jobtitlename as jobtitleName,
e.companystartdate as companystartdate,
e.mobile as mobile,
b.dismissdate as dismissdate
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
left join hrmjobtitles c on e.jobtitle = c.id
left join bill_hrmdismiss b on e.id = b.resource_n
where 1 = 1
<if test="collection != null and collection.size()>0">
AND e.id IN
<foreach collection="collection" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
</select>
</mapper>

View File

@ -1,7 +1,6 @@
package com.engine.salary.mapper.sicategory;
import com.engine.salary.entity.sicategory.po.ICategoryPO;
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -23,6 +22,14 @@ public interface ICategoryMapper {
*/
ICategoryPO getById(Long id);
/**
* 查询所有
* @return
*/
List<ICategoryPO> listAll();
/**
* 根据福利名称获取
* @param insuranceName

View File

@ -1,8 +1,6 @@
package com.engine.salary.mapper.sischeme;
import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO;
import com.engine.salary.entity.sischeme.po.InsuranceSchemePO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -43,5 +41,11 @@ public interface InsuranceSchemeMapper {
*/
List<InsuranceSchemePO> listByName(String schemeName);
/**
* 查询所有
* @return
*/
List<InsuranceSchemePO> listAll();
}

View File

@ -50,6 +50,14 @@
ORDER BY id DESC
</select>
<select id="listAll" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM hrsa_social_security_scheme t
WHERE delete_type = 0
ORDER BY id DESC
</select>
<!-- 插入全部字段 -->
<insert id="insert" parameterType="com.engine.salary.entity.sischeme.po.InsuranceSchemePO"

View File

@ -1,9 +1,14 @@
package com.engine.salary.service.impl;
import com.engine.core.impl.Service;
import com.engine.salary.biz.SIArchivesBiz;
import com.engine.salary.cmd.archives.SIArchivesTipsCmd;
import com.engine.salary.entity.siarchives.dto.InsuranceArchivesBaseDTO;
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
import com.engine.salary.service.SIArchivesService;
import weaver.general.Util;
import java.util.HashMap;
import java.util.Map;
/**
@ -21,6 +26,14 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
@Override
public Map<String, Object> getBaseForm(Map<String, Object> params) {
return null;
Map<String, Object> apidatas = new HashMap<>(16);
SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
WelfareTypeEnum welfareTypeEnum = (WelfareTypeEnum)params.get("welfareTypeEnum");
Long employeeId = Long.valueOf(Util.null2String(params.get("employeeId")));
apidatas = siArchivesBiz.getBaseForm(welfareTypeEnum, employeeId,(long) user.getUID());
if (welfareTypeEnum != null) {
}
return apidatas;
}
}

View File

@ -54,13 +54,9 @@ public class SIArchivesController {
@QueryParam(value = "employeeId") Long employeeId) {
User user = HrmUserVarify.getUser(request, response);
Map<String, Object> map = ParamUtil.request2Map(request);
if (Objects.nonNull(welfareTypeEnum)){
InsuranceSchemeDTO insuranceSchemeDTO = InsuranceSchemeDTO.builder().welfareType(welfareTypeEnum).build();
Integer welfareType = insuranceSchemeDTO.getWelfareType().getValue();
map.put("welfareType",welfareType);
}
map.put("welfareTypeEnum",welfareTypeEnum);
map.put("employeeId",employeeId);
return ResponseResult.run(getService(user)::getBaseForm, ParamUtil.request2Map(request));
return ResponseResult.run(getService(user)::getBaseForm, map);
}