Commit 26f07402 authored by fangxinjiang's avatar fangxinjiang

商险规则调整&派单优化&项目负责人优化-fxj

parent ef5864f3
......@@ -56,38 +56,38 @@ public class TAutoInsurRuleInfo extends BaseEntity {
@NotBlank(message = "是否启用自动化:0是 1否不能为空")
@ExcelProperty("是否启用自动化")
@Schema(description = "是否启用自动化:0是 1否")
private Integer autoFlag;
private String autoFlag;
/**
* 投保方式:0自动1 手动
*/
@ExcelAttribute(name = "投保方式", isNotEmpty = true, errorInfo = "投保方式不能为空")
@ExcelAttribute(name = "投保方式")
@NotBlank(message = "投保方式:0自动1 手动不能为空")
@ExcelProperty("投保方式")
@Schema(description = "投保方式:0自动1 手动")
private Integer addType;
private String addType;
/**
* 续保方式:0自动1 手动
*/
@ExcelAttribute(name = "续保方式", isNotEmpty = true, errorInfo = "续保方式不能为空")
@ExcelAttribute(name = "续保方式")
@NotBlank(message = "续保方式:0自动1 手动不能为空")
@ExcelProperty("续保方式")
@Schema(description = "续保方式:0自动1 手动")
private Integer updateType;
private String updateType;
/**
* 退保方式:0自动1 手动
*/
@ExcelAttribute(name = "退保方式", isNotEmpty = true, errorInfo = "退保方式不能为空")
@ExcelAttribute(name = "退保方式")
@NotBlank(message = "退保方式:0自动1 手动不能为空")
@ExcelProperty("退保方式")
@Schema(description = "退保方式:0自动1 手动")
private Integer reduceType;
private String reduceType;
/**
* 投保派单日期类型 0 入职日期前一天
*/
@ExcelAttribute(name = "投保派单日期类型")
@ExcelProperty("投保派单日期类型")
@Schema(description = "投保派单日期类型 0 入职日期前一天")
private Integer addAutoType;
private String addAutoType;
/**
* 投保派单日期投保时间
*/
......@@ -102,14 +102,14 @@ public class TAutoInsurRuleInfo extends BaseEntity {
@ExcelAttribute(name = "保单开始时间类型")
@ExcelProperty("保单开始时间类型")
@Schema(description = "保单开始时间 类型 0 入职当日")
private Integer addStartDate;
private String addStartDate;
/**
* 续保派单日期类型 0 上一份保单截止日期
*/
@ExcelAttribute(name = "续保派单日期类型")
@ExcelProperty("续保派单日期类型")
@Schema(description = "续保派单日期类型 0 上一份保单截止日期")
private Integer updateAutoType;
private String updateAutoType;
/**
* 续保派单日期续保时间
*/
......@@ -124,14 +124,14 @@ public class TAutoInsurRuleInfo extends BaseEntity {
@ExcelAttribute(name = "续保保单开始时间")
@ExcelProperty("续保保单开始时间")
@Schema(description = "续保保单开始时间 0 上一份保单截止日期+1天")
private Integer updateStartDate;
private String updateStartDate;
/**
* 退保派单日期类型 0 离职日期
*/
@ExcelAttribute(name = "退保派单日期类型")
@ExcelProperty("退保派单日期类型")
@Schema(description = "退保派单日期类型 0 离职日期")
private Integer reduceAutoType;
private String reduceAutoType;
/**
* 退保派单日期退保时间
*/
......@@ -146,13 +146,12 @@ public class TAutoInsurRuleInfo extends BaseEntity {
@ExcelAttribute(name = "退保保单失效时间")
@ExcelProperty("退保保单失效时间")
@Schema(description = "退保保单失效时间 0 离职日期+1天")
private Integer reduceStartDate;
private String reduceStartDate;
/**
* 项目配置主表ID
*/
@ExcelAttribute(name = "项目配置主表ID", isNotEmpty = true, errorInfo = "项目配置主表ID不能为空", maxLength = 32)
@ExcelAttribute(name = "项目配置主表ID")
@NotBlank(message = "项目配置主表ID不能为空")
@Length(max = 32, message = "项目配置主表ID不能超过32个字符")
@ExcelProperty("项目配置主表ID")
@Schema(description = "项目配置主表ID")
private String mainId;
......@@ -163,7 +162,7 @@ public class TAutoInsurRuleInfo extends BaseEntity {
@NotBlank(message = "默认信息是否允许修改 0是 1否不能为空")
@ExcelProperty("默认信息是否允许修改")
@Schema(description = "默认信息是否允许修改 0是 1否")
private Integer updateFlag;
private String updateFlag;
/**
* 项目编码
......
......@@ -57,7 +57,7 @@ public class TAutoInsurRuleInfoVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "是否启用自动化", isNotEmpty = true, errorInfo = "是否启用自动化不能为空")
@Schema(description = "是否启用自动化")
@ExcelProperty("是否启用自动化")
private Integer autoFlag;
private String autoFlag;
/**
* 投保方式:0自动1 手动
*/
......@@ -65,7 +65,7 @@ public class TAutoInsurRuleInfoVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "投保方式", isNotEmpty = true, errorInfo = "投保方式不能为空")
@Schema(description = "投保方式")
@ExcelProperty("投保方式")
private Integer addType;
private String addType;
/**
* 续保方式:0自动1 手动
*/
......@@ -73,7 +73,7 @@ public class TAutoInsurRuleInfoVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "续保方式", isNotEmpty = true, errorInfo = "续保方式不能为空")
@Schema(description = "续保方式")
@ExcelProperty("续保方式")
private Integer updateType;
private String updateType;
/**
* 退保方式:0自动1 手动
*/
......@@ -81,14 +81,14 @@ public class TAutoInsurRuleInfoVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "退保方式", isNotEmpty = true, errorInfo = "退保方式不能为空")
@Schema(description = "退保方式")
@ExcelProperty("退保方式")
private Integer reduceType;
private String reduceType;
/**
* 投保派单日期类型 0 入职日期前一天
*/
@ExcelAttribute(name = "投保派单日期类型")
@Schema(description = "投保派单日期类型")
@ExcelProperty("投保派单日期类型")
private Integer addAutoType;
private String addAutoType;
/**
* 投保派单日期投保时间
*/
......@@ -103,14 +103,14 @@ public class TAutoInsurRuleInfoVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "保单开始时间")
@Schema(description = "保单开始时间类型 0 入职当日")
@ExcelProperty("保单开始时间类型")
private Integer addStartDate;
private String addStartDate;
/**
* 续保派单日期类型 0 上一份保单截止日期
*/
@ExcelAttribute(name = "续保派单日期类型")
@Schema(description = "续保派单日期类型 0 上一份保单截止日期")
@ExcelProperty("续保派单日期类型")
private Integer updateAutoType;
private String updateAutoType;
/**
* 续保派单日期续保时间
*/
......@@ -125,14 +125,14 @@ public class TAutoInsurRuleInfoVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "续保保单开始时间")
@Schema(description = "续保保单开始时间 0 上一份保单截止日期+1天")
@ExcelProperty("续保保单开始时间")
private Integer updateStartDate;
private String updateStartDate;
/**
* 退保派单日期类型 0 离职日期
*/
@ExcelAttribute(name = "退保派单日期类型")
@Schema(description = "退保派单日期类型 0 离职日期")
@ExcelProperty("退保派单日期类型")
private Integer reduceAutoType;
private String reduceAutoType;
/**
* 退保派单日期退保时间
*/
......@@ -147,7 +147,7 @@ public class TAutoInsurRuleInfoVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "退保保单失效时间")
@Schema(description = "退保保单失效时间 0 离职日期+1天")
@ExcelProperty("退保保单失效时间")
private Integer reduceStartDate;
private String reduceStartDate;
/**
* 项目配置主表ID
*/
......@@ -163,6 +163,6 @@ public class TAutoInsurRuleInfoVo extends RowIndex implements Serializable {
@ExcelAttribute(name = "默认信息是否允许修改", isNotEmpty = true, errorInfo = "默认信息是否允许修改 不能为空")
@Schema(description = "默认信息是否允许修改 0是 1否")
@ExcelProperty("默认信息是否允许修改")
private Integer updateFlag;
private String updateFlag;
}
......@@ -388,7 +388,7 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
}else {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
if (!checkInsurStandardsForDuplicates(insurStandards)){
if (checkInsurStandardsForDuplicates(insurStandards)){
return R.failed(buyStandardRepeat);
}
return null;
......@@ -489,10 +489,6 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
TAutoInsurRuleInfo autoInsurRuleNew = entity.getAutoInsurRuleInfo();
TAutoInsurRuleInfo autoInsurRuleOld = null;
if (Common.isNotNull(autoInsurRuleNew)){
// 如果商险规则信息的ID为空,则返回参数错误的响应
if (!Common.isNotNull(autoInsurRuleNew.getId())){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
// 检查商险规则信息的有效性
ExcelUtil<TAutoInsurRuleInfo> excelUtil = new ExcelUtil<>(TAutoInsurRuleInfo.class);
ErrorMessage errorMessage = excelUtil.checkEntity(autoInsurRuleNew,0);
......@@ -506,12 +502,12 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
List<TAutoInsurStandard> insurStandards = null;
if (Common.isNotNull(autoInsurRuleNew)){
if (Common.isNotNull(autoInsurRuleNew.getId())){
autoInsurRuleInfoMapper.updateById(autoInsurRuleNew);
}else {
autoInsurRuleNew.setDeptNo(autoMainRel.getDeptNo());
autoInsurRuleNew.setDeptId(autoMainRel.getDeptId());
autoInsurRuleNew.setMainId(autoMainRel.getId());
autoInsurRuleInfoMapper.insert(autoInsurRuleNew);
}else {
autoInsurRuleInfoMapper.updateById(autoInsurRuleNew);
}
//校验商险购买标准
insurStandards = entity.getInsurStandards();
......@@ -519,7 +515,7 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
if (PARAM_IS_NOT_ERROR != null){
return PARAM_IS_NOT_ERROR;
}
if (!checkInsurStandardsForDuplicates(insurStandards)){
if (checkInsurStandardsForDuplicates(insurStandards)){
return R.failed(buyStandardRepeat);
}
}
......@@ -598,6 +594,9 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
}
//处理商险规则日志
if (Common.isNotNull(autoInsurRuleNew)){
if (Common.isEmpty(autoInsurRuleOld)){
autoInsurRuleOld = new TAutoInsurRuleInfo();
}
String differenceKey = HrEquator.comparisonValueIgnoreField(autoInsurRuleOld, autoInsurRuleNew,ignoreFields);
if (!Common.isEmpty(differenceKey)){
diffKeyMap.put("insurRule",differenceKey);
......@@ -614,9 +613,15 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
map = insurStandards.stream().collect(Collectors.toMap(TAutoInsurStandard::getId, v->v));
if (Common.isNotNull(insurStandardsOld)){
String differenceKey;
TAutoInsurStandard newTemp;
for (TAutoInsurStandard old:insurStandardsOld){
// 如果存在,则比较,不存在则标记为更新
differenceKey = HrEquator.comparisonValueIgnoreField(old, map.get(old.getId()),ignoreFields);
newTemp = map.get(old.getId());
if (Common.isEmpty(newTemp)){
flag = true;
newTemp = new TAutoInsurStandard();
}
differenceKey = HrEquator.comparisonValueIgnoreField(old, newTemp,ignoreFields);
if (!Common.isEmpty(differenceKey)){
diffKeys.append(differenceKey);
flag = true;
......@@ -638,6 +643,8 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
private void saveStandard(TAutoInsurStandard standard) {
if (Common.isNotNull(standard.getStandardInfos())){
autoStandardInfoMapper.delete(Wrappers.<TAutoStandardInfo>query().lambda()
.eq(TAutoStandardInfo::getMainId,standard.getId()));
for (TAutoStandardInfo standardInfo: standard.getStandardInfos()){
standardInfo.setMainId(standard.getId());
autoStandardInfoMapper.insert(standardInfo);
......
......@@ -511,6 +511,9 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
domain.setDepartName(tSettleDomainInfo.getDepartName());
domain.setId(tSettleDomainInfo.getId());
initServerTeamPermission(domain);
tSettleDomainInfo.setProjectManagerName(domain.getProjectManagerName());
tSettleDomainInfo.setProjectManager(domain.getProjectManager());
baseMapper.updateById(tSettleDomainInfo);
}
}
return R.ok(Boolean.TRUE,CommonConstants.RESULT_DATA_SUCESS);
......@@ -542,6 +545,10 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
if (Common.isNotNull(res) && Common.isNotNull(res.getData()) && Common.isNotNull(res.getData().getUserList())){
// 先清理缓存
this.removeSettleCache(null, res.getData().getUserIds());
//项目负责人目前只有一个,如果有多个这个地方需要特殊处理
if (res.getData().getUserList().size() >= CommonConstants.ONE_INT){
domain.setProjectManagerName(res.getData().getUserList().get(0).getNickname());
}
saveForEkp(res.getData().getUserList(), domain);
}
}
......
......@@ -632,4 +632,11 @@ public interface ErrorCodes {
* 试用期不可为空
*/
String EMP_DISPATCH_EMP_TRYPERIOD_NOT_EMPTY = "dispatch.emp.tryperiod.not.empty";
/**
* 试用期不可为空
*/
String EMP_DISPATCH_EMP_TYPE_ERROR = "dispatch.emp.type.error";
}
......@@ -246,6 +246,8 @@ dispatch.emp.registype.not.empty=\u5DF2\u6709\u6863\u6848\u6237\u53E3\u6027\u8D2
dispatch.emp.tryperiod.not.empty=\u5DF2\u6709\u6863\u6848\u8BD5\u7528\u671F\u4E3A\u7A7A\u6216\u65E0\u6863\u6848\uFF0C\u6D3E\u5355\u6A21\u677F\u8BD5\u7528\u671F\u4E0D\u53EF\u4E3A\u7A7A\uFF0C\u8BF7\u8865\u5145\u8BD5\u7528\u671F
dispatch.emp.type.error=\u5DF2\u6709\u6863\u6848\u5458\u5DE5\u7C7B\u578B\u4E0E\u6B64\u6B21\u6D3E\u5355\u7684\u5458\u5DE5\u7C7B\u578B\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u8C03\u6574\u4E00\u81F4\u540E\u518D\u6B21\u6D3E\u5355
......
......@@ -26,7 +26,7 @@ import java.util.List;
@RequiredArgsConstructor
@RequestMapping("/insuranceCompany")
@Tag(name = "保险公司相关")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
//@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TInsuranceCompanyController {
@Resource
......
......@@ -26,7 +26,7 @@ import javax.annotation.Resource;
@RequiredArgsConstructor
@RequestMapping("/insuranceType")
@Tag(name = "险种相关")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
//@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TInsuranceTypeController {
@Resource
private TInsuranceTypeService insuranceTypeService;
......
......@@ -23,7 +23,7 @@ import java.util.List;
@RequiredArgsConstructor
@RequestMapping("/insuranceTypeStandard")
@Tag(name = "购买标准相关")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
//@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TInsuranceTypeStandardController {
@Resource
......@@ -40,10 +40,10 @@ public class TInsuranceTypeStandardController {
}
/**
* 根据险种ID查询购买标准列表
* 根据险种ID查询购买标准列表(未删除,未禁用)
* @return
*/
@Operation(summary = "根据险种ID查询购买标准列表", description = "购买标准列表2 传参险种ID riskId")
@Operation(summary = "根据险种ID查询购买标准列表(未删除,未禁用)", description = "购买标准列表2 传参险种ID riskId")
@GetMapping("/listEnable" )
public R<List<TInsuranceTypeStandard>> getInsuranceTypeStandardList(String riskId) {
return insuranceTypeStandardService.getInsuranceTypeStandardList(riskId);
......@@ -81,7 +81,7 @@ public class TInsuranceTypeStandardController {
* @Date 19:00 2025/4/7
**/
@Operation(summary = "通过id更新启用状态", description = "通过id更新启用状态")
@DeleteMapping("/enableById" )
@PostMapping("/enableById" )
public R enableById(@RequestParam(value = "id",required = true ) String id,
@RequestParam(value = "enable",required = true ) String enable) {
return insuranceTypeStandardService.enableById(id, enable);
......
......@@ -236,12 +236,12 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
}
@Override
@Transactional(value = "insurancesTransactionEnableByIdr" ,rollbackFor = {Exception.class})
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R enableById(String id, String enable) {
if (Common.isEmpty(id)
|| Common.isEmpty(enable)
|| !CommonConstants.ONE_STRING.equals(enable)
&& !CommonConstants.TWO_STRING.equals(enable)){
&& !CommonConstants.ZERO_STRING.equals(enable)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
TInsuranceType insuranceType = getById(id);
......
......@@ -177,12 +177,12 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
}
@Override
@Transactional(value = "insurancesTransactionEnableById" ,rollbackFor = {Exception.class})
@Transactional(value = "insurancesTransactionManager" ,rollbackFor = {Exception.class})
public R enableById(String id, String enable) {
if (Common.isEmpty(id)
|| Common.isEmpty(enable)
|| !CommonConstants.ONE_STRING.equals(enable)
&& !CommonConstants.TWO_STRING.equals(enable)){
&& !CommonConstants.ZERO_STRING.equals(enable)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
TInsuranceTypeStandard typeStandard = getById(id);
......
......@@ -35,7 +35,7 @@
FROM t_insurance_company
where DELETE_FLAG = 0
<if test="param.companyName != null and param.companyName.trim() != ''">
and COMPANY_NAME = #{param.companyName}
and COMPANY_NAME like concat('%', #{param.companyName}, '%')
</if>
<if test="param.insuranceHandleCity != null">
and INSURANCE_HANDLE_CITY = #{param.insuranceHandleCity}
......
......@@ -77,7 +77,10 @@
and
a.DELETE_FLAG = 0
<if test="insuranceType.insuranceCompanyName != null and insuranceType.insuranceCompanyName.trim() != ''">
and b.COMPANY_NAME = #{insuranceType.insuranceCompanyName}
and b.COMPANY_NAME like concat('%', #{insuranceType.insuranceCompanyName}, '%')
</if>
<if test="insuranceType.insuranceCompanyId != null and insuranceType.insuranceCompanyId.trim() != ''">
and a.INSURANCE_COMPANY_ID = #{insuranceType.insuranceCompanyId}
</if>
<if test="insuranceType.name != null and insuranceType.name.trim() != ''">
and a.NAME like concat('%',replace(replace(#{insuranceType.name},'_','\_'),'%','\%'),'%')
......
......@@ -2409,6 +2409,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
签订期限:无固定期限 合同到期时间、合同期限非必填,合同开始时间必填;
签订期限:固定期限、已完成一定工作任务为期限 合同期限非必填,合同开始时间、合同到期时间都必填*/
if (Common.isNotNull(empVo)){
//有档案档案员工类型 和派单的员工类型不一致禁止派单,改一致后可派单
if (Common.isNotNull(empVo.getEmpNatrue()) && !empVo.getEmpNatrue().equals(excel.getEmpType())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_TYPE_ERROR)));
return true;
}
//档案试用期必填 20241128 fxj 1.7.2
if (Common.isEmpty(empVo.getTryPeriod()) && Common.isEmpty(excel.getTryPeriod())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_TRYPERIOD_NOT_EMPTY)));
......
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