Commit 7091fd7b authored by hongguangwu's avatar hongguangwu

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

parents 17c743ca 82634100
...@@ -78,7 +78,7 @@ public class TEmpChangeInfo extends BaseEntity { ...@@ -78,7 +78,7 @@ public class TEmpChangeInfo extends BaseEntity {
* 项目档案id * 项目档案id
*/ */
@Schema(description ="项目档案id") @Schema(description ="项目档案id")
private Long proId; private String proId;
/** /**
* 未结算费用 0:划转 1:不划转 * 未结算费用 0:划转 1:不划转
......
...@@ -53,7 +53,6 @@ public class TEmployeeProject extends BaseEntity { ...@@ -53,7 +53,6 @@ public class TEmployeeProject extends BaseEntity {
* 人员档案主表id * 人员档案主表id
*/ */
@Schema(description ="人员档案主表id") @Schema(description ="人员档案主表id")
@NotNull(message = "人员档案主表id不能为空")
@Size(max = 32, message = "人员档案主表id不可超过32位") @Size(max = 32, message = "人员档案主表id不可超过32位")
private String empId; private String empId;
...@@ -141,7 +140,6 @@ public class TEmployeeProject extends BaseEntity { ...@@ -141,7 +140,6 @@ public class TEmployeeProject extends BaseEntity {
* 员工编码 * 员工编码
*/ */
@Schema(description ="员工编码") @Schema(description ="员工编码")
@NotNull(message = "员工编码不能为空")
@Size(max = 20, message = "员工编码不可超过20位") @Size(max = 20, message = "员工编码不可超过20位")
private String empNo; private String empNo;
......
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.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
...@@ -22,36 +21,32 @@ public class EmpBadRecordVo extends RowIndex implements Serializable { ...@@ -22,36 +21,32 @@ public class EmpBadRecordVo extends RowIndex implements Serializable {
/** /**
* 员工姓名 * 员工姓名
*/ */
@ExcelAttribute(name = "员工姓名" ,maxLength = 20, isNotEmpty = true) @ExcelAttribute(name = "员工姓名" ,maxLength = 20)
@Schema(description ="员工姓名") @Schema(description ="员工姓名")
@ExcelProperty("员工姓名")
private String empName; private String empName;
/**
* 员工ID
*/
@ExcelAttribute(name = "员工ID")
@Schema(description ="员工ID")
private String empId;
/** /**
* 身份证号 * 身份证号
*/ */
@ExcelAttribute(name = "身份证号" ,maxLength = 20, isNotEmpty = true) @ExcelAttribute(name = "身份证号" ,maxLength = 20, isNotEmpty = true)
@Schema(description ="身份证号") @Schema(description ="身份证号")
@ExcelProperty("身份证号")
private String empIdcard; private String empIdcard;
/** /**
* 产生项目 * 产生项目
*/ */
@ExcelAttribute(name = "产生项目" ,maxLength = 50, isNotEmpty = true)
@Schema(description ="产生项目") @Schema(description ="产生项目")
@ExcelIgnore
private String project; private String project;
/** /**
* 项目编码 * 项目编码
*/ */
@ExcelAttribute(name = "项目编码" ,maxLength = 50, isNotEmpty = true) @ExcelAttribute(name = "产生项目编码" ,maxLength = 50, isNotEmpty = true)
@Schema(description ="项目编码") @Schema(description ="产生项目编码")
@ExcelProperty("产生项目编码")
private String projectCode; private String projectCode;
/** /**
...@@ -59,13 +54,15 @@ public class EmpBadRecordVo extends RowIndex implements Serializable { ...@@ -59,13 +54,15 @@ public class EmpBadRecordVo extends RowIndex implements Serializable {
*/ */
@ExcelAttribute(name = "发生时间" , isNotEmpty = true) @ExcelAttribute(name = "发生时间" , isNotEmpty = true)
@Schema(description ="发生时间") @Schema(description ="发生时间")
@ExcelProperty("发生时间")
private Date happenTime; private Date happenTime;
/** /**
* 备注 * 备注
*/ */
@ExcelAttribute(name = "备注", maxLength = 200, isNotEmpty = true) @ExcelAttribute(name = "不良记录描述", maxLength = 200, isNotEmpty = true)
@Schema(description ="备注") @Schema(description ="不良记录描述")
@ExcelProperty("不良记录描述")
private String remark; private String remark;
/** /**
...@@ -73,6 +70,7 @@ public class EmpBadRecordVo extends RowIndex implements Serializable { ...@@ -73,6 +70,7 @@ public class EmpBadRecordVo extends RowIndex implements Serializable {
*/ */
@ExcelAttribute(name = "费用损失 " ) @ExcelAttribute(name = "费用损失 " )
@Schema(description ="费用损失 (费用损失与其他费用损失其一必填)") @Schema(description ="费用损失 (费用损失与其他费用损失其一必填)")
@ExcelProperty("费用损失")
private BigDecimal loseFee; private BigDecimal loseFee;
/** /**
...@@ -80,5 +78,6 @@ public class EmpBadRecordVo extends RowIndex implements Serializable { ...@@ -80,5 +78,6 @@ public class EmpBadRecordVo extends RowIndex implements Serializable {
*/ */
@ExcelAttribute(name = "其他损失" ) @ExcelAttribute(name = "其他损失" )
@Schema(description ="其他损失 (费用损失与其他费用损失其一必填)") @Schema(description ="其他损失 (费用损失与其他费用损失其一必填)")
@ExcelProperty("其他损失")
private BigDecimal loseFeeOther; private BigDecimal loseFeeOther;
} }
...@@ -19,10 +19,10 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo; ...@@ -19,10 +19,10 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.Past; import javax.validation.constraints.Past;
import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
...@@ -67,13 +67,13 @@ public class EmployeeProjectExportVO{ ...@@ -67,13 +67,13 @@ public class EmployeeProjectExportVO{
* 身份证有效期起 * 身份证有效期起
*/ */
@ExcelProperty(value = "身份证开始日期") @ExcelProperty(value = "身份证开始日期")
private LocalDateTime validityStart; private LocalDate validityStart;
/** /**
* 身份证有效期止 * 身份证有效期止
*/ */
@ExcelProperty(value = "身份证截止日期") @ExcelProperty(value = "身份证截止日期")
private LocalDateTime validityEnd; private LocalDate validityEnd;
/** /**
* 婚姻状况 * 婚姻状况
...@@ -175,13 +175,13 @@ public class EmployeeProjectExportVO{ ...@@ -175,13 +175,13 @@ public class EmployeeProjectExportVO{
* 入学时间 * 入学时间
*/ */
@ExcelProperty(value = "入学时间") @ExcelProperty(value = "入学时间")
private LocalDateTime admissionDate; private LocalDate admissionDate;
/** /**
* 毕业时间 * 毕业时间
*/ */
@ExcelProperty(value = "毕业时间") @ExcelProperty(value = "毕业时间")
private LocalDateTime gradutionDate; private LocalDate gradutionDate;
/** /**
* 备注 * 备注
...@@ -267,7 +267,7 @@ public class EmployeeProjectExportVO{ ...@@ -267,7 +267,7 @@ public class EmployeeProjectExportVO{
*/ */
@ExcelProperty(value ="入职日期") @ExcelProperty(value ="入职日期")
@Past @Past
private LocalDateTime enjoinDate; private LocalDate enjoinDate;
/** /**
* 试用期(单位月) * 试用期(单位月)
......
...@@ -23,9 +23,8 @@ import lombok.Data; ...@@ -23,9 +23,8 @@ import lombok.Data;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past; import javax.validation.constraints.Past;
import javax.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime; import java.time.LocalDate;
/** /**
* 项目档案表excel对应的实体 * 项目档案表excel对应的实体
...@@ -113,7 +112,7 @@ public class EmployeeProjectVO implements Serializable { ...@@ -113,7 +112,7 @@ public class EmployeeProjectVO implements Serializable {
*/ */
@ExcelProperty(value ="入职日期") @ExcelProperty(value ="入职日期")
@Past @Past
private LocalDateTime enjoinDate; private LocalDate enjoinDate;
/** /**
* 试用期(单位月) * 试用期(单位月)
......
...@@ -19,11 +19,18 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller; ...@@ -19,11 +19,18 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fadada.api.bean.rsp.sign.SignUrlRsp;
import com.fadada.api.exception.ApiException; import com.fadada.api.exception.ApiException;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractAttachInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.service.FddContractAttachInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.FddContractInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.FddContractInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.utils.FddUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
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.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.security.SecurityRequirement;
...@@ -32,6 +39,11 @@ import lombok.RequiredArgsConstructor; ...@@ -32,6 +39,11 @@ import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/** /**
* 法大大合同与员工合同信息 * 法大大合同与员工合同信息
...@@ -48,6 +60,8 @@ public class FddContractInfoController { ...@@ -48,6 +60,8 @@ public class FddContractInfoController {
private final FddContractInfoService fddContractInfoService; private final FddContractInfoService fddContractInfoService;
private final FddContractAttachInfoService fddContractAttachInfoService;
/** /**
* 分页查询 * 分页查询
* @param page 分页对象 * @param page 分页对象
...@@ -123,6 +137,133 @@ public class FddContractInfoController { ...@@ -123,6 +137,133 @@ public class FddContractInfoController {
@SysLog("发送法大大电子合同定稿任务" ) @SysLog("发送法大大电子合同定稿任务" )
@PostMapping("/send") @PostMapping("/send")
public R<String> send(FddContractInfo fddContractInfo) throws ApiException { public R<String> send(FddContractInfo fddContractInfo) throws ApiException {
return fddContractInfoService.saveEmpContract(fddContractInfo); FddContractAttachInfo fddContractAttachInfo = fddContractAttachInfoService.getById(fddContractInfo.getId());
return fddContractInfoService.saveEmpContract(fddContractAttachInfo);
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description:作废重签
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Operation(summary = "作废重签", description = "作废重签")
@PostMapping("/invalidAndsend")
public R<String> invalidAndsend(FddContractInfo fddContractInfo) throws ApiException {
return fddContractInfoService.invalidAndsend(fddContractInfo);
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description:公司获取在线定稿地址
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Operation(summary = "公司获取在线定稿地址", description = "公司获取在线定稿地址")
@PostMapping("/getCompanyFillFileUrl")
public R<String> getCompanyFillFileUrl(FddContractInfo fddContractInfo) throws ApiException {
return fddContractInfoService.getFillFileUrl(fddContractInfo, FddUtil.COMPANY);
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description: 员工获取在线定稿地址
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Operation(summary = "员工获取在线定稿地址", description = "员工获取在线定稿地址")
@PostMapping("/getPersonFillFileUrl")
public R<String> getPersonFillFileUrl(FddContractInfo fddContractInfo) throws ApiException {
return fddContractInfoService.getFillFileUrl(fddContractInfo, FddUtil.PERSON);
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description: 引用模板创建签署任务
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Operation(summary = "引用模板创建签署任务", description = "引用模板创建签署任务")
@PostMapping("/createTaskByDraftId")
public R<String> createTaskByDraftId(FddContractInfo fddContractInfo) throws ApiException {
//获取法大大电子合同
FddContractInfo entity = fddContractInfoService.getById(fddContractInfo.getId());
if (entity == null) {
return R.failed("未查询到相关记录");
}
YifuUser user = SecurityUtils.getUser();
FddContractAttachInfo fddContractAttachInfo = fddContractAttachInfoService.getOne(Wrappers.<FddContractAttachInfo>query().lambda()
.eq(FddContractAttachInfo::getContractId,entity.getContractId()));
if (!user.getId().equals(fddContractAttachInfo.getCreateBy())) {
return R.failed("当前用户不是电子合同导入用户,不能操作");
}
R<String> returnR = fddContractInfoService.createTaskByDraftId(entity);
if (returnR != null) {
//记录返回信息
if(returnR.getCode()== CommonConstants.SUCCESS){
fddContractInfo.setRemark("成功");
}else {
fddContractInfo.setRemark(returnR.getMsg());
}
}
fddContractInfoService.updateById(fddContractInfo);
return returnR;
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description: 获取签署链接
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Operation(summary = "获取签署链接", description = "获取签署链接")
@PostMapping("/getSignUrl")
public R<Map<String, List<SignUrlRsp>>> getSignUrl(FddContractInfo fddContractInfo) throws ApiException {
return fddContractInfoService.getSignUrl(fddContractInfo);
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description: 获取签署文件预览地址
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Operation(summary = "获取签署文件预览地址", description = "获取签署文件预览地址")
@PostMapping("/getSignPreviewUrl")
public R<String> getSignPreviewUrl(FddContractInfo fddContractInfo) throws ApiException {
return fddContractInfoService.getSignPreviewUrl(fddContractInfo);
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description: 签署文件下载
**/
@Operation(summary = "签署文件下载", description = "签署文件下载")
@PostMapping("/getBySignFileId")
public void getBySignFileId(FddContractInfo fddContractInfo, HttpServletResponse response) throws ApiException, IOException {
fddContractInfoService.getBySignFileId(fddContractInfo, response);
}
/**
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @Description: 签署文件转移为合同附件
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Operation(summary = "签署文件转移为合同附件", description = "签署文件转移为合同附件")
@PostMapping("/moveFileToEmpConcat")
public R<String> moveFileToEmpConcat(FddContractInfo fddContractInfo, HttpServletResponse response) throws ApiException, IOException {
return fddContractInfoService.moveFileToEmpConcat(fddContractInfo, response);
} }
} }
...@@ -120,7 +120,7 @@ public class TElecEmployeeInfoController { ...@@ -120,7 +120,7 @@ public class TElecEmployeeInfoController {
@SysLog("通过身份证号查询人员档案" ) @SysLog("通过身份证号查询人员档案" )
@PostMapping("/getEmpInfo" ) @PostMapping("/getEmpInfo" )
public R getEmpInfoByCard(@RequestParam String idCard) { public R getEmpInfoByCard(@RequestParam String idCard) {
return R.ok(tElecEmployeeInfoService.getEmpInfoByCard(idCard)); return tElecEmployeeInfoService.getEmpInfoByCard(idCard);
} }
/** /**
......
...@@ -102,7 +102,7 @@ public class TEmployeeProjectController { ...@@ -102,7 +102,7 @@ public class TEmployeeProjectController {
@PostMapping @PostMapping
@PreAuthorize("@pms.hasPermission('archives_temployeeproject_add')" ) @PreAuthorize("@pms.hasPermission('archives_temployeeproject_add')" )
public R save(@Valid @RequestBody TEmployeeProject tEmployeeProject) { public R save(@Valid @RequestBody TEmployeeProject tEmployeeProject) {
return R.ok(tEmployeeProjectService.save(tEmployeeProject)); return tEmployeeProjectService.saveEmp(tEmployeeProject);
} }
/** /**
...@@ -143,7 +143,7 @@ public class TEmployeeProjectController { ...@@ -143,7 +143,7 @@ public class TEmployeeProjectController {
@PostMapping("/check") @PostMapping("/check")
@PreAuthorize("@pms.hasPermission('archives_temployeeproject_add')" ) @PreAuthorize("@pms.hasPermission('archives_temployeeproject_add')" )
public R addCheck(@RequestBody TEmployeeProject tEmployeeProject) { public R addCheck(@RequestBody TEmployeeProject tEmployeeProject) {
return R.ok(tEmployeeProjectService.addCheck(tEmployeeProject)); return tEmployeeProjectService.addCheck(tEmployeeProject);
} }
/** /**
...@@ -158,7 +158,7 @@ public class TEmployeeProjectController { ...@@ -158,7 +158,7 @@ public class TEmployeeProjectController {
@PostMapping("/reEmpInfo") @PostMapping("/reEmpInfo")
@PreAuthorize("@pms.hasPermission('archives_temployeeproject_reempinfo')" ) @PreAuthorize("@pms.hasPermission('archives_temployeeproject_reempinfo')" )
public R reEmpInfo(@RequestBody JSONObject jsonObject) { public R reEmpInfo(@RequestBody JSONObject jsonObject) {
return R.ok(tEmployeeProjectService.reEmpInfo(jsonObject)); return tEmployeeProjectService.reEmpInfo(jsonObject);
} }
/** /**
...@@ -172,7 +172,7 @@ public class TEmployeeProjectController { ...@@ -172,7 +172,7 @@ public class TEmployeeProjectController {
@PostMapping("/deleteEmpPro") @PostMapping("/deleteEmpPro")
@PreAuthorize("@pms.hasPermission('archives_temployeeproject_delempproinfo')" ) @PreAuthorize("@pms.hasPermission('archives_temployeeproject_delempproinfo')" )
public R deleteEmpPro(@RequestBody TEmployeeProject tEmployeeProject) { public R deleteEmpPro(@RequestBody TEmployeeProject tEmployeeProject) {
return R.ok(tEmployeeProjectService.deleteEmpPro(tEmployeeProject)); return tEmployeeProjectService.deleteEmpPro(tEmployeeProject);
} }
/** /**
......
...@@ -17,12 +17,18 @@ ...@@ -17,12 +17,18 @@
package com.yifu.cloud.plus.v1.yifu.archives.service; package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.fadada.api.bean.rsp.sign.SignUrlRsp;
import com.fadada.api.exception.ApiException; import com.fadada.api.exception.ApiException;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractAttachInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/** /**
* 法大大合同与员工合同信息 * 法大大合同与员工合同信息
* *
...@@ -31,5 +37,77 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R; ...@@ -31,5 +37,77 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
*/ */
public interface FddContractInfoService extends IService<FddContractInfo> { public interface FddContractInfoService extends IService<FddContractInfo> {
R<String> saveEmpContract(FddContractInfo fddContractInfo) throws ApiException; /**
* 发送法大大电子合同定稿任务
* @param fddContractInfo 法大大合同信息表
* @Author: huyc
* @Date: 2022/6/30
* @return R
*/
R<String> saveEmpContract(FddContractAttachInfo fddContractInfo) throws ApiException;
/**
* 作废重签
* @param fddContractInfo 法大大合同信息表
* @Author: huyc
* @Date: 2022/6/30
* @return R
*/
R<String> invalidAndsend(FddContractInfo fddContractInfo) throws ApiException;
/**
* 获取在线定稿地址
* @param fddContractInfo
* @param roleName
* @Author: huyc
* @Date: 2022/6/30
* @return R
*/
R<String> getFillFileUrl(FddContractInfo fddContractInfo,String roleName) throws ApiException;
/**
* 引用模板创建签署任务
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @return R
*/
R<String> createTaskByDraftId(FddContractInfo fddContractInfo) throws ApiException;
/**
* 获取签署链接
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @return R
*/
R<Map<String, List<SignUrlRsp>>> getSignUrl(FddContractInfo fddContractInfo) throws ApiException;
/**
* 获取签署链接
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @return R
*/
R<String> getSignPreviewUrl(FddContractInfo fddContractInfo) throws ApiException;
/**
* 获取签署链接
* @param fddContractInfo
* @Author: huyc
* @Date: 2022/6/30
* @return: void
*/
void getBySignFileId(FddContractInfo fddContractInfo, HttpServletResponse response) throws ApiException, IOException;
/**
* 签署文件转移为合同附件
* @param fddContractInfo
* @param response
* @Author: huyc
* @Date: 2022/6/30
* @return: R
**/
R<String> moveFileToEmpConcat(FddContractInfo fddContractInfo, HttpServletResponse response) throws ApiException, IOException;
} }
...@@ -45,6 +45,8 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> { ...@@ -45,6 +45,8 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
R reEmpInfo(JSONObject jsonObject); R reEmpInfo(JSONObject jsonObject);
R saveEmp(TEmployeeProject tEmployeeProject);
/** /**
* @param tEmployeeProject * @param tEmployeeProject
* @Description: 减项 * @Description: 减项
......
...@@ -152,6 +152,10 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T ...@@ -152,6 +152,10 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
// 已有验证报错直接下一个 // 已有验证报错直接下一个
EmpBadRecordVo excel = excelVOList.get(i); EmpBadRecordVo excel = excelVOList.get(i);
if (Common.isEmpty(excel.getLoseFee()) && Common.isEmpty(excel.getLoseFeeOther())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_PROJECT_EMP_LOSE_FEE_NOT_EMPTY)));
continue;
}
emp = employeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda() emp = employeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard,excel.getEmpIdcard()) .eq(TEmployeeInfo::getEmpIdcard,excel.getEmpIdcard())
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING) .eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
...@@ -171,6 +175,8 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T ...@@ -171,6 +175,8 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_PROJECT_EMP_NOT_EXIST))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_PROJECT_EMP_NOT_EXIST)));
continue; continue;
} }
excel.setProjectCode(exist.getDeptNo());
excel.setProject(exist.getDeptName());
// 数据合法情况 // 数据合法情况
insertExcel(excel,emp); insertExcel(excel,emp);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS));
......
...@@ -20,15 +20,9 @@ import cn.hutool.core.collection.CollUtil; ...@@ -20,15 +20,9 @@ import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pig4cloud.plugin.excel.vo.ErrorMessage; import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpChangeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpChangeInfoMapper; import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpChangeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCustomerInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.*;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpChangeInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpChangeInfoVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpChangeInfoVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes; import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
...@@ -80,7 +74,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -80,7 +74,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
//社保预估库、缴费库、对比库、代理差额库,需要同步修改未结算(并且满足这个条件:数据 生成月≥此处划转起始月)的数据,已结算数据不变更; //社保预估库、缴费库、对比库、代理差额库,需要同步修改未结算(并且满足这个条件:数据 生成月≥此处划转起始月)的数据,已结算数据不变更;
//划转,更新项目信息 //划转,更新项目信息
TEmployeeProject updateTEmployeeProject = tEmployeeProjectService.getById(tEmpChangeInfo.getProId()); TEmployeeProject updateTEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, tEmpChangeInfo.getEmpIdcard()).eq(TEmployeeProject::getDeptName,tEmpChangeInfo.getOldSettle())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(updateTEmployeeProject)) { if (Common.isNotNull(updateTEmployeeProject)) {
updateTEmployeeProject.setDeptNo(tEmpChangeInfo.getDeptNo()); updateTEmployeeProject.setDeptNo(tEmpChangeInfo.getDeptNo());
updateTEmployeeProject.setDeptId(tEmpChangeInfo.getDeptId()); updateTEmployeeProject.setDeptId(tEmpChangeInfo.getDeptId());
...@@ -89,6 +85,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper, ...@@ -89,6 +85,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updateTEmployeeProject.setUnitNo(tEmpChangeInfo.getUnitNo()); updateTEmployeeProject.setUnitNo(tEmpChangeInfo.getUnitNo());
updateTEmployeeProject.setUnitName(tEmpChangeInfo.getNewDept()); updateTEmployeeProject.setUnitName(tEmpChangeInfo.getNewDept());
tEmployeeProjectService.updateById(updateTEmployeeProject); tEmployeeProjectService.updateById(updateTEmployeeProject);
tEmpChangeInfo.setProId(updateTEmployeeProject.getId());
} }
//保存档案划转记录 //保存档案划转记录
this.save(tEmpChangeInfo); this.save(tEmpChangeInfo);
......
...@@ -115,11 +115,10 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -115,11 +115,10 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (!Common.isEmpty(tEmployeeInfo)) { if (!Common.isEmpty(tEmployeeInfo)) {
map.put("empProId",tEmployeeProject.getId()); map.put("empProId",tEmployeeProject.getId());
if (CommonConstants.STATUS_NORMAL.equals(tEmployeeInfo.getFileStatus())) { if (CommonConstants.STATUS_NORMAL.equals(tEmployeeInfo.getFileStatus())) {
return R.ok(map, "该人员已减项,是否“复项”"); return new R<>(CommonConstants.dingleDigitIntArray[4],"该人员已减项,是否“复项”",map);
} else { } else {
map.put("code","202");
map.put("employeeId", tEmployeeInfo.getId()); map.put("employeeId", tEmployeeInfo.getId());
return R.ok(map, "该人员已减档减项,是否“复档复项”"); return new R<>(CommonConstants.dingleDigitIntArray[2],"该人员已减档减项,是否“复档复项”",map);
} }
} }
} }
...@@ -135,13 +134,28 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -135,13 +134,28 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//判断是否已经减档 //判断是否已经减档
if (CommonConstants.ONE_STRING.equals(tEmployeeInfo.getFileStatus())) { if (CommonConstants.ONE_STRING.equals(tEmployeeInfo.getFileStatus())) {
map.put("employeeId", tEmployeeInfo.getId()); map.put("employeeId", tEmployeeInfo.getId());
map.put("code","203"); return new R<>(CommonConstants.dingleDigitIntArray[3],"该人员在离职库已存在,是否“恢复档案”",map);
return R.ok(map,"该人员在离职库已存在,是否“恢复档案”");
} }
} }
return R.ok(); return R.ok();
} }
@Override
public R saveEmp(TEmployeeProject tEmployeeProject) {
//查询人员档案
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, tEmployeeProject.getEmpIdcard())
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(tEmployeeInfo)) {
String empNO = getEmpNo(tEmployeeProject.getDeptNo());
tEmployeeProject.setEmpNo(empNO);
tEmployeeProject.setEmpId(tEmployeeInfo.getId());
this.save(tEmployeeProject);
return R.ok();
}
return R.failed("未在人员档案中查到身份信息");
}
@Override @Override
public R reEmpInfo(JSONObject jsonObject) { public R reEmpInfo(JSONObject jsonObject) {
if (Common.isNotNull(jsonObject)) { if (Common.isNotNull(jsonObject)) {
...@@ -507,14 +521,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -507,14 +521,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//人员档案主表id先设置成空,后面更新id //人员档案主表id先设置成空,后面更新id
insTEmployeePro.setEmpId(CommonConstants.EMPTY_STRING); insTEmployeePro.setEmpId(CommonConstants.EMPTY_STRING);
String str = ""; String empNO = getEmpNo(insTEmployeePro.getDeptNo());
String EmpNo = baseMapper.findEmployeeMaxOnlyNoByDepId(insTEmployeePro.getDeptNo()); insTEmployeePro.setEmpNo(empNO);
if (!Common.isEmpty(EmpNo)) {
str = NoUtil.productionNo(EmpNo, CommonConstants.EMPLOYEE_INIT_NO_START);
} else {
str = insTEmployeePro.getDeptNo() + CommonConstants.EMPLOYEE_INIT_NO;
}
insTEmployeePro.setEmpNo(str);
//员工编码生成规则 //员工编码生成规则
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda() TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, excel.getEmpIdcard()) .eq(TEmployeeInfo::getEmpIdcard, excel.getEmpIdcard())
...@@ -675,14 +683,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -675,14 +683,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
tEmployeeProject.setEmpName(employeeInfo.getEmpName()); tEmployeeProject.setEmpName(employeeInfo.getEmpName());
tEmployeeProject.setEmpIdcard(employeeInfo.getEmpIdcard()); tEmployeeProject.setEmpIdcard(employeeInfo.getEmpIdcard());
tEmployeeProject.setPost(employeeInfo.getPost()); tEmployeeProject.setPost(employeeInfo.getPost());
String str = "";
String EmpNo = baseMapper.findEmployeeMaxOnlyNoByDepId(employeeInfo.getDeptNo()); String empNO = getEmpNo(employeeInfo.getDeptNo());
if (!Common.isEmpty(EmpNo)) { tEmployeeProject.setEmpNo(empNO);
str = NoUtil.productionNo(EmpNo, CommonConstants.EMPLOYEE_INIT_NO_START);
} else {
str = employeeInfo.getDeptNo() + CommonConstants.EMPLOYEE_INIT_NO;
}
tEmployeeProject.setEmpNo(str);
tEmployeeProject.setDeptNo(employeeInfo.getDeptNo()); tEmployeeProject.setDeptNo(employeeInfo.getDeptNo());
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda() TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
...@@ -798,4 +801,15 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -798,4 +801,15 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return R.ok(projectMap); return R.ok(projectMap);
} }
//获取员工编码
public String getEmpNo(String deptNo) {
String str = "";
String EmpNo = baseMapper.findEmployeeMaxOnlyNoByDepId(deptNo);
if (!Common.isEmpty(EmpNo)) {
str = NoUtil.productionNo(EmpNo, CommonConstants.EMPLOYEE_INIT_NO_START);
} else {
str = deptNo + CommonConstants.EMPLOYEE_INIT_NO;
}
return str;
}
} }
...@@ -121,5 +121,6 @@ ...@@ -121,5 +121,6 @@
1=1 AND a.DELETE_FLAG = '0' AND b.DELETE_FLAG = '0' 1=1 AND a.DELETE_FLAG = '0' AND b.DELETE_FLAG = '0'
<include refid="tElecEmployeeInfo_where"/> <include refid="tElecEmployeeInfo_where"/>
</where> </where>
order by a.CREATE_TIME desc
</select> </select>
</mapper> </mapper>
...@@ -665,6 +665,7 @@ ...@@ -665,6 +665,7 @@
a.DELETE_FLAG = '0' a.DELETE_FLAG = '0'
<include refid="tEmployeeProject_where"/> <include refid="tEmployeeProject_where"/>
</where> </where>
order by a.CREATE_TIME desc
</select> </select>
<!--tEmployeeInfo导出查询--> <!--tEmployeeInfo导出查询-->
<select id="getTEmployeeProjectExportPage" resultMap="tEmployeeProjectExportMap"> <select id="getTEmployeeProjectExportPage" resultMap="tEmployeeProjectExportMap">
......
...@@ -289,4 +289,8 @@ public interface ErrorCodes { ...@@ -289,4 +289,8 @@ public interface ErrorCodes {
* 人员在该项目下存在进行中/未完结的服务 * 人员在该项目下存在进行中/未完结的服务
*/ */
String ARCHIVES_PROJECT_CHANGE_NOT_EXIST = "archives.project.change.not.exist"; String ARCHIVES_PROJECT_CHANGE_NOT_EXIST = "archives.project.change.not.exist";
/**
* 不良记录费用损失和其他损失不可同时为空
*/
String ARCHIVES_PROJECT_EMP_LOSE_FEE_NOT_EMPTY = "archives.project.emp.lose.fee.not.empty";
} }
...@@ -257,6 +257,7 @@ public class ExcelUtil <T> implements Serializable { ...@@ -257,6 +257,7 @@ public class ExcelUtil <T> implements Serializable {
tempStr= reverseByExp( c, attr.readConverterExp()); tempStr= reverseByExp( c, attr.readConverterExp());
if (Common.isEmpty(tempStr)){ if (Common.isEmpty(tempStr)){
errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, "未找到:" + c + "的字典数据"), errorTemp); errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, "未找到:" + c + "的字典数据"), errorTemp);
continue;
}else { }else {
c = tempStr; c = tempStr;
} }
...@@ -280,12 +281,9 @@ public class ExcelUtil <T> implements Serializable { ...@@ -280,12 +281,9 @@ public class ExcelUtil <T> implements Serializable {
// TODO // TODO
tempStr = getAreaValue("area_"+c.trim()+ "_" + getFieldValueByName(attr.parentField(), data, DateUtil.ISO_EXPANDED_DATE_FORMAT), tempStr, attr,rowNum,errorTemp); tempStr = getAreaValue("area_"+c.trim()+ "_" + getFieldValueByName(attr.parentField(), data, DateUtil.ISO_EXPANDED_DATE_FORMAT), tempStr, attr,rowNum,errorTemp);
} }
} else {
//直接按值去找数据 TODO
tempStr = getDicValue(c.trim() , tempStr, attr,rowNum,errorTemp);
} }
} }
if (!StringUtils.isNotBlank(tempStr)) { if (StringUtils.isEmpty(tempStr) && (attr.isArea() || attr.isDataId())) {
if (attr.isOrgan()) { if (attr.isOrgan()) {
errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, "未找到:" + c + "的单位或结算主体数据,请确认存在结算主体权限"), errorTemp); errorMessageHashMap = initErrorMessage(errorMessageHashMap, new ErrorMessage(rowNum, "未找到:" + c + "的单位或结算主体数据,请确认存在结算主体权限"), errorTemp);
} }
......
...@@ -91,6 +91,8 @@ archives.project.emp.not.exist=\u5BF9\u5E94\u9879\u76EE\u7F16\u7801\u65E0\u9879\ ...@@ -91,6 +91,8 @@ archives.project.emp.not.exist=\u5BF9\u5E94\u9879\u76EE\u7F16\u7801\u65E0\u9879\
archives.project.change.not.exist=\u4EBA\u5458\u5728\u8BE5\u9879\u76EE\u4E0B\u5B58\u5728\u8FDB\u884C\u4E2D/\u672A\u5B8C\u7ED3\u7684\u670D\u52A1 archives.project.change.not.exist=\u4EBA\u5458\u5728\u8BE5\u9879\u76EE\u4E0B\u5B58\u5728\u8FDB\u884C\u4E2D/\u672A\u5B8C\u7ED3\u7684\u670D\u52A1
archives.project.emp.lose.fee.not.empty=\u4E0D\u826F\u8BB0\u5F55\u8D39\u7528\u635F\u5931\u548C\u5176\u4ED6\u635F\u5931\u4E0D\u53EF\u540C\u65F6\u4E3A\u7A7A
......
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