Commit e542f4bf authored by fangxinjiang's avatar fangxinjiang

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

parents 4025f3db f38861c6
package com.yifu.cloud.plus.v1.yifu.archives.vo; package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
* @Author fxj * @Author fxj
...@@ -38,4 +42,19 @@ public class UpdateEmpVo implements Serializable { ...@@ -38,4 +42,19 @@ public class UpdateEmpVo implements Serializable {
**/ **/
private String createName; private String createName;
private String createBy; private String createBy;
@Schema(description = "是否大专及以上(0否1是)")
private Integer isCollege;
@Schema(description = "最高学历(字典值)")
private String hignEducation;
@Schema(description = "学校")
private String school;
@Schema(description = "专业")
private String major;
@Schema(description = "毕业时间")
private Date gradutionDate;
} }
...@@ -1597,7 +1597,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1597,7 +1597,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
sf.setEmpIdcard(insert.getEmpIdcard()); sf.setEmpIdcard(insert.getEmpIdcard());
sf.setSettleDomain(insert.getSettleDomain()); sf.setSettleDomain(insert.getSettleDomain());
if (!("合同未到期重新签订").equals(insert.getSituation())&&!("正常续签").equals(insert.getSituation()) if (!("合同未到期重新签订").equals(insert.getSituation())&&!("正常续签").equals(insert.getSituation())
&&!("离职再入职").equals(insert.getSituation()) &&!("商务合同更改").equals(insert.getSituation())) { &&!("离职再入职").equals(insert.getSituation()) &&!("商务合同更改").equals(insert.getSituation())
&&!("正常签订").equals(insert.getSituation())) {
R<Integer> socialFundR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId() R<Integer> socialFundR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tsocialfundinfo/inner/selectSocialFoundByContract", sf, Integer.class, SecurityConstants.FROM_IN); , "/tsocialfundinfo/inner/selectSocialFoundByContract", sf, Integer.class, SecurityConstants.FROM_IN);
if (socialFundR != null && socialFundR.getData() != null && socialFundR.getData() > 0) { if (socialFundR != null && socialFundR.getData() != null && socialFundR.getData() > 0) {
......
...@@ -2634,6 +2634,22 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2634,6 +2634,22 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
employeeInfo.setContactAddress(vo.getContactAddress()); employeeInfo.setContactAddress(vo.getContactAddress());
} }
employeeInfo.setStatus(CommonConstants.ONE_INT); employeeInfo.setStatus(CommonConstants.ONE_INT);
// 新增加同步派单的学历等信息到档案里:MVP1.7.18 2025-12-15 09:21:47
if (Common.isNotNull(vo.getHignEducation())) {
employeeInfo.setHignEducation(vo.getHignEducation());
}
if (Common.isNotNull(vo.getIsCollege())) {
employeeInfo.setIsCollege(vo.getIsCollege());
}
if (Common.isNotNull(vo.getSchool())) {
employeeInfo.setSchool(vo.getSchool());
}
if (Common.isNotNull(vo.getMajor())) {
employeeInfo.setMajor(vo.getMajor());
}
if (Common.isNotNull(vo.getGradutionDate())) {
employeeInfo.setGradutionDate(vo.getGradutionDate());
}
} }
if (Common.isNotNull(vo.getProjectNo())) { if (Common.isNotNull(vo.getProjectNo())) {
......
...@@ -301,21 +301,7 @@ public class ArchivesDaprUtil { ...@@ -301,21 +301,7 @@ public class ArchivesDaprUtil {
* @Param type 0 审核通过 1 审核不通过 * @Param type 0 审核通过 1 审核不通过
* @return * @return
**/ **/
public R<Boolean> updateEmpInfo(String empIdCard,String contactAddress, String projectNo, String contractId,String type,String remarkTemp, YifuUser user){ public R<Boolean> updateEmpInfo(UpdateEmpVo vo) {
if (Common.isEmpty(empIdCard)
|| Common.isEmpty(projectNo)
|| Common.isEmpty(type)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
UpdateEmpVo vo = new UpdateEmpVo();
vo.setEmpIdCard(empIdCard);
vo.setProjectNo(projectNo);
vo.setContractId(contractId);
vo.setRemarkTemp(remarkTemp);
vo.setType(type);
vo.setCreateBy(user.getId());
vo.setCreateName(user.getNickname());
vo.setContactAddress(contactAddress);
R<Boolean> res = HttpDaprUtil.invokeMethodPost( R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId() daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeinfo/inner/updateEmpInfo" , JSON.toJSONString(vo), Boolean.class, SecurityConstants.FROM_IN); ,"/temployeeinfo/inner/updateEmpInfo" , JSON.toJSONString(vo), Boolean.class, SecurityConstants.FROM_IN);
......
package com.yifu.cloud.plus.v1.yifu.insurances.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 javax.validation.constraints.NotBlank;
/**
* 商险信息变更表
*
* @author huych
* @date 2025-12-11 15:35:05
*/
@Data
@TableName("t_insurances_change_log")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "商险信息变更表")
public class TInsurancesChangeLog extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 商险信息ID
*/
@ExcelAttribute(name = "商险信息ID")
@ExcelProperty("商险信息ID")
@Schema(description = "商险信息ID")
private String preId;
/**
* 差异的信息(属性名称,逗号隔开)
*/
@ExcelAttribute(name = "差异的信息(属性名称,逗号隔开)")
@ExcelProperty("差异的信息(属性名称,逗号隔开)")
@Schema(description = "差异的信息(属性名称,逗号隔开)")
private String differenceInfo;
/**
* 原来的信息
*/
@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 reason;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateConverter;
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;
import java.time.LocalDateTime;
/**
* 商险明细项目变更日志导出VO
*
* @author yifu
* @date 2025-12-12
*/
@Data
@Tag(name = "商险明细项目变更日志导出VO")
public class InsuranceChangeLogExportVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "员工姓名")
private String empName;
/**
* 员工身份证号码
*/
@Schema(description = "员工身份证号码")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "员工身份证号码")
private String empIdcardNo;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "险种名称")
private String insuranceTypeName;
/**
* 保单开始日期
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
@Schema(description = "保单开始日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "保单开始日期", converter = LocalDateConverter.class)
@DateTimeFormat("yyyy-MM-dd")
private LocalDate policyStart;
/**
* 保单结束日期
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
@Schema(description = "保单结束日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "保单结束日期", converter = LocalDateConverter.class)
@DateTimeFormat("yyyy-MM-dd")
private LocalDate policyEnd;
/**
* 购买标准
*/
@Schema(description = "购买标准")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "购买标准(元)")
private String buyStandard;
/**
* 操作人
*/
@Schema(description = "操作人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "操作人")
private String createName;
/**
* 操作时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
@Schema(description = "操作时间")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "操作时间")
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
/**
* 操作内容(项目编码和项目名称变更)
*/
@Schema(description = "操作内容")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "操作内容")
private String operateContent;
/**
* 变更原因
*/
@Schema(description = "变更原因")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "变更原因")
private String reason;
}
...@@ -493,6 +493,20 @@ public class TInsuranceDetailController { ...@@ -493,6 +493,20 @@ public class TInsuranceDetailController {
tInsuranceDetailService.getInsuredList(param,response); tInsuranceDetailService.getInsuredList(param,response);
} }
/**
* 导出商险明细项目变更日志
*
* @author yifu
* @param param 查询条件
* @param response 响应参数
* @return void
*/
@Operation(summary = "导出商险明细项目变更日志", description = "导出商险明细项目变更日志")
@PostMapping("/exportInsuranceChangeLog")
public void exportInsuranceChangeLog(@RequestBody InsuredParam param, HttpServletResponse response) {
tInsuranceDetailService.exportInsuranceChangeLog(param, response);
}
/** /**
* 已减员列表分页查询 * 已减员列表分页查询
* *
......
package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancesChangeLog;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancesChangeLogService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 入职确认信息变更日志表
*
* @author huych
* @date 2025-12-12 15:35:05
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tInsurancesChangeLog")
@Tag(name = "商险信息变更日志表管理")
public class TInsurancesChangeLogController {
private final TInsurancesChangeLogService insurancesChangeLogService;
/**
* 分页查询
*
* @return {@link R< IPage < TInsurancesChangeLog >>}
*/
@Operation(summary = "分页查询", description = "分页查询")
@PostMapping("/getInsuranceListPage")
public R<IPage<TInsurancesChangeLog>> getInsuranceListPage(Page<TInsurancesChangeLog> page, @RequestBody TInsurancesChangeLog param) {
return R.ok(insurancesChangeLogService.getInsuranceListPage(page, param));
}
/**
* 通过id查询入职确认信息变更日志表
*
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}")
public R<List<TInsurancesChangeLog>> getById(@PathVariable("id") String id) {
return R.ok(insurancesChangeLogService.getTInsurancesChangeLoglList(id));
}
}
...@@ -343,4 +343,22 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -343,4 +343,22 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
List<String> getInsuranceDetailList(@Param("empIdCard") String empIdCard, @Param("deptNo") String deptNo); List<String> getInsuranceDetailList(@Param("empIdCard") String empIdCard, @Param("deptNo") String deptNo);
List<String> getInsuranceDetailListByClose(@Param("empIdCard") String empIdCard, @Param("deptNo") String deptNo); List<String> getInsuranceDetailListByClose(@Param("empIdCard") String empIdCard, @Param("deptNo") String deptNo);
/**
* 导出商险明细项目变更日志
*
* @author yifu
* @param param 查询参数
* @return {@link List<InsuranceChangeLogExportVo>}
*/
List<InsuranceChangeLogExportVo> getInsuranceChangeLogExportList(@Param("param") InsuredParam param);
/**
* 导出商险明细项目变更日志统计
*
* @author huych
* @param param 查询参数
* @return {@link long}
*/
long getInsuranceChangeLogExportCount(@Param("param") InsuredParam param);
} }
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
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.insurances.entity.TInsurancesChangeLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 商险信息信息变更日志明细表
*
* @author huych
* @date 2025-12-11 15:35:05
*/
@Mapper
public interface TInsurancesChangeLogMapper extends BaseMapper<TInsurancesChangeLog> {
/**
* 入商险信息信息变更明细表查询
* @param preId 商险id
* @return
*/
List<TInsurancesChangeLog> getTInsurancesChangeLoglList(@Param("preId") String preId);
/**
* 商险信息信息变更明细表简单分页查询
* @param param 商险信息信息变更明细表
* @return
*/
IPage<TInsurancesChangeLog> getInsuranceListPage(Page<TInsurancesChangeLog> page, @Param("param") TInsurancesChangeLog param);
}
...@@ -256,6 +256,16 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -256,6 +256,16 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/ */
void getInsuredList(InsuredParam param, HttpServletResponse response); void getInsuredList(InsuredParam param, HttpServletResponse response);
/**
* 导出商险明细项目变更日志
*
* @author yifu
* @param param 查询参数
* @param response 响应参数
* @return void
*/
void exportInsuranceChangeLog(InsuredParam param, HttpServletResponse response);
/** /**
* 已减员列表分页查询 * 已减员列表分页查询
* *
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
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.insurances.entity.TInsurancesChangeLog;
import java.util.List;
/**
* 商险信息信息变更日志明细表
*
* @author huych
* @date 2025-12-11 15:35:05
*/
public interface TInsurancesChangeLogService extends IService<TInsurancesChangeLog> {
/**
* 入职确认信息变更日志明细表查询
* @param preId 商险ID
* @return
*/
List<TInsurancesChangeLog> getTInsurancesChangeLoglList(String preId);
/**
* 入职确认信息变更日志明细表简单分页查询
* @param param 入职确认信息变更日志明细表
* @return
*
*/
IPage<TInsurancesChangeLog> getInsuranceListPage(Page<TInsurancesChangeLog> page, TInsurancesChangeLog param);
}
...@@ -8,6 +8,8 @@ import com.alibaba.excel.read.listener.ReadListener; ...@@ -8,6 +8,8 @@ import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder; import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils; import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
...@@ -86,6 +88,8 @@ import java.util.concurrent.TimeUnit; ...@@ -86,6 +88,8 @@ import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import static com.alibaba.fastjson.serializer.SerializerFeature.*;
/** /**
* @author licancan * @author licancan
* @description 针对表【t_insurance_detail(商险明细表)】的数据库操作Service实现 * @description 针对表【t_insurance_detail(商险明细表)】的数据库操作Service实现
...@@ -153,7 +157,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -153,7 +157,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private TInsurancePreRenewDetailMapper tInsurancePreRenewDetailMapper; private TInsurancePreRenewDetailMapper tInsurancePreRenewDetailMapper;
@Resource @Resource
private TInsuranceWarnMapper tInsuranceWarnMapper; private TInsuranceWarnMapper tInsuranceWarnMapper;
@Resource
private TInsurancesChangeLogService insurancesChangeLogService;
@Resource @Resource
private TInsurancePreRenewDetailQwService tInsurancePreRenewDetailQwService; private TInsurancePreRenewDetailQwService tInsurancePreRenewDetailQwService;
...@@ -5107,6 +5112,74 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5107,6 +5112,74 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
/**
* 导出商险明细项目变更日志
*
* @author yifu
* @param param 查询参数
* @param response 响应参数
* @return void
*/
@Override
public void exportInsuranceChangeLog(InsuredParam param, HttpServletResponse response) {
YifuUser user = SecurityUtils.getUser();
param.setCreateBy(user.getId());
menuUtil.setAuthSql(user, param);
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
}
List<InsuranceChangeLogExportVo> list = new ArrayList<>();
//处理导出
String fileName = "商险明细项目变更日志" + DateUtil.getThisTime() + CommonConstants.XLSX;
long count = this.baseMapper.getInsuranceChangeLogExportCount(param);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, InsuranceChangeLogExportVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; ) {
// 获取实际记录
param.setLimitStart(i);
param.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = this.baseMapper.getInsuranceChangeLogExportList(param);
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("sheet" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)) {
list.clear();
}
}
} else {
WriteSheet writeSheet = EasyExcel.writerSheet("sheet" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
list.clear();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("导出商险明细项目变更日志执行异常", e);
} finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("关闭输出流异常", e);
}
}
}
/** /**
* 已减员列表分页查询 * 已减员列表分页查询
* *
...@@ -6410,23 +6483,38 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6410,23 +6483,38 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
} }
//新增操作信息 //新增项目变更的操作信息
TInsuranceOperate insuranceOperate = new TInsuranceOperate(); TInsurancesChangeLog insuranceOperate = new TInsurancesChangeLog();
insuranceOperate.setInsuranceDetailId(success.getId()); insuranceOperate.setPreId(success.getId());
insuranceOperate.setCreateBy(user.getId()); insuranceOperate.setCreateBy(user.getId());
insuranceOperate.setCreateName(user.getNickname()); insuranceOperate.setCreateName(user.getNickname());
insuranceOperate.setCreateTime(LocalDateTime.now()); insuranceOperate.setCreateTime(LocalDateTime.now());
insuranceOperate.setDisplayFlag(CommonConstants.ZERO_INT); insuranceOperate.setReason("项目变更");
insuranceOperate.setOperateDesc(InsurancesConstants.DEPT_CHANGE); insuranceOperate.setDifferenceInfo("项目名称,项目编码");
operateList.add(insuranceOperate); Map<String, String> oldMap = new HashMap<>();
oldMap.put("deptName", success.getOldDeptName());
oldMap.put("deptNo", success.getOldDeptNo());
insuranceOperate.setOldInfo(JSON.toJSONString(oldMap, features));
Map<String, String> newMap = new HashMap<>();
newMap.put("deptName", success.getNewDeptName());
newMap.put("deptNo", success.getNewDeptNo());
insuranceOperate.setNewInfo(JSON.toJSONString(newMap, features));
insurancesChangeLogService.save(insuranceOperate);
// operateList.add(insuranceOperate);
} }
}); });
} }
tInsuranceOperateService.saveBatch(operateList); //改变原来写法,原来逻辑在执行这段代码前前面的线程任务还在执行operateList并没值,所以日志没保存上
// tInsuranceOperateService.saveBatch(operateList);
List<DeptChangeCheckParam> errorList = stringListMap.get(InsurancesConstants.ERROR_LIST); List<DeptChangeCheckParam> errorList = stringListMap.get(InsurancesConstants.ERROR_LIST);
return R.ok(errorList,InsurancesConstants.IMPORT_SUCCESS); return R.ok(errorList,InsurancesConstants.IMPORT_SUCCESS);
} }
private static final SerializerFeature[] features = new SerializerFeature[]{
WriteMapNullValue, WriteNullNumberAsZero, WriteNullListAsEmpty,
WriteNullStringAsEmpty, WriteDateUseDateFormat
};
/** /**
* 根据保险公司名称查询保单明细 * 根据保险公司名称查询保单明细
* *
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancesChangeLog;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsurancesChangeLogMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancesChangeLogService;
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 TInsurancesChangeLogServiceImpl extends ServiceImpl<TInsurancesChangeLogMapper, TInsurancesChangeLog> implements TInsurancesChangeLogService {
/**
* 入职确认信息变更日志明细表查询
* @param preId 商险ID
* @return
*/
@Override
public List<TInsurancesChangeLog> getTInsurancesChangeLoglList(String preId) {
return baseMapper.getTInsurancesChangeLoglList(preId);
}
/**
* 入职确认信息变更日志明细表简单分页查询
* @param param
* @return
*/
@Override
public IPage<TInsurancesChangeLog> getInsuranceListPage(Page<TInsurancesChangeLog> page, TInsurancesChangeLog param) {
return baseMapper.getInsuranceListPage(page,param);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!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.insurances.mapper.insurances.TInsurancesChangeLogMapper">
<resultMap id="tInsurancesChangeLogMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancesChangeLog">
<id property="id" column="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="reason" column="reason"/>
</resultMap>
<sql id="Base_Column_List">
a.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.reason
</sql>
<!--TInsurancesChangeLog简单分页查询-->
<select id="getTInsurancesChangeLoglList" resultMap="tInsurancesChangeLogMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_insurances_change_log a
where a.PRE_ID = #{preId}
order by a.create_time asc
</select>
<!--TInsurancesChangeLog简单分页查询-->
<select id="getInsuranceListPage" resultMap="tInsurancesChangeLogMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_insurances_change_log a
where 1=1
<if test="param.preId != null and param.preId.trim() != ''">
and a.PRE_ID = #{param.preId}
</if>
order by a.create_time asc
</select>
</mapper>
...@@ -50,12 +50,12 @@ public class TSocialLog extends BaseEntity { ...@@ -50,12 +50,12 @@ public class TSocialLog extends BaseEntity {
private String id; private String id;
/** /**
* 类型:1社保基数配置;2公积金基数配置;3:调基 * 类型:1社保基数配置;2公积金基数配置;3:调基 ;4户配置
*/ */
@ExcelAttribute(name = "类型:1社保基数配置;2公积金基数配置;3:调基") @ExcelAttribute(name = "类型:1社保基数配置;2公积金基数配置;3:调基 ;4户配置")
@Schema(description = "类型:1社保基数配置;2公积金基数配置;3:调基") @Schema(description = "类型:1社保基数配置;2公积金基数配置;3:调基 ;4户配置")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("类型:1社保基数配置;2公积金基数配置;3:调基") @ExcelProperty("类型:1社保基数配置;2公积金基数配置;3:调基 ;4户配置")
private Integer type; private Integer type;
/** /**
......
...@@ -147,8 +147,7 @@ public class SysHouseHoldInfoController { ...@@ -147,8 +147,7 @@ public class SysHouseHoldInfoController {
if (Common.isNotNull(autoStatus)){ if (Common.isNotNull(autoStatus)){
sysHouseHoldInfo.setAutoStatus(autoStatus); sysHouseHoldInfo.setAutoStatus(autoStatus);
} }
sysHouseHoldInfoService.updateById(sysHouseHoldInfo); return sysHouseHoldInfoService.updateStatusById(sysHouseHoldInfo);
return R.ok();
} }
return R.failed(CommonConstants.NO_DATA_TO_HANDLE); return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
} }
......
...@@ -59,6 +59,8 @@ public interface SysHouseHoldInfoService extends IService<SysHouseHoldInfo> { ...@@ -59,6 +59,8 @@ public interface SysHouseHoldInfoService extends IService<SysHouseHoldInfo> {
R<Boolean> updateByIdAsso(SysHouseHoldInfo sysHouseHoldInfo); R<Boolean> updateByIdAsso(SysHouseHoldInfo sysHouseHoldInfo);
R<Boolean> updateStatusById(SysHouseHoldInfo sysHouseHoldInfo);
IPage<SysHouseHoldInfo> getAllSingleSocailPage(Page<SysHouseHoldInfo> page); IPage<SysHouseHoldInfo> getAllSingleSocailPage(Page<SysHouseHoldInfo> page);
R<List<ErrorMessage>> importListAdd(InputStream inputStream); R<List<ErrorMessage>> importListAdd(InputStream inputStream);
......
...@@ -39,7 +39,7 @@ public interface TSocialLogService extends IService<TSocialLog> { ...@@ -39,7 +39,7 @@ public interface TSocialLogService extends IService<TSocialLog> {
/** /**
* 生成修改记录 * 生成修改记录
* *
* @param type 类型:1社保基数配置;2公积金基数配置 * @param type 类型:1社保基数配置;2公积金基数配置 4 户配置
* @param mainId 关联表id * @param mainId 关联表id
* @param oldInfo * @param oldInfo
* @param newInfo * @param newInfo
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.social.service.impl; package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.ExcelWriter;
...@@ -45,7 +44,6 @@ import com.yifu.cloud.plus.v1.yifu.social.mapper.SysBaseSetInfoMapper; ...@@ -45,7 +44,6 @@ import com.yifu.cloud.plus.v1.yifu.social.mapper.SysBaseSetInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.SysHouseHoldInfoMapper; import com.yifu.cloud.plus.v1.yifu.social.mapper.SysHouseHoldInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.SysBaseSetInfoService; import com.yifu.cloud.plus.v1.yifu.social.service.SysBaseSetInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.SysPayProportionService; import com.yifu.cloud.plus.v1.yifu.social.service.SysPayProportionService;
import com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialLogService; import com.yifu.cloud.plus.v1.yifu.social.service.TSocialLogService;
import com.yifu.cloud.plus.v1.yifu.social.vo.*; import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
...@@ -195,6 +193,11 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -195,6 +193,11 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
if (CommonConstants.ONE_STRING.equals(sysBaseSetInfo.getBaseType())) { if (CommonConstants.ONE_STRING.equals(sysBaseSetInfo.getBaseType())) {
type = CommonConstants.TWO_INT; type = CommonConstants.TWO_INT;
} }
//设置不记录更新日志字段
sysBaseSetInfo.setDepartId(old.getDepartId());
sysBaseSetInfo.setFundProList(old.getFundProList());
sysBaseSetInfo.setApplyDate(old.getApplyDate());
sysBaseSetInfo.setIsNew(old.getIsNew());
// 记录变更日志 // 记录变更日志
tSocialLogService.saveModificationRecord(type, old.getId(), old, sysBaseSetInfo); tSocialLogService.saveModificationRecord(type, old.getId(), old, sysBaseSetInfo);
return R.ok(); return R.ok();
...@@ -314,6 +317,8 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -314,6 +317,8 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
@Override @Override
public R<Boolean> updateByIdAsso(String id ,int status) { public R<Boolean> updateByIdAsso(String id ,int status) {
SysBaseSetInfo baseSetInfo = baseMapper.selectById(id); SysBaseSetInfo baseSetInfo = baseMapper.selectById(id);
//老的配置
SysBaseSetInfo oldSetInfo = baseMapper.selectById(id);
if (null == baseSetInfo){ if (null == baseSetInfo){
return R.failed("无对应ID的数据!"); return R.failed("无对应ID的数据!");
} }
...@@ -326,6 +331,9 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper, ...@@ -326,6 +331,9 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
baseSetInfo.setStatus(status); baseSetInfo.setStatus(status);
int res = baseMapper.updateById(baseSetInfo); int res = baseMapper.updateById(baseSetInfo);
if (res >= 0){ if (res >= 0){
// 记录状态变更日志
tSocialLogService.saveModificationRecord(CommonConstants.ZERO_STRING.equals(baseSetInfo.getBaseType()) ? 1 : 2
, id, oldSetInfo, baseSetInfo);
return R.ok(); return R.ok();
}else { }else {
return R.failed(CommonConstants.RESULT_DATA_FAIL); return R.failed(CommonConstants.RESULT_DATA_FAIL);
......
...@@ -77,6 +77,8 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -77,6 +77,8 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
private final SysBaseSetInfoMapper baseSetInfoMapper; private final SysBaseSetInfoMapper baseSetInfoMapper;
private final TSocialLogService tSocialLogService;
@Autowired @Autowired
private TSocialfundHouseResService tSocialfundHouseResService; private TSocialfundHouseResService tSocialfundHouseResService;
...@@ -504,6 +506,18 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -504,6 +506,18 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
} }
int res = baseMapper.updateById(hold); int res = baseMapper.updateById(hold);
if (res >= 0){ if (res >= 0){
//设置不记录更新日志字段
holdInfo.setOrganId(hold.getOrganId());
holdInfo.setUpdateBy(hold.getUpdateBy());
holdInfo.setUpdateTime(hold.getUpdateTime());
holdInfo.setAuditUserDeptName(hold.getAuditUserDeptName());
holdInfo.setAttaId(hold.getAttaId());
holdInfo.setAtta(hold.getAtta());
holdInfo.setHandleUserDeptName(hold.getHandleUserDeptName());
holdInfo.setTempAttas(hold.getTempAttas());
holdInfo.setResList(hold.getResList());
// 记录变更日志
tSocialLogService.saveModificationRecord(CommonConstants.FOUR_INT, holdInfo.getId(), holdInfo, hold);
if (isEdit) { if (isEdit) {
// 新老数据审核人办理人不同,先删除,再添加 // 新老数据审核人办理人不同,先删除,再添加
if (Common.isNotNull(holdInfo.getAuditUser()) && !holdInfo.getAuditUser().equals(hold.getAuditUser())) { if (Common.isNotNull(holdInfo.getAuditUser()) && !holdInfo.getAuditUser().equals(hold.getAuditUser())) {
...@@ -522,6 +536,16 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -522,6 +536,16 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
} }
} }
@Override
public R<Boolean> updateStatusById(SysHouseHoldInfo sysHouseHoldInfo) {
//查询老的户配置数据
SysHouseHoldInfo holdInfo = baseMapper.selectById(sysHouseHoldInfo.getId());
this.updateById(sysHouseHoldInfo);
// 记录变更日志
tSocialLogService.saveModificationRecord(CommonConstants.FOUR_INT, sysHouseHoldInfo.getId(), holdInfo, sysHouseHoldInfo);
return R.ok();
}
private R<Boolean> judgeHuAndResStatus(SysHouseHoldInfo hold, List<SysHouseHoldInfoFailRes> resList) { private R<Boolean> judgeHuAndResStatus(SysHouseHoldInfo hold, List<SysHouseHoldInfoFailRes> resList) {
FailReasonConfig s; FailReasonConfig s;
String failKey = ""; String failKey = "";
...@@ -1049,6 +1073,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -1049,6 +1073,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
} }
Map<String,String> exitNameMap = new HashMap<>(); Map<String,String> exitNameMap = new HashMap<>();
SysHouseHoldInfo info; SysHouseHoldInfo info;
SysHouseHoldInfo oldInfo;
String errorMsg; String errorMsg;
// 个性化校验逻辑 // 个性化校验逻辑
// 执行数据插入操作 组装 // 执行数据插入操作 组装
...@@ -1071,6 +1096,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -1071,6 +1096,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_NOT_EXIT,excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_NOT_EXIT,excel));
continue; continue;
} }
oldInfo = this.getById(info.getId());
if (Common.isNotNull(excel.getProvince()) && Common.isNotNull(excel.getCity())) { if (Common.isNotNull(excel.getProvince()) && Common.isNotNull(excel.getCity())) {
info.setProvince(excel.getProvince()); info.setProvince(excel.getProvince());
info.setCity(excel.getCity()); info.setCity(excel.getCity());
...@@ -1285,8 +1311,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -1285,8 +1311,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
this.saveAuditUserOrHandleUser(info, CommonConstants.ZERO_STRING); this.saveAuditUserOrHandleUser(info, CommonConstants.ZERO_STRING);
} }
//更新数据 //更新数据
updateHouseInfo(excel,info,userMap,oldInfo);
updateHouseInfo(excel,info,userMap);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.UPDATE_SUCCESS,excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.UPDATE_SUCCESS,excel));
} }
// 把errorMessageList 按 rowIndex 升序 // 把errorMessageList 按 rowIndex 升序
...@@ -1318,7 +1343,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -1318,7 +1343,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
} }
private void updateHouseInfo (TSocialHouseholdUpdateVo excel,SysHouseHoldInfo info, private void updateHouseInfo (TSocialHouseholdUpdateVo excel,SysHouseHoldInfo info,
Map<String,SysUser> userMap) { Map<String,SysUser> userMap,SysHouseHoldInfo oldInfo) {
if (Common.isNotNull(excel.getHouseType())) { if (Common.isNotNull(excel.getHouseType())) {
info.setHouseType(excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_ONE) ? "1" : "0"); info.setHouseType(excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_ONE) ? "1" : "0");
} }
...@@ -1355,18 +1380,19 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -1355,18 +1380,19 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
info.setDataFlagYgs(excel.getDataFlagYgs().equals(CommonConstants.IS_TRUE) ? "1" : "0"); info.setDataFlagYgs(excel.getDataFlagYgs().equals(CommonConstants.IS_TRUE) ? "1" : "0");
} }
}else { }else {
info.setDataFlagYgs(null); //1.7.18 huych 更新历史逻辑,null更新成空串,为了操作记录的准确定
info.setDataFlagYgs("");
} }
if (Common.isNotNull(excel.getRosterAutoFlagYgs())) { if (Common.isNotNull(excel.getRosterAutoFlagYgs())) {
info.setRosterAutoFlagYgs(excel.getRosterAutoFlagYgs().equals(CommonConstants.IS_TRUE) ? "1" : "0"); info.setRosterAutoFlagYgs(excel.getRosterAutoFlagYgs().equals(CommonConstants.IS_TRUE) ? "1" : "0");
} }
}else { }else {
info.setIsSingle(null); info.setIsSingle("");
info.setDataFlagYgs(null); info.setDataFlagYgs("");
info.setRosterAutoFlagYgs(null); info.setRosterAutoFlagYgs("");
} }
info.setIsSingleYsdPush(null); info.setIsSingleYsdPush("");
if (CommonConstants.ZERO_STRING.equals(info.getAutoStatusYsd())){ if (CommonConstants.ZERO_STRING.equals(info.getAutoStatusYsd())){
if (Common.isNotNull(excel.getIsSingleYsd())){ if (Common.isNotNull(excel.getIsSingleYsd())){
...@@ -1394,13 +1420,13 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -1394,13 +1420,13 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
info.setDataFlagYsd(excel.getDataFlagYsd().equals(CommonConstants.IS_TRUE) ? "1" : "0"); info.setDataFlagYsd(excel.getDataFlagYsd().equals(CommonConstants.IS_TRUE) ? "1" : "0");
} }
}else { }else {
info.setDataFlagYsd(null); info.setDataFlagYsd("");
} }
}else { }else {
info.setRosterAutoFlagYsd(null); info.setRosterAutoFlagYsd("");
info.setIsSingleYsd(null); info.setIsSingleYsd("");
info.setDataFlagYsd(null); info.setDataFlagYsd("");
} }
if (Common.isNotNull(excel.getOrganName())) { if (Common.isNotNull(excel.getOrganName())) {
...@@ -1443,6 +1469,11 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -1443,6 +1469,11 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
info.setHandleUser(handlerUser.getUserId()); info.setHandleUser(handlerUser.getUserId());
info.setHandleUserName(excel.getHandleUserName()); info.setHandleUserName(excel.getHandleUserName());
} }
//设置不记录更新日志字段
oldInfo.setUpdateBy(info.getUpdateBy());
oldInfo.setUpdateTime(info.getUpdateTime());
// 记录变更日志
tSocialLogService.saveModificationRecord(CommonConstants.FOUR_INT, oldInfo.getId(), oldInfo, info);
baseMapper.updateById(info); baseMapper.updateById(info);
} }
......
...@@ -3721,6 +3721,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3721,6 +3721,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 是否自动化办理,true:推送到社保士兵 // 是否自动化办理,true:推送到社保士兵
boolean isAuto; boolean isAuto;
AutoFlagVo autoFlagVo; AutoFlagVo autoFlagVo;
// 同步更新档案等信息
UpdateEmpVo updateEmpVo;
for (TDispatchInfo dis : dispatchs) { for (TDispatchInfo dis : dispatchs) {
autoFlagVo = autoFlagMap.get(dis.getId()); autoFlagVo = autoFlagMap.get(dis.getId());
if (autoFlagVo == null) { if (autoFlagVo == null) {
...@@ -4056,11 +4058,30 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4056,11 +4058,30 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 派增审核通过 要更新 人员档案 项目档案 合同的状态信息 // 派增审核通过 要更新 人员档案 项目档案 合同的状态信息
if (CommonConstants.dingleDigitStrArray[0].equals(dis.getType())) { if (CommonConstants.dingleDigitStrArray[0].equals(dis.getType())) {
R<Boolean> res = null; R<Boolean> res = null;
updateEmpVo = new UpdateEmpVo();
updateEmpVo.setEmpIdCard(dis.getEmpIdcard());
updateEmpVo.setProjectNo(dis.getSettleDomainCode());
updateEmpVo.setContractId(dis.getContractId());
updateEmpVo.setRemarkTemp(remarkTemp);
updateEmpVo.setCreateBy(user.getId());
updateEmpVo.setCreateName(user.getNickname());
if (CommonConstants.ZERO_INT == flag && !isSSC) { if (CommonConstants.ZERO_INT == flag && !isSSC) {
res = archivesDaprUtil.updateEmpInfo(dis.getEmpIdcard(), dis.getContactAddress(), dis.getSettleDomainCode(), dis.getContractId(), CommonConstants.ZERO_STRING, remarkTemp, user);
// 审核通过同步到档案
updateEmpVo.setIsCollege(getIsCollege(dis.getEducationName()));
updateEmpVo.setHignEducation(getHignEducationValue(dis.getEducationName()));
updateEmpVo.setSchool(dis.getSchoolName());
updateEmpVo.setMajor(dis.getMajor());
updateEmpVo.setGradutionDate(dis.getGraduationTime());
updateEmpVo.setContactAddress(dis.getContactAddress());
updateEmpVo.setType(CommonConstants.ZERO_STRING);
res = archivesDaprUtil.updateEmpInfo(updateEmpVo);
} }
if (CommonConstants.ONE_INT == flag) { if (CommonConstants.ONE_INT == flag) {
res = archivesDaprUtil.updateEmpInfo(dis.getEmpIdcard(), null, dis.getSettleDomainCode(), dis.getContractId(), CommonConstants.ONE_STRING, remarkTemp, user); updateEmpVo.setType(CommonConstants.ONE_STRING);
res = archivesDaprUtil.updateEmpInfo(updateEmpVo);
} }
if ((Common.isEmpty(res) || CommonConstants.SUCCESS != res.getCode()) && !isSSC) { if ((Common.isEmpty(res) || CommonConstants.SUCCESS != res.getCode()) && !isSSC) {
ServiceUtil.runTimeExceptionDiy("更新人员档案、项目档案、合同状态异常:" + (Common.isNotNull(res) ? res.getMsg() : CommonConstants.EMPTY_STRING)); ServiceUtil.runTimeExceptionDiy("更新人员档案、项目档案、合同状态异常:" + (Common.isNotNull(res) ? res.getMsg() : CommonConstants.EMPTY_STRING));
...@@ -4213,6 +4234,45 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4213,6 +4234,45 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return errorList; return errorList;
} }
private String getHignEducationValue(String educationName) {
String educationNameValue;
if (educationName.equals("文盲")) {
educationNameValue = "1";
}else if (educationName.equals("小学")) {
educationNameValue = "2";
}else if (educationName.equals("初中")) {
educationNameValue = "3";
}else if (educationName.equals("高中")) {
educationNameValue = "4";
}else if (educationName.equals("大专")) {
educationNameValue = "5";
}else if (educationName.equals("本科")) {
educationNameValue = "6";
}else if (educationName.equals("硕士")) {
educationNameValue = "7";
}else if (educationName.equals("博士")) {
educationNameValue = "8";
}else if (educationName.equals("技工")) {
educationNameValue = "9";
}else if (educationName.equals("职高")) {
educationNameValue = "10";
}else if (educationName.equals("中专")) {
educationNameValue = "11";
}else {
educationNameValue = null;
}
return educationNameValue;
}
// 获取是否大专及以上
private Integer getIsCollege(String educationName) {
Integer isCollegeValue = CommonConstants.ZERO_INT;
if (educationName.equals("大专") || educationName.equals("本科") || educationName.equals("硕士") || educationName.equals("博士")) {
isCollegeValue = CommonConstants.ONE_INT;
}
return isCollegeValue;
}
// type 1社保,2医保 // type 1社保,2医保
private Map<String, AutoFlagVo> getAutoFlagMap(List<String> idsList) { private Map<String, AutoFlagVo> getAutoFlagMap(List<String> idsList) {
Map<String, AutoFlagVo> autoFlagMap = new HashMap<>(); Map<String, AutoFlagVo> autoFlagMap = new HashMap<>();
......
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