Commit 51316284 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into develop

parents 7faf022e 09761585
...@@ -36,12 +36,12 @@ import java.util.List; ...@@ -36,12 +36,12 @@ import java.util.List;
public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> { public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
/** /**
* @param id * @param departNo
* @Author: wangan * @Author: wangan
* @Date: 2019/10/18 * @Date: 2019/10/18
* @Description: 通过id获取项目及单位部分信息 * @Description: 通过id获取项目及单位部分信息
**/ **/
TSettleDomainSelectVo selectSettleDomainSelectVosById(@Param("id") String id); TSettleDomainSelectVo selectSettleDomainSelectVosById(@Param("departNo") String departNo);
/** /**
* 获取所有客户单位的项目信息 * 获取所有客户单位的项目信息
......
...@@ -95,7 +95,7 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T ...@@ -95,7 +95,7 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
**/ **/
@Override @Override
public TSettleDomainSelectVo selectSettleDomainSelectVosById(TSettleDomainSelectVo settleDomainSelectVo) { public TSettleDomainSelectVo selectSettleDomainSelectVosById(TSettleDomainSelectVo settleDomainSelectVo) {
return baseMapper.selectSettleDomainSelectVosById(settleDomainSelectVo.getId()); return baseMapper.selectSettleDomainSelectVosById(settleDomainSelectVo.getDepartNo());
} }
@Override @Override
......
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
INDUSTRY_BELONG, INDUSTRY_BELONG,
CUSTOMER_CODE from t_customer_info CUSTOMER_CODE from t_customer_info
) c ON a.CUSTOMER_ID = c.customerId ) c ON a.CUSTOMER_ID = c.customerId
WHERE a.id=#{id} GROUP BY a.id WHERE a.DEPART_NO=#{departNo} GROUP BY a.DEPART_NO
</select> </select>
<select id="selectAllSettleDomainSelectVos" resultMap="tSettleDomainSelectVoMap"> <select id="selectAllSettleDomainSelectVos" resultMap="tSettleDomainSelectVoMap">
......
...@@ -69,4 +69,6 @@ public class ValidityConstants { ...@@ -69,4 +69,6 @@ public class ValidityConstants {
/** 不超过两位小数的正数 */ /** 不超过两位小数的正数 */
public static final String POSITIVE_INTEGER_PATTERN_TWO_FLOAT = "^[+]?([0-9]+(.[0-9]{1,2})?)$"; public static final String POSITIVE_INTEGER_PATTERN_TWO_FLOAT = "^[+]?([0-9]+(.[0-9]{1,2})?)$";
/** 身份证规则(x只能大写) */
public static final String IDCARD_UPPERCASE_PATTERN = "(^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9X]$)|(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)" ;
} }
...@@ -84,7 +84,7 @@ public class ArchivesDaprUtil { ...@@ -84,7 +84,7 @@ public class ArchivesDaprUtil {
**/ **/
public R<TSettleDomainSelectVo> getSettleDomainSelectVoById(String departId){ public R<TSettleDomainSelectVo> getSettleDomainSelectVoById(String departId){
TSettleDomainSelectVo settleDomainSelectVo = new TSettleDomainSelectVo(); TSettleDomainSelectVo settleDomainSelectVo = new TSettleDomainSelectVo();
settleDomainSelectVo.setId(departId); settleDomainSelectVo.setDepartNo(departId);
R<TSettleDomainSelectVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/tsettledomain/getSettleDomainSelectVoById",settleDomainSelectVo, TSettleDomainSelectVo.class, SecurityConstants.FROM_IN); R<TSettleDomainSelectVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/tsettledomain/getSettleDomainSelectVoById",settleDomainSelectVo, TSettleDomainSelectVo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){ if (Common.isEmpty(res)){
return R.failed("获取派单校验需要的档案信息失败!"); return R.failed("获取派单校验需要的档案信息失败!");
......
...@@ -12,6 +12,6 @@ dapr.check.appId=yifu-check ...@@ -12,6 +12,6 @@ dapr.check.appId=yifu-check
dapr.archives.appUrl=http://yifu-archives.qas-mvp.svc.cluster.local:3500/v1.0/invoke/ dapr.archives.appUrl=http://yifu-archives.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.archives.appId=yifu-archives dapr.archives.appId=yifu-archives
dapr.insurances.appUrl=http://yifu-insurances.qas-mvp.svc.cluster.local:3511/v1.0/invoke/ dapr.insurances.appUrl=http://yifu-auth.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.insurances.appId=yifu-insurances dapr.insurances.appId=yifu-insurances
...@@ -146,9 +146,9 @@ public class InsurancesConstants { ...@@ -146,9 +146,9 @@ public class InsurancesConstants {
*/ */
public static final String REDUCE_ROLLBACK_IS_NOT_ALLOW = "投保状态不是待投保、投保中、已投保,无法退回"; public static final String REDUCE_ROLLBACK_IS_NOT_ALLOW = "投保状态不是待投保、投保中、已投保,无法退回";
/** /**
* 减员中,无法退回 * 商险减员中,无法退回
*/ */
public static final String REDUCE_ROLLBACK_REDUCE_IS_NOT_ALLOW = "减员中,无法退回"; public static final String REDUCE_ROLLBACK_REDUCE_IS_NOT_ALLOW = "商险减员中,无法退回";
/** /**
* 员工姓名不能为空 * 员工姓名不能为空
*/ */
...@@ -190,9 +190,9 @@ public class InsurancesConstants { ...@@ -190,9 +190,9 @@ public class InsurancesConstants {
*/ */
public static final String REPLACE_EMP_INFO_SAME = "替换信息和被替换信息一致,无法替换"; public static final String REPLACE_EMP_INFO_SAME = "替换信息和被替换信息一致,无法替换";
/** /**
* 替换员工身份证号格式 * 替换员工身份证号格式
*/ */
public static final String REPLACE_EMP_IDCARD_NO_NOT_LEGITIMATE = "替换员工身份证号格式误"; public static final String REPLACE_EMP_IDCARD_NO_NOT_LEGITIMATE = "替换员工身份证号格式误";
/** /**
* 项目编码不能为空 * 项目编码不能为空
*/ */
...@@ -326,9 +326,9 @@ public class InsurancesConstants { ...@@ -326,9 +326,9 @@ public class InsurancesConstants {
*/ */
public static final String ACTUAL_PREMIUM_EMPTY = "保费不能为空"; public static final String ACTUAL_PREMIUM_EMPTY = "保费不能为空";
/** /**
* 保费金额格式错误 * 保费金额需要填写不大于9999999.99的正数,最多支持两位小数
*/ */
public static final String ACTUAL_PREMIUM_PARSE_ERROR= "保费金额格式错误"; public static final String ACTUAL_PREMIUM_PARSE_ERROR= "保费金额需要填写不大于9999999.99的正数,最多支持两位小数";
/** /**
* 替换类型无法登记保单保费 * 替换类型无法登记保单保费
*/ */
...@@ -525,7 +525,7 @@ public class InsurancesConstants { ...@@ -525,7 +525,7 @@ public class InsurancesConstants {
/** /**
* 商险已减员,无法变更项目 * 商险已减员,无法变更项目
*/ */
public static final String DEPT_NO_CHANGE_REFUND_STATUS_ONE_ERROR = "商险减员中,无法变更项目"; public static final String DEPT_NO_CHANGE_REFUND_STATUS_ONE_ERROR = "减员流程中,无法变更项目";
/** /**
* 商险结算中,无法变更项目 * 商险结算中,无法变更项目
......
...@@ -150,7 +150,7 @@ public class ValidityUtil { ...@@ -150,7 +150,7 @@ public class ValidityUtil {
if(Common.isEmpty(idCard)){ if(Common.isEmpty(idCard)){
return Boolean.FALSE ; return Boolean.FALSE ;
} }
return idCard.matches(ValidityConstants.IDCARD_PATTERN) ; return idCard.matches(ValidityConstants.IDCARD_UPPERCASE_PATTERN) ;
} }
/** /**
......
...@@ -38,6 +38,18 @@ public class DeptChangeCheckParam implements Serializable { ...@@ -38,6 +38,18 @@ public class DeptChangeCheckParam implements Serializable {
@Schema(description = "原项目编码") @Schema(description = "原项目编码")
private String oldDeptNo; private String oldDeptNo;
/**
* 新项目名称
*/
@Schema(description = "新项目名称")
private String newDeptName;
/**
* 原项目名称
*/
@Schema(description = "原项目名称")
private String oldDeptName;
/** /**
* 新项目编码 * 新项目编码
*/ */
......
...@@ -3,18 +3,14 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller; ...@@ -3,18 +3,14 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
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.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.insurances.entity.TInsuranceCompany;
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.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.Dept; import com.yifu.cloud.plus.v1.yifu.insurances.vo.Dept;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService; import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*; import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -33,7 +29,6 @@ import java.util.List; ...@@ -33,7 +29,6 @@ import java.util.List;
@RequestMapping("/insuranceDetail") @RequestMapping("/insuranceDetail")
@Tag(name = "商险相关") @Tag(name = "商险相关")
@Validated @Validated
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TInsuranceDetailController { public class TInsuranceDetailController {
@Resource @Resource
private TInsuranceDetailService tInsuranceDetailService; private TInsuranceDetailService tInsuranceDetailService;
......
...@@ -363,8 +363,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -363,8 +363,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//替换不参与结算 //替换不参与结算
newDetail.setDefaultSettleId(null); newDetail.setDefaultSettleId(null);
//保费都默认是0 //保费都默认是0
detail.setActualPremium(new BigDecimal("0.00")); newDetail.setActualPremium(new BigDecimal("0.00"));
detail.setEstimatePremium(new BigDecimal("0.00")); newDetail.setEstimatePremium(new BigDecimal("0.00"));
Boolean insert = this.save(newDetail); Boolean insert = this.save(newDetail);
//替换记录 //替换记录
if (insert){ if (insert){
...@@ -2794,7 +2794,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2794,7 +2794,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
cancel.setSettleId(defaultSettleId); cancel.setSettleId(defaultSettleId);
cancel.setCreateUesr(user.getId()); cancel.setCreateUesr(user.getId());
cancel.setCreateTime(LocalDateTime.now()); cancel.setCreateTime(LocalDateTime.now());
cancel.setDeptName(success.getOldDeptName());
cancel.setIsCancelPush(CommonConstants.ZERO_INT);
tInsuranceSettleCancelService.save(cancel); tInsuranceSettleCancelService.save(cancel);
//推送至EKP执行作废操作
//TODO: 2022/8/2
//推送成功更新推送状态
cancel.setIsCancelPush(CommonConstants.ONE_INT);
tInsuranceSettleCancelService.updateById(cancel);
//生成新的结算信息 //生成新的结算信息
TInsuranceSettle newInsuranceSettle = new TInsuranceSettle(); TInsuranceSettle newInsuranceSettle = new TInsuranceSettle();
newInsuranceSettle.setInsDetailId(insuranceDetailId); newInsuranceSettle.setInsDetailId(insuranceDetailId);
...@@ -2808,8 +2815,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2808,8 +2815,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//赋值新的结算信息id //赋值新的结算信息id
updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,newInsuranceSettle.getId()); updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,newInsuranceSettle.getId());
update(updateWrapper); update(updateWrapper);
//推送至EKP执行作废操作 //推送新的
//作废成功后推送新的 TODO: 2022/8/2 // TODO: 2022/8/2
//推送成功更新推送状态
newInsuranceSettle.setActualPushTime(LocalDateTime.now());
newInsuranceSettle.setIsActualPush(CommonConstants.ONE_INT);
newInsuranceSettle.setUpdateTime(LocalDateTime.now());
tInsuranceSettleService.updateById(newInsuranceSettle);
} }
//如果没有推送过实际保费 //如果没有推送过实际保费
if(byId.getIsActualPush() ==CommonConstants.ZERO_INT){ if(byId.getIsActualPush() ==CommonConstants.ZERO_INT){
...@@ -2825,10 +2837,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2825,10 +2837,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
cancel.setSettleId(defaultSettleId); cancel.setSettleId(defaultSettleId);
cancel.setCreateUesr(user.getId()); cancel.setCreateUesr(user.getId());
cancel.setCreateTime(LocalDateTime.now()); cancel.setCreateTime(LocalDateTime.now());
cancel.setDeptName(success.getOldDeptName());
cancel.setIsCancelPush(CommonConstants.ZERO_INT);
tInsuranceSettleCancelService.save(cancel); tInsuranceSettleCancelService.save(cancel);
//查询旧的结算信息 //查询旧的结算信息
TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId); TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId);
//推送EKP // TODO: 2022/8/2 //推送EKP
// TODO: 2022/8/2
//推送成功更新作废推送状态
cancel.setIsCancelPush(CommonConstants.ONE_INT);
tInsuranceSettleCancelService.updateById(cancel);
//新增新的结算信息 //新增新的结算信息
TInsuranceSettle newInsuranceSettle = new TInsuranceSettle(); TInsuranceSettle newInsuranceSettle = new TInsuranceSettle();
newInsuranceSettle.setInsDetailId(insuranceDetailId); newInsuranceSettle.setInsDetailId(insuranceDetailId);
...@@ -2845,7 +2863,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2845,7 +2863,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateWrapper.set(TInsuranceDetail ::getEstimatePremium,success.getEstimatePremium()); updateWrapper.set(TInsuranceDetail ::getEstimatePremium,success.getEstimatePremium());
updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,newInsuranceSettle.getId()); updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,newInsuranceSettle.getId());
update(updateWrapper); update(updateWrapper);
//推送EKP // TODO: 2022/8/2 //推送EKP
// TODO: 2022/8/2
//推送成功后更新本地推送状态
newInsuranceSettle.setActualPushTime(LocalDateTime.now());
newInsuranceSettle.setEstimatePushTime(LocalDateTime.now());
newInsuranceSettle.setIsActualPush(CommonConstants.ONE_INT);
newInsuranceSettle.setIsEstimatePush(CommonConstants.ONE_INT);
newInsuranceSettle.setUpdateTime(LocalDateTime.now());
tInsuranceSettleService.updateById(newInsuranceSettle);
} }
} }
//未登记保单保费 //未登记保单保费
...@@ -2868,10 +2894,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2868,10 +2894,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettle.setCreateTime(LocalDateTime.now()); tInsuranceSettle.setCreateTime(LocalDateTime.now());
tInsuranceSettleService.save(tInsuranceSettle); tInsuranceSettleService.save(tInsuranceSettle);
//将结算id赋值给保单信息,并新增预估费用 //将结算id赋值给保单信息,并新增预估费用
updateWrapper.set(TInsuranceDetail ::getEstimatePremium,success.getEstimatePremium()); updateWrapper.set(TInsuranceDetail ::getEstimatePremium,success.getEstimatePremium())
updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,tInsuranceSettle.getId()); .set(TInsuranceDetail :: getDefaultSettleId,tInsuranceSettle.getId());
update(updateWrapper); update(updateWrapper);
//推送结算信息至EKP // TODO: 2022/8/2 //推送结算信息至EKP
// TODO: 2022/8/2
//推送成功后更新本地推送状态
tInsuranceSettle.setIsEstimatePush(CommonConstants.ONE_INT);
tInsuranceSettle.setEstimatePushTime(LocalDateTime.now());
tInsuranceSettle.setUpdateTime(LocalDateTime.now());
tInsuranceSettleService.updateById(tInsuranceSettle);
} }
} }
...@@ -2889,9 +2921,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2889,9 +2921,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
cancel.setSettleId(defaultSettleId); cancel.setSettleId(defaultSettleId);
cancel.setCreateUesr(user.getId()); cancel.setCreateUesr(user.getId());
cancel.setCreateTime(LocalDateTime.now()); cancel.setCreateTime(LocalDateTime.now());
cancel.setDeptName(success.getOldDeptName());
cancel.setIsCancelPush(CommonConstants.ZERO_INT);
tInsuranceSettleCancelService.save(cancel); tInsuranceSettleCancelService.save(cancel);
TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId); TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId);
//旧的结算信息推送作废至EKP //推送EKP
// TODO: 2022/8/2
//推送成功更新作废推送状态
cancel.setIsCancelPush(CommonConstants.ONE_INT);
tInsuranceSettleCancelService.updateById(cancel);
//新增新的结算信息 //新增新的结算信息
TInsuranceSettle newInsuranceSettle = new TInsuranceSettle(); TInsuranceSettle newInsuranceSettle = new TInsuranceSettle();
newInsuranceSettle.setInsDetailId(insuranceDetailId); newInsuranceSettle.setInsDetailId(insuranceDetailId);
...@@ -2907,6 +2945,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2907,6 +2945,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,newInsuranceSettle.getId()); updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,newInsuranceSettle.getId());
update(updateWrapper); update(updateWrapper);
//推送新的结算信息至EKP //推送新的结算信息至EKP
// TODO: 2022/8/2
//推送成功,更新推送状态
newInsuranceSettle.setIsActualPush(CommonConstants.ONE_INT);
newInsuranceSettle.setActualPushTime(LocalDateTime.now());
newInsuranceSettle.setUpdateTime(LocalDateTime.now());
tInsuranceSettleService.updateById(newInsuranceSettle);
} }
//变更为合并结算 //变更为合并结算
if (CommonConstants.ZERO_INT == newSettleType){ if (CommonConstants.ZERO_INT == newSettleType){
...@@ -2917,8 +2961,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2917,8 +2961,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
cancel.setSettleId(defaultSettleId); cancel.setSettleId(defaultSettleId);
cancel.setCreateUesr(user.getId()); cancel.setCreateUesr(user.getId());
cancel.setCreateTime(LocalDateTime.now()); cancel.setCreateTime(LocalDateTime.now());
cancel.setDeptName(success.getOldDeptName());
cancel.setIsCancelPush(CommonConstants.ZERO_INT);
tInsuranceSettleCancelService.save(cancel); tInsuranceSettleCancelService.save(cancel);
TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId); TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId);
//推送EKP
// TODO: 2022/8/2
//推送成功更新作废推送状态
cancel.setIsCancelPush(CommonConstants.ONE_INT);
tInsuranceSettleCancelService.updateById(cancel);
//新增新的结算信息 //新增新的结算信息
TInsuranceSettle newInsuranceSettle = new TInsuranceSettle(); TInsuranceSettle newInsuranceSettle = new TInsuranceSettle();
newInsuranceSettle.setInsDetailId(insuranceDetailId); newInsuranceSettle.setInsDetailId(insuranceDetailId);
...@@ -2934,7 +2985,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2934,7 +2985,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateWrapper.set(TInsuranceDetail ::getEstimatePremium,success.getEstimatePremium()); updateWrapper.set(TInsuranceDetail ::getEstimatePremium,success.getEstimatePremium());
updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,newInsuranceSettle.getId()); updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,newInsuranceSettle.getId());
update(updateWrapper); update(updateWrapper);
//推送新的结算信息 // TODO: 2022/8/2 //推送新的结算信息
// TODO: 2022/8/2
//推送成功,更新预估和实际保费的推送状态
newInsuranceSettle.setIsEstimatePush(CommonConstants.ONE_INT);
newInsuranceSettle.setEstimatePushTime(LocalDateTime.now());
newInsuranceSettle.setIsActualPush(CommonConstants.ONE_INT);
newInsuranceSettle.setActualPushTime(LocalDateTime.now());
newInsuranceSettle.setUpdateTime(LocalDateTime.now());
tInsuranceSettleService.updateById(newInsuranceSettle);
} }
} }
//如果没有登记保费 //如果没有登记保费
...@@ -2948,8 +3007,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2948,8 +3007,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
cancel.setSettleId(defaultSettleId); cancel.setSettleId(defaultSettleId);
cancel.setCreateUesr(user.getId()); cancel.setCreateUesr(user.getId());
cancel.setCreateTime(LocalDateTime.now()); cancel.setCreateTime(LocalDateTime.now());
cancel.setDeptName(success.getOldDeptName());
cancel.setIsCancelPush(CommonConstants.ZERO_INT);
tInsuranceSettleCancelService.save(cancel); tInsuranceSettleCancelService.save(cancel);
//推送至EKP // TODO: 2022/8/2 //推送至EKP
// TODO: 2022/8/2
//推送成功后更新作废信息推送状态
cancel.setIsCancelPush(CommonConstants.ONE_INT);
tInsuranceSettleCancelService.updateById(cancel);
//删除预估费用和结算id //删除预估费用和结算id
updateWrapper.set(TInsuranceDetail ::getEstimatePremium,new BigDecimal("0.00")); updateWrapper.set(TInsuranceDetail ::getEstimatePremium,new BigDecimal("0.00"));
updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,null); updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,null);
...@@ -2964,9 +3029,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2964,9 +3029,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
cancel.setSettleId(defaultSettleId); cancel.setSettleId(defaultSettleId);
cancel.setCreateUesr(user.getId()); cancel.setCreateUesr(user.getId());
cancel.setCreateTime(LocalDateTime.now()); cancel.setCreateTime(LocalDateTime.now());
cancel.setDeptName(success.getOldDeptName());
cancel.setIsCancelPush(CommonConstants.ZERO_INT);
tInsuranceSettleCancelService.save(cancel); tInsuranceSettleCancelService.save(cancel);
TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId); TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId);
//推送至EKP作废 // TODO: 2022/8/2 //推送至EKP作废
// TODO: 2022/8/2
//推送成功更新作废推送状态
cancel.setIsCancelPush(CommonConstants.ONE_INT);
tInsuranceSettleCancelService.updateById(cancel);
//新增新的结算信息 //新增新的结算信息
TInsuranceSettle newInsuranceSettle = new TInsuranceSettle(); TInsuranceSettle newInsuranceSettle = new TInsuranceSettle();
newInsuranceSettle.setInsDetailId(insuranceDetailId); newInsuranceSettle.setInsDetailId(insuranceDetailId);
...@@ -2981,7 +3052,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2981,7 +3052,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateWrapper.set(TInsuranceDetail ::getEstimatePremium,success.getEstimatePremium()); updateWrapper.set(TInsuranceDetail ::getEstimatePremium,success.getEstimatePremium());
updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,newInsuranceSettle.getId()); updateWrapper.set(TInsuranceDetail :: getDefaultSettleId,newInsuranceSettle.getId());
update(updateWrapper); update(updateWrapper);
//推送新的结算信息至EKP // TODO: 2022/8/2 //推送新的结算信息至EKP
// TODO: 2022/8/2
//推送成功更新预估推送状态
newInsuranceSettle.setIsEstimatePush(CommonConstants.ONE_INT);
newInsuranceSettle.setEstimatePushTime(LocalDateTime.now());
newInsuranceSettle.setUpdateTime(LocalDateTime.now());
tInsuranceSettleService.updateById(newInsuranceSettle);
} }
} }
} }
...@@ -3684,7 +3761,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3684,7 +3761,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue; continue;
} }
//根据项目编码查询项目是否存在 //根据项目编码查询项目是否存在
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(Arrays.asList(newDeptNo)); R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(Arrays.asList(newDeptNo,oldDeptNo));
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS) { if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap(); Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
if (MapUtils.isEmpty(data)){ if (MapUtils.isEmpty(data)){
...@@ -3694,6 +3771,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3694,6 +3771,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}else { }else {
//结算类型,根据项目编码获取,并冗余到明细记录中 //结算类型,根据项目编码获取,并冗余到明细记录中
ProjectSetInfoVo jsonObject = data.get(newDeptNo); ProjectSetInfoVo jsonObject = data.get(newDeptNo);
ProjectSetInfoVo oldJsonObject = data.get(oldDeptNo);
param.setOldDeptName(oldJsonObject.getDepartName());
param.setNewDeptName(jsonObject.getDepartName());
String settleType = jsonObject.getInsuranceSettleType(); String settleType = jsonObject.getInsuranceSettleType();
if (StringUtils.isEmpty(settleType)){ if (StringUtils.isEmpty(settleType)){
param.setErrorMessage(InsurancesConstants.PROJECT_NOT_FIND_SETTLE_TYPE); param.setErrorMessage(InsurancesConstants.PROJECT_NOT_FIND_SETTLE_TYPE);
......
...@@ -84,14 +84,6 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp ...@@ -84,14 +84,6 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
if (Common.isEmpty(byId) || CommonConstants.ONE_INT == byId.getDeleteFlag()){ if (Common.isEmpty(byId) || CommonConstants.ONE_INT == byId.getDeleteFlag()){
return R.failed("购买标准信息不存在或已被删除"); return R.failed("购买标准信息不存在或已被删除");
} }
LambdaQueryWrapper<TInsuranceDetail> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceDetail::getInsuranceTypeId,byId.getInsuranceTypeId())
.eq(TInsuranceDetail::getBuyStandard,byId.getBuyStandard())
.eq(TInsuranceDetail::getDeleteFlag,CommonConstants.ZERO_INT);
List<TInsuranceDetail> list = tInsuranceDetailService.list(queryWrapper);
if (Common.isNotEmpty(list)){
return R.failed("当前险种的购买标准已存在对应的商险信息,不能删除");
}
LambdaUpdateWrapper<TInsuranceTypeStandard> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<TInsuranceTypeStandard> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TInsuranceTypeStandard::getId,id) updateWrapper.eq(TInsuranceTypeStandard::getId,id)
.set(TInsuranceTypeStandard::getDeleteFlag, CommonConstants.ONE_INT) .set(TInsuranceTypeStandard::getDeleteFlag, CommonConstants.ONE_INT)
......
...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.annotation.TableField; ...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
...@@ -60,12 +61,14 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -60,12 +61,14 @@ public class TPreDispatchInfo extends BaseEntity {
@Schema(description ="派单类型:0 派增 1 派减") @Schema(description ="派单类型:0 派增 1 派减")
@NotNull(message = "派单类型不可为空") @NotNull(message = "派单类型不可为空")
@Size(max = 2, message = "派单类型不可超过2位") @Size(max = 2, message = "派单类型不可超过2位")
@ExcelAttribute(name = "派单类型", maxLength = 2)
private String type; private String type;
/** /**
* 日期,格式:2020-12-25 * 日期,格式:2020-12-25
*/ */
@Schema(description ="日期,格式:2020-12-25") @Schema(description ="日期,格式:2020-12-25")
@ExcelAttribute(name = "日期")
private String date; private String date;
/** /**
...@@ -73,13 +76,15 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -73,13 +76,15 @@ public class TPreDispatchInfo extends BaseEntity {
*/ */
@Schema(description ="接单分公司") @Schema(description ="接单分公司")
@Size(max = 50, message = "接单分公司不可超过50位") @Size(max = 50, message = "接单分公司不可超过50位")
@ExcelAttribute(name = "接单分公司", maxLength = 50)
private String company; private String company;
/** /**
* 缴费地 * 缴费地
*/ */
@Schema(description ="缴费地") @Schema(description ="缴费地")
@Size(max = 20, message = "接单分公司不可超过20位") @Size(max = 20, message = "缴费地不可超过20位")
@ExcelAttribute(name = "缴费地", isNotEmpty = true,errorInfo = "缴费地不能为空", maxLength = 20)
private String payAddress; private String payAddress;
/** /**
...@@ -87,6 +92,7 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -87,6 +92,7 @@ public class TPreDispatchInfo extends BaseEntity {
*/ */
@Schema(description ="客户名称") @Schema(description ="客户名称")
@Size(max = 50, message = "客户名称不可超过50位") @Size(max = 50, message = "客户名称不可超过50位")
@ExcelAttribute(name = "客户名称", errorInfo = "客户名称不能为空", maxLength = 50)
private String customerName; private String customerName;
/** /**
...@@ -95,6 +101,7 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -95,6 +101,7 @@ public class TPreDispatchInfo extends BaseEntity {
@Schema(description ="身份证号") @Schema(description ="身份证号")
@NotNull(message = "身份证号码不可为空") @NotNull(message = "身份证号码不可为空")
@Size(max = 20, message = "身份证号码不可超过20位") @Size(max = 20, message = "身份证号码不可超过20位")
@ExcelAttribute(name = "身份证号", isNotEmpty = true,errorInfo = "身份证号不能为空", maxLength = 20, isIdCard = true)
private String empIdcard; private String empIdcard;
/** /**
...@@ -103,18 +110,21 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -103,18 +110,21 @@ public class TPreDispatchInfo extends BaseEntity {
@Schema(description ="员工姓名") @Schema(description ="员工姓名")
@NotNull(message = "员工姓名不可为空") @NotNull(message = "员工姓名不可为空")
@Size(max = 20, message = "员工姓名不可超过20位") @Size(max = 20, message = "员工姓名不可超过20位")
@ExcelAttribute(name = "员工姓名", isNotEmpty = true, maxLength = 20)
private String empName; private String empName;
/** /**
* 联系电话1 * 联系电话1
*/ */
@Schema(description ="联系电话1") @Schema(description ="联系电话1")
@ExcelAttribute(name = "联系电话1", maxLength = 20)
private String telOne; private String telOne;
/** /**
* 联系电话2 * 联系电话2
*/ */
@Schema(description ="联系电话2") @Schema(description ="联系电话2")
@ExcelAttribute(name = "联系电话2", maxLength = 20)
private String telTwo; private String telTwo;
/** /**
...@@ -122,12 +132,14 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -122,12 +132,14 @@ public class TPreDispatchInfo extends BaseEntity {
*/ */
@Schema(description ="入职日期") @Schema(description ="入职日期")
@Size(max = 20, message = "入职日期不可超过20位") @Size(max = 20, message = "入职日期不可超过20位")
@ExcelAttribute(name = "入职日期",isDate = true,dateFormatExport = DateUtil.ISO_EXPANDED_DATE_FORMAT)
private String entryDate; private String entryDate;
/** /**
* 正式工资 * 正式工资
*/ */
@Schema(description ="正式工资") @Schema(description ="正式工资")
@ExcelAttribute(name = "正式工资")
private String formalSalary; private String formalSalary;
/** /**
...@@ -135,6 +147,7 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -135,6 +147,7 @@ public class TPreDispatchInfo extends BaseEntity {
*/ */
@Schema(description ="派遣开始日期") @Schema(description ="派遣开始日期")
@Size(max = 20, message = "派遣开始日期不可超过20位") @Size(max = 20, message = "派遣开始日期不可超过20位")
@ExcelAttribute(name = "派遣开始日期", maxLength = 20)
private String dispatchStart; private String dispatchStart;
/** /**
...@@ -149,6 +162,7 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -149,6 +162,7 @@ public class TPreDispatchInfo extends BaseEntity {
*/ */
@Schema(description ="合同开始日期") @Schema(description ="合同开始日期")
@Size(max = 20, message = "合同开始日期不可超过20位") @Size(max = 20, message = "合同开始日期不可超过20位")
@ExcelAttribute(name = "派遣结束日期", maxLength = 20)
private String contractStart; private String contractStart;
/** /**
...@@ -156,13 +170,15 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -156,13 +170,15 @@ public class TPreDispatchInfo extends BaseEntity {
*/ */
@Schema(description ="合同终止日期") @Schema(description ="合同终止日期")
@Size(max = 20, message = "合同终止日期不可超过20位") @Size(max = 20, message = "合同终止日期不可超过20位")
@ExcelAttribute(name = "合同终止日期", isDate = true, dateFormatExport = DateUtil.ISO_EXPANDED_DATE_FORMAT)
private String contractEnd; private String contractEnd;
/** /**
* 使用开始日期 * 用开始日期
*/ */
@Schema(description ="使用开始日期") @Schema(description ="试用开始日期")
@Size(max = 20, message = "使用开始日期不可超过20位") @Size(max = 20, message = "试用开始日期不可超过20位")
@ExcelAttribute(name = "试用开始日期", maxLength = 20)
private String trialStart; private String trialStart;
/** /**
...@@ -170,12 +186,14 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -170,12 +186,14 @@ public class TPreDispatchInfo extends BaseEntity {
*/ */
@Schema(description ="试用结束日期") @Schema(description ="试用结束日期")
@Size(max = 20, message = "试用结束日期不可超过20位") @Size(max = 20, message = "试用结束日期不可超过20位")
@ExcelAttribute(name = "试用结束日期", maxLength = 20)
private String trialEnd; private String trialEnd;
/** /**
* 试用期工资 * 试用期工资
*/ */
@Schema(description ="试用期工资") @Schema(description ="试用期工资")
@ExcelAttribute(name = "试用期工资")
private String trialSalary; private String trialSalary;
/** /**
...@@ -183,6 +201,7 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -183,6 +201,7 @@ public class TPreDispatchInfo extends BaseEntity {
*/ */
@Schema(description ="工作制") @Schema(description ="工作制")
@Size(max = 20, message = "工作制不可超过20位") @Size(max = 20, message = "工作制不可超过20位")
@ExcelAttribute(name = "工作制", maxLength = 20)
private String workingSystem; private String workingSystem;
/** /**
...@@ -190,156 +209,182 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -190,156 +209,182 @@ public class TPreDispatchInfo extends BaseEntity {
*/ */
@Schema(description ="合同版本") @Schema(description ="合同版本")
@Size(max = 20, message = "合同版本不可超过20位") @Size(max = 20, message = "合同版本不可超过20位")
@ExcelAttribute(name = "合同版本", maxLength = 20)
private String contractVersion; private String contractVersion;
/** /**
* 是否电话通知 * 是否电话通知
*/ */
@Schema(description ="是否电话通知") @Schema(description ="是否电话通知")
@ExcelAttribute(name = "是否电话通知")
private String telNotice; private String telNotice;
/** /**
* 实际工作地 * 实际工作地
*/ */
@Schema(description ="实际工作地") @Schema(description ="实际工作地")
@ExcelAttribute(name = "实际工作地")
private String workingAddress; private String workingAddress;
/** /**
* 备注说明1 * 备注说明1
*/ */
@Schema(description ="备注说明1") @Schema(description ="备注说明1")
@ExcelAttribute(name = "备注说明1", maxLength = 255)
private String remarkOne; private String remarkOne;
/** /**
* 备注说明2 * 备注说明2
*/ */
@Schema(description ="备注说明2") @Schema(description ="备注说明2")
@ExcelAttribute(name = "备注说明2", maxLength = 255)
private String remarkTwo; private String remarkTwo;
/** /**
* 养老城市 * 养老城市
*/ */
@Schema(description ="养老城市") @Schema(description ="养老城市")
@ExcelAttribute(name = "养老城市")
private String pensionAddress; private String pensionAddress;
/** /**
* 养老基数 * 养老基数
*/ */
@Schema(description ="养老基数") @Schema(description ="养老基数")
@ExcelAttribute(name = "养老基数")
private BigDecimal pensionBase; private BigDecimal pensionBase;
/** /**
* 养老起缴月 * 养老起缴月
*/ */
@Schema(description ="养老起缴月") @Schema(description ="养老起缴月")
@ExcelAttribute(name = "养老起缴月")
private String pensionStart; private String pensionStart;
/** /**
* 医疗城市 * 医疗城市
*/ */
@Schema(description ="医疗城市") @Schema(description ="医疗城市")
@ExcelAttribute(name = "医疗城市")
private String medicalAddress; private String medicalAddress;
/** /**
* 医疗基数 * 医疗基数
*/ */
@Schema(description ="医疗基数") @Schema(description ="医疗基数")
@ExcelAttribute(name = "医疗基数")
private BigDecimal medicalBase; private BigDecimal medicalBase;
/** /**
* 医疗起缴月 * 医疗起缴月
*/ */
@Schema(description ="医疗起缴月") @Schema(description ="医疗起缴月")
@ExcelAttribute(name = "医疗起缴月")
private String medicalStart; private String medicalStart;
/** /**
* 工伤城市 * 工伤城市
*/ */
@Schema(description ="工伤城市") @Schema(description ="工伤城市")
@ExcelAttribute(name = "工伤城市")
private String injuryAddress; private String injuryAddress;
/** /**
* 工伤基数 * 工伤基数
*/ */
@Schema(description ="工伤基数") @Schema(description ="工伤基数")
@ExcelAttribute(name = "工伤基数")
private BigDecimal injuryBase; private BigDecimal injuryBase;
/** /**
* 工伤起缴月 * 工伤起缴月
*/ */
@Schema(description ="工伤起缴月") @Schema(description ="工伤起缴月")
@ExcelAttribute(name = "工伤起缴月")
private String injuryStart; private String injuryStart;
/** /**
* 生育城市 * 生育城市
*/ */
@Schema(description ="生育城市") @Schema(description ="生育城市")
@ExcelAttribute(name = "生育城市", maxLength = 15)
private String birthAddress; private String birthAddress;
/** /**
* 生育基数 * 生育基数
*/ */
@Schema(description ="生育基数") @Schema(description ="生育基数")
@ExcelAttribute(name = "生育基数")
private BigDecimal birthBase; private BigDecimal birthBase;
/** /**
* 生育起缴月 * 生育起缴月
*/ */
@Schema(description ="生育起缴月") @Schema(description ="生育起缴月")
@ExcelAttribute(name = "生育起缴月", maxLength = 6)
private String birthStart; private String birthStart;
/** /**
* 失业城市 * 失业城市
*/ */
@Schema(description ="失业城市") @Schema(description ="失业城市")
@ExcelAttribute(name = "失业城市", maxLength = 15)
private String unemploymentAddress; private String unemploymentAddress;
/** /**
* 失业基数 * 失业基数
*/ */
@Schema(description ="失业基数") @Schema(description ="失业基数")
@ExcelAttribute(name = "失业基数")
private BigDecimal unemploymentBase; private BigDecimal unemploymentBase;
/** /**
* 失业起缴月 * 失业起缴月
*/ */
@Schema(description ="失业起缴月") @Schema(description ="失业起缴月")
@ExcelAttribute(name = "失业起缴月", maxLength = 6)
private String unemploymentStart; private String unemploymentStart;
/** /**
* 公积金城市 * 公积金城市
*/ */
@Schema(description ="公积金城市") @Schema(description ="公积金城市")
@ExcelAttribute(name = "公积金城市", maxLength = 15)
private String fundAddress; private String fundAddress;
/** /**
* 公积金基数 * 公积金基数
*/ */
@Schema(description ="公积金基数") @Schema(description ="公积金基数")
@ExcelAttribute(name = "公积金基数", isFloat = true)
private BigDecimal fundBase; private BigDecimal fundBase;
/** /**
* 公积金起缴月 * 公积金起缴月
*/ */
@Schema(description ="公积金起缴月") @Schema(description ="公积金起缴月")
@ExcelAttribute(name = "公积金起缴月", maxLength = 6)
private String fundStart; private String fundStart;
/** /**
* 公积金个人比例 * 公积金个人比例
*/ */
@Schema(description ="公积金个人比例") @Schema(description ="公积金个人比例")
@ExcelAttribute(name = "公积金个人比例", isFloat = true)
private BigDecimal fundPersonalPer; private BigDecimal fundPersonalPer;
/** /**
* 公积金企业比例 * 公积金企业比例
*/ */
@Schema(description ="公积金企业比例") @Schema(description ="公积金企业比例")
@ExcelAttribute(name = "公积金企业比例", isFloat = true)
private BigDecimal fundCompanyPer; private BigDecimal fundCompanyPer;
/** /**
* 派单分公司 * 派单分公司
*/ */
@Schema(description ="派单分公司") @Schema(description ="派单分公司")
@ExcelAttribute(name = "派单分公司", maxLength = 50)
private String dispatchCompany; private String dispatchCompany;
/** /**
...@@ -347,12 +392,14 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -347,12 +392,14 @@ public class TPreDispatchInfo extends BaseEntity {
*/ */
@Schema(description ="派单客服") @Schema(description ="派单客服")
@Size(max = 20, message = "派单客服不可超过20位") @Size(max = 20, message = "派单客服不可超过20位")
@ExcelAttribute(name = "派单客服", maxLength = 20)
private String customerService; private String customerService;
/** /**
* 小合同名称 * 小合同名称
*/ */
@Schema(description ="小合同名称") @Schema(description ="小合同名称")
@ExcelAttribute(name = "小合同名称", maxLength = 150)
private String contractMinorName; private String contractMinorName;
/** /**
...@@ -360,12 +407,14 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -360,12 +407,14 @@ public class TPreDispatchInfo extends BaseEntity {
*/ */
@Schema(description ="唯一号") @Schema(description ="唯一号")
@Size(max = 20, message = "唯一号不可超过20位") @Size(max = 20, message = "唯一号不可超过20位")
@ExcelAttribute(name = "唯一号", maxLength = 20)
private String uniqueNumber; private String uniqueNumber;
/** /**
* 客户编号 * 客户编号
*/ */
@Schema(description ="客户编号") @Schema(description ="客户编号")
@ExcelAttribute(name = "客户编号", maxLength = 20)
private String customerNumber; private String customerNumber;
/** /**
...@@ -373,96 +422,112 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -373,96 +422,112 @@ public class TPreDispatchInfo extends BaseEntity {
*/ */
@Schema(description ="服务类别") @Schema(description ="服务类别")
@Size(max = 20, message = "服务类别不可超过20位") @Size(max = 20, message = "服务类别不可超过20位")
@ExcelAttribute(name = "服务类别", maxLength = 20)
private String serviceType; private String serviceType;
/** /**
* 养老城市 * 养老城市
*/ */
@Schema(description ="养老城市") @Schema(description ="养老城市")
@ExcelAttribute(name = "养老城市", maxLength = 15)
private String pensionAddressReduce; private String pensionAddressReduce;
/** /**
* 养老截止时间 * 养老截止时间
*/ */
@Schema(description ="养老截止时间") @Schema(description ="养老截止时间")
@ExcelAttribute(name = "养老时间")
private String pensionEndReduce; private String pensionEndReduce;
/** /**
* 医疗城市 * 医疗城市
*/ */
@Schema(description ="医疗城市") @Schema(description ="医疗城市")
@ExcelAttribute(name = "医疗城市", maxLength = 15)
private String medicalAddressReduce; private String medicalAddressReduce;
/** /**
* 医疗截止时间 * 医疗截止时间
*/ */
@Schema(description ="医疗截止时间") @Schema(description ="医疗截止时间")
@ExcelAttribute(name = "医疗时间")
private String medicalEndReduce; private String medicalEndReduce;
/** /**
* 工伤城市 * 工伤城市
*/ */
@Schema(description ="工伤城市") @Schema(description ="工伤城市")
@ExcelAttribute(name = "工伤城市", maxLength = 15)
private String injuryAddressReduce; private String injuryAddressReduce;
/** /**
* 工伤截止时间 * 工伤截止时间
*/ */
@Schema(description ="工伤截止时间") @Schema(description ="工伤时间")
@ExcelAttribute(name = "工伤时间")
private String injuryEndReduce; private String injuryEndReduce;
/** /**
* 生育城市 * 生育城市
*/ */
@Schema(description ="生育城市") @Schema(description ="生育城市")
@ExcelAttribute(name = "生育城市", maxLength = 15)
private String birthAddressReduce; private String birthAddressReduce;
/** /**
* 生育截止时间 * 生育截止时间
*/ */
@Schema(description ="生育截止时间") @Schema(description ="生育时间")
@ExcelAttribute(name = "生育时间")
private String birthEndReduce; private String birthEndReduce;
/** /**
* 失业城市 * 失业城市
*/ */
@Schema(description ="失业城市") @Schema(description ="失业城市")
@ExcelAttribute(name = "失业城市", maxLength = 15)
private String unemploymentAddressReduce; private String unemploymentAddressReduce;
/** /**
* 失业截止时间 * 失业截止时间
*/ */
@Schema(description ="失业截止时间") @Schema(description ="失业时间")
@ExcelAttribute(name = "失业时间", maxLength = 6, isInteger = true)
private String unemploymentEndReduce; private String unemploymentEndReduce;
/** /**
* 公积金城市 * 公积金城市
*/ */
@Schema(description ="公积金城市") @Schema(description ="公积金城市")
@ExcelAttribute(name = "公积金城市", maxLength = 15)
private String fundAddressReduce; private String fundAddressReduce;
/** /**
* 公积金截止时间 * 公积金截止时间
*/ */
@Schema(description ="公积金截止时间") @Schema(description ="公积金时间")
@ExcelAttribute(name = "公积金时间", maxLength = 6, isInteger = true)
private String fundEndReduce; private String fundEndReduce;
/** /**
* 离职日期 * 离职日期
*/ */
@Schema(description ="离职日期") @Schema(description ="离职日期")
@ExcelAttribute(name = "离职日期")
private Date leaveDate; private Date leaveDate;
/** /**
* 离职原因 * 离职原因
*/ */
@Schema(description ="离职原因") @Schema(description ="离职原因")
@ExcelAttribute(name = "离职原因")
private String leaveReason; private String leaveReason;
/** /**
* 合同类型 * 合同类型
*/ */
@Schema(description ="合同类型") @Schema(description ="合同类型")
@ExcelAttribute(name = "合同类型")
private String contractType; private String contractType;
/** /**
...@@ -471,108 +536,126 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -471,108 +536,126 @@ public class TPreDispatchInfo extends BaseEntity {
@Schema(description ="员工类型") @Schema(description ="员工类型")
@Size(max = 20, message = "员工类型不可超过20位") @Size(max = 20, message = "员工类型不可超过20位")
@NotNull(message = "员工类型不可为空") @NotNull(message = "员工类型不可为空")
@ExcelAttribute(name = "员工类型")
private String empTypeAdd; private String empTypeAdd;
/** /**
* 所属单位ID * 所属单位ID
*/ */
@Schema(description ="所属单位ID") @Schema(description ="所属单位ID")
@ExcelAttribute(name = "所属单位ID", maxLength = 32)
private String unitIdAdd; private String unitIdAdd;
/** /**
* 所属项目ID * 所属项目ID
*/ */
@Schema(description ="所属项目ID") @Schema(description ="所属项目ID")
@ExcelAttribute(name = "所属项目ID", maxLength = 32)
private String departIdAdd; private String departIdAdd;
/** /**
* 所属单位名称 * 所属单位名称
*/ */
@Schema(description ="所属单位名称") @Schema(description ="所属单位名称")
@ExcelAttribute(name = "所属单位名称", maxLength = 50)
private String unitNameAdd; private String unitNameAdd;
/** /**
* 所属项目名称 * 所属项目名称
*/ */
@Schema(description ="所属项目名称") @Schema(description ="所属项目名称")
@ExcelAttribute(name = "所属项目名称", maxLength = 50)
private String departNameAdd; private String departNameAdd;
/** /**
* 社保户 * 社保户
*/ */
@Schema(description ="社保户") @Schema(description ="社保户")
@ExcelAttribute(name = "社保户")
private String socialHouseAdd; private String socialHouseAdd;
/** /**
* 公积金户 * 公积金户
*/ */
@Schema(description ="公积金户") @Schema(description ="公积金户")
@ExcelAttribute(name = "公积金户", maxLength = 50)
private String fundHouseAdd; private String fundHouseAdd;
/** /**
* 备案基数 * 备案基数
*/ */
@Schema(description ="备案基数") @Schema(description ="备案基数")
@ExcelAttribute(name = "备案基数", isFloat = true)
private BigDecimal filingBaseAdd; private BigDecimal filingBaseAdd;
/** /**
* 0:正常未派单1:异常未派单2:已派单 * 0:正常未派单1:异常未派单2:已派单
*/ */
@Schema(description ="0:正常未派单1:异常未派单2:已派单") @Schema(description ="0:正常未派单1:异常未派单2:已派单")
@ExcelAttribute(name = "派单状态")
private String preStatus; private String preStatus;
/** /**
* 0:正常1:作废 * 0:正常1:作废
*/ */
@Schema(description ="0:正常1:作废") @Schema(description ="0:正常1:作废")
@ExcelAttribute(name = "预派单状态", maxLength = 1)
private String status; private String status;
/** /**
* 异常内容 * 异常内容
*/ */
@Schema(description ="异常内容") @Schema(description ="异常内容")
@ExcelAttribute(name = "异常内容")
private String exceptionContent; private String exceptionContent;
/** /**
* 社保-省 * 社保-省
*/ */
@Schema(description ="社保-省") @Schema(description ="社保-省")
@ExcelAttribute(name = "社保-省")
private String socialProvince; private String socialProvince;
/** /**
* 社保-市 * 社保-市
*/ */
@Schema(description ="社保-市") @Schema(description ="社保-市")
@ExcelAttribute(name = "社保-市")
private String socialCity; private String socialCity;
/** /**
* 社保-县 * 社保-县
*/ */
@Schema(description ="社保-县") @Schema(description ="社保-县")
@ExcelAttribute(name = "社保-县")
private String socialTown; private String socialTown;
/** /**
* 公积金-省 * 公积金-省
*/ */
@Schema(description ="公积金-省") @Schema(description ="公积金-省")
@ExcelAttribute(name = "公积金-省")
private String fundProvince; private String fundProvince;
/** /**
* 公积金-市 * 公积金-市
*/ */
@Schema(description ="公积金-市") @Schema(description ="公积金-市")
@ExcelAttribute(name = "公积金-市")
private String fundCity; private String fundCity;
/** /**
* 公积金-县 * 公积金-县
*/ */
@Schema(description ="公积金-县") @Schema(description ="公积金-县")
@ExcelAttribute(name = "公积金-县")
private String fundTown; private String fundTown;
/** /**
* 派单日期限制 在15日前可派单 15日及15后次月派单 * 派单日期限制 在15日前可派单 15日及15后次月派单
*/ */
@Schema(description ="派单日期限制 在15日前可派单 15日及15后次月派单") @Schema(description ="派单日期限制 在15日前可派单 15日及15后次月派单")
@ExcelAttribute(name = "派单日期限制", isInteger = true)
private Integer dayLimit; private Integer dayLimit;
/** /**
...@@ -581,6 +664,7 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -581,6 +664,7 @@ public class TPreDispatchInfo extends BaseEntity {
@Schema(description ="资料是否提交: 0 已提交 1 未提交") @Schema(description ="资料是否提交: 0 已提交 1 未提交")
@NotNull(message = "资料是否提交不可为空") @NotNull(message = "资料是否提交不可为空")
@Size(max = 2, message = "资料是否提交不可超过2位") @Size(max = 2, message = "资料是否提交不可超过2位")
@ExcelAttribute(name = "资料是否提交", maxLength = 2)
private String dataSubStatus; private String dataSubStatus;
/** /**
...@@ -589,36 +673,42 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -589,36 +673,42 @@ public class TPreDispatchInfo extends BaseEntity {
@Schema(description ="岗位") @Schema(description ="岗位")
@NotNull(message = "岗位不可为空") @NotNull(message = "岗位不可为空")
@Size(max = 50, message = "岗位不可超过50位") @Size(max = 50, message = "岗位不可超过50位")
@ExcelAttribute(name = "岗位")
private String positionAdd; private String positionAdd;
/** /**
* 派单的合同名称 * 派单的合同名称
*/ */
@Schema(description ="派单的合同名称") @Schema(description ="派单的合同名称")
@ExcelAttribute(name = "派单合同名称")
private String contractNameAdd; private String contractNameAdd;
/** /**
* 派单的合同类型 * 派单的合同类型
*/ */
@Schema(description ="派单的合同类型") @Schema(description ="派单的合同类型")
@ExcelAttribute(name = "派单合同类型")
private String contractTypeAdd; private String contractTypeAdd;
/** /**
* 合同开始时间 * 合同开始时间
*/ */
@Schema(description ="合同开始时间") @Schema(description ="合同开始时间")
@ExcelAttribute(name = "合同开始时间")
private String contractStartAdd; private String contractStartAdd;
/** /**
* 合同截止时间 * 合同截止时间
*/ */
@Schema(description ="合同截止时间") @Schema(description ="合同截止时间")
@ExcelAttribute(name = "合同截止时间")
private String contractEndAdd; private String contractEndAdd;
/** /**
* 合同期限:默认两年 * 合同期限:默认两年
*/ */
@Schema(description ="合同期限:默认两年") @Schema(description ="合同期限:默认两年")
@ExcelAttribute(name = "合同期限")
private String contractTermAdd; private String contractTermAdd;
/** /**
...@@ -637,24 +727,28 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -637,24 +727,28 @@ public class TPreDispatchInfo extends BaseEntity {
* 备注 * 备注
*/ */
@Schema(description ="备注") @Schema(description ="备注")
@ExcelAttribute(name = "备注")
private String remark; private String remark;
/** /**
* 是否派单:0 是 1 否 * 是否派单:0 是 1 否
*/ */
@Schema(description ="是否派单:0 是 1 否 ") @Schema(description ="是否派单:0 是 1 否 ")
@ExcelAttribute(name = "是否派单")
private String dispatchFlag; private String dispatchFlag;
/** /**
* 取消原因:不派单时填写 * 取消原因:不派单时填写
*/ */
@Schema(description ="取消原因:不派单时填写") @Schema(description ="取消原因:不派单时填写")
@ExcelAttribute(name = "取消原因")
private String cancelRemark; private String cancelRemark;
/** /**
* 创建人部门名称 * 创建人部门名称
*/ */
@Schema(description ="创建人部门名称") @Schema(description ="创建人部门名称")
@ExcelAttribute(name = "创建人部门名称")
private String userDeptName; private String userDeptName;
/** /**
......
...@@ -88,6 +88,7 @@ public class TAgentConfigServiceImpl extends ServiceImpl<TAgentConfigMapper, TAg ...@@ -88,6 +88,7 @@ public class TAgentConfigServiceImpl extends ServiceImpl<TAgentConfigMapper, TAg
if (Common.isNotNull(count)) { if (Common.isNotNull(count)) {
return R.failed("同一城市,年度的政策不能重复新增"); return R.failed("同一城市,年度的政策不能重复新增");
} }
baseMapper.insert(tAgentConfig);
return R.ok(); return R.ok();
} }
} }
...@@ -2096,16 +2096,22 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2096,16 +2096,22 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
Map<String, TSocialFundInfo> socialFundMap = getSocialFundMap(idcards); Map<String, TSocialFundInfo> socialFundMap = getSocialFundMap(idcards);
// 获取项目编码数据 以供校验 // 获取项目编码数据 以供校验
Map<String, ProjectSetInfoVo> projectVoMap = getProjectVoMap(codes); Map<String, ProjectSetInfoVo> projectVoMap = getProjectVoMap(codes);
DispatchEmpVo empVo = null; DispatchEmpVo empVo;
TDispatchInfo dispatch; TDispatchInfo dispatch;
TDispatchReduceVo excel; TDispatchReduceVo excel;
TSocialFundInfo socialFund; TSocialFundInfo socialFund;
ProjectSetInfoVo setInfoVo = null; ProjectSetInfoVo setInfoVo;
// 执行数据插入操作 组装 // 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
socialFund = null;
setInfoVo= null;
empVo= null;
dispatch= null;
excel = excelVOList.get(i); excel = excelVOList.get(i);
setInfoVo = getSetInfoVo(projectVoMap,excel.getDepartNo()); setInfoVo = getSetInfoVo(projectVoMap,excel.getDepartNo());
if (Common.isNotNull(socialFundMap)){
socialFund = socialFundMap.get(excel.getEmpIdcard()); socialFund = socialFundMap.get(excel.getEmpIdcard());
}
if (Common.isEmpty(setInfoVo)){ if (Common.isEmpty(setInfoVo)){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_PROJECT_NOT_FOUND))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_PROJECT_NOT_FOUND)));
continue; continue;
......
...@@ -1825,6 +1825,33 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -1825,6 +1825,33 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
} }
} }
/**
* map数据封装
*
* @param settleDomainList
* @param settleDomainNameMap
* @param customerNameMap
* @param settleIdAndCustomerIdMap
* @return
* @Author huyc
* @Date 2022-07-18
**/
private void initSettleDomainMaps(List<TSettleDomainSelectVo> settleDomainList,
Map<String, String> settleDomainNameMap,
Map<String, String> customerNameMap,
Map<String, String> settleIdAndCustomerIdMap) {
//map数据封装
if (Common.isNotNull(settleDomainList)) {
for (TSettleDomainSelectVo settleDomainSelectVo : settleDomainList) {
settleDomainNameMap.put(settleDomainSelectVo.getId(), settleDomainSelectVo.getDepartName());
settleIdAndCustomerIdMap.put(settleDomainSelectVo.getId(), settleDomainSelectVo.getCustomerId());
if (!customerNameMap.containsKey(settleDomainSelectVo.getCustomerName())) {
customerNameMap.put(settleDomainSelectVo.getCustomerId(), settleDomainSelectVo.getCustomerName());
}
}
}
}
/** /**
* 初始化社保公积金基数 * 初始化社保公积金基数
* *
...@@ -1858,33 +1885,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -1858,33 +1885,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
initBaseSetMap(baseSocialTimeMap, baseFundTimeMap, baseSocialSetMap, baseFundSetMap); initBaseSetMap(baseSocialTimeMap, baseFundTimeMap, baseSocialSetMap, baseFundSetMap);
} }
/**
* map数据封装
*
* @param settleDomainList
* @param settleDomainNameMap
* @param customerNameMap
* @param settleIdAndCustomerIdMap
* @return
* @Author huyc
* @Date 2022-07-18
**/
private void initSettleDomainMaps(List<TSettleDomainSelectVo> settleDomainList,
Map<String, String> settleDomainNameMap,
Map<String, String> customerNameMap,
Map<String, String> settleIdAndCustomerIdMap) {
//map数据封装
if (Common.isNotNull(settleDomainList)) {
for (TSettleDomainSelectVo settleDomainSelectVo : settleDomainList) {
settleDomainNameMap.put(settleDomainSelectVo.getId(), settleDomainSelectVo.getDepartName());
settleIdAndCustomerIdMap.put(settleDomainSelectVo.getId(), settleDomainSelectVo.getCustomerId());
if (!customerNameMap.containsKey(settleDomainSelectVo.getCustomerName())) {
customerNameMap.put(settleDomainSelectVo.getCustomerId(), settleDomainSelectVo.getCustomerName());
}
}
}
}
/** /**
* 初始化派减的相关状态及数据 * 初始化派减的相关状态及数据
* *
......
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