Commit 7c9cee9a authored by hongguangwu's avatar hongguangwu

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

parents a314bfe9 992eaa83
......@@ -341,7 +341,7 @@ public class TEmployeeContractPreController {
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/getInfoByRegistId " )
@GetMapping("/getInfoByRegistId" )
public R<TEmployeeContractPre> getInfoByRegistId(@RequestParam("registId" ) String registId) {
return tEmployeeContractPreService.getInfoByRegistId(registId);
}
......
......@@ -237,7 +237,7 @@ public class TSettleDomainController {
TSettleDomainListVo listVo = new TSettleDomainListVo();
listVo.setListSelectVO(list);
if (Common.isNotNull(list)){
listVo.setMapSelectVo(list.stream().collect(Collectors.toMap(TSettleDomain::getDepartNo, k->k)));
listVo.setMapSelectVo(list.stream().collect(Collectors.toMap(TSettleDomain::getDepartNo, k->k, (existing, replacement) -> existing)));
}
return listVo;
}
......@@ -255,7 +255,7 @@ public class TSettleDomainController {
TSettleDomainListVo listVo = new TSettleDomainListVo();
listVo.setListSelectVO(list);
if (Common.isNotNull(list)){
listVo.setMapSelectVo(list.stream().collect(Collectors.toMap(TSettleDomain::getId, k->k)));
listVo.setMapSelectVo(list.stream().collect(Collectors.toMap(TSettleDomain::getId, k->k, (existing, replacement) -> existing)));
}
return listVo;
}
......
......@@ -272,23 +272,59 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
receiveVo.setEmpIdcard(updatePre.getEmpIdcard());
receiveVo.setReason(employeeRegistrationPre.getReason());
receiveVo.setEmployeeId(user.getId());
StringBuilder sb = new StringBuilder();
try {
//调用csp服务更新状态和新增操作记录
cspDaprUtils.updateRegistByPreInfo(receiveVo);
//处理合同待办信息
contractPreMapper.delete(Wrappers.<TEmployeeContractPre>query().lambda()
.eq(TEmployeeContractPre::getRegisterId, updatePre.getId()));
//处理社保待办信息
R<Boolean> booleanR = socialDaprUtils.deleteUnProcessSocialPreInfo(updatePre.getId());
if (null != booleanR && booleanR.getData().booleanValue()){
sb.append("社保");
}
//处理公积金待办信息
booleanR = socialDaprUtils.deleteUnProcessFundPreInfo(updatePre.getId());
if (null != booleanR && booleanR.getData().booleanValue()){
if (sb.length() == 0){
sb.append("公积金");
}else {
sb.append("/公积金");
}
}
//处理商险待办信息
BaseSearchVO insuranceSearchVo = new BaseSearchVO();
insuranceSearchVo.setRegisterId(updatePre.getId());
insuranceDaprUtil.getInsurancesStatus(insuranceSearchVo);
//处理社保待办信息
socialDaprUtils.deleteUnProcessSocialPreInfo(updatePre.getId());
//处理公积金待办信息
socialDaprUtils.deleteUnProcessFundPreInfo(updatePre.getId());
booleanR = insuranceDaprUtil.delInsurancePreByRegisterId(insuranceSearchVo);
if (null != booleanR && booleanR.getData().booleanValue()){
if (sb.length() == 0){
sb.append("商险");
}else {
sb.append("/商险");
}
}
//处理合同待办信息
int res = contractPreMapper.delete(Wrappers.<TEmployeeContractPre>query().lambda()
.eq(TEmployeeContractPre::getRegisterId, updatePre.getId()));
if (res > 0){
if (sb.length() == 0){
sb.append("合同");
}else {
sb.append("/合同");
}
}
} catch (Exception e) {
log.error("调用csp服务更新数据异常", e);
}
//增加操作日期
TEmployeePreLog log = new TEmployeePreLog();
log.setCreateTime(LocalDateTime.now());
log.setCreateName(user.getNickname());
log.setUpdateTime(LocalDateTime.now());
log.setPreId(employeeRegistrationPre.getId());
log.setDiffTitle("联动删除的待办:"+sb);
log.setMenuInfo("入职建档");
tEmployeePreLogService.save(log);
return R.ok();
}
......
......@@ -1250,6 +1250,7 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
return R.ok(baseMapper.selectOne(Wrappers.<TEmployeeContractPre>query().lambda()
.notIn(TEmployeeContractPre::getProcessStatus, Arrays.asList("0","1","3","5","7","10","11"))
.eq(TEmployeeContractPre::getRegisterId, registId)
.last(CommonConstants.LAST_ONE_SQL)));
}
......
......@@ -422,7 +422,7 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
List<TSettleDomain> voList = baseMapper.getSettleInfoByCodes(codes);
TSettleDomainListVo setMap = new TSettleDomainListVo();
if (Common.isNotNull(voList)){
setMap.setMapVO(voList.stream().collect(Collectors.toMap(TSettleDomain::getDepartNo, k->k)));
setMap.setMapVO(voList.stream().collect(Collectors.toMap(TSettleDomain::getDepartNo, k->k, (existing, replacement) -> existing)));
}
return setMap;
}
......
......@@ -970,7 +970,7 @@
b.CONTRACT_START,b.CONTRACT_END,b.CONTRACT_TERM,b.CONTRACT_SUB_NAME,b.CONTRACT_ID,
c.UNIT_NAME,
c.UNIT_NO,c.DEPT_ID,c.DEPT_NAME,c.DEPT_NO,c.POST,c.EMP_NO,c.PROJECT_STATUS,c.EMP_NATRUE,c.TRY_PERIOD
c.UNIT_NO,c.DEPT_ID,c.DEPT_NAME,c.DEPT_NO,c.POST,c.EMP_NO,c.PROJECT_STATUS,c.EMP_NATRUE,ifnull(c.TRY_PERIOD,b.TRY_PERIOD) TRY_PERIOD
,a.SCHOOL
from (
select e.ID,e.EMP_CODE,e.EMP_NAME,e.EMP_IDCARD,e.EMP_NATIONAL,e.EMP_PHONE,e.ID_PROVINCE,e.ID_CITY,
......@@ -1012,7 +1012,7 @@
x.CONTRACT_TERM,
x.CONTRACT_SUB_NAME,
x.ID as "CONTRACT_ID",
x.EMP_IDCARD
x.EMP_IDCARD,x.TRY_PERIOD
FROM
t_employee_contract_info x
WHERE
......
......@@ -644,7 +644,7 @@ public interface CommonConstants {
List<String> processStatus = Stream.of("0","1").collect(Collectors.toList());
List<String> insuranceAutoProcessStatus = Stream.of("0","1","2","5","7").collect(Collectors.toList());
List<String> insuranceAutoProcessStatus = Stream.of("0","1","2","5").collect(Collectors.toList());
List<String> processPreStatus = Stream.of("1").collect(Collectors.toList());
......
......@@ -348,8 +348,8 @@ public class SocialDaprUtils {
* @Param
* @return
**/
public void deleteUnProcessSocialPreInfo(String id){
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl()
public R<Boolean> deleteUnProcessSocialPreInfo(String id){
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl()
, daprProperties.getAppId(),"/tdispatchinfopre/deleteUnProcessSocialPreInfo" , id
, Object.class, SecurityConstants.FROM_IN);
}
......
......@@ -2398,6 +2398,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if (Common.isEmpty(registrationNow)) {
return R.failed(RegistConstants.NO_DATA_TO_HANDLE);
}
if (!CommonConstants.ONE_STRING.equals(registrationNow.getProcessStatus())){
return R.failed("状态非未处理状态,请刷新确认后操作!");
}
registrationNow.setProcessStatus(CommonConstants.THREE_STRING);
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING, RegistConstants.BACK_RECEIVE, LocalDateTime.now(),
user.getNickname(), registration.getLeaveReason());
......
......@@ -439,6 +439,12 @@ public class TInsuranceDetail extends BaseEntity {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
private LocalDate preHandleTime;
/**
* 差额settleId
*/
@TableField(exist = false)
@Schema(description = "差额settleId")
private String balanceId;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -196,4 +196,10 @@ public class EkpInteractiveParam implements Serializable {
*/
@Schema(description = "是否见费出单")
private String isJfcd;
/**
* 差额settleId
*/
@Schema(description = "差额settleId")
private String balanceId;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
......@@ -192,4 +193,11 @@ public class InsuranceExportListOneVO implements Serializable {
*/
@Schema(description = "客户名称")
private String unitName;
/**
* 默认结算信息id
*/
@ExcelIgnore
@Schema(description = "默认结算信息id")
private String defaultSettleId;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -204,4 +207,11 @@ public class InsuranceExportListVO implements Serializable {
@ExcelProperty(value = "派单备注")
private String remarkDispatch;
/**
* 默认结算信息id
*/
@ExcelIgnore
@Schema(description = "默认结算信息id")
private String defaultSettleId;
}
......@@ -337,7 +337,7 @@ public class TEmployeeInsurancePreController {
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/getInfoByRegistId " )
@GetMapping("/getInfoByRegistId" )
public R<TEmployeeInsurancePre> getInfoByRegistId(@RequestParam("registId" ) String registId) {
return tEmployeeInsurancePreService.getInfoByRegistId(registId);
}
......
......@@ -1026,7 +1026,7 @@ public class TInsuranceDetailController {
**/
@Operation(summary = "手动拉取缴费状态", description = "手动拉取缴费状态")
@PostMapping("/pullPaymentStatus")
public R pullPaymentStatus(@RequestParam String idStr) {
return tInsuranceDetailService.pullPaymentStatus(idStr);
public R pullPaymentStatus() {
return tInsuranceDetailService.pullPaymentStatus(null);
}
}
......@@ -23,6 +23,18 @@ public interface TBusinessOperateService extends IService<TBusinessOperate> {
*/
<T> TBusinessOperate saveModificationRecord(String businessId, T oldInfo, T newInfo, String remark);
/**
* 保存修改记录
*
* @author licancan
* @param businessId 业务表主键
* @param oldInfo 老的实体类
* @param newInfo 新的实体类
* @param remark 备注
* @return {@link TBusinessOperate}
*/
<T> TBusinessOperate saveModificationRecord(String businessId, T oldInfo, T newInfo, String remark,String userName);
/**
* 根据业务主键获取操作记录
*
......
......@@ -67,6 +67,31 @@ public class TBusinessOperateServiceImpl extends ServiceImpl<TBusinessOperateMap
return null;
}
@Override
public <T> TBusinessOperate saveModificationRecord(String businessId, T oldInfo, T newInfo, String remark,String userName) {
try{
//比较记录不影响业务逻辑,用try套住
//比较差异
String differenceKey = HrEquator.comparisonValue(oldInfo, newInfo);
//如果有差异保存差异
if(!Common.isEmpty(differenceKey)){
TBusinessOperate operate = new TBusinessOperate();
operate.setBusinessId(businessId);
operate.setCreateTime(LocalDateTime.now());
operate.setOldInfo(JSON.toJSONString(oldInfo,features));
operate.setNewInfo(JSON.toJSONString(newInfo,features));
operate.setDifferenceInfo(differenceKey);
operate.setRemark(remark);
operate.setCreateName(userName);
baseMapper.insert(operate);
return operate;
}
}catch (Exception e){
log.error(JSON.toJSON(oldInfo)+"插入修改记录报错>>>",e);
}
return null;
}
/**
* 根据业务主键获取操作记录
*
......
......@@ -12,6 +12,7 @@ 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;
......@@ -1007,6 +1008,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
return R.ok(baseMapper.selectOne(Wrappers.<TEmployeeInsurancePre>query().lambda()
.notIn(TEmployeeInsurancePre::getProcessStatus, Arrays.asList("0","1","2","5"))
.eq(TEmployeeInsurancePre::getRegisterId, registId).last(CommonConstants.LAST_ONE_SQL)));
}
}
......@@ -248,8 +248,8 @@ public class DoJointInsuranceTask {
if (Common.isNotNull(viewVo.getId())) {
insuranceId = viewVo.getId().substring(0, 19);
detail = insuranceDetailMapper.selectById(insuranceId);
log.error("更新状态商险ID:"+detail.getId() +"|"+insuranceId);
if (Common.isNotNull(detail)) {
log.error("更新状态商险ID:"+detail.getId() +"|"+insuranceId);
TInsuranceDetail detailOld = new TInsuranceDetail();
BeanCopyUtils.copyProperties(detail,detailOld);
//判断订单类型是预估还是实缴
......@@ -268,16 +268,14 @@ public class DoJointInsuranceTask {
detail.setIncomeCollectFlag(viewVo.getIncomeCollectFlag());
// 这里就是EKP 同步已收及垫付后同步HRO的特殊处理
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd()) && "0".equals(vo.getPaymentStatsus())){
if (CommonConstants.ZERO_STRING.equals(detail.getPaymentStatus())
&&("0".equals(viewVo.getIncomeCollectFlag())
|| "2".equals(viewVo.getIncomeCollectFlag()))){
if (CommonConstants.SIX_INT == detail.getBuyHandleStatus().intValue()){
detail.setBuyHandleStatus(CommonConstants.ONE_INT);
detail.setPaymentStatus(CommonConstants.ONE_STRING);
detail.setPaymentTime(DateUtil.formatDatePatten(new Date(),DateUtil.DATETIME_PATTERN_SECOND));
detail.setUpdateBy("05501879fed711eca3540242ac110010");
detail.setUpdateTime(LocalDateTime.now());
//添加日期
tBusinessOperateService.saveModificationRecord(detail.getId(),detailOld,detail,"收款结算单已收或垫付同步更新投保状态为待投保");
tBusinessOperateService.saveModificationRecord(detail.getId(),detailOld,detail,"收款结算单已收或垫付同步更新投保状态为待投保","EKP系统");
//更新自动化
LambdaUpdateWrapper<TEmployeeInsurancePre> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TEmployeeInsurancePre::getInsurancesId,detail.getId());
......@@ -289,15 +287,6 @@ public class DoJointInsuranceTask {
.set(TInsurancePreRenewDetail::getProcessStatus,CommonConstants.SEVEN_STRING);
tInsurancePreRenewDetailMapper.update(null, updateReNewInfoWrapper);
}
if (CommonConstants.ONE_STRING.equals(detail.getPaymentStatus())
&& "1".equals(viewVo.getIncomeCollectFlag())){
detail.setBuyHandleStatus(CommonConstants.SIX_INT);
detail.setPaymentStatus(CommonConstants.ZERO_STRING);
detail.setPaymentTime(CommonConstants.EMPTY_STRING);
detail.setUpdateBy("05501879fed711eca3540242ac110010");
detail.setUpdateTime(LocalDateTime.now());
tBusinessOperateService.saveModificationRecord(detail.getId(),detailOld,detail,"收款结算单退单或撤销匹配同步更新投保状态为待缴费");
}
}
} else {
detail.setPaySettleFlag(viewVo.getPaySettleFlag());
......@@ -650,7 +639,7 @@ public class DoJointInsuranceTask {
ys = 0L;
}
}else {
if (!"".equals(param.getIsJfcd())){
if (!"0".equals(param.getIsJfcd())){
//1、针对非提前缴费也非预估模式也未启用BPO结算模式的项目下,商险只存在实缴费用,实缴费用中应收等于应支——此类费用“实缴费用”需已收才能支出
if (InsurancesConstants.ACTUAL_SETTLE_BILL.equals(param.getSettleType())
&& "无".equals(pushParam.getFd_3af9d1441ef7b6())){
......@@ -670,7 +659,7 @@ public class DoJointInsuranceTask {
ys = BigDecimalUtils.safeSubtract(param.getActualPremium(),param.getEstimatePremium()).doubleValue();
}
}
} else if ("".equals(param.getIsJfcd())){
} else if ("0".equals(param.getIsJfcd())){
//3、针对提前缴费的项目,无论是否为预估模式,商险存在预估费用,预估费用中应收有值为按照规则计算得出的,应支为0;存在实缴费用,实缴费用应收为0,应支等于导入的实缴金额;
// 存在差额费用,差额费用应收有值,等于“实缴的应支金额-预估的应收金额——此类实缴支出会判断是否存在提前缴费的标识,若存在,则支出可以选择的到,
// 选择后即可支出(差额明细逻辑:导入后根据预估明细和实缴明细,生成“单据类型”为“差额”的商险明细数据(只有应收金额没有应支,应收金额=实缴的应支-预估的应收,若>0,
......@@ -692,6 +681,9 @@ public class DoJointInsuranceTask {
pushParam.setFd_3adfe6e3911ffe(0.00);
//是否全部结算
pushParam.setFd_3b13b2ecc164aa("是");
//实际保费设置为0.0
pushParam.setFd_3adfe6610c0d2c(0.00);
}
}
......@@ -748,6 +740,7 @@ public class DoJointInsuranceTask {
if (Common.isNotNull(list) && !list.isEmpty()) {
for (EkpInsurancesInfo info: list) {
initValueUpdate(info, deptInfoVo, param);
}
}
//更新实缴单据应收金额
......@@ -760,6 +753,10 @@ public class DoJointInsuranceTask {
info.setFd_3adfe6e30f2a3c("是".equals(param.getBpoFlag()) ? 0 : BigDecimalUtils.safeSubtract(false,param.getActualPremium(),param.getEstimatePremium()).doubleValue());
//应支
info.setFd_3adfe6e3911ffe(param.getActualPremium().doubleValue());
if ("0".equals(param.getIsJfcd())){
//见费出单 实缴的应收为0
info.setFd_3adfe6e30f2a3c(0.00);
}
insurancesInfoMapper.updateById(info);
}
}
......@@ -963,8 +960,12 @@ public class DoJointInsuranceTask {
if (null != param.getDetailId() && null != param.getDefaultSettleId()) {
pushParam.setFd_3b0a5743acab7e(param.getDetailId() + CommonConstants.DOWN_LINE_STRING + param.getDefaultSettleId());
} else {
if (InsurancesConstants.BALANCE_SETTLE_BILL.equals(param.getSettleType())){
pushParam.setFd_3b0a5743acab7e(param.getDetailId() + CommonConstants.DOWN_LINE_STRING + (null==param.getBalanceId()?"":param.getBalanceId()));
}else {
pushParam.setFd_3b0a5743acab7e(CommonConstants.EMPTY_STRING);
}
}
//单据类型
pushParam.setFd_3adfe6af71a1cc(null != param.getSettleType() ? param.getSettleType() : CommonConstants.EMPTY_STRING);
//项目编码
......
......@@ -67,7 +67,7 @@
from
ekp_insurances_info
where
fd_3b0a5743acab7e = #{id} and fd_3adfe6af71a1cc = '实缴' limit 1
fd_3b0a5743acab7e like CONCAT(#{id},'%') and fd_3adfe6af71a1cc = '实缴' limit 1
</select>
<select id="getSettleStatusFromEkpAsso" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSettleStatusVo">
......@@ -100,18 +100,18 @@
ekp_insurances_info
where
fd_3adfe6af71a1cc = '差额' and fd_jfcd='是' and
fd_3b0a5743acab7e like concact(#{id},'%')
fd_3b0a5743acab7e like CONCAT(#{id},'%')
</select>
<delete id="deleteEkpInsuranceDetail">
delete from ekp_insurances_info where fd_3b0a5743acab7e=#{id} and fd_jfcd='是' and fd_3adfe6af71a1cc = '预估'
</delete>
<delete id="deleteEkpInsuranceDetailAsso">
delete from ekp_insurances_info where fd_3b0a5743acab7e like concat(#{id},'%') and fd_jfcd='是' and (fd_3adfe6af71a1cc = '差额' or fd_3adfe6af71a1cc = '实缴')
delete from ekp_insurances_info where fd_3b0a5743acab7e like CONCAT(#{id},'%') and fd_jfcd='是' and (fd_3adfe6af71a1cc = '差额' or fd_3adfe6af71a1cc = '实缴')
</delete>
<delete id="callBackBalance">
delete from ekp_insurances_info where fd_3b0a5743acab7e like concat(#{id},'%') and fd_jfcd='是' and fd_3adfe6af71a1cc = '差额'
delete from ekp_insurances_info where fd_3b0a5743acab7e like CONCAT(#{id},'%') and fd_jfcd='是' and fd_3adfe6af71a1cc = '差额'
</delete>
<select id="getDeptSettle" resultMap="BaseDeptResultMap">
select
......
......@@ -294,6 +294,7 @@
WHEN a.process_status ='4' THEN "投保中"
WHEN a.process_status ='5' THEN "投保退回"
WHEN a.process_status ='6' THEN "已完成"
WHEN a.process_status ='7' THEN "待缴费"
ELSE a.process_status END as process_status,
a.customer_username,
concat(DATE_FORMAT(a.policy_start,'%Y-%m-%d'),'-',DATE_FORMAT(a.policy_end,'%Y-%m-%d')) as policy_start_end,
......
......@@ -131,7 +131,7 @@
a.PAYMENT_STATUS as paymentStatus,
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.BILLING_TYPE as billingType,
a.PRE_HANDLE_TIME as preHandleTime,
a.ESTIMATE_PREMIUM as estimatePremium
......@@ -241,7 +241,8 @@
a.PAYMENT_STATUS as paymentStatus,
a.PAYMENT_TIME as paymentTime,
a.IS_JFCD as isJfcd,
a.PURCHASE_CYCLE as purchaseCycle,
<!-- a.PURCHASE_CYCLE as purchaseCycle, -->
IF(a.BILLING_TYPE='0',CONCAT(a.PURCHASE_CYCLE,'天'),CONCAT(a.PURCHASE_CYCLE,'个月')) as purchaseCycle,
a.PRE_HANDLE_TIME as preHandleTime,
a.ESTIMATE_PREMIUM as estimatePremium,
a.BILLING_TYPE as billingType
......@@ -435,7 +436,8 @@
a.REFUND_ID as refundId,
a.EXPIRE_REMARK,
a.EXPIRE_IGNORE_FLAG,
a.IS_ADRESS as isAdress,PAYMENT_STATUS,PAYMENT_TIME,IS_JFCD,PURCHASE_CYCLE,PRE_HANDLE_TIME
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
from t_insurance_detail a
left join t_insurance_settle tis on a.DEFAULT_SETTLE_ID = tis.ID
where a.ID = #{id}
......@@ -468,7 +470,7 @@
a.CREATE_NAME as createName,
a.POLICY_NO as policyNo,
a.REMARK as remark,
a.IS_ADRESS as isAdress
a.IS_ADRESS as isAdress,a.DEFAULT_SETTLE_ID as defaultSettleId
from t_insurance_detail a
where a.DELETE_FLAG = 0 and a.id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
......@@ -503,7 +505,7 @@
a.CREATE_NAME as createName,
a.POLICY_NO as policyNo,
a.REMARK as remark,
a.IS_ADRESS as isAdress
a.IS_ADRESS as isAdress,a.DEFAULT_SETTLE_ID as defaultSettleId
from t_insurance_detail a
where a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
<if test="param.empName != null and param.empName.trim() != ''">
......@@ -569,7 +571,7 @@
a.SETTLE_TYPE as settleType,
a.CREATE_NAME as createName,
a.POLICY_NO as policyNo,
a.REMARK as remark,a.UNIT_NAME as unitName
a.REMARK as remark,a.UNIT_NAME as unitName,a.DEFAULT_SETTLE_ID as defaultSettleId
from t_insurance_detail a
where a.DELETE_FLAG = 0 and a.id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
......@@ -601,7 +603,7 @@
a.SETTLE_TYPE as settleType,
a.CREATE_NAME as createName,
a.POLICY_NO as policyNo,
a.REMARK as remark,a.UNIT_NAME as unitName
a.REMARK as remark,a.UNIT_NAME as unitName,a.DEFAULT_SETTLE_ID as defaultSettleId
from t_insurance_detail a
where a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
<if test="param.empName != null and param.empName.trim() != ''">
......
......@@ -426,7 +426,7 @@
,'临期' isOverdue,a.HAVE_WORK_DAY,'否' EXPIRE_IGNORE_FLAG,a.CREATE_NAME,a.ALERTER
,DATE_FORMAT(b.expected_collection_time,'%Y-%m-%d %H:%i') expected_collection_time
,case b.process_status when '0' then '待确认' when '1' then '待派单' when '2' then '派单失败'
when '3' then '待投保' when '4' then '投保中' when '5' then '投保退回' when '6' then '已投保' else '-' end process_status
when '3' then '待投保' when '4' then '投保中' when '5' then '投保退回' when '6' then '已投保' when '7' then '待缴费' else '-' end process_status
,b.CUSTOMER_USERNAME
FROM t_insurance_alert a
JOIN t_insurance_pre_renew_detail b ON a.INSURANCES_PRE_RENEW_DETAIL_ID = b.ID
......
......@@ -359,8 +359,8 @@ public class TDispatchInfoPreController {
@Operation(description = "删除非流程中的社保待购买数据")
@Inner
@PostMapping("/deleteUnProcessSocialPreInfo")
public void deleteUnProcessSocialPreInfo(@RequestBody String id) {
tDispatchInfoPreService.deleteUnProcessSocialPreInfo(id);
public Boolean deleteUnProcessSocialPreInfo(@RequestBody String id) {
return tDispatchInfoPreService.deleteUnProcessSocialPreInfo(id);
}
/**
......@@ -373,8 +373,8 @@ public class TDispatchInfoPreController {
@Operation(description = "删除非流程中的公积金待购买数据")
@Inner
@PostMapping("/deleteUnProcessFundPreInfo")
public void deleteUnProcessFundPreInfo(@RequestBody String id) {
tDispatchInfoPreService.deleteUnProcessFundPreInfo(id);
public Boolean deleteUnProcessFundPreInfo(@RequestBody String id) {
return tDispatchInfoPreService.deleteUnProcessFundPreInfo(id);
}
......@@ -410,7 +410,7 @@ public class TDispatchInfoPreController {
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/getInfoByRegistId " )
@GetMapping("/getInfoByRegistId" )
public R<TDispatchInfoPre> getInfoByRegistId(@RequestParam("registId" ) String registId, @RequestParam("type" ) String type) {
return tDispatchInfoPreService.getInfoByRegistId(registId,type);
}
......
......@@ -77,9 +77,9 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> {
EmployeePreSocialListVo getSocialPreInfoStatus(String id);
void deleteUnProcessSocialPreInfo(String id);
Boolean deleteUnProcessSocialPreInfo(String id);
void deleteUnProcessFundPreInfo(String id);
Boolean deleteUnProcessFundPreInfo(String id);
/**
* 社保待购买信息单个/批量发起签署任务
......
......@@ -69,7 +69,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
@ShardingTransactionType(TransactionType.BASE)
void importTDispatchInfo(List<TDispatchImportVo> excelVOList,
List<ErrorMessage> errorMessageList,
YifuUser user, String orderId, Map<String, String> idCardMap);
YifuUser user, String orderId, Map<String, String> idCardMap,String autoFlag);
R<List<ErrorMessage>> importReduceDiy(InputStream inputStream, String orderId,String flag);
......
......@@ -21,6 +21,7 @@ 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;
......@@ -449,27 +450,22 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
}
@Override
public void deleteUnProcessSocialPreInfo(String id) {
public Boolean deleteUnProcessSocialPreInfo(String id) {
//删除未处理的社保待购买信息
this.remove(Wrappers.<TDispatchInfoPre>query().lambda()
return this.remove(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getTypeSub,CommonConstants.ZERO_STRING)
.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4","8"))
.eq(TDispatchInfoPre::getRegisterId, id));
socialPreDetailService.remove(Wrappers.<TSocialPreDetail>query().lambda()
.eq(TSocialPreDetail::getRegisterId, id));
}
@Override
public void deleteUnProcessFundPreInfo(String id) {
public Boolean deleteUnProcessFundPreInfo(String id) {
//删除未处理的公积金待购买信息
this.remove(Wrappers.<TDispatchInfoPre>query().lambda()
return this.remove(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getTypeSub,CommonConstants.ONE_STRING)
.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4","8"))
.eq(TDispatchInfoPre::getRegisterId, id));
socialPreDetailService.remove(Wrappers.<TSocialPreDetail>query().lambda()
.eq(TSocialPreDetail::getRegisterId, id));
}
@Override
......@@ -511,7 +507,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
if (Common.isNotNull(disList)) {
//调用批量派单接口100条处理一次,同原合同派单保持一致
List<ErrorMessage> errorMessageList = new ArrayList<>();
dispatchInfoService.importTDispatchInfo(disList, errorMessageList,user, null, new HashMap<>());
dispatchInfoService.importTDispatchInfo(disList, errorMessageList,user, null, new HashMap<>(),CommonConstants.ZERO_STRING);
if (!errorMessageList.stream().allMatch(message -> message.getMessage().equals(CommonConstants.SAVE_SUCCESS))) {
List<ErrorMessage> relErrorMessageList = errorMessageList.stream().filter(message -> !message.getMessage().equals(CommonConstants.SAVE_SUCCESS)).collect(Collectors.toList());
errorMessageListAll.addAll(relErrorMessageList);
......@@ -816,7 +812,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
if (Common.isNotNull(disList)) {
//调用批量派单接口100条处理一次,同原合同派单保持一致
List<ErrorMessage> errorMessageList = new ArrayList<>();
dispatchInfoService.importTDispatchInfo(disList, errorMessageList,user, null, new HashMap<>());
dispatchInfoService.importTDispatchInfo(disList, errorMessageList,user, null, new HashMap<>(),null);
if (!errorMessageList.stream().allMatch(message -> message.getMessage().equals(CommonConstants.SAVE_SUCCESS))) {
List<ErrorMessage> relErrorMessageList = errorMessageList.stream().filter(message -> !message.getMessage().equals(CommonConstants.SAVE_SUCCESS)).collect(Collectors.toList());
errorMessageListAll.addAll(relErrorMessageList);
......@@ -1067,6 +1063,9 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
if (Common.isEmpty(registId) || Common.isEmpty(type)) {
return R.failed(CommonConstants.PARAM_INFO_ERROR);
}
return R.ok(baseMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda().eq(TDispatchInfoPre::getTypeSub,type).eq(TDispatchInfoPre::getRegisterId, registId).last(CommonConstants.LAST_ONE_SQL)));
return R.ok(baseMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.notIn(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4", "8"))
.eq(TDispatchInfoPre::getTypeSub,type)
.eq(TDispatchInfoPre::getRegisterId, registId).last(CommonConstants.LAST_ONE_SQL)));
}
}
......@@ -458,7 +458,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/
private void saveData() {
log.info("{}条数据,开始存储数据库!", cachedDataList.size());
importTDispatchInfo(cachedDataList, errorMessageList, user, orderId, idCardMap);
importTDispatchInfo(cachedDataList, errorMessageList, user, orderId, idCardMap,null);
log.info("存储数据库成功!");
}
}).sheet().doRead();
......@@ -475,7 +475,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
public void importTDispatchInfo(List<TDispatchImportVo> excelVOList,
List<ErrorMessage> errorMessageList,
YifuUser user, String orderId,
Map<String, String> idCardMap) {
Map<String, String> idCardMap,String autoFlag) {
if (!Common.isNotNull(excelVOList)) {
return;
}
......@@ -624,7 +624,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
continue;
}
// 数据合法情况
if (validImport(errorMessageList, excel, setInfoVo, socialFund, empVo, socialSet, fundSet)) {
if (validImport(errorMessageList, excel, setInfoVo, socialFund, empVo, socialSet, fundSet,autoFlag)) {
excelVOTemp.put(excel.getRowIndex().toString(), excel.getEmpIdcard());
continue;
}
......@@ -2390,11 +2390,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return empVoMap;
}
//autoFalg "0" 为自动化
private boolean validImport(List<ErrorMessage> errorMessageList,
TDispatchImportVo excel,
ProjectSetInfoVo setInfoVo,
TSocialFundInfo socialFund,
DispatchEmpVo empVo, SysBaseSetInfo socialSet, SysBaseSetInfo fundSet) {
DispatchEmpVo empVo, SysBaseSetInfo socialSet, SysBaseSetInfo fundSet,String autoFlag) {
if (Common.isNotNull(excel.getSocialHousehold()) && Common.isEmpty(excel.getPaymentType())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_NOT_EMPTY)));
return true;
......@@ -2515,10 +2516,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return true;
}
//档案试用期必填 20241128 fxj 1.7.2
if (Common.isEmpty(empVo.getTryPeriod()) && Common.isEmpty(excel.getTryPeriod())) {
if (Common.isEmpty(empVo.getTryPeriod())
&& Common.isEmpty(excel.getTryPeriod())
&& CommonConstants.ZERO_STRING.equals(empVo.getTryPeriod()) && !CommonConstants.ZERO_STRING.equals(autoFlag)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_TRYPERIOD_NOT_EMPTY)));
return true;
}
if (CommonConstants.ZERO_STRING.equals(autoFlag) && Common.isEmpty(excel.getTryPeriod())){
excel.setTryPeriod(empVo.getTryPeriod());
}
// fxj 2024-08-30 有档案 学历或户口性质为空 派单必填 学历或客户性质
if (Common.isEmpty(empVo.getHignEducation()) && Common.isEmpty(excel.getEducationName())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_EDUCATION_NOT_EMPTY)));
......@@ -6824,7 +6830,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
initAreaMap(areaMap, areaIdMap, areaListR);
}
// 档案地市没问题 开始派单处理
this.importTDispatchInfo(importVoList, errorMessageList, user, null, new HashMap<>());
this.importTDispatchInfo(importVoList, errorMessageList, user, null, new HashMap<>(),null);
if (errorMessageList.isEmpty() || CommonConstants.GREEN.equals(errorMessageList.get(0).getColor())) {
return R.ok();
} else {
......
......@@ -382,7 +382,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
}
// 档案地市没问题 开始派单处理
if (errorMessageList.size() == CommonConstants.ZERO_INT) {
dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user, null, new HashMap<>());
dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user, null, new HashMap<>(),null);
}
// 处理派增结果
errorMessage = handleDispatchAddRes(preInfo, errorMessageList);
......@@ -2535,7 +2535,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
}
// 档案地市没问题 开始派单处理
if (!Common.isNotNull(errorMessageList)){
dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user, null, new HashMap<>());
dispatchInfoService.importTDispatchInfo(importVoList, errorMessageList, user, null, new HashMap<>(),null);
}
// 处理派增结果
handleDispatchAddRes(pre, errorMessageList);
......
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