Commit fef8914b authored by fangxinjiang's avatar fangxinjiang

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

parents d09686bb 4b19b4eb
...@@ -6,16 +6,6 @@ public class EmployeeContractConstants { ...@@ -6,16 +6,6 @@ public class EmployeeContractConstants {
public static final String NOT_CREATE_USER = "不是创建人,无法删除"; public static final String NOT_CREATE_USER = "不是创建人,无法删除";
public static final String NOT_AUDIT_STATUS = "不是待审核或审核不通过,无法删除"; public static final String NOT_AUDIT_STATUS = "不是待提交或审核不通过,无法删除";
public static final String searchEmpContractInfo = " 查询对应的员工合同信息!";
public static final String sameEmpOnlyOneStandContract= "同一员工只允许一个在用标准合同,请按员工编码:";
public static final String exportTip = "数据导入解析!数据行数:";
public final static String ContractUpdateFailInfo="合同更新失败:合同更新同步更新派单数据更新失败!";
public final static String UTF8 ="UTF-8";
} }
...@@ -316,6 +316,27 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -316,6 +316,27 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} }
baseMapper.insert(tEmployeeContractInfo); baseMapper.insert(tEmployeeContractInfo);
if (Common.isNotNull(tEmployeeContractInfo.getAttaList()) && Common.isNotNull(tEmployeeContractInfo.getId())) { if (Common.isNotNull(tEmployeeContractInfo.getAttaList()) && Common.isNotNull(tEmployeeContractInfo.getId())) {
this.updateFileMainId(tEmployeeContractInfo);
}
} else {
baseMapper.updateById(tEmployeeContractInfo);
}
// 不是待提交,记录审核记录
this.setAuditInfo(tEmployeeContractInfo);
// 更新档案合同状态
this.updateEmployeeContractStatus(tEmployeeContractInfo.getEmpId());
return R.ok(null, CommonConstants.SAVE_SUCCESS);
}
/**
* @param tEmployeeContractInfo
* @Description: 更新附件的合同id
* @Author: hgw
* @Date: 2022/7/20 10:07
* @return: void
**/
private void updateFileMainId(TEmployeeContractInfo tEmployeeContractInfo) {
List<String> attaList = tEmployeeContractInfo.getAttaList(); List<String> attaList = tEmployeeContractInfo.getAttaList();
if (null != attaList && !attaList.isEmpty()) { if (null != attaList && !attaList.isEmpty()) {
TAttaInfo contractAtta; TAttaInfo contractAtta;
...@@ -328,16 +349,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -328,16 +349,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} }
} }
} }
} else {
baseMapper.updateById(tEmployeeContractInfo);
}
// 不是待提交,记录审核记录
this.setAuditInfo(tEmployeeContractInfo);
// 更新档案合同状态
this.updateEmployeeContractStatus(tEmployeeContractInfo.getEmpId());
return R.ok(null, CommonConstants.SAVE_SUCCESS);
}
/** /**
* @param tEmployeeContractInfo * @param tEmployeeContractInfo
...@@ -434,11 +445,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -434,11 +445,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
return R.failed("未找到记录"); return R.failed("未找到记录");
} else { } else {
if (!user.getId().equals(contractInfo.getCreateBy())) { if (!user.getId().equals(contractInfo.getCreateBy())) {
return R.failed("不是合同创建人,无法删除"); return R.failed(EmployeeContractConstants.NOT_CREATE_USER);
} }
if (contractInfo.getAuditStatus() != CommonConstants.ZERO_INT if (contractInfo.getAuditStatus() != CommonConstants.ZERO_INT
&& contractInfo.getAuditStatus() != CommonConstants.dingleDigitIntArray[3]) { && contractInfo.getAuditStatus() != CommonConstants.dingleDigitIntArray[3]) {
return R.failed("不是待提交或审核不通过,无法删除"); return R.failed(EmployeeContractConstants.NOT_AUDIT_STATUS);
} }
contractInfo.setDeleteFlag(CommonConstants.ONE_INT); contractInfo.setDeleteFlag(CommonConstants.ONE_INT);
this.updateById(contractInfo); this.updateById(contractInfo);
...@@ -498,6 +509,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -498,6 +509,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} }
//档案柜存在就自动归档 //档案柜存在就自动归档
if (Common.isNotNull(tEmployeeContractInfo.getAttaList())) { if (Common.isNotNull(tEmployeeContractInfo.getAttaList())) {
this.updateFileMainId(tEmployeeContractInfo);
this.setFileInfo(tEmployeeContractInfo.getId(), "添加附件"); this.setFileInfo(tEmployeeContractInfo.getId(), "添加附件");
tEmployeeContractInfo.setIsFile(CommonConstants.ZERO_STRING); tEmployeeContractInfo.setIsFile(CommonConstants.ZERO_STRING);
} else { } else {
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
package com.yifu.cloud.plus.v1.yifu.common.core.constant; package com.yifu.cloud.plus.v1.yifu.common.core.constant;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
...@@ -146,6 +147,11 @@ public interface CommonConstants { ...@@ -146,6 +147,11 @@ public interface CommonConstants {
*/ */
String THREE_STRING = "3"; String THREE_STRING = "3";
/**
* 数字int 3
*/
int THREE_INT = 3;
/** /**
* 下划线 * 下划线
* hgw 2022-6-9 17:36:35 * hgw 2022-6-9 17:36:35
...@@ -354,4 +360,11 @@ public interface CommonConstants { ...@@ -354,4 +360,11 @@ public interface CommonConstants {
public static final int SIXTEEN_INT = 16; public static final int SIXTEEN_INT = 16;
public static final String FIFTEEN = "15"; public static final String FIFTEEN = "15";
public static final String NINETEEN = "19"; public static final String NINETEEN = "19";
//百分之一 1/100
public static final BigDecimal ONE_OF_PERCENT = new BigDecimal("0.01");
// 1/2
public static final BigDecimal HALF_OF_ONE = new BigDecimal("0.5");
public static final BigDecimal TWO_BIG = new BigDecimal("2");
} }
...@@ -111,5 +111,13 @@ public class InsurancesConstants { ...@@ -111,5 +111,13 @@ public class InsurancesConstants {
* 岗位不能为空 * 岗位不能为空
*/ */
public static final String POST_NOT_EMPTY = "岗位不能为空"; public static final String POST_NOT_EMPTY = "岗位不能为空";
/**
* 保单号不能为空
*/
public static final String POLICY_NO_EMPTY = "保单号不能为空";
/**
* 保单号不存在
*/
public static final String POLICY_NO_EXIST= "保单号不存在";
} }
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @author licancan
* @description 商险办理批增入参
* @date 2022-07-20 08:43:31
*/
@Data
@Tag(name = "商险办理批增入参")
public class InsuranceBatchParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 岗位
*/
@Schema(description = "岗位")
private String post;
/**
* 保单号
*/
@Schema(description = "保单号")
private String policyNo;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 商险购买地省名称
*/
@Schema(description = "商险购买地省名称")
private String insuranceProvinceName;
/**
* 商险购买地市名称
*/
@Schema(description = "商险购买地市名称")
private String insuranceCityName;
/**
* 商险办理省名称
*/
@Schema(description = "商险办理省名称")
private String insuranceHandleProvinceName;
/**
* 商险办理城市名称
*/
@Schema(description = "商险办理城市名称")
private String insuranceHandleCityName;
/**
* 结算月
*/
@Schema(description = "结算月")
private String settleMonth;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 错误信息
*/
private String errorMessage;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
*/
private Integer settleType;
/**
* 医疗额度
*/
private String medicalQuota;
/**
* 身故或残疾额度
*/
private String dieDisableQuota;
/**
* 险种主键
*/
private Long insuranceTypeId;
/**
* 商险购买地省code
*/
private Integer insuranceProvince;
/**
* 商险购买地市code
*/
private Integer insuranceCity;
/**
* 商险办理省code
*/
private Integer insuranceHandleProvince;
/**
* 商险办理城市code
*/
private Integer insuranceHandleCity;
/**
* 保单开始时间
*/
private LocalDate policyStart;
/**
* 保单结束时间
*/
private LocalDate policyEnd;
}
...@@ -5,6 +5,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R; ...@@ -5,6 +5,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.InsuranceRefundCheck; import com.yifu.cloud.plus.v1.yifu.insurances.entity.InsuranceRefundCheck;
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.InsuranceAddParam; import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAddParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceBatchParam;
import io.swagger.v3.oas.annotations.security.SecurityRequirement; 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;
...@@ -51,6 +52,18 @@ public class TInsuranceDetailController { ...@@ -51,6 +52,18 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.addInsurance(paramList); return tInsuranceDetailService.addInsurance(paramList);
} }
/**
* 商险批增
*
* @author licancan
* @param paramList
* @return {@link R<List<InsuranceBatchParam>>}
*/
@PostMapping("/batchInsurance")
public R<List<InsuranceBatchParam>> batchInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceBatchParam> paramList){
return tInsuranceDetailService.batchInsurance(paramList);
}
/***********************减员办理********************************/ /***********************减员办理********************************/
/** /**
......
...@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R; ...@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.InsuranceRefundCheck; import com.yifu.cloud.plus.v1.yifu.insurances.entity.InsuranceRefundCheck;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAddParam; import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAddParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceBatchParam;
import java.util.List; import java.util.List;
...@@ -29,6 +30,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -29,6 +30,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/ */
R<List<InsuranceAddParam>> addInsurance(List<InsuranceAddParam> paramList); R<List<InsuranceAddParam>> addInsurance(List<InsuranceAddParam> paramList);
/**
* 商险批增
*
* @author licancan
* @param paramList
* @return {@link R<List<InsuranceBatchParam>>}
*/
R<List<InsuranceBatchParam>> batchInsurance(List<InsuranceBatchParam> paramList);
/***********************减员办理********************************/ /***********************减员办理********************************/
/** /**
* 减员导入校验 * 减员导入校验
......
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