Commit c67cfcfc authored by fangxinjiang's avatar fangxinjiang

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

parents b7a2e276 7a6c50a7
...@@ -2,12 +2,14 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity; ...@@ -2,12 +2,14 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* 入职待建档表 * 入职待建档表
...@@ -112,5 +114,8 @@ public class EmployeeRegistrationPre extends BaseEntity { ...@@ -112,5 +114,8 @@ public class EmployeeRegistrationPre extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private String reason; private String reason;
@Schema(description = "商险配置列表")
@TableField(exist = false)
private List<TEmployeeInsurancePre> insurancePreList;
} }
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
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.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.List;
/**
* 入职确认信息变更日志表
*
* @author hgw
* @date 2025-04-07 15:35:05
*/
@Data
@TableName("t_employee_pre_log")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "入职确认信息变更日志表")
public class TEmployeePreLog extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 变化主体:档案信息、商险信息
*/
@ExcelAttribute(name = "变化主体:档案信息、商险信息", maxLength = 100)
@Length(max = 100, message = "变化主体:档案信息、商险信息不能超过100个字符")
@ExcelProperty("变化主体:档案信息、商险信息")
@Schema(description = "变化主体:档案信息、商险信息")
private String diffTitle;
/**
* 入职确认信息ID——employee_registration_pre
*/
@ExcelAttribute(name = "入职确认信息ID——employee_registration_pre", isNotEmpty = true, errorInfo = "入职确认信息ID——employee_registration_pre不能为空", maxLength = 32)
@NotBlank(message = "入职确认信息ID——employee_registration_pre不能为空")
@Length(max = 32, message = "入职确认信息ID——employee_registration_pre不能超过32个字符")
@ExcelProperty("入职确认信息ID——employee_registration_pre")
@Schema(description = "入职确认信息ID——employee_registration_pre")
private String preId;
@TableField(exist = false)
private List<TEmployeePreLogDetail> detailList = new ArrayList<>();
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.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.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* 入职确认信息变更日志明细表
*
* @author hgw
* @date 2025-04-07 15:35:05
*/
@Data
@TableName("t_employee_pre_log_detail")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "入职确认信息变更日志明细表")
public class TEmployeePreLogDetail extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 类型:1档案;2商险
*/
@ExcelAttribute(name = "类型:1档案;2商险", maxLength = 1)
@Length(max = 1, message = "类型:1档案;2商险不能超过1个字符")
@ExcelProperty("类型:1档案;2商险")
@Schema(description = "类型:1档案;2商险")
private String type;
/**
* 入职确认信息表ID
*/
@ExcelAttribute(name = "入职确认信息表ID", isNotEmpty = true, errorInfo = "入职确认信息表ID不能为空", maxLength = 32)
@NotBlank(message = "入职确认信息表ID不能为空")
@Length(max = 32, message = "入职确认信息表ID不能超过32个字符")
@ExcelProperty("入职确认信息表ID")
@Schema(description = "入职确认信息表ID")
private String preId;
/**
* 入职日志ID
*/
@ExcelAttribute(name = "入职日志ID", isNotEmpty = true, errorInfo = "入职日志ID不能为空", maxLength = 32)
@NotBlank(message = "入职日志ID不能为空")
@Length(max = 32, message = "入职日志ID不能超过32个字符")
@ExcelProperty("入职日志ID")
@Schema(description = "入职日志ID")
private String preLogId;
/**
* 原来的信息
*/
@ExcelAttribute(name = "原来的信息", isNotEmpty = true, errorInfo = "原来的信息不能为空")
@NotBlank(message = "原来的信息不能为空")
@ExcelProperty("原来的信息")
@Schema(description = "原来的信息")
private String oldInfo;
/**
* 新的信息
*/
@ExcelAttribute(name = "新的信息", isNotEmpty = true, errorInfo = "新的信息不能为空")
@NotBlank(message = "新的信息不能为空")
@ExcelProperty("新的信息")
@Schema(description = "新的信息")
private String newInfo;
/**
* 差异的信息(属性名称,逗号隔开)
*/
@ExcelAttribute(name = "差异的信息(属性名称,逗号隔开)")
@ExcelProperty("差异的信息(属性名称,逗号隔开)")
@Schema(description = "差异的信息(属性名称,逗号隔开)")
private String differenceInfo;
/**
* 修改类型:1新增;2修改;3删除
*/
@ExcelAttribute(name = "修改类型:1新增;2修改;3删除", maxLength = 1)
@Length(max = 1, message = "修改类型:1新增;2修改;3删除不能超过1个字符")
@ExcelProperty("修改类型:1新增;2修改;3删除")
@Schema(description = "修改类型:1新增;2修改;3删除")
private String modelType;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLog;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 入职确认信息变更日志表
*
* @author hgw
* @date 2025-04-07 15:35:05
*/
@Data
public class TEmployeePreLogSearchVo extends TEmployeePreLog {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLog;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLogDetail;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 入职确认信息变更日志表
*
* @author hgw
* @date 2025-04-07 15:35:05
*/
@Data
public class TEmployeePreLogVo extends TEmployeePreLog implements Serializable {
List<TEmployeePreLogDetail> detailList = new ArrayList<>();
}
...@@ -60,7 +60,7 @@ public class EmployeeRegistrationPreController { ...@@ -60,7 +60,7 @@ public class EmployeeRegistrationPreController {
@Operation(summary = "通过id查询", description = "通过id查询") @Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}" ) @GetMapping("/{id}" )
public R<EmployeeRegistrationPre> getById(@PathVariable("id" ) String id) { public R<EmployeeRegistrationPre> getById(@PathVariable("id" ) String id) {
return R.ok(employeeRegistrationPreService.getById(id)); return R.ok(employeeRegistrationPreService.getEmployeeRegistrationPreById(id));
} }
/** /**
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLog;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeePreLogService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeePreLogSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 入职确认信息变更日志表
*
* @author hgw
* @date 2025-04-07 15:35:05
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/temployeeprelog")
@Tag(name = "入职确认信息变更日志表管理")
public class TEmployeePreLogController {
private final TEmployeePreLogService tEmployeePreLogService;
/**
* 简单分页查询
*
* @param page 分页对象
* @param tEmployeePreLog 入职确认信息变更日志表
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TEmployeePreLog>> getTEmployeePreLogPage(Page<TEmployeePreLog> page, TEmployeePreLogSearchVo tEmployeePreLog) {
return new R<>(tEmployeePreLogService.getTEmployeePreLogPage(page, tEmployeePreLog));
}
/**
* 不分页查询
*
* @param tEmployeePreLog 入职确认信息变更日志表
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage")
public R<List<TEmployeePreLog>> getTEmployeePreLogNoPage(@RequestBody TEmployeePreLogSearchVo tEmployeePreLog) {
return R.ok(tEmployeePreLogService.noPageDiy(tEmployeePreLog));
}
/**
* 通过id查询入职确认信息变更日志表
*
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('archives_temployeeprelog_get')")
@GetMapping("/{id}")
@PreAuthorize("@pms.hasPermission('archives_temployeeprelog_get')")
public R<TEmployeePreLog> getById(@PathVariable("id") String id) {
return R.ok(tEmployeePreLogService.getById(id));
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLogDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 入职确认信息变更日志明细表
*
* @author hgw
* @date 2025-04-07 15:35:05
*/
@Mapper
public interface TEmployeePreLogDetailMapper extends BaseMapper<TEmployeePreLogDetail> {
/**
* 入职确认信息变更日志明细表简单分页查询
*
* @param preId 入职确认信息变更日志明细表
* @return
*/
List<TEmployeePreLogDetail> getTEmployeePreLogDetailList(@Param("preId") String preId);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 入职确认信息变更日志表
*
* @author hgw
* @date 2025-04-07 15:35:05
*/
@Mapper
public interface TEmployeePreLogMapper extends BaseMapper<TEmployeePreLog> {
/**
* 入职确认信息变更日志表简单分页查询
*
* @param tEmployeePreLog 入职确认信息变更日志表
* @return
*/
IPage<TEmployeePreLog> getTEmployeePreLogPage(Page<TEmployeePreLog> page, @Param("tEmployeePreLog") TEmployeePreLog tEmployeePreLog);
}
...@@ -113,4 +113,12 @@ public interface EmployeeRegistrationPreService extends IService<EmployeeRegistr ...@@ -113,4 +113,12 @@ public interface EmployeeRegistrationPreService extends IService<EmployeeRegistr
**/ **/
EmployeeRegistrationPre getPreInfo(String empIdCard, String deptId); EmployeeRegistrationPre getPreInfo(String empIdCard, String deptId);
/**
* @Description: 根据ID获取商险待购买
* @Author: hgw
* @Date: 2025/4/9 15:01
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre>
**/
EmployeeRegistrationPre getEmployeeRegistrationPreById(String id);
} }
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLogDetail;
import java.util.List;
/**
* 入职确认信息变更日志明细表
*
* @author hgw
* @date 2025-04-07 15:35:05
*/
public interface TEmployeePreLogDetailService extends IService<TEmployeePreLogDetail> {
/**
* 入职确认信息变更日志明细表简单分页查询
*
* @param preId 入职确认信息变更日志明细表
* @return
*/
List<TEmployeePreLogDetail> getTEmployeePreLogDetailList(String preId);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLog;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeePreLogSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import java.util.List;
import java.util.Map;
/**
* 入职确认信息变更日志表
*
* @author hgw
* @date 2025-04-07 15:35:05
*/
public interface TEmployeePreLogService extends IService<TEmployeePreLog> {
/**
* 入职确认信息变更日志表简单分页查询
*
* @param tEmployeePreLog 入职确认信息变更日志表
* @return
*/
IPage<TEmployeePreLog> getTEmployeePreLogPage(Page<TEmployeePreLog> page, TEmployeePreLogSearchVo tEmployeePreLog);
List<TEmployeePreLog> noPageDiy(TEmployeePreLogSearchVo searchVo);
/**
* @Description: 添加日志并修改商险list
* @Author: hgw
* @Date: 2025/4/9 14:50
* @return: void
**/
void saveModifyAndUpdateInsurance(String empPreId, EmployeeRegistrationPre oldInfo
, EmployeeRegistrationPre newInfo, YifuUser user, Map<String, TEmployeeInsurancePre> oldMap);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLogDetail;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeePreLogDetailMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeePreLogDetailService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 入职确认信息变更日志明细表
*
* @author hgw
* @date 2025-04-07 15:35:05
*/
@Log4j2
@Service
public class TEmployeePreLogDetailServiceImpl extends ServiceImpl<TEmployeePreLogDetailMapper, TEmployeePreLogDetail> implements TEmployeePreLogDetailService {
/**
* 入职确认信息变更日志明细表简单分页查询
*
* @param preId 入职确认信息变更日志明细表
* @return
*/
@Override
public List<TEmployeePreLogDetail> getTEmployeePreLogDetailList(String preId) {
return baseMapper.getTEmployeePreLogDetailList(preId);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeePreLogDetailMapper">
<resultMap id="tEmployeePreLogDetailMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLogDetail">
<id property="id" column="ID"/>
<result property="type" column="TYPE"/>
<result property="preLogId" column="PRE_LOG_ID"/>
<result property="preId" column="PRE_ID"/>
<result property="createBy" column="CREATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="oldInfo" column="OLD_INFO"/>
<result property="newInfo" column="NEW_INFO"/>
<result property="differenceInfo" column="DIFFERENCE_INFO"/>
<result property="modelType" column="MODEL_TYPE"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.TYPE,
a.PRE_LOG_ID,
a.PRE_ID,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME,
a.OLD_INFO,
a.NEW_INFO,
a.DIFFERENCE_INFO,
a.MODEL_TYPE
</sql>
<!--tEmployeePreLogDetail简单分页查询-->
<select id="getTEmployeePreLogDetailList" resultMap="tEmployeePreLogDetailMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_employee_pre_log_detail a
where a.PRE_ID = #{preId}
order by a.create_time asc
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeePreLogMapper">
<resultMap id="tEmployeePreLogMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLog">
<id property="id" column="ID"/>
<result property="diffTitle" column="DIFF_TITLE"/>
<result property="preId" column="PRE_ID"/>
<result property="createBy" column="CREATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.DIFF_TITLE,
a.PRE_ID,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
</sql>
<sql id="tEmployeePreLog_where">
<if test="tEmployeePreLog != null">
<if test="tEmployeePreLog.id != null and tEmployeePreLog.id.trim() != ''">
AND a.ID = #{tEmployeePreLog.id}
</if>
<if test="tEmployeePreLog.diffTitle != null and tEmployeePreLog.diffTitle.trim() != ''">
AND a.DIFF_TITLE = #{tEmployeePreLog.diffTitle}
</if>
<if test="tEmployeePreLog.preId != null and tEmployeePreLog.preId.trim() != ''">
AND a.PRE_ID = #{tEmployeePreLog.preId}
</if>
<if test="tEmployeePreLog.createBy != null and tEmployeePreLog.createBy.trim() != ''">
AND a.CREATE_BY = #{tEmployeePreLog.createBy}
</if>
<if test="tEmployeePreLog.createName != null and tEmployeePreLog.createName.trim() != ''">
AND a.CREATE_NAME = #{tEmployeePreLog.createName}
</if>
<if test="tEmployeePreLog.createTime != null">
AND a.CREATE_TIME = #{tEmployeePreLog.createTime}
</if>
<if test="tEmployeePreLog.updateBy != null and tEmployeePreLog.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tEmployeePreLog.updateBy}
</if>
<if test="tEmployeePreLog.updateTime != null">
AND a.UPDATE_TIME = #{tEmployeePreLog.updateTime}
</if>
</if>
</sql>
<!--tEmployeePreLog简单分页查询-->
<select id="getTEmployeePreLogPage" resultMap="tEmployeePreLogMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_employee_pre_log a
<where>
1=1
<include refid="tEmployeePreLog_where"/>
</where>
</select>
</mapper>
...@@ -10,7 +10,9 @@ import java.math.BigDecimal; ...@@ -10,7 +10,9 @@ import java.math.BigDecimal;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.Instant;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.temporal.TemporalAdjusters; import java.time.temporal.TemporalAdjusters;
import java.util.*; import java.util.*;
...@@ -681,6 +683,20 @@ public class DateUtil { ...@@ -681,6 +683,20 @@ public class DateUtil {
return dt; return dt;
} }
/**
* @param localDateTime
* @Description: 将LocalDateTime转成Date
* @Author: hgw
* @Date: 2025/4/8 21:13
* @return: java.util.Date
**/
public static Date convertToDateByLocalDateTime(LocalDateTime localDateTime) {
ZoneId defaultZoneId = ZoneId.systemDefault();
Instant instant = localDateTime.atZone(defaultZoneId).toInstant();
Date date = Date.from(instant);
return date;
}
public static String dateFromat(Date date, int minute) { public static String dateFromat(Date date, int minute) {
String dateFormat = null; String dateFormat = null;
int year = Integer.parseInt(getYear(date)); int year = Integer.parseInt(getYear(date));
......
package com.yifu.cloud.plus.v1.yifu.insurances.entity; package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
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.fasterxml.jackson.annotation.JsonFormat;
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;
...@@ -39,6 +41,7 @@ public class TEmployeeInsurancePre extends BaseEntity { ...@@ -39,6 +41,7 @@ public class TEmployeeInsurancePre extends BaseEntity {
@Schema(description = "手机号码") @Schema(description = "手机号码")
private String empPhone; private String empPhone;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "入职日期") @Schema(description = "入职日期")
private Date joinLeaveDate; private Date joinLeaveDate;
...@@ -60,12 +63,14 @@ public class TEmployeeInsurancePre extends BaseEntity { ...@@ -60,12 +63,14 @@ public class TEmployeeInsurancePre extends BaseEntity {
@Schema(description = "项目id") @Schema(description = "项目id")
private String deptId; private String deptId;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "预计派单时间") @Schema(description = "预计派单时间")
private LocalDateTime expectedCollectionTime; private LocalDateTime expectedCollectionTime;
@Schema(description = "登记人") @Schema(description = "登记人")
private String registUser; private String registUser;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "登记时间") @Schema(description = "登记时间")
private LocalDateTime registTime; private LocalDateTime registTime;
...@@ -84,9 +89,11 @@ public class TEmployeeInsurancePre extends BaseEntity { ...@@ -84,9 +89,11 @@ public class TEmployeeInsurancePre extends BaseEntity {
@Schema(description = "购买类型, 1新增、3批增、4替换") @Schema(description = "购买类型, 1新增、3批增、4替换")
private Integer buyType; private Integer buyType;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "保单开始时间") @Schema(description = "保单开始时间")
private Date policyStart; private Date policyStart;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "保单结束时间") @Schema(description = "保单结束时间")
private Date policyEnd; private Date policyEnd;
...@@ -126,4 +133,8 @@ public class TEmployeeInsurancePre extends BaseEntity { ...@@ -126,4 +133,8 @@ public class TEmployeeInsurancePre extends BaseEntity {
@Schema(description = "替换项目编码") @Schema(description = "替换项目编码")
private String replaceDeptNo; private String replaceDeptNo;
@TableField(exist = false)
@Schema(description = "修改类型:1新增;2修改;3删除;4状态346为不可编辑")
private String modelType;
} }
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @author hgw
* @description 商险待办任务表VO
* @date 2025-4-8 11:20:05
*/
@Data
@Schema(description = "商险待办任务表VO")
public class EmployeePreLogListVo implements Serializable {
private static final long serialVersionUID = 628032758008497542L;
private List<TEmployeeInsurancePre> preList = new ArrayList<>();
}
...@@ -12,6 +12,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; ...@@ -12,6 +12,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; 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.insurances.entity.TEmployeeInsurancePre;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TEmployeeInsurancePreService; import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TEmployeeInsurancePreService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EmployeePreLogListVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreSearchVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreSearchVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsuranceSelectVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsuranceSelectVo;
...@@ -186,4 +187,23 @@ public class TEmployeeInsurancePreController { ...@@ -186,4 +187,23 @@ public class TEmployeeInsurancePreController {
tEmployeeInsurancePreService.pushWxConfrimMessage(); tEmployeeInsurancePreService.pushWxConfrimMessage();
} }
/**
* @param empPreId 入职确认信息表ID
* @Description: 获取商险信息
* @Author: hgw
* @Date: 2025/4/8 9:23
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre>>
**/
@Inner
@PostMapping("/inner/getListByEmpPreId")
public EmployeePreLogListVo getListByEmpPreId(@RequestBody String empPreId){
return tEmployeeInsurancePreService.getListByEmpPreId(empPreId);
}
@Inner
@PostMapping("/inner/saveOrUpdateInsuranceList")
public Boolean saveOrUpdateInsuranceList(@RequestBody List<TEmployeeInsurancePre> preList) {
return tEmployeeInsurancePreService.saveOrUpdateInsuranceList(preList);
}
} }
...@@ -31,4 +31,12 @@ public interface TEmployeeInsurancePreMapper extends BaseMapper<TEmployeeInsuran ...@@ -31,4 +31,12 @@ public interface TEmployeeInsurancePreMapper extends BaseMapper<TEmployeeInsuran
List<TEmployeeInsurancePreExportVo> selectExportList(@Param("employeeRegistration") TEmployeeInsurancePreSearchVo employeeRegistration); List<TEmployeeInsurancePreExportVo> selectExportList(@Param("employeeRegistration") TEmployeeInsurancePreSearchVo employeeRegistration);
List<TEmployeeInsurancePre> getAllUnconfimData(); List<TEmployeeInsurancePre> getAllUnconfimData();
/**
* 根据empPreId查询
* @param empPreId 入职确认信息表主键
* @return
*/
List<TEmployeeInsurancePre> getListByEmpPreId(@Param("empPreId") String empPreId);
void deleteByEmpPreId(@Param("empPreId") String empPreId);
} }
...@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo; ...@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo;
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.TEmployeeInsurancePre; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EmployeePreLogListVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreSearchVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreSearchVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsuranceSelectVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsuranceSelectVo;
...@@ -70,4 +71,20 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc ...@@ -70,4 +71,20 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc
void pushWxConfrimMessage(); void pushWxConfrimMessage();
/**
* @Description: 查询list
* @Author: hgw
* @Date: 2025/4/8 11:31
* @return: com.yifu.cloud.plus.v1.yifu.insurances.vo.EmployeePreLogListVo
**/
EmployeePreLogListVo getListByEmpPreId(String empPreId);
/**
* @Description: 先删后增
* @Author: hgw
* @Date: 2025/4/8 11:31
* @return: boolean
**/
boolean saveOrUpdateInsuranceList(List<TEmployeeInsurancePre> preList);
} }
...@@ -539,4 +539,32 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -539,4 +539,32 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
} }
} }
} }
/**
* @param empPreId 入职确认ID
* @Description: 根据
* @Author: hgw
* @Date: 2025/4/7 18:29
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre>
**/
@Override
public EmployeePreLogListVo getListByEmpPreId(String empPreId) {
EmployeePreLogListVo vo = new EmployeePreLogListVo();
List<TEmployeeInsurancePre> preList = baseMapper.getListByEmpPreId(empPreId);
vo.setPreList(preList);
return vo;
}
/**
* @Description: 先删后增
* @Author: hgw
* @Date: 2025/4/8 11:30
* @return: boolean
**/
@Override
public boolean saveOrUpdateInsuranceList(List<TEmployeeInsurancePre> preList) {
baseMapper.deleteByEmpPreId(preList.get(0).getRegisterId());
this.saveOrUpdateBatch(preList);
return true;
}
} }
...@@ -225,6 +225,18 @@ ...@@ -225,6 +225,18 @@
</where> </where>
</select> </select>
<!--查询list,用来对比,记录日志-->
<select id="getListByEmpPreId" resultMap="tEmployeeInsurancePreMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_employee_insurance_pre a
where a.register_id = #{empPreId}
</select>
<!--先删后加-->
<delete id="deleteByEmpPreId">
delete FROM t_employee_insurance_pre where register_id = #{empPreId} and process_status in ('0','1','2','5')
</delete>
<select id="selectExportCount" resultType="java.lang.Long"> <select id="selectExportCount" resultType="java.lang.Long">
SELECT SELECT
count(1) count(1)
......
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