Commit 573d1f7f authored by fangxinjiang's avatar fangxinjiang

见费出单逻辑-fxj

parent 7537c978
...@@ -334,4 +334,15 @@ public class TEmployeeContractPreController { ...@@ -334,4 +334,15 @@ public class TEmployeeContractPreController {
public R contractUrg(@RequestParam String id) { public R contractUrg(@RequestParam String id) {
return tEmployeeContractPreService.contractUrg(id); return tEmployeeContractPreService.contractUrg(id);
} }
/**
* 通过id查询合同待签订任务记录表
* @param registId
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/getInfoByRegistId " )
public R<TEmployeeContractPre> getInfoByRegistId(@RequestParam("registId" ) String registId) {
return tEmployeeContractPreService.getInfoByRegistId(registId);
}
} }
...@@ -103,4 +103,6 @@ public interface TEmployeeContractPreService extends IService<TEmployeeContractP ...@@ -103,4 +103,6 @@ public interface TEmployeeContractPreService extends IService<TEmployeeContractP
* @return * @return
*/ */
R contractUrg(String id); R contractUrg(String id);
R<TEmployeeContractPre> getInfoByRegistId(String registId);
} }
...@@ -1244,5 +1244,13 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra ...@@ -1244,5 +1244,13 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
} }
} }
} }
@Override
public R<TEmployeeContractPre> getInfoByRegistId(String registId) {
if (Common.isEmpty(registId)) {
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
return R.ok(baseMapper.selectOne(Wrappers.<TEmployeeContractPre>query().lambda()
.eq(TEmployeeContractPre::getRegisterId, registId)
.last(CommonConstants.LAST_ONE_SQL)));
}
} }
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -4,6 +4,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.csp.vo.EmployeeRegistrationCustomerUserUpdateVo; import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre; import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractPre;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo;
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.BaseSearchVO; import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseSearchVO;
...@@ -329,4 +330,15 @@ public class TEmployeeInsurancePreController { ...@@ -329,4 +330,15 @@ public class TEmployeeInsurancePreController {
} }
return tEmployeeInsurancePreService.delInsurancePreByRegisterId(preVo); return tEmployeeInsurancePreService.delInsurancePreByRegisterId(preVo);
} }
/**
* 通过id查询商险待签订任务记录表
* @param registId
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/getInfoByRegistId " )
public R<TEmployeeInsurancePre> getInfoByRegistId(@RequestParam("registId" ) String registId) {
return tEmployeeInsurancePreService.getInfoByRegistId(registId);
}
} }
...@@ -134,4 +134,6 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc ...@@ -134,4 +134,6 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc
, List<InsuranceReplaceParam> replaceParamList); , List<InsuranceReplaceParam> replaceParamList);
Boolean delInsurancePreByRegisterId(BaseSearchVO preVo); Boolean delInsurancePreByRegisterId(BaseSearchVO preVo);
R<TEmployeeInsurancePre> getInfoByRegistId(String registId);
} }
...@@ -1000,4 +1000,13 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -1000,4 +1000,13 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
return this.remove(Wrappers.<TEmployeeInsurancePre>query().lambda() return this.remove(Wrappers.<TEmployeeInsurancePre>query().lambda()
.eq(TEmployeeInsurancePre::getRegisterId, preVo.getRegisterId())); .eq(TEmployeeInsurancePre::getRegisterId, preVo.getRegisterId()));
} }
@Override
public R<TEmployeeInsurancePre> getInfoByRegistId(String registId) {
if (Common.isEmpty(registId)){
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
return R.ok(baseMapper.selectOne(Wrappers.<TEmployeeInsurancePre>query().lambda()
.eq(TEmployeeInsurancePre::getRegisterId, registId).last(CommonConstants.LAST_ONE_SQL)));
}
} }
...@@ -9789,11 +9789,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -9789,11 +9789,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (viewVoList != null && !viewVoList.isEmpty()) { if (viewVoList != null && !viewVoList.isEmpty()) {
String insuranceId; String insuranceId;
List<String> insuranceIds = new ArrayList<>(); List<String> insuranceIds = new ArrayList<>();
TInsuranceDetail detailOld = null;
for (EkpInsuranceViewVo viewVo : viewVoList) { for (EkpInsuranceViewVo viewVo : viewVoList) {
//获取所有的明细id //获取所有的明细id
if (Common.isNotNull(viewVo.getId())) { if (Common.isNotNull(viewVo.getId())) {
insuranceId = viewVo.getId().substring(0, 19); insuranceId = viewVo.getId().substring(0, 19);
detail = baseMapper.selectById(insuranceId); detail = baseMapper.selectById(insuranceId);
detailOld = new TInsuranceDetail();
BeanCopyUtils.copyProperties(detail,detailOld);
//见费出单且是待投保状态 直接回退到 待缴费 并清空缴费时间和缴费状态 //见费出单且是待投保状态 直接回退到 待缴费 并清空缴费时间和缴费状态
if (Common.isNotNull(detail) if (Common.isNotNull(detail)
&& CommonConstants.ONE_INT == detail.getBuyHandleStatus().intValue() && CommonConstants.ONE_INT == detail.getBuyHandleStatus().intValue()
...@@ -9801,7 +9804,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -9801,7 +9804,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setPaymentTime(CommonConstants.EMPTY_STRING); detail.setPaymentTime(CommonConstants.EMPTY_STRING);
detail.setPaymentStatus(CommonConstants.ZERO_STRING); detail.setPaymentStatus(CommonConstants.ZERO_STRING);
detail.setBuyHandleStatus(CommonConstants.SIX_INT); detail.setBuyHandleStatus(CommonConstants.SIX_INT);
detail.setUpdateBy("05501879fed711eca3540242ac110010");
detail.setUpdateTime(LocalDateTime.now());
baseMapper.updateById(detail); baseMapper.updateById(detail);
tBusinessOperateService.saveModificationRecord(detail.getId(),detailOld,detail,"收款结算单退单或撤销匹配同步更新投保状态为待缴费");
insuranceIds.add(insuranceId); insuranceIds.add(insuranceId);
} }
} }
......
...@@ -379,10 +379,10 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP ...@@ -379,10 +379,10 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
List<InsuranceAutoParam> autoAddParamList = this.getInsuranceAutoParamList(paramList, batchParamList, replaceParamList); List<InsuranceAutoParam> autoAddParamList = this.getInsuranceAutoParamList(paramList, batchParamList, replaceParamList);
if (autoAddParamList.isEmpty()) { if (autoAddParamList.isEmpty()) {
LambdaUpdateWrapper<TInsurancePreRenewDetail> updateWrapper = new LambdaUpdateWrapper<>(); /*LambdaUpdateWrapper<TInsurancePreRenewDetail> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.in(TInsurancePreRenewDetail::getId, pushIdList) updateWrapper.in(TInsurancePreRenewDetail::getId, pushIdList)
.set(TInsurancePreRenewDetail::getProcessStatus, CommonConstants.THREE_STRING); .set(TInsurancePreRenewDetail::getProcessStatus, CommonConstants.THREE_STRING);
this.update(updateWrapper); this.update(updateWrapper);*/
} else { } else {
// 将 autoAddParamList 中的id等信息提取出来,放入一个 Set 中 // 将 autoAddParamList 中的id等信息提取出来,放入一个 Set 中
Set<String> autoAddParamSet = new HashSet<>(); Set<String> autoAddParamSet = new HashSet<>();
......
...@@ -22,6 +22,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceDetail ...@@ -22,6 +22,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceDetail
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsurancePreRenewDetailMapper; import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsurancePreRenewDetailMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TUpdateStatusErrorMapper; import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TUpdateStatusErrorMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService; import com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TBusinessOperateService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceEkpService; import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceEkpService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceSettleCancelService; import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceSettleCancelService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceSettleService; import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceSettleService;
...@@ -86,7 +87,8 @@ public class DoJointInsuranceTask { ...@@ -86,7 +87,8 @@ public class DoJointInsuranceTask {
@Autowired @Autowired
private TInsurancePreRenewDetailMapper tInsurancePreRenewDetailMapper; private TInsurancePreRenewDetailMapper tInsurancePreRenewDetailMapper;
@Autowired
private TBusinessOperateService tBusinessOperateService;
/** /**
* @Description: 商险明细推送 * @Description: 商险明细推送
* @Author: huyc * @Author: huyc
...@@ -248,6 +250,8 @@ public class DoJointInsuranceTask { ...@@ -248,6 +250,8 @@ public class DoJointInsuranceTask {
detail = insuranceDetailMapper.selectById(insuranceId); detail = insuranceDetailMapper.selectById(insuranceId);
log.error("更新状态商险ID:"+detail.getId() +"|"+insuranceId); log.error("更新状态商险ID:"+detail.getId() +"|"+insuranceId);
if (Common.isNotNull(detail)) { if (Common.isNotNull(detail)) {
TInsuranceDetail detailOld = new TInsuranceDetail();
BeanCopyUtils.copyProperties(detail,detailOld);
//判断订单类型是预估还是实缴 //判断订单类型是预估还是实缴
if (InsurancesConstants.ACTUAL_SETTLE_BILL.equals(viewVo.getOrderType())) { if (InsurancesConstants.ACTUAL_SETTLE_BILL.equals(viewVo.getOrderType())) {
//判断是收入还是支出结算单号 //判断是收入还是支出结算单号
...@@ -270,6 +274,10 @@ public class DoJointInsuranceTask { ...@@ -270,6 +274,10 @@ public class DoJointInsuranceTask {
detail.setBuyHandleStatus(CommonConstants.ONE_INT); detail.setBuyHandleStatus(CommonConstants.ONE_INT);
detail.setPaymentStatus(CommonConstants.ONE_STRING); detail.setPaymentStatus(CommonConstants.ONE_STRING);
detail.setPaymentTime(DateUtil.formatDatePatten(new Date(),DateUtil.DATETIME_PATTERN_SECOND)); detail.setPaymentTime(DateUtil.formatDatePatten(new Date(),DateUtil.DATETIME_PATTERN_SECOND));
detail.setUpdateBy("05501879fed711eca3540242ac110010");
detail.setUpdateTime(LocalDateTime.now());
//添加日期
tBusinessOperateService.saveModificationRecord(detail.getId(),detailOld,detail,"收款结算单已收或垫付同步更新投保状态为待投保");
//更新自动化 //更新自动化
LambdaUpdateWrapper<TEmployeeInsurancePre> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TEmployeeInsurancePre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TEmployeeInsurancePre::getInsurancesId,detail.getId()); updateWrapper.eq(TEmployeeInsurancePre::getInsurancesId,detail.getId());
...@@ -286,6 +294,9 @@ public class DoJointInsuranceTask { ...@@ -286,6 +294,9 @@ public class DoJointInsuranceTask {
detail.setBuyHandleStatus(CommonConstants.SIX_INT); detail.setBuyHandleStatus(CommonConstants.SIX_INT);
detail.setPaymentStatus(CommonConstants.ZERO_STRING); detail.setPaymentStatus(CommonConstants.ZERO_STRING);
detail.setPaymentTime(CommonConstants.EMPTY_STRING); detail.setPaymentTime(CommonConstants.EMPTY_STRING);
detail.setUpdateBy("05501879fed711eca3540242ac110010");
detail.setUpdateTime(LocalDateTime.now());
tBusinessOperateService.saveModificationRecord(detail.getId(),detailOld,detail,"收款结算单退单或撤销匹配同步更新投保状态为待缴费");
} }
} }
} else { } else {
......
...@@ -13,6 +13,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil; ...@@ -13,6 +13,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
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.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPre; import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPre;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoPreService; import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoPreService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreSearchVo;
...@@ -402,4 +403,15 @@ public class TDispatchInfoPreController { ...@@ -402,4 +403,15 @@ public class TDispatchInfoPreController {
public void pushDisConfrimSocial() { public void pushDisConfrimSocial() {
tDispatchInfoPreService.pushDisConfrimSocial(); tDispatchInfoPreService.pushDisConfrimSocial();
} }
/**
* 通过id查询社保或公积金待签订任务记录表
* @param registId
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/getInfoByRegistId " )
public R<TDispatchInfoPre> getInfoByRegistId(@RequestParam("registId" ) String registId, @RequestParam("type" ) String type) {
return tDispatchInfoPreService.getInfoByRegistId(registId,type);
}
} }
...@@ -106,4 +106,7 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> { ...@@ -106,4 +106,7 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> {
R confirmFund(List<String> idList); R confirmFund(List<String> idList);
Boolean getFundPreStatus(String id); Boolean getFundPreStatus(String id);
R<TDispatchInfoPre> getInfoByRegistId(String registId,String type);
} }
...@@ -1062,4 +1062,11 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -1062,4 +1062,11 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
} }
} }
} }
@Override
public R<TDispatchInfoPre> getInfoByRegistId(String registId,String type) {
if (Common.isEmpty(registId) || Common.isEmpty(type)) {
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
return R.ok(baseMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda().eq(TDispatchInfoPre::getTypeSub,type).eq(TDispatchInfoPre::getRegisterId, registId).last(CommonConstants.LAST_ONE_SQL)));
}
} }
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