Commit 99060503 authored by wangzb's avatar wangzb

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

parents 996a3a48 328adaf6
......@@ -18,10 +18,12 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
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.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -36,9 +38,8 @@ import java.util.Date;
*/
@Data
@TableName("t_personnel_roster")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "")
public class TPersonnelRoster extends BaseEntity {
public class TPersonnelRoster{
/**
* id
......@@ -46,6 +47,7 @@ public class TPersonnelRoster extends BaseEntity {
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
@HeadFontStyle(fontHeightInPoints = 11)
private String id;
/**
* 客户名称
......@@ -54,6 +56,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 50, message = "客户名称不能超过50个字符")
@ExcelProperty("客户名称")
@Schema(description = "客户名称")
@HeadFontStyle(fontHeightInPoints = 11)
private String customerName;
/**
* 项目名称
......@@ -62,6 +65,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 50, message = "项目名称不能超过50个字符")
@ExcelProperty("项目名称")
@Schema(description = "项目名称")
@HeadFontStyle(fontHeightInPoints = 11)
private String departName;
/**
* 项目编码
......@@ -70,6 +74,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 50, message = "项目编码不能超过50个字符")
@ExcelProperty("项目编码")
@Schema(description = "项目编码")
@HeadFontStyle(fontHeightInPoints = 11)
private String departNo;
/**
* 业务类型
......@@ -78,6 +83,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 50, message = "业务类型不能超过50个字符")
@ExcelProperty("业务类型")
@Schema(description = "业务类型")
@HeadFontStyle(fontHeightInPoints = 11)
private String businessPrimary;
/**
* 二级分类
......@@ -86,6 +92,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 50, message = "二级分类不能超过50个字符")
@ExcelProperty("二级分类")
@Schema(description = "二级分类")
@HeadFontStyle(fontHeightInPoints = 11)
private String businessSecond;
/**
* 三级分类
......@@ -94,6 +101,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 50, message = "三级分类不能超过50个字符")
@ExcelProperty("三级分类")
@Schema(description = "三级分类")
@HeadFontStyle(fontHeightInPoints = 11)
private String businessThird;
/**
* 标签
......@@ -102,6 +110,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 50, message = "标签不能超过50个字符")
@ExcelProperty("标签")
@Schema(description = "标签")
@HeadFontStyle(fontHeightInPoints = 11)
private String label;
/**
* 条线类型
......@@ -110,6 +119,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 50, message = "条线类型不能超过50个字符")
@ExcelProperty("条线类型")
@Schema(description = "条线类型")
@HeadFontStyle(fontHeightInPoints = 11)
private String businessType;
/**
* BU归属
......@@ -118,14 +128,16 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 30, message = "BU归属不能超过30个字符")
@ExcelProperty("BU归属")
@Schema(description = "BU归属")
@HeadFontStyle(fontHeightInPoints = 11)
private String buBelong;
/**
* 员工类型
*/
@ExcelAttribute(name = "员工类型", maxLength = 20)
@ExcelAttribute(name = "员工类型", errorInfo = "员工类型不能为空", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Length(max = 20, message = "员工类型不能超过20个字符")
@ExcelProperty("员工类型")
@Schema(description = "员工类型")
@HeadFontStyle(fontHeightInPoints = 11)
private String empType;
/**
* 员工姓名
......@@ -134,14 +146,16 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 20, message = "员工姓名不能超过20个字符")
@ExcelProperty("员工姓名")
@Schema(description = "员工姓名")
@HeadFontStyle(fontHeightInPoints = 11)
private String empName;
/**
* 性别
*/
@ExcelAttribute(name = "性别", maxLength = 10)
@ExcelAttribute(name = "性别", maxLength = 10,isDataId = true,readConverterExp = "1=男,2=女")
@Length(max = 10, message = "性别不能超过10个字符")
@ExcelProperty("性别")
@Schema(description = "性别")
@HeadFontStyle(fontHeightInPoints = 11)
private String empSex;
/**
* 出生日期
......@@ -149,6 +163,7 @@ public class TPersonnelRoster extends BaseEntity {
@ExcelAttribute(name = "出生日期", isDate = true)
@ExcelProperty("出生日期")
@Schema(description = "出生日期")
@HeadFontStyle(fontHeightInPoints = 11)
private Date empBirthDate;
/**
* 年龄
......@@ -157,6 +172,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 3, message = "年龄不能超过3个字符")
@ExcelProperty("年龄")
@Schema(description = "年龄")
@HeadFontStyle(fontHeightInPoints = 11)
private String empAge;
/**
* 身份证号
......@@ -165,6 +181,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 20, message = "身份证号不能超过20个字符")
@ExcelProperty("身份证号")
@Schema(description = "身份证号")
@HeadFontStyle(fontHeightInPoints = 11)
private String empIdcard;
/**
* 银行卡号
......@@ -173,6 +190,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 25, message = "银行卡号不能超过25个字符")
@ExcelProperty("银行卡号")
@Schema(description = "银行卡号")
@HeadFontStyle(fontHeightInPoints = 11)
private String bankNo;
/**
* 开户行总行
......@@ -181,22 +199,25 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 50, message = "开户行总行不能超过50个字符")
@ExcelProperty("开户行总行")
@Schema(description = "开户行总行")
@HeadFontStyle(fontHeightInPoints = 11)
private String bankName;
/**
* 开户行-省
*/
@ExcelAttribute(name = "开户行-省", maxLength = 30)
@ExcelAttribute(name = "开户行-省", maxLength = 30,isArea = true)
@Length(max = 30, message = "开户行-省不能超过30个字符")
@ExcelProperty("开户行-省")
@Schema(description = "开户行-省")
@HeadFontStyle(fontHeightInPoints = 11)
private String bankProvince;
/**
* 开户行-市
*/
@ExcelAttribute(name = "开户行-市", maxLength = 30)
@ExcelAttribute(name = "开户行-市", maxLength = 30,isArea = true,parentField = "bankProvince")
@Length(max = 30, message = "开户行-市不能超过30个字符")
@ExcelProperty("开户行-市")
@Schema(description = "开户行-市")
@HeadFontStyle(fontHeightInPoints = 11)
private String bankCity;
/**
* 开户行支行
......@@ -205,6 +226,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 50, message = "开户行支行不能超过50个字符")
@ExcelProperty("开户行支行")
@Schema(description = "开户行支行")
@HeadFontStyle(fontHeightInPoints = 11)
private String bankNameSub;
/**
* 手机号码
......@@ -213,54 +235,61 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 15, message = "手机号码不能超过15个字符")
@ExcelProperty("手机号码")
@Schema(description = "手机号码")
@HeadFontStyle(fontHeightInPoints = 11)
private String empPhone;
/**
* 档案地-省
*/
@ExcelAttribute(name = "档案地-省", maxLength = 30)
@ExcelAttribute(name = "档案地-省", maxLength = 30,isArea = true)
@Length(max = 30, message = "档案地-省不能超过30个字符")
@ExcelProperty("档案地-省")
@Schema(description = "档案地-省")
@HeadFontStyle(fontHeightInPoints = 11)
private String empProvince;
/**
* 档案地-市
*/
@ExcelAttribute(name = "档案地-市", maxLength = 30)
@ExcelAttribute(name = "档案地-市", maxLength = 30,isArea = true,parentField = "empProvince")
@Length(max = 30, message = "档案地-市不能超过30个字符")
@ExcelProperty("档案地-市")
@Schema(description = "档案地-市")
@HeadFontStyle(fontHeightInPoints = 11)
private String empCity;
/**
* 档案地-县
*/
@ExcelAttribute(name = "档案地-县", maxLength = 30)
@ExcelAttribute(name = "档案地-县", maxLength = 30,isArea = true,parentField = "empCity")
@Length(max = 30, message = "档案地-县不能超过30个字符")
@ExcelProperty("档案地-县")
@Schema(description = "档案地-县")
@HeadFontStyle(fontHeightInPoints = 11)
private String empTown;
/**
* 社保缴纳地-省
*/
@ExcelAttribute(name = "社保缴纳地", maxLength = 50)
@ExcelAttribute(name = "社保缴纳地", maxLength = 50,isArea = true)
@Length(max = 50, message = "社保缴纳地不能超过50个字符")
@ExcelProperty("社保缴纳地")
@Schema(description = "社保缴纳地")
@HeadFontStyle(fontHeightInPoints = 11)
private String socialProvince;
/**
* 社保缴纳地-市
*/
@ExcelAttribute(name = "社保缴纳地-市", maxLength = 50)
@ExcelAttribute(name = "社保缴纳地-市", maxLength = 50,isArea = true,parentField = "socialProvince")
@Length(max = 50, message = "社保缴纳地-市不能超过50个字符")
@ExcelProperty("社保缴纳地-市")
@Schema(description = "社保缴纳地-市")
@HeadFontStyle(fontHeightInPoints = 11)
private String socialCity;
/**
* 社保缴纳地-县
*/
@ExcelAttribute(name = "社保缴纳地-县", maxLength = 50)
@ExcelAttribute(name = "社保缴纳地-县", maxLength = 50,isArea = true,parentField = "socialCity")
@Length(max = 50, message = "社保缴纳地-县不能超过50个字符")
@ExcelProperty("社保缴纳地-县")
@Schema(description = "社保缴纳地-县")
@HeadFontStyle(fontHeightInPoints = 11)
private String socialTown;
/**
......@@ -270,6 +299,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 32, message = "合同申请编号不能超过32个字符")
@ExcelProperty("合同申请编号")
@Schema(description = "合同申请编号")
@HeadFontStyle(fontHeightInPoints = 11)
private String contractApplyNo;
/**
* 合同起始时间
......@@ -278,6 +308,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 20, message = "合同起始时间不能超过20个字符")
@ExcelProperty("合同起始时间")
@Schema(description = "合同起始时间")
@HeadFontStyle(fontHeightInPoints = 11)
private String contractStart;
/**
* 合同截止时间
......@@ -286,38 +317,43 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 20, message = "合同截止时间不能超过20个字符")
@ExcelProperty("合同截止时间")
@Schema(description = "合同截止时间")
@HeadFontStyle(fontHeightInPoints = 11)
private String contractEnd;
/**
* 合同类型
*/
@ExcelAttribute(name = "合同类型", maxLength = 10)
@ExcelAttribute(name = "合同类型")
@Length(max = 10, message = "合同类型不能超过10个字符")
@ExcelProperty("合同类型")
@Schema(description = "合同类型")
@HeadFontStyle(fontHeightInPoints = 11)
private String contractType;
/**
* 业务细分
*/
@ExcelAttribute(name = "业务细分", maxLength = 20)
@ExcelAttribute(name = "业务细分")
@Length(max = 20, message = "业务细分不能超过20个字符")
@ExcelProperty("业务细分")
@Schema(description = "业务细分")
@HeadFontStyle(fontHeightInPoints = 11)
private String businessDetail;
/**
* 签订类型
*/
@ExcelAttribute(name = "签订类型", maxLength = 20)
@ExcelAttribute(name = "签订类型")
@Length(max = 20, message = "签订类型不能超过20个字符")
@ExcelProperty("签订类型")
@Schema(description = "签订类型")
@HeadFontStyle(fontHeightInPoints = 11)
private String signType;
/**
* 签订期限
*/
@ExcelAttribute(name = "签订期限", maxLength = 10)
@ExcelAttribute(name = "签订期限", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.EMPLOYEE_CONTRACT_TYPE, needExport = true)
@Length(max = 10, message = "签订期限不能超过10个字符")
@ExcelProperty("签订期限")
@Schema(description = "签订期限")
@HeadFontStyle(fontHeightInPoints = 11)
private String signTerm;
/**
* 合同甲方
......@@ -326,6 +362,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 50, message = "合同甲方不能超过50个字符")
@ExcelProperty("合同甲方")
@Schema(description = "合同甲方")
@HeadFontStyle(fontHeightInPoints = 11)
private String contractPartyA;
/**
* 合同岗位
......@@ -334,14 +371,16 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 20, message = "合同岗位不能超过20个字符")
@ExcelProperty("合同岗位")
@Schema(description = "合同岗位")
@HeadFontStyle(fontHeightInPoints = 11)
private String contractPost;
/**
* 工时制
*/
@ExcelAttribute(name = "工时制", maxLength = 10)
@ExcelAttribute(name = "工时制",maxLength = 10,isDataId = true,dataType = ExcelAttributeConstants.WORKING_HOURS)
@Length(max = 10, message = "工时制不能超过10个字符")
@ExcelProperty("工时制")
@Schema(description = "工时制")
@HeadFontStyle(fontHeightInPoints = 11)
private String contractTaskTime;
/**
* 合同编码
......@@ -350,6 +389,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 30, message = "合同编码不能超过30个字符")
@ExcelProperty("合同编码")
@Schema(description = "合同编码")
@HeadFontStyle(fontHeightInPoints = 11)
private String contractCode;
/**
* 合同创建人
......@@ -358,6 +398,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 10, message = "合同创建人不能超过10个字符")
@ExcelProperty("合同创建人")
@Schema(description = "合同创建人")
@HeadFontStyle(fontHeightInPoints = 11)
private String contractCreater;
/**
* 合同创建时间
......@@ -366,6 +407,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 10, message = "合同创建时间不能超过10个字符")
@ExcelProperty("合同创建时间")
@Schema(description = "合同创建时间")
@HeadFontStyle(fontHeightInPoints = 11)
private String contractCreateTime;
/**
* 数据生产月
......@@ -374,6 +416,7 @@ public class TPersonnelRoster extends BaseEntity {
@Length(max = 10, message = "数据生产月不能超过10个字符")
@ExcelProperty("数据生产月")
@Schema(description = "数据生产月")
@HeadFontStyle(fontHeightInPoints = 11)
private String dataCreateMonth;
}
......@@ -21,6 +21,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
/**
* @author fxj
......@@ -52,5 +53,14 @@ public class TPersonnelRosterSearchVo extends TPersonnelRoster {
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
/**
* @Author fxj
* 业务类型
**/
private List<String> businessTypes;
/**
* @Author fxj
* BU归属
**/
private List<String> buBelongs;
}
......@@ -130,7 +130,6 @@ public class TPersonnelRosterController {
**/
@Operation(description = "导出 hasPermission('demo_tpersonnelroster-export')")
@PostMapping("/export")
@PreAuthorize("@pms.hasPermission('demo_tpersonnelroster-export')")
public void export(HttpServletResponse response, @RequestBody TPersonnelRosterSearchVo searchVo) {
tPersonnelRosterService.listExport(response,searchVo);
}
......
......@@ -613,11 +613,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
* @Date: 2023/6/16 10:16
* @return: void
**/
private void setAuditInfoNew(TEmployeeContractInfo tEmployeeContractInfo,String flag) {
private void setAuditInfoNew(TEmployeeContractInfo tEmployeeContractInfo) {
TEmployeeContractAudit audit = new TEmployeeContractAudit();
audit.setRootName("合同审核");
audit.setAuditStatus(CommonConstants.ZERO_STRING.equals(flag) ? "审核通过" : "审核不通过");
audit.setRemark("终止合同联动");
audit.setRootName("终止合同联动");
audit.setLinkId(tEmployeeContractInfo.getId());
audit.setLinkType(CommonConstants.ONE_INT);
tEmployeeContractAuditService.save(audit);
......@@ -754,27 +752,31 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
.lambda().eq(TEmployeeContractInfo::getEmpId, contractInfo.getEmpId())
.eq(TEmployeeContractInfo::getSettleDomain, contractInfo.getSettleDomain())
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT));
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.ne(TEmployeeContractInfo::getId, tEmployeeContractInfo.getId()));
if (Common.isNotNull(contractInfoList)) {
for (TEmployeeContractInfo contractInfo1:contractInfoList) {
contractInfo1.setInUse(CommonConstants.ONE_STRING);
contractInfo1.setAuditUserName(user.getNickname());
baseMapper.updateById(contractInfo1);
//增加审核记录
this.setAuditInfoNew(contractInfo1,CommonConstants.ZERO_STRING);
this.setAuditInfoNew(contractInfo1);
}
}
//在途的合同更新为审核不通过
List<TEmployeeContractInfo> contractInfoListZt = baseMapper.selectList(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getEmpId, contractInfo.getEmpId())
.eq(TEmployeeContractInfo::getSettleDomain, contractInfo.getSettleDomain())
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ZERO_INT)
.and(obj -> obj.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_INT)
.or().eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ZERO_INT))
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT));
if (Common.isNotNull(contractInfoListZt)) {
for (TEmployeeContractInfo contractInfo1:contractInfoListZt) {
contractInfo1.setAuditStatus(CommonConstants.THREE_INT);
contractInfo1.setAuditUserName(user.getNickname());
baseMapper.updateById(contractInfo1);
//增加审核记录
this.setAuditInfoNew(contractInfo1,CommonConstants.ONE_STRING);
this.setAuditInfoNew(contractInfo1);
}
}
//项目档案处理
......@@ -807,7 +809,19 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (tEmployeeProject.getProjectStatus() == CommonConstants.ONE_INT && Common.isNotNull(tEmployeeInfo)) {
TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoMapper.selectById(tEmployeeInfo.getId());
tEmployeeInfo.setProjectNum(tEmployeeInfo.getProjectNum() - CommonConstants.ONE_INT);
// 判断人员有无审核通过的其他合同
TEmployeeContractInfo contractInfoInUse = this.getOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getEmpId, contractInfo.getEmpId())
.and(obj -> obj.ge(TEmployeeContractInfo::getContractEnd, DateUtil.getThisDayByPatten("yyyy-MM-dd"))
.or().isNull(TEmployeeContractInfo::getContractEnd))
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (contractInfoInUse != null) {
tEmployeeInfo.setContractStatus(CommonConstants.ONE_INT);
} else {
tEmployeeInfo.setContractStatus(CommonConstants.TWO_INT);
}
//减项成功把人员档案现存项目数减一
if (tEmployeeInfo.getProjectNum() == CommonConstants.ZERO_INT) {
//减档
......@@ -817,12 +831,12 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeInfo.setLeaveUser(user.getId());
tEmployeeInfo.setLeaveUserName(user.getNickname());
workInfo.append("减档成功,");
tEmployeeInfoMapper.updateById(tEmployeeInfo);
} else {
failueInfo.append("存在其他项目,无法减档");
}
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfo.getId(),
"", tEmployeeInfoOld, tEmployeeInfo);
tEmployeeInfoMapper.updateById(tEmployeeInfo);
}
}
//更新任务处理情况数据
......@@ -1679,27 +1693,29 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
.lambda().eq(TEmployeeContractInfo::getEmpId, contract.getEmpId())
.eq(TEmployeeContractInfo::getSettleDomain, contract.getSettleDomain())
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT));
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.ne(TEmployeeContractInfo::getId, contract.getId()));
if (Common.isNotNull(contractInfoList)) {
for (TEmployeeContractInfo contractInfo1 : contractInfoList) {
contractInfo1.setInUse(CommonConstants.ONE_STRING);
baseMapper.updateById(contractInfo1);
//增加审核记录
this.setAuditInfoNew(contractInfo1, CommonConstants.ZERO_STRING);
this.setAuditInfoNew(contractInfo1);
}
}
//在途的合同更新为审核不通过
contractInfoListZt = baseMapper.selectList(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getEmpId, contract.getEmpId())
.eq(TEmployeeContractInfo::getSettleDomain, contract.getSettleDomain())
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ZERO_INT)
.and(obj -> obj.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_INT)
.or().eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ZERO_INT))
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT));
if (Common.isNotNull(contractInfoListZt)) {
for (TEmployeeContractInfo contractInfo1 : contractInfoListZt) {
contractInfo1.setAuditStatus(CommonConstants.THREE_INT);
baseMapper.updateById(contractInfo1);
//增加审核记录
this.setAuditInfoNew(contractInfo1, CommonConstants.ONE_STRING);
this.setAuditInfoNew(contractInfo1);
}
}
//项目档案处理
......@@ -1728,23 +1744,39 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeProject.getId(), tEmployeeProjectOld, tEmployeeProject);
tEmployeeProjectService.updateById(tEmployeeProject);
//如果项目档案已减项,如果人员存在多个项目不处理,反之则减档
if (tEmployeeProject.getProjectStatus() == CommonConstants.ONE_INT) {
tEmployeeInfo = tEmployeeInfoMapper.selectById(tEmployeeProject.getEmpId());
if (Common.isNotNull(tEmployeeInfo) && tEmployeeInfo.getProjectNum() == CommonConstants.ONE_INT) {
//减档
if (tEmployeeProject.getProjectStatus() == CommonConstants.ONE_INT && Common.isNotNull(tEmployeeInfo)) {
TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoMapper.selectById(tEmployeeInfo.getId());
tEmployeeInfo.setProjectNum(tEmployeeInfo.getProjectNum() - CommonConstants.ONE_INT);
// 判断人员有无审核通过的其他合同
contractInfoInUse = this.getOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getEmpId, contract.getEmpId())
.and(obj -> obj.ge(TEmployeeContractInfo::getContractEnd, DateUtil.getThisDayByPatten("yyyy-MM-dd"))
.or().isNull(TEmployeeContractInfo::getContractEnd))
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (contractInfoInUse != null) {
tEmployeeInfo.setContractStatus(CommonConstants.ONE_INT);
} else {
tEmployeeInfo.setContractStatus(CommonConstants.TWO_INT);
}
//减项成功把人员档案现存项目数减一
if (tEmployeeInfo.getProjectNum() == CommonConstants.ZERO_INT) {
//减档
tEmployeeInfo.setFileStatus(CommonConstants.dingleDigitIntArray[1]);
tEmployeeInfo.setLeaveRemark(tEmployeeProject.getLeaveRemark());
tEmployeeInfo.setLeaveTime(DateUtil.getCurrentDateTime());
tEmployeeInfo.setLeaveUser(user.getId());
tEmployeeInfo.setLeaveUserName(user.getNickname());
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfo.getId(),
"", tEmployeeInfoOld, tEmployeeInfo);
workInfo.append("减档成功,");
tEmployeeInfoMapper.updateById(tEmployeeInfo);
} else {
failueInfo.append("存在其他项目,无法减档");
}
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfo.getId(),
"", tEmployeeInfoOld, tEmployeeInfo);
tEmployeeInfoMapper.updateById(tEmployeeInfo);
}
}
//更新任务处理情况数据
......
......@@ -1403,23 +1403,26 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (Common.isNotNull(contractInfoList)) {
for (TEmployeeContractInfo contractInfo1 : contractInfoList) {
contractInfo1.setInUse(CommonConstants.ONE_STRING);
contractInfo1.setAuditUserName(vo.getUserName());
contractInfoMapper.updateById(contractInfo1);
//增加审核记录
this.setAuditInfoNew(contractInfo1, CommonConstants.ZERO_STRING);
this.setAuditInfoNew(contractInfo1);
}
}
//在途的合同更新为审核不通过
contractInfoListZt = contractInfoMapper.selectList(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getEmpIdcard, vo.getEmpIdCard())
.eq(TEmployeeContractInfo::getDeptNo, vo.getDepartNo())
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ZERO_INT)
.and(obj -> obj.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_INT)
.or().eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ZERO_INT))
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT));
if (Common.isNotNull(contractInfoListZt)) {
for (TEmployeeContractInfo contractInfo1 : contractInfoListZt) {
contractInfo1.setAuditStatus(CommonConstants.THREE_INT);
contractInfo1.setAuditUserName(vo.getUserName());
contractInfoMapper.updateById(contractInfo1);
//增加审核记录
this.setAuditInfoNew(contractInfo1, CommonConstants.ONE_STRING);
this.setAuditInfoNew(contractInfo1);
}
}
//项目档案处理
......@@ -1462,12 +1465,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
tEmployeeInfo.setLeaveUser(vo.getUserId());
tEmployeeInfo.setLeaveUserName(vo.getUserName());
workInfo.append("减档成功,");
tEmployeeInfoMapper.updateById(tEmployeeInfo);
} else {
failueInfo.append("存在其他项目,无法减档");
}
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfo.getId(),
"", tEmployeeInfoOld, tEmployeeInfo);
tEmployeeInfoMapper.updateById(tEmployeeInfo);
}
}
//更新任务处理情况查询表数据
......@@ -1831,11 +1834,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
* @Date: 2023/6/16 10:16
* @return: void
**/
private void setAuditInfoNew(TEmployeeContractInfo tEmployeeContractInfo,String flag) {
private void setAuditInfoNew(TEmployeeContractInfo tEmployeeContractInfo) {
TEmployeeContractAudit audit = new TEmployeeContractAudit();
audit.setRootName("合同审核");
audit.setAuditStatus(CommonConstants.ZERO_STRING.equals(flag) ? "审核通过" : "审核不通过");
audit.setRemark("终止合同联动");
audit.setRootName("社保派减联动减合同");
audit.setLinkId(tEmployeeContractInfo.getId());
audit.setLinkType(CommonConstants.ONE_INT);
tEmployeeContractAuditService.save(audit);
......
......@@ -16,34 +16,26 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FddSealPersonAuth;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPersonnelRoster;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TPersonnelRosterMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TPersonnelRosterService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TPersonnelRosterSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TPersonnelRosterVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalaryProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryEmpRosterRes;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmpRosterVo;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
......@@ -53,8 +45,8 @@ import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -69,10 +61,11 @@ import java.util.stream.Collectors;
*/
@Log4j2
@AllArgsConstructor
@EnableConfigurationProperties({DaprArchivesProperties.class})
@EnableConfigurationProperties({DaprSalaryProperties.class})
@Service
public class TPersonnelRosterServiceImpl extends ServiceImpl<TPersonnelRosterMapper, TPersonnelRoster> implements TPersonnelRosterService {
private final DaprArchivesProperties daprArchivesProperties;
private final DaprSalaryProperties daprSalaryProperties;
/**
* 简单分页查询
* @param tPersonnelRoster
......@@ -159,7 +152,7 @@ public class TPersonnelRosterServiceImpl extends ServiceImpl<TPersonnelRosterMap
long count = baseMapper.getTPersonnelRosterCount(searchVo);
List<TPersonnelRoster> list;
if (count > CommonConstants.ZERO_INT){
R<List<TSalaryEmpRosterVo>> res;
R<SalaryEmpRosterRes> res;
Map<String,TSalaryEmpRosterVo> voMap = new HashMap<>();
TSalaryEmpRosterVo rosterVo;
for (int i = 0; i <= count; ) {
......@@ -168,12 +161,12 @@ public class TPersonnelRosterServiceImpl extends ServiceImpl<TPersonnelRosterMap
list = baseMapper.getTPersonnelRoster(searchVo);
if (Common.isNotNull(list)){
// 处理薪资信息
res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(), daprArchivesProperties.getAppId(),
"/tsalaryemployee/inner/getSalaryEmpRoster", list.stream()
res = HttpDaprUtil.invokeMethodPost(daprSalaryProperties.getAppUrl(), daprSalaryProperties.getAppId(),
"/tsalaryemployee/getSalaryEmpRoster", list.stream()
.map(TPersonnelRoster::getEmpIdcard).collect(Collectors.toList()),
TSalaryEmpRosterVo.class, SecurityConstants.FROM_IN);
if (Common.isNotNull(res) && Common.isNotNull(res.getData()) && res.getData().size() > 0){
for (TSalaryEmpRosterVo vo :res.getData()){
SalaryEmpRosterRes.class, SecurityConstants.FROM_IN);
if (Common.isNotNull(res) && Common.isNotNull(res.getData()) && Common.isNotEmpty(res.getData().getRosterVos())){
for (TSalaryEmpRosterVo vo :res.getData().getRosterVos()){
voMap.put(vo.getEmpIdcard(),vo);
}
}
......@@ -187,6 +180,7 @@ public class TPersonnelRosterServiceImpl extends ServiceImpl<TPersonnelRosterMap
r.setBankNameSub(rosterVo.getBankSubName());
r.setBankProvince(rosterVo.getBankProvince());
}
r.setDataCreateMonth(DateUtil.getYearAndMonth(LocalDateTime.now(),0));
}
this.saveBatch(list);
}
......
......@@ -240,6 +240,20 @@
AND a.DATA_CREATE_MONTH = #{tPersonnelRoster.dataCreateMonth}
</if>
<if test="tPersonnelRoster.businessTypes != null and tPersonnelRoster.businessTypes.size() > 0">
AND a.BUSINESS_TYPE in
<foreach item="item" index="index" collection="tPersonnelRoster.businessTypes" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="tPersonnelRoster.buBelongs != null and tPersonnelRoster.buBelongs.size() > 0">
AND a.BU_BELONG in
<foreach item="item" index="index" collection="tPersonnelRoster.buBelongs" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</if>
</sql>
<!--tPersonnelRoster简单分页查询-->
......@@ -260,7 +274,7 @@
e.EMP_PHONE as 'EMP_PHONE',c1.FILE_PROVINCE as 'EMP_PROVINCE',c1.FILE_CITY as 'EMP_CITY',c1.FILE_TOWN as 'EMP_TOWN',
p.SOCIAL_PROVINCE as 'SOCIAL_PROVINCE',p.SOCIAL_CITY as 'SOCIAL_CITY',p.SOCIAL_TOWN as 'SOCIAL_TOWN',c1.APPLY_NO as 'CONTRACT_APPLY_NO',
c1.CONTRACT_START as 'CONTRACT_START',c1.CONTRACT_END as 'CONTRACT_END',c1.CONTRACT_NAME as 'CONTRACT_TYPE',c1.CONTRACT_SUB_NAME as 'BUSINESS_DETAIL',
c1.SITUATION as 'SIGN_TERM',c1.CONTRACT_TYPE as 'SIGN_TYPE',
c1.SITUATION as 'SIGN_TYPE',c1.CONTRACT_TYPE as 'SIGN_TERM',
c1.CONTRACT_PARTY as 'CONTRACT_PARTY_A',c1.POST as 'CONTRACT_POST',c1.WORKING_HOURS as 'CONTRACT_TASK_TIME',
c1.CONTRACT_NO as 'CONTRACT_CODE',c1.CREATE_NAME as 'CONTRACT_CREATER',c1.CREATE_TIME as 'CONTRACT_CREATE_TIME'
from
......@@ -302,7 +316,7 @@
<include refid="Base_Column_List"/>
from t_personnel_roster a
<where>
a.DELETE_FLAG = '0'
1=1
<include refid="tPersonnelRoster_where"/>
</where>
order by a.CREATE_TIME desc
......
......@@ -4,16 +4,19 @@ dapr.upms.appId=yifu-upms
#\u6D4B\u8BD5\u73AF\u5883
#dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u672C\u5730
#\u6D4B\u8BD5\u73AF\u5883
dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.check.appId=yifu-check
#\u672C\u5730
#\u6D4B\u8BD5\u73AF\u5883
dapr.archives.appUrl=http://yifu-archives.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.archives.appId=yifu-archives
#\u6D4B\u8BD5\u73AF\u5883
dapr.salary.appUrl=http://yifu-salary.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.salary.appId=yifu-salary
#\u6D4B\u8BD5\u73AF\u5883
dapr.social.appUrl=http://yifu-social.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.social.appId=yifu-social
......
......@@ -60,4 +60,12 @@ public class ArchiveTask {
SecurityConstants.FROM_IN);
log.info("-------------每日凌晨1点人员退休提醒-定时任务开始------------");
}
public void everyMonthUpdateRoster() {
log.info("-------------每月26号更新人员花名册-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(), daprArchivesProperties.getAppId(),
"/tpersonnelroster/inner/everyMonthUpdateRoster", "", Object.class,
SecurityConstants.FROM_IN);
log.info("-------------每月26号更新人员花名册-定时任务开始------------");
}
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author fxj
* @Date 2023/6/26
* @Description
* @Version 1.0
*/
@Data
public class SalaryEmpRosterRes implements Serializable {
private List<TSalaryEmpRosterVo> rosterVos;
}
......@@ -8,6 +8,7 @@ import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author fxj
......@@ -17,54 +18,32 @@ import javax.validation.constraints.NotBlank;
* @return
**/
@Data
public class TSalaryEmpRosterVo {
public class TSalaryEmpRosterVo implements Serializable {
/**
* 身份证号
*/
@ExcelAttribute(name = "身份证号", isNotEmpty = true, errorInfo = "身份证号不能为空", maxLength = 32)
@NotBlank(message = "身份证号不能为空")
@Length(max = 32, message = "身份证号不能超过32个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 开户行总行
*/
@ExcelAttribute(name = "开户行总行", maxLength = 50)
@Length(max = 50, message = "开户行总行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行总行")
private String bankName;
/**
* 开户行省
*/
@ExcelAttribute(name = "开户行省",isArea = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行省")
private String bankProvince;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行市")
private String bankCity;
/**
* 开户行支行
*/
@ExcelAttribute(name = "开户行支行", maxLength = 50)
@Length(max = 50, message = "开户行支行不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("开户行支行")
private String bankSubName;
/**
* 银行卡号
*/
@ExcelAttribute(name = "银行卡号", maxLength = 50)
@Length(max = 50, message = "银行卡号不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("银行卡号")
private String bankNo;
}
......@@ -74,7 +74,7 @@ public class TConfigSalaryController {
// 当前年 未推送或未发放的 发薪次数
int yearCount = tSalaryStandardService.getNum(settleDepart, null, nowYear);
for (TConfigSalary cs : configSalaryList) {
if (cs.getSalaryNum() < monthCount) {
if (cs.getSalaryNum() <= monthCount) {
cs.setNowMonthSalaryNum(monthCount);
}
cs.setNowYearSalaryNum(yearCount);
......
......@@ -217,8 +217,10 @@ public class TSalaryEmployeeController {
**/
@Operation(summary = "获取员工花名册信息信息", description = "获取员工花名册信息信息")
@Inner
@PostMapping("/inner/getSalaryEmpRoster")
public List<TSalaryEmpRosterVo> getSalaryEmpRoster(@RequestBody List<String> idCardList) {
return tSalaryEmployeeService.getSalaryEmpRoster(idCardList);
@PostMapping("/getSalaryEmpRoster")
public SalaryEmpRosterRes getSalaryEmpRoster(@RequestBody List<String> idCardList) {
SalaryEmpRosterRes res = new SalaryEmpRosterRes();
res.setRosterVos(tSalaryEmployeeService.getSalaryEmpRoster(idCardList));
return res;
}
}
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