Commit f6275807 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.7.20' into MVP1.7.20

parents 8533db6b 9538ecb1
......@@ -83,4 +83,6 @@ public interface TEmployeeContractPreNewService extends IService<TEmployeeContra
R getContractTerm(String startDate, String endDate);
LocalDate getPreDateByConfigId(String configId, Date contractEnd);
void updateByIdAndUpdateAlert(TEmployeeContractPreNew preNew);
}
......@@ -1286,6 +1286,7 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
TEmployeeContractInfo contractInfo = contractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getPreNewId,preNew.getId())
.eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.orderByDesc(TEmployeeContractInfo::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL));
vo.setContractInfo(contractInfo);
if (Common.isNotNull(preNew.getProcessStatus())){
......
......@@ -736,12 +736,6 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
updateWrapper.eq(TEmployeeContractPreNew::getId, contractPre.getId())
.set(TEmployeeContractPreNew::getProcessStatus, CommonConstants.FIVE_STRING)
.set(TEmployeeContractPreNew::getErrorInfo, "电子签发起失败:已超过合同开始日期一个月")
.set(TEmployeeContractPreNew::getChangeTypeUser, type.equals("1") ? "自动化手动—" +
(null==contractPre.getCustomerUsername()?"":contractPre.getCustomerUsername())
: "自动化自动—" + "超管" )
.set(TEmployeeContractPreNew::getChangeTypeReason, "已超过合同开始日期一个月,自动转线下签")
.set(TEmployeeContractPreNew::getChangeTypeTime, LocalDateTimeUtils.convertLDToDate(LocalDate.now()))
.set(TEmployeeContractPreNew::getSignType, CommonConstants.ONE_STRING)
.set(TEmployeeContractPreNew::getErrorTime, LocalDateTimeUtils.convertLDToDate(LocalDate.now()));
this.update(updateWrapper);
......@@ -1107,7 +1101,7 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
TEmployeeContractPreNew pre;
TEmployeeContractInfo contractInfo;
TEmployeeContractInfo contractInfo = null;
R<String> result;
for (TEmployeeAutoRegistRevokeVo registRevokeVo : registRevokeVoList) {
pre = baseMapper.selectById(registRevokeVo.getId());
......@@ -1125,6 +1119,14 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
return R.failed("推送法大大失败!" + e.getMessage());
}
}
if (Common.isNotNull(pre.getId())) {
//如果存在合同申请审核数据,将状态更新成待提交
contractInfo = contractInfoService.getOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getPreNewId, pre.getId())
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_INT)
.last(CommonConstants.LAST_ONE_SQL));
}
//电子待归档、线下签待归档、已完结的不能撤销签署
if (Common.isNotNull(pre) && !CommonConstants.NINE_STRING.equals(pre.getProcessStatus()) &&
!CommonConstants.FOUR_STRING.equals(pre.getProcessStatus()) &&
......@@ -1132,10 +1134,11 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
//如果不是待确认和待发起,需要记录操作记录
if (!CommonConstants.ZERO_STRING.equals(pre.getProcessStatus()) &&
!CommonConstants.ONE_STRING.equals(pre.getProcessStatus()) &&
Common.isNotNull(pre.getContractId())) {
Common.isNotNull(contractInfo)) {
//找到最新的合同数据添加审核记录
TEmployeeContractAudit audit = new TEmployeeContractAudit();
audit.setRootName("撤销签署");
audit.setLinkId(pre.getContractId());
audit.setLinkId(contractInfo.getId());
audit.setLinkType(CommonConstants.ONE_INT);
audit.setRemark(registRevokeVo.getReason());
tEmployeeContractAuditService.save(audit);
......@@ -1148,18 +1151,10 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
//更新合同续签待办提醒的办理状态为待办理
updateEmpContractAlertHandleStatus(pre.getContractId(), CommonConstants.ZERO_STRING);
}
if (Common.isNotNull(pre.getId())) {
//如果存在合同申请审核数据,将状态更新成待提交
contractInfo = contractInfoService.getOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getPreNewId, pre.getId())
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(contractInfo)) {
contractInfo.setAuditStatus(CommonConstants.FIVE_INT);
contractInfo.setInUse(CommonConstants.ONE_STRING);
contractInfoService.updateById(contractInfo);
}
if (Common.isNotNull(contractInfo)) {
contractInfo.setAuditStatus(CommonConstants.FIVE_INT);
contractInfo.setInUse(CommonConstants.ONE_STRING);
contractInfoService.updateById(contractInfo);
}
}
}
......@@ -1901,4 +1896,20 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
}
return null;
}
@Override
public void updateByIdAndUpdateAlert(TEmployeeContractPreNew preNew) {
baseMapper.updateById(preNew);
//已完成同步更新续签待办提醒为已办理
if (preNew.getProcessStatus().equals(CommonConstants.dingleDigitStrArray[9])
&& null != preNew.getContractId()){
TEmpContractAlert alert = empContractAlertMapper.selectOne(Wrappers.<TEmpContractAlert>query().lambda()
.eq(TEmpContractAlert::getContractId,preNew.getContractId())
.last(CommonConstants.LAST_ONE_SQL));
if (null != alert){
alert.setHandleStatus(CommonConstants.dingleDigitStrArray[2]);
empContractAlertMapper.updateById(alert);
}
}
}
}
......@@ -115,7 +115,7 @@ public class DoFascTask {
tEmployeeContractInfoService.updateGzOfferStatus(contractInfo, CommonConstants.EIGHT_STRING, CommonConstants.NINETY_NINE, user.getId(), user.getNickname());
}
}
tEmployeeContractPreNewService.updateById(preNew);
tEmployeeContractPreNewService.updateByIdAndUpdateAlert(preNew);
pushLog.setReturnData("签署任务完成事件:fddEvent:" + fddEvent + FASC_BIZ_CONTENT_STR + fddBizContent);
......
......@@ -233,8 +233,9 @@ public class TSocialFundInfoController {
@Operation(summary = "通过身份证查询在途或在保的数据", description = "通过身份证查询在途或在保的数据")
@PostMapping("/selectUnSocialFundInfoByEmpIdcard" )
public R<List<UnSocialFundInfoVo>> selectUnSocialFundInfoByEmpIdcard(@RequestParam String empIdcard,
@RequestParam(required = false) String type) {
return R.ok(tSocialFundInfoService.selectUnSocialFundInfoByEmpIdcard(empIdcard, type));
@RequestParam(required = false) String type,
@RequestParam(required = false) String socialPreId) {
return R.ok(tSocialFundInfoService.selectUnSocialFundInfoByEmpIdcard(empIdcard, type,socialPreId));
}
/**
......@@ -246,8 +247,9 @@ public class TSocialFundInfoController {
@Operation(summary = "通过身份证查询在途或在保的公积金数据", description = "通过身份证查询在途或在保的公积金数据")
@PostMapping("/selectUnFundInfoByEmpIdcard" )
public R<List<UnFundInfoVo>> selectUnFundInfoByEmpIdcard(@RequestParam String empIdcard,
@RequestParam(required = false) String type) {
return R.ok(tSocialFundInfoService.selectUnFundInfoByEmpIdcard(empIdcard, type));
@RequestParam(required = false) String type,
@RequestParam(required = false) String fundPreId) {
return R.ok(tSocialFundInfoService.selectUnFundInfoByEmpIdcard(empIdcard, type,fundPreId));
}
......
......@@ -98,13 +98,15 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> {
**/
List<String> getSocialWorkInjuryList();
List<UnSocialFundInfoVo> selectUnSocialFundInfoByEmpIdcard(@Param("empIdcard") String empIdcard,@Param("type") String type);
List<UnSocialFundInfoVo> selectUnSocialFundInfoByEmpIdcard(@Param("empIdcard") String empIdcard,
@Param("dispatchId") String dispatchId);
long selectSocialFundInfoCountByEmpIdcard(@Param("empIdcard") String empIdcard);
long selectFundCountByEmpIdcard(@Param("empIdcard") String empIdcard);
List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(@Param("empIdcard")String empIdcard,@Param("type") String type);
List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(@Param("empIdcard")String empIdcard,
@Param("dispatchId") String dispatchId);
// 离职待办专用,查询社保ID与状态(主要派增部分失败与成功的)
TSocialFundInfo getSocialStatus(@Param("empIdCard") String empIdCard, @Param("deptNo") String deptNo);
......
......@@ -96,7 +96,9 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> {
SocialFundVo getSocialAndFundReduceListByEmpIdCardSet(Set<String> empIdCardSet);
List<UnSocialFundInfoVo> selectUnSocialFundInfoByEmpIdcard(String empIdcard,String type);
List<UnSocialFundInfoVo> selectUnSocialFundInfoByEmpIdcard(String empIdcard,String type,String socialPreId);
List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(String empIdcard, String type, String fundPreId);
Boolean selectExitEmpSocail(TEmployeeAutoRegistCheckVo cardVo);
......@@ -109,8 +111,6 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> {
**/
Boolean selectExitEmpFund(TEmployeeAutoRegistCheckVo cardVo);
List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(String empIdcard,String type);
/**
* @param paramVo
* @Description: 查询正常的社保、公积金
......
......@@ -46,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonCardVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TDispatchInfoPreMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFundInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
......@@ -83,6 +84,8 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
private final SysBaseSetInfoService sysBaseSetInfoService;
private final TSocialFundHistoryService tSocialFundHistoryService;
private final TDispatchInfoPreMapper tDispatchInfoPreMapper;
/**
* 社保公积金查询表简单分页查询
*
......@@ -954,12 +957,28 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
}
@Override
public List<UnSocialFundInfoVo> selectUnSocialFundInfoByEmpIdcard(String empIdcard,String type) {
return baseMapper.selectUnSocialFundInfoByEmpIdcard(empIdcard, type);
public List<UnSocialFundInfoVo> selectUnSocialFundInfoByEmpIdcard(String empIdcard,String type,String socialPreId) {
String dispatchId = null;
if (Common.isNotNull(socialPreId)){
TDispatchInfoPre socialPre = tDispatchInfoPreMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getId, socialPreId).last(CommonConstants.LAST_ONE_SQL));
if (null != socialPre){
dispatchId = socialPre.getDispatcherId();
}
}
return baseMapper.selectUnSocialFundInfoByEmpIdcard(empIdcard, dispatchId);
}
@Override
public List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(String empIdcard,String type) {
return baseMapper.selectUnFundInfoByEmpIdcard(empIdcard, type);
public List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(String empIdcard, String type, String fundPreId) {
String dispatchId = null;
if (Common.isNotNull(fundPreId)) {
TDispatchInfoPre fundPre = tDispatchInfoPreMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getId, fundPreId).last(CommonConstants.LAST_ONE_SQL));
if (null != fundPre){
dispatchId = fundPre.getDispatcherId();
}
}
return baseMapper.selectUnFundInfoByEmpIdcard(empIdcard, dispatchId);
}
@Override
public Boolean selectExitEmpSocail(TEmployeeAutoRegistCheckVo cardVo) {
......
......@@ -1245,32 +1245,46 @@
<!--tSocialFundInfo简单分页查询-->
<select id="selectUnSocialFundInfoByEmpIdcard" resultMap="unSocialFundInfoMap">
SELECT a.ID,
a.SOCIAL_HOUSEHOLD_NAME,
a.PAYMENT_TYPE,
a.SOCIAL_STATUS,
a.SETTLE_DOMAIN_CODE,
a.SETTLE_DOMAIN_NAME,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
d.CREATE_NAME as dispatchName,
a.PENSION_START,
a.MEDICAL_START,
a.UNEMPLOY_START,
a.WORK_INJURY_START,
a.BIRTH_START,
a.BIGAILMENT_START,
a.RECORD_BASE,
a.TRUST_REMARK,
DATE_FORMAT(d.CREATE_TIME, '%Y-%m-%d %H:%i:%s') as dispatchTime
a.SOCIAL_HOUSEHOLD_NAME,
a.PAYMENT_TYPE,
a.SOCIAL_STATUS,
a.SETTLE_DOMAIN_CODE,
a.SETTLE_DOMAIN_NAME,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
d.CREATE_NAME as dispatchName,
a.PENSION_START,
a.MEDICAL_START,
a.UNEMPLOY_START,
a.WORK_INJURY_START,
a.BIRTH_START,
a.BIGAILMENT_START,
a.RECORD_BASE,
a.TRUST_REMARK,
DATE_FORMAT(d.CREATE_TIME, '%Y-%m-%d %H:%i:%s') as dispatchTime
FROM t_social_fund_info a
inner join t_dispatch_info d on a.EMP_IDCARD = d.EMP_IDCARD
where a.EMP_IDCARD = #{empIdcard} and d.DELETE_FLAG = '0' and d.type = '0' and d.SOCIAL_ID is not null
inner join
(
SELECT
t.CREATE_NAME,t.CREATE_TIME,t.EMP_IDCARD
FROM
t_dispatch_info t
WHERE
t.DELETE_FLAG = '0'
AND t.type = '0'
AND t.SOCIAL_ID IS NOT NULL
AND t.`STATUS` != '3'
<!-- 社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3 部分办理成功 4 办理中 -->
AND t.SOCIAL_HANDLE_STATUS IN ('0','1','3','4')
AND t.EMP_IDCARD =#{empIdcard}
<if test="dispatchId != null and dispatchId != ''">
AND t.id != #{dispatchId}
</if>
) d on a.EMP_IDCARD = d.EMP_IDCARD
where a.EMP_IDCARD = #{empIdcard}
<!-- 社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败 10 审核不通过)、派减(6待审核 7待办理 8办理成功 9 办理失败 11派减办理中 12 派减部分办理失败) -->
and a.social_status in ('0', '1', '2', '3', '4', '6', '7', '9', '11', '12')
<if test="type != null and type != '' and type == 1">
and d.create_name not like '自动化%'
</if>
group by a.ID
</select>
<!--tSocialFundInfo简单分页查询-->
......@@ -1291,13 +1305,26 @@
a.PROVIDENT_START,
a.UNIT_PROVIDENG_CARDINAL
FROM t_social_fund_info a
inner join t_dispatch_info d on a.EMP_IDCARD = d.EMP_IDCARD
where a.EMP_IDCARD = #{empIdcard} and d.DELETE_FLAG = '0' and d.type = '0' and d.FUND_ID is not null
inner join (
SELECT
t.CREATE_NAME,t.CREATE_TIME,t.EMP_IDCARD
FROM
t_dispatch_info t
WHERE
t.DELETE_FLAG = '0'
AND t.type = '0'
AND t.FUND_ID IS NOT NULL
AND t.`STATUS` != '3'
<!-- 公积金办理状态:0 未办理 1办理成功 2 办理失败 -->
AND t.FUND_HANDLE_STATUS IN ('0','1')
AND t.EMP_IDCARD =#{empIdcard}
<if test="dispatchId != null and dispatchId != ''">
AND t.id != #{dispatchId}
</if>
) d on a.EMP_IDCARD = d.EMP_IDCARD
where a.EMP_IDCARD = #{empIdcard}
<!-- 派增(0待审核、1待办理、3办理成功、4办理失败9 审核不通过)、派减(5待审核 6待办理 7 办理成功 8 办理失败 ) -->
and a.fund_status in ('0', '1', '3', '5', '6', '8')
<if test="type != null and type != '' and type == 1">
and d.create_name not like '自动化%'
</if>
group by a.ID
</select>
<select id="selectSocialFundInfoCountByEmpIdcard" resultType="java.lang.Long">
......
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