Commit 5bda7de4 authored by hongguangwu's avatar hongguangwu

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

parents d4dc3a2a e4dc3fea
......@@ -189,4 +189,10 @@ public class EmployeeRegistrationPre extends BaseEntity {
@Schema(description = "合同是否可修改")
@TableField(exist = false)
private Boolean contractUpdateFlag;
/**
* 是否拒绝入职: 0 是 1 否
*/
@Schema(description = "是否拒绝入职: 0 是 1 ")
private String isRefuse;
}
......@@ -362,5 +362,9 @@ public class TEmployeeContractPre extends BaseEntity {
@ExcelAttribute(name = "紧急联系人地址")
private String contactAddress;
// 电子签推送需要的新字段——END
/**
* 是否拒绝入职: 0 是 1 否
*/
@Schema(description = "是否拒绝入职: 0 是 1 ")
private String isRefuse;
}
......@@ -264,6 +264,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
YifuUser user = SecurityUtils.getUser();
employeeRegistrationPre.setProcessStatus(CommonConstants.THREE_STRING);
employeeRegistrationPre.setIsRefuse(CommonConstants.ZERO_STRING);
baseMapper.updateById(employeeRegistrationPre);
//新增操作记录
EmployeeRegistrationUpdateVo receiveVo = new EmployeeRegistrationUpdateVo();
......@@ -272,18 +273,22 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
receiveVo.setEmpIdcard(updatePre.getEmpIdcard());
receiveVo.setReason(employeeRegistrationPre.getReason());
receiveVo.setEmployeeId(user.getId());
StringBuilder sb = new StringBuilder();
StringBuilder sb = new StringBuilder("档案");
try {
//调用csp服务更新状态和新增操作记录
cspDaprUtils.updateRegistByPreInfo(receiveVo);
//处理社保待办信息
R<Boolean> booleanR = socialDaprUtils.deleteUnProcessSocialPreInfo(updatePre.getId());
R<Boolean> booleanR = socialDaprUtils.updateRefuseSocialPreInfo(updatePre.getId());
if (null != booleanR && booleanR.getData().booleanValue()){
if (sb.length() == 0){
sb.append("社保");
}else {
sb.append("/社保");
}
}
//处理公积金待办信息
booleanR = socialDaprUtils.deleteUnProcessFundPreInfo(updatePre.getId());
booleanR = socialDaprUtils.updateRefuseFundPreInfo(updatePre.getId());
if (null != booleanR && booleanR.getData().booleanValue()){
if (sb.length() == 0){
sb.append("公积金");
......@@ -294,7 +299,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
//处理商险待办信息
BaseSearchVO insuranceSearchVo = new BaseSearchVO();
insuranceSearchVo.setRegisterId(updatePre.getId());
booleanR = insuranceDaprUtil.delInsurancePreByRegisterId(insuranceSearchVo);
booleanR = insuranceDaprUtil.refuseInsurancePreByRegisterId(insuranceSearchVo);
if (null != booleanR && booleanR.getData().booleanValue()){
if (sb.length() == 0){
sb.append("商险");
......@@ -303,8 +308,10 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
}
//处理合同待办信息
int res = contractPreMapper.delete(Wrappers.<TEmployeeContractPre>query().lambda()
.eq(TEmployeeContractPre::getRegisterId, updatePre.getId()));
LambdaUpdateWrapper<TEmployeeContractPre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TEmployeeContractPre::getRegisterId, updatePre.getId());
updateWrapper.set(TEmployeeContractPre::getIsRefuse,CommonConstants.ZERO_STRING);
int res = contractPreMapper.update(null,updateWrapper);
if (res > 0){
if (sb.length() == 0){
sb.append("合同");
......@@ -321,7 +328,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
log.setCreateName(user.getNickname());
log.setUpdateTime(LocalDateTime.now());
log.setPreId(employeeRegistrationPre.getId());
log.setDiffTitle("联动删除的待办:"+sb);
log.setDiffTitle("拒绝入职联动删除的待办:"+sb);
log.setMenuInfo("入职建档");
tEmployeePreLogService.save(log);
......@@ -1226,7 +1233,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
List<TEmployeeInsurancePre> list = dataR.getData().getInsurancePreList();
for (TEmployeeInsurancePre pre : list) {
//项目不同
if (!preVo.getDeptNo().equals(pre.getDeptNo()) && (pre.getProcessStatus().equals(CommonConstants.ZERO_STRING) ||
if (!preVo.getDeptNo().equals(pre.getDeptNo()) && (
pre.getProcessStatus().equals(CommonConstants.ZERO_STRING) ||
pre.getProcessStatus().equals(CommonConstants.ONE_STRING) ||
pre.getProcessStatus().equals(CommonConstants.TWO_STRING))) {
erorFlag = true;
......@@ -1249,7 +1257,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
//第一次确认接收场景
if (Common.isNotNull(insuranceDetail)) {
//项目不同
if (!preVo.getDeptNo().equals(insuranceDetail.getDeptNo()) && (insuranceDetail.getBuyHandleStatus() == CommonConstants.ONE_INT ||
if (!preVo.getDeptNo().equals(insuranceDetail.getDeptNo()) && (
insuranceDetail.getBuyHandleStatus() == CommonConstants.SIX_INT ||
insuranceDetail.getBuyHandleStatus() == CommonConstants.ONE_INT ||
insuranceDetail.getBuyHandleStatus() == CommonConstants.TWO_INT ||
insuranceDetail.getBuyHandleStatus() == CommonConstants.THREE_INT)) {
erorFlag = true;
......@@ -1264,6 +1274,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
preVo.setProcessStatus(CommonConstants.SIX_STRING);
} else if (insuranceDetail.getBuyHandleStatus() == CommonConstants.FOUR_INT) {
preVo.setProcessStatus(CommonConstants.FIVE_STRING);
} else if (insuranceDetail.getBuyHandleStatus() == CommonConstants.SIX_INT) {
preVo.setProcessStatus(CommonConstants.SEVEN_STRING);
}
//是否地市自购
preVo.setIsAddress(insuranceDetail.getIsAdress());
......
......@@ -119,6 +119,9 @@
</sql>
<sql id="employeeRegistrationPre_where">
<if test="employeeRegistrationPre != null">
<if test="employeeRegistrationPre.isRefuse != null and employeeRegistrationPre.isRefuse.trim() != ''">
AND a.IS_REFUSE = #{employeeRegistrationPre.isRefuse}
</if>
<if test="employeeRegistrationPre.id != null and employeeRegistrationPre.id.trim() != ''">
AND a.id = #{employeeRegistrationPre.id}
</if>
......
......@@ -179,6 +179,9 @@
</sql>
<sql id="tEmployeeContractPre_where">
<if test="tEmployeeContractPre != null">
<if test="tEmployeeContractPre.isRefuse != null and tEmployeeContractPre.isRefuse.trim() != ''">
AND a.IS_REFUSE = #{tEmployeeContractPre.isRefuse}
</if>
<if test="tEmployeeContractPre.id != null and tEmployeeContractPre.id.trim() != ''">
AND a.id = #{tEmployeeContractPre.id}
</if>
......
......@@ -298,6 +298,15 @@ public class ChecksUtil {
if (mobileList.size() > CommonConstants.ZERO_INT){
TCheckMobile mobile = null;
for (String mb : mobileList){
//广电号码放行,硬编码 后续要优化
if (mb.indexOf("192") == 0){
mobile = new TCheckMobile();
mobile.setMobile(mb);
mobile.setStatus(CommonConstants.ONE_STRING);
mobile.setMessage("广电号码放行");
checkMobileMap.put(mb,mobile);
continue;
}
jsonObject = ChecksUtil.invokeMobileBasic(mb);
// 2.处理返回结果
if (jsonObject != null) {
......@@ -342,10 +351,19 @@ public class ChecksUtil {
}
} else {
// 记录错误日志,正式项目中请换成log打印
return R.failed("手机号校验失败:" + jsonObject.get(ChecksConstants.MESSAGE).getAsString());
//return R.failed("手机号校验失败:" + jsonObject.get(ChecksConstants.MESSAGE).getAsString());
mobile = new TCheckMobile();
mobile.setMobile(mb);
mobile.setStatus(CommonConstants.TEN_STRING);
mobile.setMessage(getJsonElementValue(jsonObject.get(ChecksConstants.MESSAGE))+getJsonElementValue(jsonObject.get(ChecksConstants.REMARK)));
checkMobileMap.put(mb,mobile);
}
} else {
return R.failed(ChecksConstants.NO_DATA_RESULT);
mobile = new TCheckMobile();
mobile.setMobile(mb);
mobile.setStatus(CommonConstants.TEN_STRING);
mobile.setMessage("调用第三方服务失败!");
checkMobileMap.put(mb,mobile);
}
}
}
......
......@@ -127,6 +127,22 @@ public class InsuranceDaprUtil {
}
return res;
}
/**
* @Author fxj
* @Description 拒绝入职状态更新
* @Date 20:28 2026/1/22
* @Param
* @return
**/
public R<Boolean> refuseInsurancePreByRegisterId(BaseSearchVO paramVo) {
R<Boolean> res = HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(),daprInsurancesProperties.getAppId()
,"/temployeeinsurancepre/inner/refuseInsurancePreByRegisterId", paramVo, Boolean.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("拒绝入职更新商险待办数据!");
}
return res;
}
/**
* @param paramVo 查询参数,主要是身份证与项目编码
* @Description: 查询人员的已减完成的商险(返回值,则表示有未减完成的商险
......
......@@ -140,6 +140,16 @@ public class SocialDaprUtils {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincomedetail/inner/deleteById", JSON.toJSONString(infoVo), Object.class, SecurityConstants.FROM_IN);
}
/**
* @Author fxj
* @Description 通过收入id收入数据
* @Date 16:56 2026/1/27
* @Param
* @return
**/
public void deleteIncomeById(TIncomeDetail infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tincome/inner/deleteById", JSON.toJSONString(infoVo), Object.class, SecurityConstants.FROM_IN);
}
/**
* @Author huyc
* @Description 更新结算信息
......@@ -353,6 +363,18 @@ public class SocialDaprUtils {
, daprProperties.getAppId(),"/tdispatchinfopre/deleteUnProcessSocialPreInfo" , id
, Object.class, SecurityConstants.FROM_IN);
}
/**
* @Author huych
* @Description 拒绝入职更新社保已购买非流程中的数据
* @Date 2025-10-10 15:51:36
* @Param
* @return
**/
public R<Boolean> updateRefuseSocialPreInfo(String id){
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl()
, daprProperties.getAppId(),"/tdispatchinfopre/updateRefuseSocialPreInfo" , id
, Object.class, SecurityConstants.FROM_IN);
}
/**
* @Author fxj
......@@ -366,6 +388,11 @@ public class SocialDaprUtils {
"/tdispatchinfopre/deleteUnProcessFundPreInfo", id, Boolean.class, SecurityConstants.FROM_IN);
}
public R<Boolean> updateRefuseFundPreInfo(String id) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),
"/tdispatchinfopre/updateRefuseFundPreInfo", id, Boolean.class, SecurityConstants.FROM_IN);
}
/**
* @Author fxj
* @Description 获取公积金待购买信息
......
......@@ -1135,7 +1135,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//前端客服的所有项目权限赋值
EmployeeRegistrationSearchVo searchVo = new EmployeeRegistrationSearchVo();
initSearchVo(searchVo);
searchVo.setStatusList(CommonConstants.processPreStatus);
List<String> statusList = CommonConstants.processPreStatus;
CommonConstants.processPreStatus.add(CommonConstants.THREE_STRING);
searchVo.setStatusList(statusList);
searchVo.setTypeList(CommonConstants.processPreStatus);
searchVo.setDeptNo(preVo.getDeptNo());
if (Common.isNotNull(preVo.getIdcardList())) {
......@@ -1162,6 +1164,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
exitCheckVo.setEmpIdcard(registration.getEmpIdcard());
exitCheckVo.setDeptName(registration.getDeptName());
exitCheckVo.setDeptNo(registration.getDeptNo());
if (CommonConstants.THREE_STRING.equals(registration.getProcessStatus())) {
exitCheckVo.setType(preVo.getServerItem());
exitCheckVo.setErrorMsg("已拒绝入职,不可操作!");
errorList.add(exitCheckVo);
continue;
}
if (preVo.getServerItem().contains("商险") && !preVo.getEmployeeInsurancePreVos().isEmpty()) {
//批量的商险是否已购买默认为否
if (Common.isEmpty(preVo.getInsuranceIsBuy())) {
......@@ -2290,7 +2298,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//第一次确认接收场景
if (Common.isNotNull(insuranceDetail)) {
//项目不同
if (!preVo.getDeptNo().equals(insuranceDetail.getDeptNo()) && (insuranceDetail.getBuyHandleStatus() == CommonConstants.ONE_INT ||
if (!preVo.getDeptNo().equals(insuranceDetail.getDeptNo()) && (
insuranceDetail.getBuyHandleStatus() == CommonConstants.ONE_INT ||
insuranceDetail.getBuyHandleStatus() == CommonConstants.SIX_INT ||
insuranceDetail.getBuyHandleStatus() == CommonConstants.TWO_INT ||
insuranceDetail.getBuyHandleStatus() == CommonConstants.THREE_INT)) {
erorFlag = true;
......@@ -2305,6 +2315,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo.setProcessStatus(CommonConstants.SIX_STRING);
} else if (insuranceDetail.getBuyHandleStatus() == CommonConstants.FOUR_INT) {
preVo.setProcessStatus(CommonConstants.FIVE_STRING);
} else if (insuranceDetail.getBuyHandleStatus() == CommonConstants.SIX_INT) {
preVo.setProcessStatus(CommonConstants.SEVEN_STRING);
}
//是否地市自购
preVo.setIsAddress(insuranceDetail.getIsAdress());
......
......@@ -159,5 +159,9 @@ public class TEmployeeInsurancePre extends BaseEntity {
@TableField(exist = false)
@Schema(description = "修改类型:1新增;2修改;3删除;4状态346为不可编辑")
private String modelType;
/**
* 是否拒绝入职: 0 是 1 否
*/
@Schema(description = "是否拒绝入职: 0 是 1 ")
private String isRefuse;
}
......@@ -70,6 +70,12 @@ public class EkpInteractiveParam implements Serializable {
@Schema(description = "客户编码")
private String customerCode;
@Schema(description ="客户名称")
private String unitName;
@Schema(description ="客户编码")
private String unitNo;
/**
* 员工姓名
*/
......
......@@ -3,6 +3,8 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* @Description: 查询EKP中的状态,拦截批量保单号保费
......@@ -38,4 +40,10 @@ public class EkpSettleStatusVo implements Serializable {
**/
private Double paymentBalance;
/**
* 待收
**/
private String statusUpdateTime;
}
......@@ -68,7 +68,7 @@ public class TEmployeeInsurancePreVo implements Serializable {
* 状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职4已完成
*/
@ExcelAttribute(name = "状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职4已完成")
@Schema(description = "状态,0待确认,1待派单,2派单失败,3待投保,4投保中,5投保退回,6已完成")
@Schema(description = "状态,0待确认,1待派单,2派单失败,3待投保,4投保中,5投保退回,6已完成, 待缴费")
@ExcelProperty("状态,0待确认,1待派单,2派单失败,3待投保,4投保中,5投保退回,6已完成")
private String processStatus;
/**
......
......@@ -331,6 +331,23 @@ public class TEmployeeInsurancePreController {
return tEmployeeInsurancePreService.delInsurancePreByRegisterId(preVo);
}
/**
* @Author fxj
* @Description 拒绝入职更新商险待办数据
* @Date 11:13 2026/1/27
* @Param
* @return
**/
@Operation(description = "拒绝入职更新商险待办数据")
@Inner
@PostMapping("/inner/refuseInsurancePreByRegisterId")
public Boolean refuseInsurancePreByRegisterId(@RequestBody BaseSearchVO preVo) {
if (null == preVo || preVo.getRegisterId() == null){
return false;
}
return tEmployeeInsurancePreService.refuseInsurancePreByRegisterId(preVo);
}
/**
* 通过id查询商险待签订任务记录表
* @param registId
......
......@@ -95,6 +95,21 @@ public class TInsuranceDetailController {
return R.ok(tInsuranceDetailService.getInsuranceListPage(page, param, mId));
}
/**
* @Author fxj
* @Description
* @Date 11:55 2026/1/27
* @Param
* @return
**/
@Operation(summary = "投保页查询待缴费金额", description = "投保分页查询")
@PostMapping("/getInsuranceListPagePaymentMoney")
public R<Double> getInsuranceListPagePaymentMoney(@RequestBody InsuranceListParam param,
@RequestParam(required = false) String mId) {
param.setPaymentStatus(CommonConstants.ZERO_STRING);
return R.ok(tInsuranceDetailService.getInsuranceListPagePaymentMoney(param, mId));
}
/**
* 投保不分页查询
*
......@@ -1027,6 +1042,10 @@ public class TInsuranceDetailController {
@Operation(summary = "手动拉取缴费状态", description = "手动拉取缴费状态")
@PostMapping("/pullPaymentStatus")
public R pullPaymentStatus() {
return tInsuranceDetailService.pullPaymentStatus(null);
YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) {
return R.failed(CommonConstants.PLEASE_LOG_IN);
}
return tInsuranceDetailService.pullPaymentStatus(null,user );
}
}
......@@ -31,6 +31,8 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
IPage<InsuranceListVO> getInsuranceListPage(Page<InsuranceListVO> page, @Param("param") InsuranceListParam param);
Double getInsuranceListPagePaymentMoney(@Param("param") InsuranceListParam param);
/**
* 投保不分页查询
*
......
......@@ -135,5 +135,7 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc
Boolean delInsurancePreByRegisterId(BaseSearchVO preVo);
Boolean refuseInsurancePreByRegisterId(BaseSearchVO preVo);
R<TEmployeeInsurancePre> getInfoByRegistId(String registId);
}
......@@ -606,7 +606,9 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
R callBack(TInsuranceDetail detail);
R pullPaymentStatus(String idStr);
R pullPaymentStatus(String idStr,YifuUser user );
R callBackInsuranceBuyHandleStatus(EkpStatusParamVo vo);
Double getInsuranceListPagePaymentMoney(InsuranceListParam param, String mId);
}
......@@ -12,7 +12,6 @@ import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysUserListVo;
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.TSettleDomainRegistListVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants;
......@@ -408,11 +407,11 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
updateList.add(updatePre);
} else {
// 派单成功的
// 派单成功的 在各个口禅
//nonExistingList.add(pre)
updatePre.setProcessStatus(CommonConstants.THREE_STRING);
updateList.add(updatePre);
/*updatePre.setProcessStatus(CommonConstants.THREE_STRING);
updateList.add(updatePre)*/;
}
}
if (!updateList.isEmpty()) {
......@@ -678,6 +677,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
.eq(TInsuranceDetail::getIsOverdue, CommonConstants.ZERO_INT)
.eq(TInsuranceDetail::getBuyHandleStatus, CommonConstants.THREE_INT)
.or().eq(TInsuranceDetail::getBuyHandleStatus, CommonConstants.TWO_INT)
.or().eq(TInsuranceDetail::getBuyHandleStatus, CommonConstants.SIX_INT)
.or().eq(TInsuranceDetail::getBuyHandleStatus, CommonConstants.ONE_INT)));
return count == preVo.getExitInsuranceInfoList().size();
}
......@@ -1001,7 +1001,13 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
return this.remove(Wrappers.<TEmployeeInsurancePre>query().lambda()
.eq(TEmployeeInsurancePre::getRegisterId, preVo.getRegisterId()));
}
@Override
public Boolean refuseInsurancePreByRegisterId(BaseSearchVO preVo) {
LambdaUpdateWrapper<TEmployeeInsurancePre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TEmployeeInsurancePre::getRegisterId, preVo.getRegisterId());
updateWrapper.set(TEmployeeInsurancePre::getIsRefuse, CommonConstants.ZERO_STRING);
return this.update(updateWrapper);
}
@Override
public R<TEmployeeInsurancePre> getInfoByRegistId(String registId) {
if (Common.isEmpty(registId)){
......
......@@ -36,6 +36,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseServiceParamListVO;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.config.WxConfig;
......@@ -139,6 +140,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Resource
private SocialDaprUtils socialDaprUtils;
@Resource
private ArchivesDaprUtil archivesDaprUtils;
@Resource
private MenuUtil menuUtil;
@Resource
......@@ -399,6 +403,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
LocalTime currentTime = LocalTime.now();
R<TEmployeeInsuranceWorkDayVo> dataR;
if (!currentTime.isBefore(LocalTime.of(15, 20)) && !currentTime.equals(LocalTime.of(15, 20))) {
preDispatchDate = DateUtil.addDayByDate(preDispatchDate, 1);
}
//日期赋值
dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING);
......@@ -408,14 +414,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isNotNull(dataR)
&& Common.isNotNull(dataR.getData())
&& Common.isNotNull(dataR.getData().getRegistDate())) {
preDispatchDate = dataR.getData().getRegistDate();
preDispatchDate = dataR.getData().getPriDisDate();
} else {
return R.failed("获取最近工作日失败!");
}
}catch (Exception e){
return R.failed("获取最近工作日异常:"+e.getMessage());
}
}
if (CollectionUtils.isNotEmpty(listSuccess)){
List<TInsuranceSettle> settleList = new ArrayList<>();
List<String> sourceIdCardList = new ArrayList<>();
......@@ -441,12 +446,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setId(RandomStringUtils.randomNumeric(19));
//是否见费出单逻辑处理:预估保费结算、购买周期计算、保单结束日期结算、参保开始日期计算、预计办理日期计算
initJfcdInfo(preDispatchDate, detail,settleList);
//生成收入数据
createInsuranceInfo(detail,mapSelectVo.get(detail.getDeptNo()));
detailList.add(detail);
sourceIdCardList.add(detail.getEmpIdcardNo());
baseMapper.insert(detail);
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
//生成收入数据
createInsuranceInfo(detail,mapSelectVo.get(detail.getDeptNo()));
updateEmployeeInsurancePre(success.getInsurancePreId(),detail,CommonConstants.SEVEN_STRING);
updateEmployeeInsurancePreRenew(success.getInsurancePreRenewId(),detail,CommonConstants.SEVEN_STRING);
//异步任务推送
......@@ -518,9 +523,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//购买周期
long purchaseCycle = 0;
LocalDate buyStartDate;
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
//计算预计办理日期:若派单当日为工作日3点20之前,则预计办理日期为派单日期,若为3点20之后或派单日为非工作日,则预计办理日期为派单日后最近的一个工作日
detail.setPreHandleTime(LocalDateUtil.parseLocalDate(DateUtil.formatDate(preDispatchDate)));
//计算参保开始日期:新增\批增\替换的参保开始日期=MAX("保单开始时间"、"预计办理日期+1日");
if (detail.getPolicyStart().isAfter(detail.getPreHandleTime().plusDays(1))){
buyStartDate = detail.getPolicyStart();
......@@ -532,25 +537,35 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//计算购买周期:购买周期=保单结束日期-参保开始日期+1(天数);购买周期=保单结束日期-参保开始日期+1(天数)推算出月数;
//按天计费方式
long day = LocalDateUtil.betweenDay(buyStartDate.toString(),detail.getPolicyEnd().toString());
if (null != detail.getBillingType() && CommonConstants.ZERO_INT == detail.getBillingType().intValue()){
//计算预计保费:根据计费方式、购买标准、购买天数/月数等计算:
//“计费方式”为“按天”的,预估保费=购买周期天数/365*购买标准+5元;
//“计费方式”为“按月”的,预估保费=购买周期月数对应的费率*购买标准+5元
//按天计费方式
detail.setEstimatePremium(new BigDecimal(detail.getBuyStandard())
.multiply(new BigDecimal(purchaseCycle))
.multiply(new BigDecimal(day))
.divide(new BigDecimal("365"), 2, RoundingMode.HALF_UP)
.add(new BigDecimal("5.00")));
//按月计费方式
}else if (null != detail.getBillingType() && CommonConstants.ONE_INT == detail.getBillingType().intValue()){
TInsuranceTypeRate typeRate = tInsuranceTypeRateService.getOne(Wrappers.<TInsuranceTypeRate>query().lambda()
.eq(TInsuranceTypeRate::getInsuranceTypeId, detail.getInsuranceTypeId())
.eq(TInsuranceTypeRate::getMonth, purchaseCycle)
.eq(TInsuranceTypeRate::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (null != typeRate){
detail.setRate(new BigDecimal(typeRate.getRate()));
}
detail.setEstimatePremium(new BigDecimal(detail.getBuyStandard())
.multiply(new BigDecimal(purchaseCycle))
.multiply(null== detail.getRate()?BigDecimal.ZERO: detail.getRate())
.add(new BigDecimal("5.00")));
}
long day = LocalDateUtil.betweenDay(buyStartDate.toString().toString(),detail.getPolicyEnd().toString());
//购买周期
detail.setPurchaseCycle(purchaseCycle+"个月|"+day+"天");
detail.setPurchaseCycle(purchaseCycle+"个月/"+day+"天");
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
//预估缴费状态 0待缴费、1已缴费
detail.setPaymentStatus(CommonConstants.ZERO_STRING);
detail.setBuyHandleStatus(CommonConstants.SIX_INT);
......@@ -567,6 +582,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
settle.setId(RandomStringUtils.randomNumeric(19));
settleList.add(settle);
detail.setDefaultSettleId(settle.getId());
}else {
detail.setEstimatePremium(BigDecimal.ZERO);
}
}
......@@ -593,6 +610,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
LocalTime currentTime = LocalTime.now();
R<TEmployeeInsuranceWorkDayVo> dataR;
if (!currentTime.isBefore(LocalTime.of(15, 20)) && !currentTime.equals(LocalTime.of(15, 20))) {
preDispatchDate = DateUtil.addDayByDate(preDispatchDate, 1);
}
//日期赋值
dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING);
......@@ -602,14 +621,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isNotNull(dataR)
&& Common.isNotNull(dataR.getData())
&& Common.isNotNull(dataR.getData().getRegistDate())) {
preDispatchDate = dataR.getData().getRegistDate();
preDispatchDate = dataR.getData().getPriDisDate();
} else {
return R.failed("获取最近工作日失败!");
}
}catch (Exception e){
return R.failed("获取最近工作日异常:"+e.getMessage());
}
}
YifuUser user = SecurityUtils.getUser();
Map<String,TSettleDomainSelectVo> mapSelectVo = new HashMap<>();
Map<String, List<InsuranceBatchParam>> map = batchInsuranceCheck(paramList,user,autoFlag,mapSelectVo);
......@@ -647,10 +665,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
replaceIdList.add(detail.getId());
//是否见费出单逻辑处理:预估保费结算、购买周期计算、保单结束日期结算、参保开始日期计算、预计办理日期计算
initJfcdInfo(preDispatchDate, detail,settleList);
//生成收入数据
createInsuranceInfo(detail,mapSelectVo.get(detail.getDeptNo()));
baseMapper.insert(detail);
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
//生成收入数据
createInsuranceInfo(detail,mapSelectVo.get(detail.getDeptNo()));
updateEmployeeInsurancePre(success.getInsurancePreId(),detail,CommonConstants.SEVEN_STRING);
updateEmployeeInsurancePreRenew(success.getInsurancePreRenewId(),detail,CommonConstants.SEVEN_STRING);
//异步任务推送
......@@ -1172,6 +1190,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public InsuranceDetailVO getInsuranceDetailById(String id) {
InsuranceDetailVO insuranceDetailVO = this.baseMapper.getInsuranceDetailById(id);
if (null != insuranceDetailVO){
//见费出单 费用类型也是预估
if (CommonConstants.ZERO_STRING.equals(insuranceDetailVO.getIsJfcd())){
insuranceDetailVO.setPremiumType(CommonConstants.ZERO_INT);
}
//启用BPO结算模式的也是预估
if (null != insuranceDetailVO.getDeptNo()){
TSettleDomainSelectVo settleResult =archivesDaprUtils.selectDeptByNo(insuranceDetailVO.getDeptNo());
if (settleResult != null && CommonConstants.IS_TRUE.equals(settleResult.getBpoEnable()) ) {
insuranceDetailVO.setPremiumType(CommonConstants.ONE_INT);
}
}
if (null != insuranceDetailVO.getPremiumType() && CommonConstants.ONE_INT == insuranceDetailVO.getPremiumType().intValue()){
insuranceDetailVO.setEstimatePremium(BigDecimal.ZERO);
}
long day = LocalDateUtil.betweenDay(insuranceDetailVO.getPolicyStart().toString(),insuranceDetailVO.getPolicyEnd().toString());
long month = LocalDateUtil.betweenMonth(insuranceDetailVO.getPolicyStart().toString(),insuranceDetailVO.getPolicyEnd().toString());
String defaultSettleId = insuranceDetailVO.getDefaultSettleId();
......@@ -1689,7 +1721,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TInsuranceDetail byId;
List<TInsuranceDetail> updList = new ArrayList<>();
List<TInsuranceReplace> replaceList = new ArrayList<>();
TInsuranceDetail newDetail;
TInsuranceDetail oldDetail;
for (TInsuranceDetail detail : detailList) {
oldDetail = new TInsuranceDetail();
newDetail = new TInsuranceDetail();
BeanCopyUtils.copyProperties(detail,oldDetail);
BeanCopyUtils.copyProperties(detail,newDetail);
if (detail.getBuyHandleStatus() == CommonConstants.FOUR_INT
|| detail.getBuyHandleStatus() == CommonConstants.FIVE_INT){
InsuranceListVO listVO = new InsuranceListVO();
......@@ -1741,6 +1779,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
// 记录状态置为「退回」
detail.setBuyHandleStatus(CommonConstants.FOUR_INT);
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
detail.setPaymentTime(CommonConstants.EMPTY_STRING);
detail.setPaymentStatus(CommonConstants.ZERO_STRING);
//添加日志
newDetail.setPaymentTime(CommonConstants.EMPTY_STRING);
newDetail.setPaymentStatus(CommonConstants.ZERO_STRING);
tBusinessOperateService.saveModificationRecord(detail.getId(),oldDetail,newDetail,"投保退回更新缴费状态、缴费时间",user.getNickname());
}
//投保成功后再次投保退回,需要将保单生效日期、是否有效、是否过期置为空
if (detail.getSignFlag() == CommonConstants.ONE_INT){
detail.setHandledTime(null);
......@@ -1748,8 +1794,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setPolicyEffect(null);
detail.setIsEffect(null);
detail.setIsOverdue(null);
detail.setPaymentTime(CommonConstants.EMPTY_STRING);
detail.setPaymentStatus(CommonConstants.ZERO_STRING);
}
detail.setUpdateBy(user.getId());
detail.setUpdateTime(LocalDateTime.now());
......@@ -2026,6 +2070,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//替换类型,保单生效日期:T + 1
detail.setPolicyEffect(LocalDate.now().plusDays(CommonConstants.ONE_INT));
successOne.add(detail);
//投保替换不生成预估需要排除掉
successThree.add(detail);
updateEmployeeInsurancePreById(detail, Stream.of("4").collect(Collectors.toList()),CommonConstants.SIX_STRING);
updateEmployeeInsurancePreRenewById(detail, Stream.of("4").collect(Collectors.toList()),CommonConstants.SIX_STRING, false);
......@@ -2059,7 +2105,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 预估保费 = 费率 * 购买标准 + 5元
BigDecimal estimatePremium = new BigDecimal(detail.getBuyStandard())
.multiply(detail.getRate())
.add(BigDecimal.valueOf(5.00))
.setScale(2,BigDecimal.ROUND_HALF_UP);
detail.setEstimatePremium(estimatePremium);
if (detail.getBuyType() == CommonConstants.THREE_INT){
......@@ -2103,8 +2148,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//预估保费 = (购买标准 / 365) * 天数 + 5元
BigDecimal estimatePremium = new BigDecimal(detail.getBuyStandard())
.multiply(new BigDecimal(day))
.divide(new BigDecimal("365"),CommonConstants.TWO_INT,BigDecimal.ROUND_HALF_UP)
.add(BigDecimal.valueOf(5.00));
.divide(new BigDecimal("365"),CommonConstants.TWO_INT,BigDecimal.ROUND_HALF_UP);
detail.setEstimatePremium(estimatePremium);
//记录状态均置为「已投保」
detail.setBuyHandleStatus(CommonConstants.THREE_INT);
......@@ -2165,29 +2209,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
successOne.add(detail);
updateEmployeeInsurancePreById(detail, Stream.of("4").collect(Collectors.toList()),CommonConstants.SIX_STRING);
updateEmployeeInsurancePreRenewById(detail, Stream.of("4").collect(Collectors.toList()),CommonConstants.SIX_STRING, false);
//如果是见费出单,生成差额数据
//如果是见费出单,不重复生成预估,具体差额在登记保单保费处处理
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
//保费存储
TInsuranceSettle settle = new TInsuranceSettle();
settle.setInsDetailId(detail.getId());
settle.setSettleType(CommonConstants.TWO_INT);
settle.setSettleHandleStatus(CommonConstants.ONE_STRING);
settle.setEstimatePremium(BigDecimalUtils.safeAdd(detail.getActualPremium(),detail.getEstimatePremium()));
settle.setActualPremium(BigDecimal.ZERO);
//调完ekp接口才会是1
settle.setIsEstimatePush(CommonConstants.ONE_INT);
settle.setEstimatePushTime(LocalDateTime.now());
settle.setCreateTime(LocalDateTime.now());
settle.setId(RandomStringUtils.randomNumeric(19));
settleList.add(settle);
TInsuranceDetail detailTemp = new TInsuranceDetail();
BeanCopyUtils.copyProperties(detail,detailTemp);
detailTemp.setDefaultSettleId(settle.getId());
detailTemp.setEstimatePremium(BigDecimalUtils.safeAdd(detail.getActualPremium(),detail.getEstimatePremium()));
detailTemp.setActualPremium(BigDecimal.ZERO);
//差额结算
detailTemp.setSettleType(CommonConstants.TWO_INT);
successBanlance.add(detailTemp);
successThree.add(detail);
}
}
}
......@@ -2225,6 +2249,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
doJointInsuranceTask.pushEstime(successList);
}
//操作记录
if (Common.isNotNull(successThree)){
successList.addAll(successThree);
}
if (CollectionUtils.isNotEmpty(successList)){
for (TInsuranceDetail detail : successList) {
//获取成功数据的remark
......@@ -8015,14 +8042,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//按月
if (CommonConstants.ONE_INT == insuranceDetail.getBillingType()){
// 预估保费 = 费率 * 购买标准
BigDecimal estimatePremium = new BigDecimal(insuranceDetail.getBuyStandard()).multiply(insuranceDetail.getRate()).setScale(2,BigDecimal.ROUND_HALF_UP);
BigDecimal estimatePremium = new BigDecimal(insuranceDetail.getBuyStandard())
.multiply(insuranceDetail.getRate())
.setScale(2,BigDecimal.ROUND_HALF_UP);
param.setEstimatePremium(estimatePremium);
}else {
//按天
//计算起止时间的天数
long day = LocalDateUtil.betweenDay(insuranceDetail.getPolicyStart().toString(), insuranceDetail.getPolicyEnd().toString());
//预估保费 = (购买标准 / 365) * 天数
BigDecimal estimatePremium = new BigDecimal(insuranceDetail.getBuyStandard()).multiply(new BigDecimal(day)).divide(new BigDecimal("365"),CommonConstants.TWO_INT,BigDecimal.ROUND_HALF_UP);
BigDecimal estimatePremium = new BigDecimal(insuranceDetail.getBuyStandard())
.multiply(new BigDecimal(day))
.divide(new BigDecimal("365"),CommonConstants.TWO_INT,BigDecimal.ROUND_HALF_UP);
param.setEstimatePremium(estimatePremium);
}
}
......@@ -9728,9 +9759,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if(Common.isNotNull(detailList) && detailList.getCode() == CommonConstants.SUCCESS
&& !detailList.getData().getDetailList().isEmpty()){
List<TIncomeDetail> incomeDetailList = detailList.getData().getDetailList();
BigDecimal sumMoney = BigDecimal.ZERO;
for (TIncomeDetail income : incomeDetailList) {
socialDaprUtils.deleteById(income);
socialDaprUtils.deleteIncomeById(income);
//删除管理费
ekpSettleService.deleteEkpManagerInfo(income.getId());
//删除风险金
......@@ -9760,13 +9791,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return
**/
@Override
public R pullPaymentStatus(String idStr) {
public R pullPaymentStatus(String idStr,YifuUser user ) {
List<TInsuranceDetail> list = null;
if (Common.isNotNull(idStr)){
list = baseMapper.selectBatchIds(Arrays.asList(idStr.split(CommonConstants.COMMA_STRING)));
}else {
list = baseMapper.selectList(Wrappers.<TInsuranceDetail>query().lambda()
.eq(TInsuranceDetail::getBuyHandleStatus,CommonConstants.SIX_INT)
.eq(BaseEntity::getCreateBy, user.getId())
.eq(TInsuranceDetail::getIsJfcd,CommonConstants.ZERO_STRING));
}
......@@ -9797,12 +9829,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (null != detail){
detailOld = new TInsuranceDetail();
BeanCopyUtils.copyProperties(detail,detailOld);
detail.setPaymentTime(DateUtil.formatDatePatten(new Date(),DateUtil.DATETIME_PATTERN_SECOND));
detail.setPaymentTime(vo.getStatusUpdateTime());
detail.setBuyHandleStatus(CommonConstants.ONE_INT);
detail.setUpdateTime(LocalDateTime.now());
detail.setPaymentStatus(CommonConstants.ONE_STRING);
detail.setUpdateBy("05501879fed711eca3540242ac110010");
tBusinessOperateService.saveModificationRecord(detail.getId(),detailOld,detail,"收款结算单已收或垫付同步更新投保状态为待投保","EKP系统");
tBusinessOperateService.saveModificationRecord(detail.getId(),detailOld,detail,"手动拉取缴费:收款结算单已收或垫付同步更新投保状态为待投保","EKP系统");
updateList.add(detail);
ids.add(detailId);
}
......@@ -9892,4 +9924,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
log.error("收款结算单退单或撤销匹配更新是否见费出单的商险状态为待缴费", e);
}
}
@Override
public Double getInsuranceListPagePaymentMoney(InsuranceListParam param, String mId) {
YifuUser user = SecurityUtils.getUser();
if (!Common.isEmpty(mId)) {
param.setMId(mId);
}
param.setCreateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
return baseMapper.getInsuranceListPagePaymentMoney(param);
}
}
......@@ -465,8 +465,8 @@ public class TInsurancePreRenewDetailServiceImpl extends ServiceImpl<TInsuranceP
} else {
// 派单成功的
updatePre.setProcessStatus(CommonConstants.THREE_STRING);
updateList.add(updatePre);
/*updatePre.setProcessStatus(CommonConstants.THREE_STRING);
updateList.add(updatePre);*/
}
}
if (!updateList.isEmpty()) {
......
......@@ -639,6 +639,10 @@ public class DoJointInsuranceTask {
if (InsurancesConstants.ACTUAL_SETTLE_BILL.equals(param.getSettleType())){
ys = 0L;
}
//针对启用BPO结算模式的,无论是否为预估模式是否需提前缴费,都不会产生商险的预估数据
if (InsurancesConstants.ESTIMATE_SETTLE_BILL.equals(param.getSettleType())){
return null;
}
}else {
if (!"0".equals(param.getIsJfcd())){
//1、针对非提前缴费也非预估模式也未启用BPO结算模式的项目下,商险只存在实缴费用,实缴费用中应收等于应支——此类费用“实缴费用”需已收才能支出
......@@ -657,10 +661,14 @@ public class DoJointInsuranceTask {
}
if (InsurancesConstants.ACTUAL_SETTLE_BILL.equals(param.getSettleType())){
//应收=实缴的应支-预估的应收
ys = BigDecimalUtils.safeSubtract(param.getActualPremium(),param.getEstimatePremium()).doubleValue();
ys = BigDecimalUtils.subtractAllowNegative(param.getActualPremium(),param.getEstimatePremium()).doubleValue();
}
}
} else if ("0".equals(param.getIsJfcd())){
//见费出单 是否全部结算 都是 是
pushParam.setFd_3b13b2ecc164aa("是");
//实际结算月份置空
pushParam.setFd_3af9d11088facc(null);
//3、针对提前缴费的项目,无论是否为预估模式,商险存在预估费用,预估费用中应收有值为按照规则计算得出的,应支为0;存在实缴费用,实缴费用应收为0,应支等于导入的实缴金额;
// 存在差额费用,差额费用应收有值,等于“实缴的应支金额-预估的应收金额——此类实缴支出会判断是否存在提前缴费的标识,若存在,则支出可以选择的到,
// 选择后即可支出(差额明细逻辑:导入后根据预估明细和实缴明细,生成“单据类型”为“差额”的商险明细数据(只有应收金额没有应支,应收金额=实缴的应支-预估的应收,若>0,
......@@ -671,8 +679,11 @@ public class DoJointInsuranceTask {
//应支=0
pushParam.setFd_3adfe6e3911ffe(0.00);
pushParam.setFd_3adfe6af71a1cc("预估");
//见费出单 是否全部结算 都是 是
pushParam.setFd_3b13b2ecc164aa("是");
//实际结算月份
pushParam.setFd_3af9d11088facc(null);
//有无预估
pushParam.setFd_3af9d1441ef7b6("有");
}
if (InsurancesConstants.ACTUAL_SETTLE_BILL.equals(param.getSettleType())){
......@@ -684,12 +695,12 @@ public class DoJointInsuranceTask {
ys = BigDecimalUtils.subtractAllowNegative(param.getActualPremium(),param.getEstimatePremium()).doubleValue();
//应支=0
pushParam.setFd_3adfe6e3911ffe(0.00);
//是否全部结算
pushParam.setFd_3b13b2ecc164aa("是");
//实际保费设置为0.0
pushParam.setFd_3adfe6610c0d2c(null == param.getActualPremium()?0.00:param.getActualPremium().doubleValue());
//见费出单 是否全部结算 都是 是
pushParam.setFd_3b13b2ecc164aa("是");
//实际结算月份
pushParam.setFd_3af9d11088facc(null);
//有无预估
pushParam.setFd_3af9d1441ef7b6("有");
}
......@@ -720,13 +731,22 @@ public class DoJointInsuranceTask {
if (InsurancesConstants.ACTUAL_SETTLE_BILL.equals(param.getSettleType())) {
EkpInsurancesInfo info = insurancesInfoMapper.getEkpInsurancesInfoYg(param.getDetailId()+
CommonConstants.DOWN_LINE_STRING + (null == param.getDefaultSettleId() ? "" :param.getDefaultSettleId()));
//特殊处理下是否见费出单 是否全部结算为是
if ("0".equals(param.getIsJfcd())) {
//见费出单 是否全部结算 都是 是
info.setFd_3b13b2ecc164aa("是");
//实际结算月份置空
info.setFd_3af9d11088facc(null);
}
if (Common.isNotNull(info)) {
initValueUpdate(info, deptInfoVo, param);
}
}
}
//红冲
if (InsurancesConstants.CORRECT_SETTLE_BILL.equals(param.getInteractiveType()) && "否".equals(param.getBpoFlag())) {
if (InsurancesConstants.CORRECT_SETTLE_BILL.equals(param.getInteractiveType())
&& ("否".equals(param.getBpoFlag()) || "0".equals(param.getIsJfcd()))) {
EkpInsurancesInfo pushParam = new EkpInsurancesInfo();
String code = "";
if (InsurancesConstants.ESTIMATE_SETTLE_BILL.equals(param.getSettleType())) {
......@@ -735,8 +755,23 @@ public class DoJointInsuranceTask {
code = "4";
}
initValues(pushParam, deptInfoVo, param,code);
//是否bpo客户
pushParam.setFd_3b178fab62d196(null != param.getBpoFlag() ? param.getBpoFlag() : CommonConstants.EMPTY_STRING);
//派单客服姓名
pushParam.setFd_3c6f0108e05c84(null != param.getCreateName() ? param.getCreateName() : CommonConstants.EMPTY_STRING);
//商险封面抬头
pushParam.setFd_3b941cbcea3e1a(deptInfoVo.getInsurancesTitle());
//是否启用BPO结算模式
pushParam.setFd_usebpo_settle("否".equals(deptInfoVo.getIsBpo()) ? "否" : deptInfoVo.getBpoSettle());
//应收
pushParam.setFd_3adfe6e30f2a3c(InsurancesConstants.ACTUAL_SETTLE_BILL.equals(param.getSettleType()) ? param.getActualPremium().doubleValue() :param.getEstimatePremium().doubleValue());
//特殊处理下是否见费出单 是否全部结算为是
if ("0".equals(param.getIsJfcd())) {
//见费出单 是否全部结算 都是 是
pushParam.setFd_3b13b2ecc164aa("是");
//实际结算月份置空
pushParam.setFd_3af9d11088facc(null);
}
insurancesInfoMapper.insert(pushParam);
}
//更新
......@@ -980,9 +1015,9 @@ public class DoJointInsuranceTask {
//项目名称
pushParam.setFd_3adfe6592b4158(null != param.getDeptName() ? param.getDeptName() : CommonConstants.EMPTY_STRING);
//客户编码
pushParam.setFd_3adfe6598281e8(null != param.getCustomerCode() ? param.getCustomerCode() : CommonConstants.EMPTY_STRING);
pushParam.setFd_3adfe6598281e8(null != param.getCustomerCode() ? param.getCustomerCode() : (null==param.getUnitNo()?"":param.getUnitNo()));
//客户名称
pushParam.setFd_3adfe7a2688902(null != param.getCustomerName() ? param.getCustomerName() : CommonConstants.EMPTY_STRING);
pushParam.setFd_3adfe7a2688902(null != param.getCustomerName() ? param.getCustomerName() : (null==param.getUnitName()?"":param.getUnitName()));
//发生日期
pushParam.setFd_3adfe67c24dace(DateUtil.getCurrentDateTime());
//姓名
......@@ -1015,6 +1050,7 @@ public class DoJointInsuranceTask {
pushParam.setFd_3b13b3076af5a0(null != param.getSettleMonth() ? DateUtil.parseDate(param.getSettleMonth(), DateUtil.DATETIME_YYYY_MM) : null);
//有无预估
pushParam.setFd_3af9d1441ef7b6(null != param.getEstimateStatus() ? param.getEstimateStatus() : CommonConstants.EMPTY_STRING);
//结算状态
pushParam.setFd_3adfe6ec6a8cbe("未结算");
//收款状态
......@@ -1028,6 +1064,8 @@ public class DoJointInsuranceTask {
//是否见费出单
if (CommonConstants.ZERO_STRING.equals(param.getIsJfcd())){
pushParam.setFd_jfcd("是");
//有无预估
pushParam.setFd_3af9d1441ef7b6("有");
}else {
pushParam.setFd_jfcd("否");
}
......
......@@ -80,7 +80,7 @@
</select>
<select id="getSettleStatusFromEkpAssoByIds" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSettleStatusVo">
select
fd_3adfe6ec6a8cbe settleStatus,fd_3adfe6eda67236 payStatus,fd_3adfe6ef5dfaac paymentStatus,fd_3b0a5743acab7e detailId
fd_3adfe6ec6a8cbe settleStatus,fd_3adfe6eda67236 payStatus,fd_3adfe6ef5dfaac paymentStatus,fd_3b0a5743acab7e detailId,update_time_status statusUpdateTime
from
ekp_insurances_info
where
......
......@@ -107,6 +107,9 @@
</sql>
<sql id="tEmployeeInsurancePre_where">
<if test="tEmployeeInsurancePre != null">
<if test="tEmployeeInsurancePre.isRefuse != null and tEmployeeInsurancePre.isRefuse.trim() != ''">
AND a.IS_REFUSE = #{tEmployeeInsurancePre.isRefuse}
</if>
<if test="tEmployeeInsurancePre.id != null and tEmployeeInsurancePre.id.trim() != ''">
AND a.id = #{tEmployeeInsurancePre.id}
</if>
......
......@@ -131,7 +131,7 @@
a.PAYMENT_STATUS as paymentStatus,
a.PAYMENT_TIME as paymentTime,
a.IS_JFCD as isJfcd,
IF(a.BILLING_TYPE='0',CONCAT(a.PURCHASE_CYCLE,'天'),CONCAT(a.PURCHASE_CYCLE,'个月')) as purchaseCycle,
a.PURCHASE_CYCLE as purchaseCycle,
a.BILLING_TYPE as billingType,
a.PRE_HANDLE_TIME as preHandleTime,
a.ESTIMATE_PREMIUM as estimatePremium
......@@ -242,7 +242,7 @@
a.PAYMENT_TIME as paymentTime,
a.IS_JFCD as isJfcd,
<!-- a.PURCHASE_CYCLE as purchaseCycle, -->
IF(a.BILLING_TYPE='0',CONCAT(a.PURCHASE_CYCLE,'天'),CONCAT(a.PURCHASE_CYCLE,'个月')) as purchaseCycle,
a.PURCHASE_CYCLE as purchaseCycle,
a.PRE_HANDLE_TIME as preHandleTime,
a.ESTIMATE_PREMIUM as estimatePremium,
a.BILLING_TYPE as billingType
......@@ -437,7 +437,7 @@
a.EXPIRE_REMARK,
a.EXPIRE_IGNORE_FLAG,
a.IS_ADRESS as isAdress,a.PAYMENT_STATUS,a.PAYMENT_TIME,a.IS_JFCD,
IF(a.BILLING_TYPE='0',CONCAT(a.PURCHASE_CYCLE,'天'),CONCAT(a.PURCHASE_CYCLE,'个月')) PURCHASE_CYCLE,a.PRE_HANDLE_TIME
a.PURCHASE_CYCLE,a.PRE_HANDLE_TIME
from t_insurance_detail a
left join t_insurance_settle tis on a.DEFAULT_SETTLE_ID = tis.ID
where a.ID = #{id}
......@@ -685,7 +685,7 @@
t_insurance_detail a
where
a.DELETE_FLAG = 0
and (a.BUY_HANDLE_STATUS in (1,2) or (a.BUY_HANDLE_STATUS = 3 and a.IS_EFFECT = 0 and a.IS_OVERDUE = 0))
and (a.BUY_HANDLE_STATUS in (1,2,6) or (a.BUY_HANDLE_STATUS = 3 and a.IS_EFFECT = 0 and a.IS_OVERDUE = 0))
AND EMP_IDCARD_NO = #{empIdCard}
</select>
......@@ -718,7 +718,7 @@
left join t_employee_insurance_pre b on a.id = b.insurances_id
where
a.DELETE_FLAG = 0
and (a.BUY_HANDLE_STATUS in (1,2) or (a.BUY_HANDLE_STATUS = 3 and a.IS_EFFECT = 0 and a.IS_OVERDUE = 0))
and (a.BUY_HANDLE_STATUS in (1,2,6) or (a.BUY_HANDLE_STATUS = 3 and a.IS_EFFECT = 0 and a.IS_OVERDUE = 0))
AND EMP_IDCARD_NO = #{empIdCard} and b.id is null
group by a.id
</select>
......@@ -2543,5 +2543,85 @@
</if>
and b.PRE_ID is not null
</select>
<select id="getInsuranceListPagePaymentMoney" resultType="java.lang.Double">
select
ROUND(SUM(ifnull(a.ESTIMATE_PREMIUM,0.00)),2) as paymentMoney
from t_insurance_detail a
where a.DELETE_FLAG = 0
<if test="param.isEffect != null">
and a.IS_EFFECT = #{param.isEffect}
</if>
<if test="param.id != null">
and a.id = #{param.id}
</if>
<if test="param.unitName != null and param.unitName.trim() != ''">
and a.UNIT_NAME like concat(replace(replace(#{param.unitName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.unitNo != null and param.unitNo.trim() != ''">
and a.UNIT_NO like concat(replace(replace(#{param.unitNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and a.DEPT_NO = #{param.deptNo}
</if>
<if test="param.orderNo != null and param.orderNo.trim() != ''">
and a.ORDER_NO = #{param.orderNo}
</if>
<if test="param.buyHandleStatus != null">
and a.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
</if>
<if test="param.empName != null and param.empName.trim() != ''">
and a.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and a.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and a.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if test="param.insuranceTypeName != null and param.insuranceTypeName.trim() != ''">
and a.INSURANCE_TYPE_NAME like concat('%',replace(replace(#{param.insuranceTypeName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.buyHandleStatusList != null and param.buyHandleStatusList.size > 0">
and a.BUY_HANDLE_STATUS in
<foreach collection="param.buyHandleStatusList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.buyType != null">
and a.BUY_TYPE = #{param.buyType}
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and a.CREATE_NAME like concat('%',#{param.createName},'%')
</if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and a.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and a.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
<if test="param.reduceHandleStatus != null">
and a.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if>
<if test="param.isAdress != null and param.isAdress.trim() != ''">
and a.IS_ADRESS = #{param.isAdress}
</if>
<if test="param.paymentStatus != null and param.paymentStatus.trim() != ''">
and a.PAYMENT_STATUS = #{param.paymentStatus}
</if>
<if test="param.paymentTimeStart != null and param.paymentTimeStart.trim() != '' ">
and a.PAYMENT_TIME <![CDATA[ >= ]]> #{param.paymentTimeStart}
</if>
<if test="param.paymentTimeEnd != null and param.paymentTimeEnd.trim() != ''">
and a.PAYMENT_TIME <![CDATA[ <= ]]> #{param.paymentTimeEnd}
</if>
<if test="param.isJfcd != null and param.isJfcd.trim() != ''">
and a.IS_JFCD = #{param.isJfcd}
</if>
<if test="param.estimatePremiumStart != null">
and a.ESTIMATE_PREMIUM <![CDATA[ >= ]]> #{param.estimatePremiumStart}
</if>
<if test="param.estimatePremiumEnd != null">
and a.ESTIMATE_PREMIUM <![CDATA[ <= ]]> #{param.estimatePremiumEnd}
</if>
<if test="param.authSql != null and param.authSql.trim() != ''">
${param.authSql}
</if>
</select>
</mapper>
......@@ -677,4 +677,10 @@ public class TDispatchInfoPre extends BaseEntity {
@Schema(description = "起缴日期类型:0 入职日期 1 入职满个月 2 入职满2个月 3 入职满3个月 4 入职满4个月 5 入职满5个月 6 入职满6个月 7 入职满7个月 8 入职满8个月 9 入职满9个月 10 入职满10个月 11 入职满11个月 12 入职满12个月")
private String socialDateType;
/**
* 是否拒绝入职: 0 是 1 否
*/
@Schema(description = "是否拒绝入职: 0 是 1 ")
private String isRefuse;
}
......@@ -57,8 +57,6 @@ public class TDispatchInfoPreController {
//typeSuB 0 社保 1 公积金
if (Common.isEmpty(tDispatchInfoPre.getTypeSub())){
tDispatchInfoPre.setTypeSub(CommonConstants.ZERO_STRING);
}else if (Common.isEmpty(tDispatchInfoPre.getTypeSub())){
tDispatchInfoPre.setTypeSub(tDispatchInfoPre.getTypeSub());
}
return new R<>(tDispatchInfoPreService.getTDispatchInfoPrePage(page, tDispatchInfoPre));
}
......@@ -376,7 +374,19 @@ public class TDispatchInfoPreController {
public Boolean deleteUnProcessFundPreInfo(@RequestBody String id) {
return tDispatchInfoPreService.deleteUnProcessFundPreInfo(id);
}
/**
* @Author fxj
* @Description 拒绝入职更新非流程中的公积金待购买数据
* @Date 11:09 2026/1/27
* @Param
* @return
**/
@Operation(description = "拒绝入职更新非流程中的公积金待购买数据")
@Inner
@PostMapping("/updateRefuseFundPreInfo")
public Boolean updateRefuseFundPreInfo(@RequestBody String id) {
return tDispatchInfoPreService.updateRefuseFundPreInfo(id);
}
/**
* 派单当日9点统一推送确认信息 公积金可以通用
......@@ -414,4 +424,18 @@ public class TDispatchInfoPreController {
public R<TDispatchInfoPre> getInfoByRegistId(@RequestParam("registId" ) String registId, @RequestParam("type" ) String type) {
return tDispatchInfoPreService.getInfoByRegistId(registId,type);
}
/**
* @Author fxj
* @Description 拒绝入职更新非流程中的社保待购买数据
* @Date 11:04 2026/1/27
* @Param
* @return
**/
@Operation(description = "拒绝入职更新非流程中的社保待购买数据")
@Inner
@PostMapping("/updateRefuseSocialPreInfo")
public Boolean updateRefuseSocialPreInfo(@RequestBody String id) {
return tDispatchInfoPreService.updateRefuseSocialPreInfo(id);
}
}
......@@ -242,4 +242,16 @@ public class TIncomeController {
public Boolean updateSocialSettleStatus(@RequestBody List<EkpInsuranceViewVo> viewVo) {
return tIncomeService.updateIncomeSettleStatus(viewVo);
}
/**
* 通过id删除收入明细表
*
* @param tIncomeDetail
* @return R
*/
@Inner
@PostMapping("/inner/deleteById")
public void deleteMainById(@RequestBody TIncomeDetail tIncomeDetail) {
tIncomeService.removeById(tIncomeDetail.getId());
}
}
......@@ -74,7 +74,7 @@ public class TIncomeDetailController {
* @return R
*/
@Inner
@PostMapping("/deleteById")
@PostMapping("/inner/deleteById")
public void deleteById(@RequestBody TIncomeDetail tIncomeDetail) {
tIncomeDetailService.removeById(tIncomeDetail.getId());
}
......
......@@ -54,4 +54,6 @@ public interface TDispatchInfoPreMapper extends BaseMapper<TDispatchInfoPre> {
long selectFundCount(@Param("tDispatchInfoPre") TDispatchInfoPreSearchVo searchVo);
long selectSocialCount(@Param("tDispatchInfoPre") TDispatchInfoPreSearchVo searchVo);
}
......@@ -109,4 +109,7 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> {
R<TDispatchInfoPre> getInfoByRegistId(String registId,String type);
Boolean updateRefuseSocialPreInfo(String id);
Boolean updateRefuseFundPreInfo(String id);
}
......@@ -21,7 +21,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
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.config.WxConfig;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPre;
import com.yifu.cloud.plus.v1.yifu.social.entity.TFundPreDetail;
......@@ -195,7 +194,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
@Override
public long getDispatchInfoCount(TDispatchInfoPreSearchVo searchVo) {
initSearchVo(searchVo);
return baseMapper.selectExportCount(searchVo);
return baseMapper.selectSocialCount(searchVo);
}
@Override
......@@ -1068,4 +1067,27 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
.eq(TDispatchInfoPre::getTypeSub,type)
.eq(TDispatchInfoPre::getRegisterId, registId).last(CommonConstants.LAST_ONE_SQL)));
}
@Override
public Boolean updateRefuseSocialPreInfo(String id) {
//更新未处理的社保待购买信息
LambdaUpdateWrapper<TDispatchInfoPre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.set(TDispatchInfoPre::getIsRefuse, CommonConstants.ZERO_STRING);
updateWrapper.in(TDispatchInfoPre::getTypeSub,CommonConstants.ZERO_STRING);
updateWrapper.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4","8"));
updateWrapper.eq(TDispatchInfoPre::getRegisterId, id);
return this.update(updateWrapper);
}
@Override
public Boolean updateRefuseFundPreInfo(String id) {
//删除未处理的公积金待购买信息
LambdaUpdateWrapper<TDispatchInfoPre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.set(TDispatchInfoPre::getIsRefuse, CommonConstants.ZERO_STRING);
updateWrapper.in(TDispatchInfoPre::getTypeSub,CommonConstants.ONE_STRING);
updateWrapper.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4","8"));
updateWrapper.eq(TDispatchInfoPre::getRegisterId, id);
return this.update(updateWrapper);
}
}
......@@ -207,6 +207,9 @@
</sql>
<sql id="tDispatchInfoPre_other_where">
<if test="tDispatchInfoPre != null">
<if test="tDispatchInfoPre.isRefuse != null and tDispatchInfoPre.isRefuse.trim() != ''">
AND a.IS_REFUSE = #{tDispatchInfoPre.isRefuse}
</if>
<if test="tDispatchInfoPre.id != null and tDispatchInfoPre.id.trim() != ''">
AND a.ID = #{tDispatchInfoPre.id}
</if>
......@@ -331,6 +334,9 @@
<sql id="tDispatchInfoPre_where">
<if test="tDispatchInfoPre != null">
<if test="tDispatchInfoPre.isRefuse != null and tDispatchInfoPre.isRefuse.trim() != ''">
AND a.IS_REFUSE = #{tDispatchInfoPre.isRefuse}
</if>
<if test="tDispatchInfoPre.id != null and tDispatchInfoPre.id.trim() != ''">
AND a.ID = #{tDispatchInfoPre.id}
</if>
......@@ -397,7 +403,7 @@
AND a.IS_CREATE_DATE = #{tDispatchInfoPre.isCreateDate}
</if>
<if test="tDispatchInfoPre.contractStatus != null and tDispatchInfoPre.contractStatus.trim() != ''">
AND if(b.id is not null,'0','1') = #{tDispatchInfoPre.contractStatus}
AND if(b.EMP_IDCARD is not null,'0','1') = #{tDispatchInfoPre.contractStatus}
</if>
<if test="tDispatchInfoPre.failType != null and tDispatchInfoPre.failType.trim() != ''">
AND a.error_info is not null
......@@ -448,8 +454,9 @@
<select id="getTDispatchInfoPrePage" resultMap="tDispatchInfoPreMap">
SELECT
<include refid="Base_Column_List"/>
,if(b.id is not null,'0','1') as CONTRACT_STATUS,a.FUND_START_DATE
,if(b.EMP_IDCARD is not null,'0','1') as CONTRACT_STATUS,a.FUND_START_DATE
FROM t_dispatch_info_pre a
<!--huych:跨库建档案的合同视图,因为需要查询合同的最新状态,合同表只用到身份证和项目编码两个字段,跨库查效率较高,如果后期档案改库名需要调整这块代码-->
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
a.DELETE_FLAG = '0'
......@@ -460,19 +467,22 @@
</select>
<select id="selectExportCount" resultType="java.lang.Long">
select count(a.id) from (
SELECT
count(a.id)
a.id
FROM t_dispatch_info_pre a
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
1=1 and a.type_sub = '0'
<include refid="tDispatchInfoPre_where"/>
</where>
group by a.id
) a
</select>
<select id="selectFundExportCount" resultType="java.lang.Long">
select count(a.id) from (
SELECT
count(a.id)
a.id
FROM t_dispatch_info_pre a
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
......@@ -480,13 +490,24 @@
and a.DELETE_FLAG = '0'
<include refid="tDispatchInfoPre_where"/>
</where>
group by a.id) a
</select>
<select id="selectSocialCount" resultType="java.lang.Long">
SELECT
count(a.id)
FROM t_dispatch_info_pre a
<where>
1=1 and a.type_sub = '0' and a.DELETE_FLAG = '0'
<include refid="tDispatchInfoPre_where"/>
</where>
</select>
<select id="selectFundCount" resultType="java.lang.Long">
SELECT
count(a.id)
FROM t_dispatch_info_pre a
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
1=1 and a.type_sub = '1'
and a.DELETE_FLAG = '0'
......@@ -503,7 +524,7 @@
a.SOCIAL_HOUSEHOLD_NAME,
a.RECORD_BASE,
DATE_FORMAT(a.join_leave_date,'%Y-%m-%d') as join_leave_date,
if(b.id is not null,'已签署','未签署') as CONTRACT_STATUS,
if(b.EMP_IDCARD is not null,'已签署','未签署') as CONTRACT_STATUS,
CASE WHEN a.process_status ='0' THEN "待确认"
WHEN a.process_status='1' THEN "待派单"
WHEN a.process_status ='2' THEN "派单失败"
......@@ -546,7 +567,7 @@
a.UNIT_PROVIDENT_PER,
a.PERSONAL_PROVIDENT_PER,
DATE_FORMAT(a.join_leave_date,'%Y-%m-%d') as join_leave_date,
if(b.id is not null,'已签署','未签署') as CONTRACT_STATUS,
if(b.EMP_IDCARD is not null,'已签署','未签署') as CONTRACT_STATUS,
CASE WHEN a.process_status ='0' THEN "待确认"
WHEN a.process_status='1' THEN "待派单"
WHEN a.process_status ='2' THEN "派单失败"
......@@ -577,7 +598,7 @@
<select id="geNoPageList" resultMap="tDispatchInfoPreMap">
SELECT
<include refid="Base_Column_List"/>
,if(b.id is not null,'0','1') as CONTRACT_STATUS,a.FUND_START_DATE
,if(b.EMP_IDCARD is not null,'0','1') as CONTRACT_STATUS,a.FUND_START_DATE
FROM t_dispatch_info_pre a
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
......
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