Commit 7e38887d authored by fangxinjiang's avatar fangxinjiang

合同续签-fxj

parent d6c8e9aa
......@@ -71,4 +71,10 @@ public class ContractAlertSearchVo extends TEmpContractAlert {
*/
@Schema(description = "项目编码列表")
private List<String> deptNoList;
/**
* 合同IDS
*/
@Schema(description = "合同IDS")
private List<String> idList;
}
/*
* 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.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
/**
* 项目档案表excel对应的实体
*
* @author huyc
* @date 2022-06-20 17:54:40
*/
@Data
@ColumnWidth(30)
public class EmpProjectVO extends RowIndex implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 员工类型(字典值,0外包1派遣2代理)
*/
@NotNull(message = "员工类型不能为空")
@ExcelAttribute(name = "员工类型",isNotEmpty = true, errorInfo = "员工类型不能为空",maxLength = 5,isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="员工类型")
private String empNatrue;
/**
* 员工姓名
*/
@NotNull(message = "员工姓名不能为空")
@ExcelAttribute(name = "员工姓名",isNotEmpty = true, errorInfo = "员工姓名不能为空",maxLength = 20)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="员工姓名")
private String empName;
/**
* 身份证号码
*/
@NotNull(message = "身份证号不能为空")
@ExcelAttribute(name = "身份证号",isNotEmpty = true, errorInfo = "身份证号不能为空",maxLength = 20)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="身份证号")
private String empIdcard;
/**
* 项目编码
*/
@NotNull(message = "项目编码不能为空")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="项目编码")
@ExcelAttribute(name = "项目编码",isNotEmpty = true, errorInfo = "项目编码不能为空",maxLength = 20)
private String deptNo;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Length(max = 50, message = "项目名称不能超过50个字符")
@ExcelProperty("项目名称")
@Schema(description = "项目名称")
@HeadFontStyle(fontHeightInPoints = 11)
private String departName;
/**
* 手机号码
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "手机号码")
@Size(max = 11, message = "手机号码不可超过11位")
private String empPhone;
}
......@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpContractAlertService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeFeedBackAllVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpContractAlertUpdateVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpProjectVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
......@@ -322,4 +323,15 @@ public class TEmpContractAlertController {
public void autoExport(HttpServletResponse response, @RequestBody ContractAlertSearchVo searchVo) {
tEmpContractAlertService.listAutoExport(response,searchVo);
}
/**
* 通过合同ID查询合同对应的项目档案信息及人员手机号码
* @param id id
* @return R
*/
@Operation(summary = "通过合同ID查询合同对应的项目档案信息及人员手机号码", description = "通过合同ID查询合同对应的项目档案信息及人员手机号码")
@GetMapping("/getProjectInfoByContractId" )
public R<EmpProjectVO> getProjectInfoByContractId(@RequestParam("id" ) String id) {
return R.ok(tEmpContractAlertService.getProjectInfoByContractId(id));
}
}
......@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ChangeFeedBackAllVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpContractAlertUpdateVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpProjectVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -85,4 +86,6 @@ public interface TEmpContractAlertService extends IService<TEmpContractAlert> {
Integer getTEmpContractAlertAutoCount(ContractAlertSearchVo tEmpContractAlert);
void listAutoExport(HttpServletResponse response, ContractAlertSearchVo searchVo);
EmpProjectVO getProjectInfoByContractId(String id);
}
......@@ -1124,6 +1124,9 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
**/
@Override
public void listAutoExport(HttpServletResponse response, ContractAlertSearchVo searchVo) {
if (Common.isNotNull(searchVo.getIds())){
searchVo.setIdList(Arrays.asList(searchVo.getIds().split(CommonConstants.COMMA_STRING)));
}
//默认导出自动化的合同续签待办
searchVo.setAutoFlag(CommonConstants.ZERO_STRING);
initSearchVo(searchVo);
......@@ -1199,4 +1202,28 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
}
}
/**
* @Author fxj
* @Description 获取合同对应的项目信息及手机号码
* @Date 11:48 2026/2/9
**/
@Override
public EmpProjectVO getProjectInfoByContractId(String id) {
EmpProjectVO vo = new EmpProjectVO();
TEmployeeContractInfo contractInfo = contractInfoMapper.selectById(id);
if (null != contractInfo){
vo.setDeptNo(contractInfo.getDeptNo());
vo.setDepartName(contractInfo.getDeptNo());
vo.setEmpIdcard(contractInfo.getEmpIdcard());
vo.setEmpName(contractInfo.getEmpName());
}
TEmployeeInfo employeeInfo = employeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeInfo::getEmpIdcard,contractInfo.getEmpIdcard()).last(CommonConstants.LAST_ONE_SQL));
if (null != employeeInfo){
vo.setEmpPhone(employeeInfo.getEmpPhone());
}
return vo;
}
}
......@@ -166,6 +166,12 @@
#{idStr}
</foreach>
</if>
<if test="tEmpContractAlert.idList != null and tEmpContractAlert.idList.size > 0">
AND a.id in
<foreach item="id" index="index" collection="tEmpContractAlert.idList" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="tEmpContractAlert.projectNo != null and tEmpContractAlert.projectNo.trim() != ''">
AND a.PROJECT_NO = #{tEmpContractAlert.projectNo}
</if>
......
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