Commit fc43c213 authored by hongguangwu's avatar hongguangwu

30号版本:档案合同、商险、薪资状态;缴费库反馈列;合同提交的直接审核优化等

parent aaae2b0b
...@@ -279,7 +279,7 @@ public class TEmployeeInfo extends BaseEntity { ...@@ -279,7 +279,7 @@ public class TEmployeeInfo extends BaseEntity {
private Integer projectNum; private Integer projectNum;
/** /**
* 员工合同状态(字典) * 员工合同状态(字典:0初始1在用2不在用
*/ */
@Schema(description = "员工合同状态(字典)0初始状态 personnel_state") @Schema(description = "员工合同状态(字典)0初始状态 personnel_state")
@ExcelAttribute(name = "员工合同状态", isDataId = true, dataType = ExcelAttributeConstants.PERSONNEL_STATE) @ExcelAttribute(name = "员工合同状态", isDataId = true, dataType = ExcelAttributeConstants.PERSONNEL_STATE)
...@@ -287,6 +287,7 @@ public class TEmployeeInfo extends BaseEntity { ...@@ -287,6 +287,7 @@ public class TEmployeeInfo extends BaseEntity {
/** /**
* 商险状态(字典) * 商险状态(字典)
* 商险状态(字典0无2正常3失效4处理中)commercial_satte
*/ */
@Schema(description = "商险状态(字典)0初始状态") @Schema(description = "商险状态(字典)0初始状态")
private Integer insuranceStatus; private Integer insuranceStatus;
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
/**
* @Author hgw
* @Date 2022-11-23 15:38:13
* @Version 1.0
*/
@Data
public class EmpIdCardAndDeptVo {
// 身份证
private String idCard;
// 项目id
private String deptId;
// 项目编码:薪资使用的,只有编码
private String deptNo;
// 状态
private String status;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
import java.util.List;
/**
* @Author hgw
* @Date 2022-11-23 15:38:13
* @Version 1.0
*/
@Data
public class EmpStatusVo {
// 身份证、项目id
private List<EmpIdCardAndDeptVo> empInfo;
}
...@@ -65,4 +65,12 @@ public class EmployeeConstants { ...@@ -65,4 +65,12 @@ public class EmployeeConstants {
**/ **/
public static final String DATA_UPDATE_FAIL = "数据更新失败!"; public static final String DATA_UPDATE_FAIL = "数据更新失败!";
/**
* @Description: 如果派单减少完成,则自动审核合同通过
* @Author: hgw
* @Date: 2022/11/25 16:42
* @return:
**/
public static final String CONTRACT_NAME[] = {"标准合同","劳动派遣合同","其他"};
} }
...@@ -385,4 +385,55 @@ public class TEmployeeInfoController { ...@@ -385,4 +385,55 @@ public class TEmployeeInfoController {
public Boolean checkMobile(@RequestBody String mobile) { public Boolean checkMobile(@RequestBody String mobile) {
return tEmployeeInfoService.checkMobile(mobile); return tEmployeeInfoService.checkMobile(mobile);
} }
/**
* @Description: 更新人员档案的商险状态
* @Author: hgw
* @Date: 2022-11-23 17:17:59
**/
@Operation(summary = "更新人员档案的商险状态", description = "更新人员档案的商险状态")
@Inner
@PostMapping("/inner/updateEmployeeInfoInsuranceStatus")
public Boolean updateEmployeeInsuranceStatus(@RequestBody EmpStatusVo vo) {
return tEmployeeInfoService.updateEmployeeInfoInsuranceStatus(vo);
}
/**
* @Description: 更新人员档案的薪资状态
* @Author: hgw
* @Date: 2022-11-23 17:17:59
**/
@Operation(summary = "更新人员档案的薪资状态", description = "更新人员档案的薪资状态")
@Inner
@PostMapping("/inner/updateEmployeeInfoSalaryStatus")
public Boolean updateEmployeeInfoSalaryStatus(@RequestBody EmpStatusVo vo) {
return tEmployeeInfoService.updateEmployeeInfoSalaryStatus(vo);
}
/**
* @Description: 每月1号更新人员档案、项目档案的薪资状态为2否
* @Author: hgw
* @Date: 2022/11/24 15:00
* @return: void
**/
@Operation(summary = "每月1号更新人员档案、项目档案的薪资状态为2否", description = "每月1号更新人员档案、项目档案的薪资状态为2否")
@Inner
@PostMapping("/inner/everyMonthUpdateSalaryStatus")
public void everyMonthUpdateSalaryStatus() {
tEmployeeInfoService.everyMonthUpdateSalaryStatus();
}
/**
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/24 15:00
* @return: void
**/
@Operation(summary = "每天更新人员档案、项目档案的过期合同为2不在用", description = "每天更新人员档案、项目档案的过期合同为2不在用")
@Inner
@PostMapping("/inner/everyDayUpdateEmployeeContractStatus")
public void everyDayUpdateEmployeeContractStatus() {
tEmployeeInfoService.everyDayUpdateEmployeeContractStatus();
}
} }
...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...@@ -314,4 +315,28 @@ public class TEmployeeProjectController { ...@@ -314,4 +315,28 @@ public class TEmployeeProjectController {
public Boolean updateProjectSocialFund(@RequestBody UpProjectSocialFundVo vo) { public Boolean updateProjectSocialFund(@RequestBody UpProjectSocialFundVo vo) {
return tEmployeeProjectService.updateProjectSocialFund(vo); return tEmployeeProjectService.updateProjectSocialFund(vo);
} }
/**
* @Description: 更新人员档案、项目档案的商险状态
* @Author: hgw
* @Date: 2022-11-23 17:17:59
**/
@Operation(summary = "更新人员档案、项目档案的商险状态", description = "更新人员档案、项目档案的商险状态")
@Inner
@PostMapping("/inner/updateEmployeeInsuranceStatus")
public Boolean updateEmployeeInsuranceStatus(@RequestBody EmpStatusVo vo) {
return tEmployeeProjectService.updateEmployeeInsuranceStatus(vo);
}
/**
* @Description: 更新人员档案、项目档案的商险状态
* @Author: hgw
* @Date: 2022-11-23 17:17:59
**/
@Operation(summary = "更新人员档案、项目档案的薪资状态", description = "更新人员档案、项目档案的薪资状态")
@Inner
@PostMapping("/inner/updateEmployeeSalaryStatus")
public Boolean updateEmployeeSalaryStatus(@RequestBody EmpStatusVo vo) {
return tEmployeeProjectService.updateEmployeeSalaryStatus(vo);
}
} }
...@@ -87,4 +87,38 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> { ...@@ -87,4 +87,38 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
int noPageCountLeaveDiy(@Param("tEmployeeInfo")EmployeeInfoSearchVo searchV); int noPageCountLeaveDiy(@Param("tEmployeeInfo")EmployeeInfoSearchVo searchV);
int updateSocialInfoById(@Param("tEmployeeInfo")TEmployeeInfo employee); int updateSocialInfoById(@Param("tEmployeeInfo")TEmployeeInfo employee);
/**
* @Description: 更新档案商险状态
* @Author: hgw
* @Date: 2022/11/23 17:38
* @return: int
**/
int updateEmployeeInfoInsuranceStatus(@Param("emp") EmpIdCardAndDeptVo emp);
/**
* @Description: 更新档案薪资状态
* @Author: hgw
* @Date: 2022/11/24 11:29
* @return: int
**/
int updateEmployeeInfoSalaryStatus(@Param("emp") EmpIdCardAndDeptVo emp);
/**
* @Description: 每月1号更新档案薪资状态为否薪资
* @Author: hgw
* @Date: 2022/11/24 14:51
* @return: int
**/
int everyMonthUpdateEmployeeInfoSalaryStatus();
/**
* @param
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/25 14:17
* @return: int
**/
int everyDayUpdateEmployeeInfoContractStatus();
} }
...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpIdCardAndDeptVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
...@@ -65,4 +66,37 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> { ...@@ -65,4 +66,37 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
List<EmployeeProjectExportVO> noPageDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo); List<EmployeeProjectExportVO> noPageDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo);
int noPageCountDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo); int noPageCountDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo);
/**
* @Description: 更新项目档案商险状态
* @Author: hgw
* @Date: 2022/11/23 17:43
* @return: int
**/
int updateEmployeeInsuranceStatus(@Param("emp") EmpIdCardAndDeptVo emp);
/**
* @Description: 更新项目档案薪资状态
* @Author: hgw
* @Date: 2022/11/24 11:28
* @return: int
**/
int updateEmployeeSalaryStatus(@Param("emp") EmpIdCardAndDeptVo emp);
/**
* @Description: 每月1号更新档案薪资状态为无薪资
* @Author: hgw
* @Date: 2022/11/24 14:51
* @return: int
**/
int everyMonthUpdateEmployeeSalaryStatus();
/**
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/25 14:19
* @return: int
**/
int everyDayUpdateEmployeContractStatus();
} }
...@@ -186,4 +186,37 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> { ...@@ -186,4 +186,37 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
Boolean updateEmpInfo(UpdateEmpVo vo); Boolean updateEmpInfo(UpdateEmpVo vo);
Boolean checkMobile(String mobile); Boolean checkMobile(String mobile);
/**
* @Description: 更新人员档案的商险状态
* @Author: hgw
* @Date: 2022/11/23 17:20
* @return: java.lang.Boolean
**/
Boolean updateEmployeeInfoInsuranceStatus(EmpStatusVo vo);
/**
* @Description: 更新人员档案的薪资状态
* @Author: hgw
* @Date: 2022/11/24 11:35
* @return: java.lang.Boolean
**/
Boolean updateEmployeeInfoSalaryStatus(EmpStatusVo vo);
/**
* @Description: 每月1号更新人员档案、项目档案的薪资状态
* @Author: hgw
* @Date: 2022/11/24 14:57
* @return: void
**/
void everyMonthUpdateSalaryStatus();
/**
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/24 14:57
* @return: void
**/
void everyDayUpdateEmployeeContractStatus();
} }
...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
...@@ -189,4 +190,38 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> { ...@@ -189,4 +190,38 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
String getEmpNo(String deptNo); String getEmpNo(String deptNo);
Boolean updateProjectSocialFund(UpProjectSocialFundVo vo); Boolean updateProjectSocialFund(UpProjectSocialFundVo vo);
/**
* @param vo
* @Description: 更新人员档案、项目档案的商险状态
* @Author: hgw
* @Date: 2022/11/23 17:20
* @return: java.lang.Boolean
**/
Boolean updateEmployeeInsuranceStatus(EmpStatusVo vo);
/**
* @param vo
* @Description: 更新人员档案、项目档案的薪资状态
* @Author: hgw
* @Date: 2022/11/24 11:25
* @return: java.lang.Boolean
**/
Boolean updateEmployeeSalaryStatus(EmpStatusVo vo);
/**
* @Description: 每月1号定时更新项目档案薪资状态为否
* @Author: hgw
* @Date: 2022/11/24 14:55
* @return: void
**/
void everyMonthUpdateEmployeeSalaryStatus();
/**
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/24 14:55
* @return: void
**/
void everyDayUpdateEmployeContractStatus();
} }
...@@ -29,6 +29,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -29,6 +29,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.check.vo.CheckBankNoVo;
import com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants; import com.yifu.cloud.plus.v1.yifu.archives.constants.ArchivesConstants;
import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeConstants; import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeConstants;
import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeContractConstants; import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeContractConstants;
...@@ -40,11 +41,18 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*; ...@@ -40,11 +41,18 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.cache.support.SimpleValueWrapper; import org.springframework.cache.support.SimpleValueWrapper;
...@@ -72,6 +80,7 @@ import java.util.List; ...@@ -72,6 +80,7 @@ import java.util.List;
@Log4j2 @Log4j2
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
@EnableConfigurationProperties({DaprSocialProperties.class})
public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContractInfoMapper, TEmployeeContractInfo> implements TEmployeeContractInfoService { public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContractInfoMapper, TEmployeeContractInfo> implements TEmployeeContractInfoService {
private static final String ID_NOT_EMPTY = "ID,EMP_ID不可为空"; private static final String ID_NOT_EMPTY = "ID,EMP_ID不可为空";
...@@ -85,7 +94,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -85,7 +94,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
private final TAttaInfoService tAttaInfoService; private final TAttaInfoService tAttaInfoService;
private final TEmployeeContractAuditService tEmployeeContractAuditService; private final TEmployeeContractAuditService tEmployeeContractAuditService;
private final TEmployeeLogService tEmployeeLogService; private final TEmployeeLogService tEmployeeLogService;
@Autowired
private DaprSocialProperties socialProperties;
// 缓存信息 // 缓存信息
private final CacheManager cacheManager; private final CacheManager cacheManager;
...@@ -315,6 +325,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -315,6 +325,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
//初始化审核类型 审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止 //初始化审核类型 审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止
initType(tEmployeeContractInfo); initType(tEmployeeContractInfo);
// 标准合同、劳动派遣合同、其他。————社保公积金都派减,自动审核通过
this.judgeAuditStatus(tEmployeeContractInfo);
if (Common.isEmpty(tEmployeeContractInfo.getId())) { if (Common.isEmpty(tEmployeeContractInfo.getId())) {
// 针对编码再做一次重复性校验 // 针对编码再做一次重复性校验
String isCur = baseMapper.getContractByApplyNo(tEmployeeContractInfo.getApplyNo()); String isCur = baseMapper.getContractByApplyNo(tEmployeeContractInfo.getApplyNo());
...@@ -947,6 +960,30 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -947,6 +960,30 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} }
} }
/**
* @Description: 标准合同、劳动派遣合同、其他。————社保公积金都派减,自动审核通过,
* 判断同项目的社保公积金都已派减,则无需审核
* @Author: hgw
* @Date: 2022/11/28 10:05
* @return: void
**/
private void judgeAuditStatus(TEmployeeContractInfo insert) {
if (insert.getAuditStatus() != CommonConstants.TWO_INT
&& (EmployeeConstants.CONTRACT_NAME[0].equals(insert.getContractName())
|| EmployeeConstants.CONTRACT_NAME[1].equals(insert.getContractName())
|| EmployeeConstants.CONTRACT_NAME[2].equals(insert.getContractName()))) {
//
TSocialFundInfo sf = new TSocialFundInfo();
sf.setEmpIdcard(insert.getEmpIdcard());
sf.setSettleDomainCode(insert.getDeptNo());
R<Integer> socialFundR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", sf, Integer.class, SecurityConstants.FROM_IN);
if (socialFundR != null && socialFundR.getData() != null && socialFundR.getData() > 0) {
insert.setAuditStatus(CommonConstants.TWO_INT);
}
}
}
/** /**
* 导出 * 导出
*/ */
......
...@@ -1150,4 +1150,32 @@ ...@@ -1150,4 +1150,32 @@
</trim> </trim>
WHERE a.id=#{tEmployeeInfo.id} WHERE a.id=#{tEmployeeInfo.id}
</update> </update>
<!-- 更新档案商险状态 -->
<update id="updateEmployeeInfoInsuranceStatus" >
update t_employee_info a set a.INSURANCE_STATUS = #{emp.status} where a.EMP_IDCARD = #{emp.idCard}
</update>
<!-- 更新档案薪资状态 -->
<update id="updateEmployeeInfoSalaryStatus" >
update t_employee_info a set a.SALARY_STATUS = #{emp.status} where a.EMP_IDCARD = #{emp.idCard}
</update>
<!-- 每月1号更新档案薪资状态为否薪资 -->
<update id="everyMonthUpdateEmployeeInfoSalaryStatus" >
update t_employee_info e set e.SALARY_STATUS = 2
where e.SALARY_STATUS = 1
and NOT EXISTS (
select 1 from view_salary_account_3month a where a.emp_idcard = e.EMP_IDCARD
)
</update>
<!-- 每天更新人员档案、项目档案的过期合同为2不在用 -->
<update id="everyDayUpdateEmployeeInfoContractStatus" >
update t_employee_info e
left join t_employee_contract_info c on e.EMP_IDCARD=c.EMP_IDCARD and c.IN_USE='0'
set e.CONTRACT_STATUS=2
where e.CONTRACT_STATUS != 2 and c.CONTRACT_END <![CDATA[ < ]]> DATE_FORMAT(curdate(),"%Y-%m-%d")
</update>
</mapper> </mapper>
...@@ -764,8 +764,7 @@ ...@@ -764,8 +764,7 @@
<select id="findEmployeeMaxOnlyNoByDepId" resultType="java.lang.String"> <select id="findEmployeeMaxOnlyNoByDepId" resultType="java.lang.String">
select MAX(EMP_NO) from t_employee_project where select MAX(EMP_NO) from t_employee_project where
id not like '%abc' and id not like '%abc' and
DEPT_NO = #{deptNo} EMP_NO like concat(#{deptNo},'%')
GROUP BY DEPT_NO
</select> </select>
<update id="updateEmpIdById" parameterType="java.util.List"> <update id="updateEmpIdById" parameterType="java.util.List">
...@@ -850,4 +849,32 @@ ...@@ -850,4 +849,32 @@
</if> </if>
</where> </where>
</select> </select>
<!-- 更新项目档案商险状态 -->
<update id="updateEmployeeInsuranceStatus" >
update t_employee_project a set a.INSURANCE_STATUS = #{emp.status} where a.EMP_IDCARD = #{emp.idCard} and a.DEPT_ID = #{emp.deptId}
</update>
<!-- 更新项目档案薪资状态 -->
<update id="updateEmployeeSalaryStatus" >
update t_employee_project a set a.SALARY_STATUS = #{emp.status} where a.EMP_IDCARD = #{emp.idCard} and a.DEPT_NO = #{emp.deptNo}
</update>
<!-- 每月1号更新项目档案薪资状态 -->
<update id="everyMonthUpdateEmployeeSalaryStatus" >
update t_employee_project e set e.SALARY_STATUS = 2
where e.SALARY_STATUS = 1
and NOT EXISTS (
select 1 from view_salary_account_3month a where a.emp_idcard = e.EMP_IDCARD and a.dept_id=e.DEPT_ID
)
</update>
<!-- 每天更新人员档案、项目档案的过期合同为2不在用 -->
<update id="everyDayUpdateEmployeContractStatus" >
update t_employee_project e
join t_employee_contract_info c on e.EMP_IDCARD=c.EMP_IDCARD and e.DEPT_NO=c.DEPT_NO and c.IN_USE='0'
set e.CONTRACT_STATUS=2
where e.CONTRACT_STATUS != 2 and c.CONTRACT_END <![CDATA[ < ]]> DATE_FORMAT(curdate(),"%Y-%m-%d")
</update>
</mapper> </mapper>
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.common.core.vo;
import lombok.Data;
import java.io.Serializable;
/**
* 封装更多信息-返回给前端的错误信息
*
* @author hgw
* @date 2022-11-24 16:41:21
*/
@Data
public class ErrorDetailVO implements Serializable {
private static final long serialVersionUID = 1L;
// 行号
private int lineNum;
// 员工姓名
private String empName;
// 身份证号
private String empIdCard;
// 社保户
private String socialHousehold;
// 公积金户
private String providentHousehold;
// 每一行的结果:0错误;1正确(例如:是否允许删除:0否;1是)
private int result = 0;
// 提示信息
private String message;
// 所有行的结果,当第一行的allTrue=1时,需要反馈文件,否则直接提示成功
private int allTrue = 0;
public ErrorDetailVO(Integer lineNum, String message) {
this.lineNum = lineNum;
this.result = 0;
this.message = message;
}
public ErrorDetailVO(Integer lineNum, int result, String empIdCard, String socialHousehold, String providentHousehold, String empName,String message) {
this.lineNum = lineNum;
this.result = result;
this.empIdCard = empIdCard;
this.socialHousehold = socialHousehold;
this.providentHousehold = providentHousehold;
this.empName = empName;
this.message = message;
}
}
...@@ -294,4 +294,38 @@ public class ArchivesDaprUtil { ...@@ -294,4 +294,38 @@ public class ArchivesDaprUtil {
} }
return res; return res;
} }
/**
* @Description: 更新人员档案与项目档案,状态一致。商险的status 0无2正常3失效4处理中
* @Author: hgw
* @Date: 2022/11/23 15:29
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public R<Boolean> updateEmployeeInsuranceStatus(EmpStatusVo empStatusVo){
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeproject/inner/updateEmployeeInsuranceStatus"
, JSON.toJSONString(empStatusVo) , Boolean.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("更新【人员档案、项目档案】的商险状态失败!");
}
return res;
}
/**
* @Description: 仅更新人员档案,项目档案另外更新。商险的status 0无2正常3失效4处理中
* @Author: hgw
* @Date: 2022-11-23 16:50:41
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public R<Boolean> updateEmployeeInfoInsuranceStatus(EmpStatusVo empStatusVo){
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeinfo/inner/updateEmployeeInfoInsuranceStatus"
, JSON.toJSONString(empStatusVo), Boolean.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("更新【人员档案】的商险状态失败!");
}
return res;
}
} }
...@@ -25,6 +25,12 @@ ...@@ -25,6 +25,12 @@
<version>1.0.0</version> <version>1.0.0</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-archives-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<!--选配: orm 模块--> <!--选配: orm 模块-->
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
......
...@@ -236,4 +236,14 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -236,4 +236,14 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
**/ **/
int ekpUpdateInsuranceDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept); int ekpUpdateInsuranceDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept);
/**
* @param idCardList
* @Description: 根据身份证列表,查找所有商险
* @Author: hgw
* @Date: 2022/11/23 15:17
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail>
**/
List<TInsuranceDetail> selectByIdCardList(@Param("idCardList") List<String> idCardList
, @Param("idList") List<String> idList);
} }
...@@ -1186,4 +1186,24 @@ ...@@ -1186,4 +1186,24 @@
</foreach> </foreach>
</update> </update>
<!--查询所有商险,如果idList 不为空,则不含被替换的本身。 用来改变档案状态-->
<select id="selectByIdCardList" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM
t_insurance_detail
where
DELETE_FLAG = 0 AND EMP_IDCARD_NO in
<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
#{item}
</foreach>
<if test="idList != null">
AND id not in
<foreach item="item" index="index" collection="idList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper> </mapper>
package com.yifu.cloud.plus.v1.job.compont;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* @Author hgw
* @Description 定时任务具体执行类
* @Date 2022-11-24 15:03:14
* @Param
* @return
**/
@Component(value = "archiveTask")
@Slf4j
@EnableConfigurationProperties(DaprArchivesProperties.class)
public class ArchiveTask {
@Autowired
private DaprArchivesProperties daprArchivesProperties;
/**
* @Author hgw
* @Description 每月1号清理人员档案、项目档案的薪资状态
* @Date 2022-11-24 15:06:37
* @Param
**/
public void everyMonthUpdateSalaryStatus() {
log.info("-------------每月1号清理人员档案、项目档案的薪资状态-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(), daprArchivesProperties.getAppId(),
"/temployeeinfo/inner/everyMonthUpdateSalaryStatus", "", Object.class,
SecurityConstants.FROM_IN);
log.info("-------------每月1号清理人员档案、项目档案的薪资状态-定时任务结束------------");
}
/**
* @Author hgw
* @Description 每天更新人员档案、项目档案的过期合同为2不在用
* @Date 2022-11-24 15:06:37
* @Param
**/
public void everyDayUpdateEmployeeContractStatus() {
log.info("-------------每天更新人员档案、项目档案的过期合同为2不在用-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(), daprArchivesProperties.getAppId(),
"/temployeeinfo/inner/everyDayUpdateEmployeeContractStatus", "", Object.class,
SecurityConstants.FROM_IN);
log.info("-------------每天更新人员档案、项目档案的过期合同为2不在用-定时任务结束------------");
}
}
\ No newline at end of file
...@@ -19,12 +19,15 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl; ...@@ -19,12 +19,15 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.alibaba.excel.EasyExcelFactory; import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpIdCardAndDeptVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
...@@ -537,12 +540,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -537,12 +540,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
Date sendTime = new Date(); Date sendTime = new Date();
String nowMonth = DateUtil.addMonth(0); String nowMonth = DateUtil.addMonth(0);
EkpSalaryParam salaryParam; EkpSalaryParam salaryParam;
EmpIdCardAndDeptVo empIdCardAndDeptVo;
List<EmpIdCardAndDeptVo> voList = new ArrayList<>();
for (EkpSalaryParamVo sendParam : ekpList) { for (EkpSalaryParamVo sendParam : ekpList) {
salaryParam = new EkpSalaryParam(); salaryParam = new EkpSalaryParam();
BeanUtils.copyProperties(sendParam, salaryParam); BeanUtils.copyProperties(sendParam, salaryParam);
// 转化报账表的参数 // 转化报账表的参数
account = new TSalaryAccount(); account = new TSalaryAccount();
account.setId(sendParam.getFd_3b10af838eab5c()); account.setId(sendParam.getFd_3b10af838eab5c());
// 社保 // 社保
if ((Common.isNotNull(sendParam.getUnitSocial()) if ((Common.isNotNull(sendParam.getUnitSocial())
&& !CommonConstants.ZERO_STRING.equals(sendParam.getUnitSocial())) && !CommonConstants.ZERO_STRING.equals(sendParam.getUnitSocial()))
...@@ -568,6 +574,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -568,6 +574,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
account.setSendStatus(CommonConstants.ONE_STRING); account.setSendStatus(CommonConstants.ONE_STRING);
account.setSendMonth(nowMonth); account.setSendMonth(nowMonth);
account.setEkpId(sendBack); account.setEkpId(sendBack);
empIdCardAndDeptVo = new EmpIdCardAndDeptVo();
empIdCardAndDeptVo.setIdCard(sendParam.getFd_3adfedfb8f76d4());
empIdCardAndDeptVo.setDeptNo(sendParam.getFd_3adfedf98ccba2());
empIdCardAndDeptVo.setStatus(CommonConstants.ONE_STRING);
voList.add(empIdCardAndDeptVo);
} else { } else {
sendStatus = false; sendStatus = false;
TSendEkpError error = new TSendEkpError(); TSendEkpError error = new TSendEkpError();
...@@ -584,6 +595,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -584,6 +595,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
accountList.add(account); accountList.add(account);
} }
salaryAccountService.updateBatchById(accountList); salaryAccountService.updateBatchById(accountList);
if (!voList.isEmpty()) {
// 改变档案状态
EmpStatusVo empStatusVo = new EmpStatusVo();
empStatusVo.setEmpInfo(voList);
HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
,"/temployeeproject/inner/updateEmployeeSalaryStatus"
, JSON.toJSONString(empStatusVo) , Boolean.class, SecurityConstants.FROM_IN);
}
if (sendStatus) { if (sendStatus) {
EkpSalaryStandardParam standardParam = new EkpSalaryStandardParam(); EkpSalaryStandardParam standardParam = new EkpSalaryStandardParam();
standardParam.setFd_3b3bf2c3b1a6cc(s.getDeptName()); standardParam.setFd_3b3bf2c3b1a6cc(s.getDeptName());
...@@ -595,12 +615,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -595,12 +615,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
standardParam.setFd_3b3d3ec85bfeb0(s.getSalaryMonth().substring(0,4) standardParam.setFd_3b3d3ec85bfeb0(s.getSalaryMonth().substring(0,4)
+ CommonConstants.CENTER_SPLIT_LINE_STRING + s.getSalaryMonth().substring(4,6)); + CommonConstants.CENTER_SPLIT_LINE_STRING + s.getSalaryMonth().substring(4,6));
// 推送主表信息 // 推送主表信息
String loginName; String loginName = user.getUsername();
if (user != null) {
loginName = user.getUsername();
} else {
loginName = s.getCreateName();
}
sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, standardParam); sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, standardParam);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) { if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, standardParam); sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, standardParam);
...@@ -644,6 +659,31 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -644,6 +659,31 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
} }
} }
/**
* @param isDept true :含项目,要分割字符串; false:不含项目,直接用身份证,仅更新人员档案
* @Description: 提取方法,塞值
* @Author: hgw
* @Date: 2022/11/23 16:48
* @return: com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo
**/
private EmpStatusVo getEmpStatusVo(Map<String, Integer> empStatusMap, boolean isDept) {
EmpStatusVo empStatusVo = new EmpStatusVo();
EmpIdCardAndDeptVo empIdCardAndDeptVo = new EmpIdCardAndDeptVo();
List<EmpIdCardAndDeptVo> voList = new ArrayList<>();
for (Map.Entry<String, Integer> entry : empStatusMap.entrySet()) {
if (isDept) {
empIdCardAndDeptVo.setIdCard(entry.getKey().split(CommonConstants.DOWN_LINE_STRING)[0]);
empIdCardAndDeptVo.setDeptId(entry.getKey().split(CommonConstants.DOWN_LINE_STRING)[1]);
} else {
empIdCardAndDeptVo.setIdCard(entry.getKey());
}
empIdCardAndDeptVo.setStatus(String.valueOf(entry.getValue()));
voList.add(empIdCardAndDeptVo);
}
empStatusVo.setEmpInfo(voList);
return empStatusVo;
}
/** /**
* @Description: 添加流程进展明细 * @Description: 添加流程进展明细
* @Author: hgw * @Author: hgw
......
...@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialSearchVo;
...@@ -146,7 +147,7 @@ public class TPaymentInfoController { ...@@ -146,7 +147,7 @@ public class TPaymentInfoController {
@SysLog("批量新增缴费库") @SysLog("批量新增缴费库")
@PostMapping("/importListAdd") @PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_batchImport')") @PreAuthorize("@pms.hasPermission('social_tpaymentinfo_batchImport')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file, @RequestParam String random) { public R<List<ErrorDetailVO>> importListAdd(@RequestBody MultipartFile file, @RequestParam String random) {
return tPaymentInfoService.importSocialDiy(file.getInputStream()); return tPaymentInfoService.importSocialDiy(file.getInputStream());
} }
...@@ -160,7 +161,7 @@ public class TPaymentInfoController { ...@@ -160,7 +161,7 @@ public class TPaymentInfoController {
@Operation(description = "导入省市社保-合肥三险") @Operation(description = "导入省市社保-合肥三险")
@SysLog("批量新增缴费库-合肥三险") @SysLog("批量新增缴费库-合肥三险")
@PostMapping("/importListSocialHeFei") @PostMapping("/importListSocialHeFei")
public R<List<ErrorMessage>> importListSocialHeFei(@RequestBody MultipartFile file, @RequestParam String random, public R<List<ErrorDetailVO>> importListSocialHeFei(@RequestBody MultipartFile file, @RequestParam String random,
@RequestParam(value = "type") String type) { @RequestParam(value = "type") String type) {
return tPaymentInfoService.importSocialHeFeiDiy(file.getInputStream(), random, type); return tPaymentInfoService.importSocialHeFeiDiy(file.getInputStream(), random, type);
} }
...@@ -176,7 +177,7 @@ public class TPaymentInfoController { ...@@ -176,7 +177,7 @@ public class TPaymentInfoController {
@SysLog("导入公积金") @SysLog("导入公积金")
@PostMapping("/batchImportPaymentFundInfo") @PostMapping("/batchImportPaymentFundInfo")
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_batchImport')") @PreAuthorize("@pms.hasPermission('social_tpaymentinfo_batchImport')")
public R<List<ErrorMessage>> importListFund(@RequestBody MultipartFile file) { public R<List<ErrorDetailVO>> importListFund(@RequestBody MultipartFile file) {
return tPaymentInfoService.batchImportPaymentFundInfo(file.getInputStream()); return tPaymentInfoService.batchImportPaymentFundInfo(file.getInputStream());
} }
......
...@@ -156,4 +156,16 @@ public class TSocialFundInfoController { ...@@ -156,4 +156,16 @@ public class TSocialFundInfoController {
tSocialFundInfoService.updateSocialAndFoundInfo(list); tSocialFundInfoService.updateSocialAndFoundInfo(list);
} }
/**
* @Description: 查找社保公积金,是否都派减或为空,允许直接审核通过合同——盛宇2022年11月28日09:18:38
* @Author: hgw
* @Date: 2022/11/28 9:18
* @return: void
**/
@Inner
@PostMapping("/inner/selectSocialFoundByContract")
public int selectSocialFoundByContract(@RequestBody TSocialFundInfo sf) {
return tSocialFundInfoService.selectSocialFoundByContract(sf);
}
} }
...@@ -67,4 +67,6 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> { ...@@ -67,4 +67,6 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> {
void updateSocialAndFoundInfoF(@Param("infoVo") UpdateSocialFoundVo infoVo); void updateSocialAndFoundInfoF(@Param("infoVo") UpdateSocialFoundVo infoVo);
int selectSocialFoundByContract(@Param("tSocialFundInfo") TSocialFundInfo tSocialFundInfo);
} }
...@@ -18,8 +18,8 @@ package com.yifu.cloud.plus.v1.yifu.social.service;/* ...@@ -18,8 +18,8 @@ package com.yifu.cloud.plus.v1.yifu.social.service;/*
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
...@@ -50,7 +50,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> { ...@@ -50,7 +50,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
* @param inputStream * @param inputStream
* @return * @return
*/ */
R<List<ErrorMessage>> importSocialDiy(InputStream inputStream); R<List<ErrorDetailVO>> importSocialDiy(InputStream inputStream);
/** /**
* 批量新增缴费库-合肥三险 * 批量新增缴费库-合肥三险
...@@ -59,14 +59,14 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> { ...@@ -59,14 +59,14 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
* @param type * @param type
* @return * @return
*/ */
R<List<ErrorMessage>> importSocialHeFeiDiy(InputStream inputStream, String random, String type); R<List<ErrorDetailVO>> importSocialHeFeiDiy(InputStream inputStream, String random, String type);
/** /**
* 批量导入公积金 * 批量导入公积金
* @param inputStream * @param inputStream
* @return * @return
*/ */
R<List<ErrorMessage>> batchImportPaymentFundInfo(InputStream inputStream); R<List<ErrorDetailVO>> batchImportPaymentFundInfo(InputStream inputStream);
/** /**
* 导出缴费库 * 导出缴费库
......
...@@ -74,5 +74,7 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> { ...@@ -74,5 +74,7 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> {
TSocialFundInfoDetailVo getDetailById(String id); TSocialFundInfoDetailVo getDetailById(String id);
void updateSocialAndFoundInfo(UpdateSocialFoundVo list); void updateSocialAndFoundInfo(UpdateSocialFoundVo list);
int selectSocialFoundByContract(TSocialFundInfo sf);
} }
...@@ -790,4 +790,9 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe ...@@ -790,4 +790,9 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
} }
} }
@Override
public int selectSocialFoundByContract(TSocialFundInfo sf) {
return baseMapper.selectSocialFoundByContract(sf);
}
} }
\ No newline at end of file
...@@ -1071,4 +1071,17 @@ ...@@ -1071,4 +1071,17 @@
where EMP_IDCARD = #{infoVo.empIdcard} where EMP_IDCARD = #{infoVo.empIdcard}
</update> </update>
<!--获取count,合同使用-->
<select id="selectSocialFoundByContract" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_social_fund_info a
where a.EMP_IDCARD = #{tSocialFundInfo.empIdcard} and
(
(a.SETTLE_DOMAIN_CODE = #{tSocialFundInfo.settleDomainCode} and a.SOCIAL_REDUCE_STATUS='2' and (a.SETTLE_DOMAIN_CODE_FUND is null or a.SETTLE_DOMAIN_CODE_FUND != #{tSocialFundInfo.settleDomainCode} or a.FUND_REDUCE_STATUS='2'))
or
(a.SETTLE_DOMAIN_CODE_FUND = #{tSocialFundInfo.settleDomainCode} and a.FUND_REDUCE_STATUS='2' and (a.SETTLE_DOMAIN_CODE is null or a.SETTLE_DOMAIN_CODE != #{tSocialFundInfo.settleDomainCode} or a.SOCIAL_REDUCE_STATUS='2'))
)
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment