Commit d34779c0 authored by fangxinjiang's avatar fangxinjiang

批量办理 50%

parent 0a1387ab
......@@ -422,5 +422,8 @@ public interface CommonConstants {
public static final String SUCCESS_MSG_PREFIX = "success=";
// 社保细分类型 hgw 2021-6-9 17:54:08
public static final String[] SOCIAL_HANDLE_TYPE = {"0","养老", "医疗", "失业", "工伤", "生育", "大病"};
public static final int SIXTY_INT = 60;
}
......@@ -23,9 +23,16 @@ public class DispatchConstants {
public static final String EMP_PHONE_INVALID = "档案手机号无效,请更新档案或模板的手机号码!";
public static final String DISPATCH_PHONE_NOT_EMPTY = "派单手机号不可为空,请更新档案或模板的手机号码!";
public static final String DISPATCH_ADD = "派增";
public static final String DISPATCH_REDUCE = "派减";
public static final String DISPATCH_SOCIAL_ADD = "社保派增";
public static final String DISPATCH_SOCIAL_HANDLE_SUCCESS = "办理成功:";
public static final String DISPATCH_SOCIAL_HANDLE_FAIL = "办理失败:";
public static final String DISPATCH_FUND_ADD_SUCCESS = "公积金派增办理成功:";
public static final String DISPATCH_FUND_ADD_FAIL = "公积金派增办理失败:";
/**
/**
* 社保派单
* '缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳) PAYMENT_TYPE
*/
......@@ -56,7 +63,6 @@ public class DispatchConstants {
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public static final String SOCIAL_INFO= "tSocialInfo";
/**
......@@ -65,7 +71,6 @@ public class DispatchConstants {
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public static final String PROVIDENT_INFO= "tProvidentFund";
......
......@@ -357,19 +357,19 @@ public class TDispatchInfo extends BaseEntity {
/**
* 社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3已派减(已废弃)
* 社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3 部分办理成功 4 办理中
*/
@Length(max = 1, message = "社保办理状态 不能超过1个字符" )
@ExcelAttribute(name = "社保办理状态", maxLength = 1)
@Schema(description = "社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3 部分办理成功 " )
@Schema(description = "社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3 部分办理成功 4 办理中" )
@ExcelProperty("社保办理状态" )
private String socialHandleStatus;
/**
* 公积金办理状态:0 未办理 1办理成功 2 办理失败
* 公积金办理状态:0 未办理 1办理成功 2 办理失败 3 已派减
*/
@Length(max = 1, message = "公积金办理状态 不能超过1个字符" )
@ExcelAttribute(name = "公积金办理状态", maxLength = 1)
@Schema(description = "公积金办理状态:0 未办理 1办理成功 2 办理失败" )
@Schema(description = "公积金办理状态:0 未办理 1办理成功 2 办理失败 3 已派减" )
@ExcelProperty("公积金办理状态" )
private String fundHandleStatus;
/**
......
......@@ -130,10 +130,10 @@ public class TProvidentFund extends BaseEntity {
* 办理状态(0待办理/1已办理2办理失败3已派减)
*/
@NotBlank(message = "办理状态(0待办理/1已办理)不能为空" )
@Length(max = 32, message = "办理状态(0待办理/1已办理) 不能超过32个字符" )
@ExcelAttribute(name = "办理状态(0待办理/1已办理)", isNotEmpty = true, errorInfo = "办理状态(0待办理/1已办理)不能为空", maxLength = 32)
@Length(max = 32, message = "办理状态不能超过32个字符" )
@ExcelAttribute(name = "办理状态", isNotEmpty = true, errorInfo = "办理状态不能为空", maxLength = 32)
@Schema(description = "办理状态(0待办理/1已办理2办理失败3已派减)" )
@ExcelProperty("办理状态(0待办理/1已办理)" )
@ExcelProperty("办理状态" )
private String handleStatus;
/**
* 废弃状态(0正常/1已废弃)
......
......@@ -17,9 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
......@@ -249,11 +247,11 @@ public class TSocialFundInfo extends BaseEntity {
@ExcelProperty("公积金缴纳地-县" )
private String fundTown;
/**
* 社保派增状态:0待审核、1待办理、2办理成功、3部分办理失败、4办理失败 5 审核不通过
* 社保派增状态:0待审核、1待办理、2办理成功、3部分办理失败、4办理失败 5 审核不通过 6 办理中
*/
@Length(max = 1, message = "社保派增状态 不能超过1个字符" )
@ExcelAttribute(name = "社保派增状态", maxLength = 1)
@Schema(description = "社保派增状态:0待审核、1待办理、2办理成功、3部分办理失败、4办理失败 、5审核不通过" )
@Schema(description = "社保派增状态:0待审核、1待办理、2办理成功、3部分办理失败、4办理失败 、5审核不通过6 办理中" )
@ExcelProperty("社保派增状态" )
private String socialAddStatus;
/**
......@@ -465,6 +463,7 @@ public class TSocialFundInfo extends BaseEntity {
@ExcelAttribute(name = "社保停缴日期", isDate = true)
@Schema(description = "社保停缴日期" )
@ExcelProperty("社保停缴日期" )
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Date socialReduceDate;
/**
* 是否可补缴 0:是,1:否
......
......@@ -234,12 +234,12 @@ public class TSocialInfo extends BaseEntity {
@ExcelProperty("审核状态" )
private String auditStatus;
/**
* 办理状态
* 办理状态:0待办理/1已办理2办理失败3已派减 4 办理中 5 部分办理失败
*/
@NotBlank(message = "办理状态不能为空" )
@Length(max = 32, message = "办理状态 不能超过32个字符" )
@ExcelAttribute(name = "办理状态", isNotEmpty = true, errorInfo = "办理状态不能为空", maxLength = 32)
@Schema(description = "办理状态:0待办理/1已办理2办理失败3已派减" )
@Schema(description = "办理状态:0待办理/1已办理2办理失败3已派减4 办理中 5 部分办理失败" )
@ExcelProperty("办理状态" )
private String handleStatus;
/**
......
......@@ -244,29 +244,29 @@ public class TDispatchInfoController {
public R<List<ErrorMessage>> addApplyAudit(@RequestParam(name = "ids", required = true) String ids,
@RequestParam(name = "auditStatus", required = true) String auditStatus,
@RequestParam(name = "auditRemark", required = false) String auditRemark) {
YifuUser user = SecurityUtils.getUser();
if (null == user) {
return R.failed(CommonConstants.USER_FAIL);
}
try {
if (!Common.isNotNull(ids)) {
return R.failed(DispatchConstants.DISPATCH_ID_NOT_EMPTY);
}
Integer flag = 1;
if (CommonConstants.ONE_STRING.equals(auditStatus)) {
//审核通过
flag = CommonConstants.ZERO_INT;
} else if (CommonConstants.TWO_STRING.equals(auditStatus)) {
//审核不通过
flag = CommonConstants.ONE_INT;
} else {
return R.failed("派单审核状态参数异常:0待审核 1审核通过 2审核不通过");
}
List<ErrorMessage> errorInfo = tDispatchInfoService.addBatchApplyAudit(Common.initStrToList(ids, CommonConstants.COMMA_STRING), user, flag, auditStatus, null==auditRemark?"":auditRemark);
return R.ok(errorInfo,"派单审核结果:");
} catch (Exception e) {
log.error("派单审核异常:" + e.getMessage());
return R.failed("数据异常,派单审核失败!");
}
return tDispatchInfoService.addApplyAudit(ids,auditStatus,auditRemark);
}
/**
* 派单申请办理
* hgw社保办理
* @param ids
* @param handleStatus 1 办理成功 2 办理失败
* @param handleRemark
* @param typeSub 0 社保 1 公积金
* @param socialType (1养老 2医疗 3失业 4工伤 5生育 6大病)
* @return
* @Author fxj
* @Date 2019-09-27
**/
@Operation(description = "派单批量办理,传参派单ID hasPermission('wxhr:tdispatchinfo_addApplyHandle')")
@PostMapping("/addApplyHandle")
@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_addApplyHandle')")
public R<List<ErrorMessage>> addApplyHandle(@RequestParam(name = "ids", required = true) String ids,
@RequestParam(name = "typeSub", required = true) String typeSub,
@RequestParam(name = "auditStatus", required = true) String handleStatus,
@RequestParam(name = "auditRemark", required = false) String handleRemark,
@RequestParam(name = "socialType", required = false) String socialType) {
return tDispatchInfoService.addApplyHandle(ids,typeSub,handleStatus,handleRemark,socialType);
}
}
......@@ -56,4 +56,8 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
DispatchDetailVo getSocialAndFundInfoById(String id);
List<ErrorMessage> addBatchApplyAudit(List<String> initStrToList, YifuUser user, Integer flag, String auditStatus, String auditRemark);
R<List<ErrorMessage>> addApplyAudit(String ids,String auditStatus,String auditRemark);
R<List<ErrorMessage>> addApplyHandle(String ids,String typeSub,String handleStatus,String handleRemark,String socialType);
}
package com.yifu.cloud.plus.v1.yifu.social.util;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import lombok.extern.slf4j.Slf4j;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
......@@ -94,4 +96,23 @@ public class ServiceUtil {
}
return false;
}
public static BigDecimal ifNull(BigDecimal old, BigDecimal last){
if (Common.isEmpty(old)){
return last;
}
return old;
}
public static Date ifNull(Date old,Date last){
if (Common.isEmpty(old)){
return last;
}
return old;
}
public static String ifNullToEmpty(String str){
if (Common.isEmpty(str)){
return CommonConstants.EMPTY_STRING;
}
return str;
}
}
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