Commit bc79f5cf authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/develop'

# Conflicts:
#	yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
#	yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
#	yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
#	yifu-common/yifu-common-ekp/src/main/resources/ekpFundConfig.properties
#	yifu-common/yifu-common-ekp/src/main/resources/ekpIncomeConfig.properties
#	yifu-common/yifu-common-ekp/src/main/resources/ekpInsuranceConfig.properties
#	yifu-common/yifu-common-ekp/src/main/resources/ekpOrderConfig.properties
#	yifu-common/yifu-common-ekp/src/main/resources/ekpSalaryConfig.properties
#	yifu-common/yifu-common-ekp/src/main/resources/ekpSocialConfig.properties
#	yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceDetailMapper.java
#	yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
#	yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsBonusServiceImpl.java
#	yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
parents f0999f99 37f71ca5
...@@ -33,4 +33,96 @@ public class ArchivesConstants { ...@@ -33,4 +33,96 @@ public class ArchivesConstants {
* 员工合同签订类型 * 员工合同签订类型
*/ */
public static final String[] contractSituation = {"作废","离职再入职","合同未到期重新签订","正常签订","商务合同更改","正常续签","终止"}; public static final String[] contractSituation = {"作废","离职再入职","合同未到期重新签订","正常签订","商务合同更改","正常续签","终止"};
/**
* 项目 ID 不可为空
*/
public static final String SETTLE_DOMAIN_ID_NOT_EMPTY = "id 不可为空";
/**
* 项目 项目编码及名称不可为空
*/
public static final String SETTLE_DOMAIN_NAME_AND_NO_NOT_EMPTY = "项目编码及名称不可为空";
/**
* 项目 客户名称、客户编码、客户ID不可为空
*/
public static final String SETTLE_DOMAIN_CUSTOMER_INFO_NOT_EMPTY = "客户名称、客户编码、客户ID不可为空";
/**
* 项目 是否BPO业务不可为空
*/
public static final String SETTLE_DOMAIN_BPO_FLAG_NOT_EMPTY = "是否BPO业务不可为空";
/**
* 项目 服务项目不可为空
*/
public static final String SETTLE_DOMAIN_SERVER_ITEM_NOT_EMPTY = "服务项目不可为空";
/**
* 项目 省市不可为空
*/
public static final String SETTLE_DOMAIN_PROVINCE_NOT_EMPTY = "省市不可为空";
/**
* 项目 业务类型、业务类型二级分类、业务类型三级分类不可为空
*/
public static final String SETTLE_DOMAIN_BUSINESS_TYPE_NOT_EMPTY = "业务类型、业务类型二级分类、业务类型三级分类不可为空";
/**
* 项目 服务状态不可为空
*/
public static final String SETTLE_DOMAIN_STOP_FLAG_NOT_EMPTY = "服务状态不可为空";
/**
* 项目 社保结算类型不可为空
*/
public static final String SETTLE_DOMAIN_SOCIAL_TYPE_NOT_EMPTY = "社保结算类型不可为空";
/**
* 项目 我司到款单位不可为空
*/
public static final String SETTLE_DOMAIN_UNIT_OUT_COMPANY_NOT_EMPTY = "我司到款单位不可为空";
/**
* 项目 社保
*/
public static final String SETTLE_DOMAIN_SOCIAL = "社保";
/**
* 项目 公积金
*/
public static final String SETTLE_DOMAIN_FUND = "公积金";
/**
* 项目 薪资
*/
public static final String SETTLE_DOMAIN_SALARY = "薪资";
/**
* 项目 商险
*/
public static final String SETTLE_DOMAIN_INSURANCES = "商险";
/**
* 项目 公积金结算类型不可为空
*/
public static final String SETTLE_DOMAIN_FUND_TYPE_NOT_EMPTY = "公积金结算类型不可为空";
/**
* 项目 封面台头-薪资不可为空
*/
public static final String SETTLE_DOMAIN_INVOICE_TITLE_NOT_EMPTY = "封面台头-薪资不可为空";
/**
* 项目 商险结算类型不可为空
*/
public static final String SETTLE_DOMAIN_INSURANCE_SETTLE_TYPE_NOT_EMPTY = "商险结算类型不可为空";
/**
* 项目 封面台头-商险不可为空
*/
public static final String SETTLE_DOMAIN_INSURANCE_TITLE_NOT_EMPTY = "封面台头-商险不可为空";
/**
* 项目 '管理费是否收费'及'风险金是否收取'不可为空
*/
public static final String SETTLE_DOMAIN_MANAGEMENT_AND_RISK_TAG_NOT_EMPTY = "'管理费是否收费'及'风险金是否收取'不可为空";
/**
* 项目 管理费是否收费为是,‘管理费服务项目’、‘管理费收费方式’、‘管理费费率/管理费金额’不可为空
*/
public static final String SETTLE_DOMAIN_MANAGEMENT_INFO_NOT_EMPTY = "管理费是否收费为是,‘管理费服务项目’、‘管理费收费方式’、‘管理费费率/管理费金额’不可为空";
/**
* 项目 风险金是否收取为是,'风险金服务项目'、'风险金收费方式'、'风险金收取费用/税率'不可为空
*/
public static final String SETTLE_DOMAIN_RISK_INFO_NOT_EMPTY = "风险金是否收取为是,'风险金服务项目'、'风险金收费方式'、'风险金收取费用/税率'不可为空";
/**
* 项目 结算方式(管理费、风险金)不可为空
*/
public static final String SETTLE_DOMAIN_SETTLE_TYPE_NOT_EMPTY = "结算方式(管理费、风险金)不可为空";
/**
* 项目 获取区域数据失败:
*/
public static final String SETTLE_DOMAIN_CHECK_AREA_NOT_EXISTS = "获取区域数据失败:";
} }
...@@ -501,7 +501,7 @@ public class TEmployeeContractInfo extends BaseEntity { ...@@ -501,7 +501,7 @@ public class TEmployeeContractInfo extends BaseEntity {
/** /**
* 减少原因 * 减少原因
*/ */
@ExcelAttribute(name = "减少原因", maxLength = 32, isDataId = true,dataType = ExcelAttributeConstants.REDUCE_SOCIAL_REASON) @ExcelAttribute(name = "减少原因")
@Schema(description = "减少原因", name = "workingHours") @Schema(description = "减少原因")
private String reduceReason; private String reduceReason;
} }
...@@ -279,7 +279,7 @@ public class TEmployeeInfo extends BaseEntity { ...@@ -279,7 +279,7 @@ public class TEmployeeInfo extends BaseEntity {
private Integer projectNum; private Integer projectNum;
/** /**
* 员工合同状态(字典) * 员工合同状态(字典:0初始1在用2不在用
*/ */
@Schema(description = "员工合同状态(字典)0初始状态 personnel_state") @Schema(description = "员工合同状态(字典)0初始状态 personnel_state")
@ExcelAttribute(name = "员工合同状态", isDataId = true, dataType = ExcelAttributeConstants.PERSONNEL_STATE) @ExcelAttribute(name = "员工合同状态", isDataId = true, dataType = ExcelAttributeConstants.PERSONNEL_STATE)
...@@ -287,6 +287,7 @@ public class TEmployeeInfo extends BaseEntity { ...@@ -287,6 +287,7 @@ public class TEmployeeInfo extends BaseEntity {
/** /**
* 商险状态(字典) * 商险状态(字典)
* 商险状态(字典0无2正常3失效4处理中)commercial_satte
*/ */
@Schema(description = "商险状态(字典)0初始状态") @Schema(description = "商险状态(字典)0初始状态")
private Integer insuranceStatus; private Integer insuranceStatus;
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
/**
* @Author hgw
* @Date 2022-11-23 15:38:13
* @Version 1.0
*/
@Data
public class EmpIdCardAndDeptVo {
// 身份证
private String idCard;
// 项目id
private String deptId;
// 项目编码:薪资使用的,只有编码
private String deptNo;
// 状态
private String status;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
import java.util.List;
/**
* @Author hgw
* @Date 2022-11-23 15:38:13
* @Version 1.0
*/
@Data
public class EmpStatusVo {
// 身份证、项目id
private List<EmpIdCardAndDeptVo> empInfo;
}
...@@ -19,20 +19,14 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo; ...@@ -19,20 +19,14 @@ 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.alibaba.excel.annotation.write.style.HeadFontStyle; import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; 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.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
import java.util.Set;
/** /**
* 员工合同 * 员工合同
...@@ -168,11 +162,11 @@ public class EmployeeContractExportAuditVO implements Serializable { ...@@ -168,11 +162,11 @@ public class EmployeeContractExportAuditVO implements Serializable {
@Schema(description = "离职日期", name = "contractEnd") @Schema(description = "离职日期", name = "contractEnd")
private String leaveDate; private String leaveDate;
/** /**
* 减少原因 * 终止原因
*/ */
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelAttribute(name = "减少原因", maxLength = 32, isDataId = true,dataType = ExcelAttributeConstants.REDUCE_SOCIAL_REASON) @ExcelAttribute(name = "终止原因")
@Schema(description = "减少原因", name = "workingHours") @Schema(description = "终止原因")
@ExcelProperty("减少原因") @ExcelProperty("终止原因")
private String reduceReason; private String reduceReason;
} }
...@@ -166,6 +166,18 @@ public class EmployeeContractVO extends RowIndex implements Serializable { ...@@ -166,6 +166,18 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
@ExcelAttribute(name = "档案柜号", maxLength = 50) @ExcelAttribute(name = "档案柜号", maxLength = 50)
@Schema(description = "档案柜号", name = "fileCabinetNo") @Schema(description = "档案柜号", name = "fileCabinetNo")
private String fileCabinetNo; private String fileCabinetNo;
/**
* 离职日期
*/
@ExcelAttribute(name = "离职日期")
@Schema(description = "离职日期")
private String leaveDate;
/**
* 终止原因
*/
@ExcelAttribute(name = "终止原因", maxLength = 32)
@Schema(description = "终止原因")
private String reduceReason;
/** /**
* 备注 * 备注
*/ */
...@@ -173,5 +185,4 @@ public class EmployeeContractVO extends RowIndex implements Serializable { ...@@ -173,5 +185,4 @@ public class EmployeeContractVO extends RowIndex implements Serializable {
@ExcelAttribute(name = "备注", maxLength = 200) @ExcelAttribute(name = "备注", maxLength = 200)
@Schema(description = "备注", name = "remark") @Schema(description = "备注", name = "remark")
private String remark; private String remark;
} }
...@@ -48,14 +48,16 @@ public class EmployeeConstants { ...@@ -48,14 +48,16 @@ public class EmployeeConstants {
public static final String CONTRACT_START_EMPTY = "起始日期不能为空"; public static final String CONTRACT_START_EMPTY = "起始日期不能为空";
public static final String POST_EMPTY = "合同岗位不能为空"; public static final String POST_EMPTY = "合同岗位不能为空";
public static final String WORKING_HOURS_EMPTY = "工时制不能为空"; public static final String WORKING_HOURS_EMPTY = "工时制不能为空";
public static final String EXIT_PRIJECT_STATUS = "人员已有该项目信息,禁止重复添加";
public static final String CONTRACT_REDUCE_INFO_NOT_EMPTY = "签订类型为终止时,离职日期和终止原因必填";
public static final String CONTRACT_REDUCE_REASON_NOT_EMPTY = "终止原因为其他时,原因说明必填";
/** /**
* 无数据可更新 * 无数据可更新
**/ **/
public static final String NO_DATA_UPDATE = "无数据可更新"; public static final String NO_DATA_UPDATE = "无数据可更新";
public static final String NO_DATA = "无数据";
public static final String FILE_EXPORT_EXCEPTION = "档案导出异常";
public static final String CONCART_EXPORT_EXCEPTION = "合同导出异常";
public static final String CONCART_ALL_EXPORT_EXCEPTION = "合同[合并]导出异常"; public static final String CONCART_ALL_EXPORT_EXCEPTION = "合同[合并]导出异常";
/** /**
...@@ -63,4 +65,12 @@ public class EmployeeConstants { ...@@ -63,4 +65,12 @@ public class EmployeeConstants {
**/ **/
public static final String DATA_UPDATE_FAIL = "数据更新失败!"; public static final String DATA_UPDATE_FAIL = "数据更新失败!";
/**
* @Description: 如果派单减少完成,则自动审核合同通过
* @Author: hgw
* @Date: 2022/11/25 16:42
* @return:
**/
public static final String CONTRACT_NAME[] = {"标准合同","劳动派遣合同","其他"};
} }
...@@ -141,6 +141,19 @@ public class TEmployeeInfoController { ...@@ -141,6 +141,19 @@ public class TEmployeeInfoController {
return tEmployeeInfoService.getById(empId); return tEmployeeInfoService.getById(empId);
} }
/**
* @param idcard
* @Description: 内部接口获取档案基本信息
* @Author: hgw
* @Date: 2022/7/21 14:47
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo>
**/
@Inner
@PostMapping("/inner/getTEmployeeInfoByIdcard")
public TEmployeeInfo getTEmployeeInfoByIdcard(@RequestBody String idcard) {
return tEmployeeInfoService.getInfoByIdcard(idcard);
}
/** /**
* @param empName 姓名 * @param empName 姓名
* @param empIdCard 身份证 * @param empIdCard 身份证
...@@ -388,4 +401,55 @@ public class TEmployeeInfoController { ...@@ -388,4 +401,55 @@ public class TEmployeeInfoController {
public Boolean checkMobile(@RequestBody String mobile) { public Boolean checkMobile(@RequestBody String mobile) {
return tEmployeeInfoService.checkMobile(mobile); return tEmployeeInfoService.checkMobile(mobile);
} }
/**
* @Description: 更新人员档案的商险状态
* @Author: hgw
* @Date: 2022-11-23 17:17:59
**/
@Operation(summary = "更新人员档案的商险状态", description = "更新人员档案的商险状态")
@Inner
@PostMapping("/inner/updateEmployeeInfoInsuranceStatus")
public Boolean updateEmployeeInsuranceStatus(@RequestBody EmpStatusVo vo) {
return tEmployeeInfoService.updateEmployeeInfoInsuranceStatus(vo);
}
/**
* @Description: 更新人员档案的薪资状态
* @Author: hgw
* @Date: 2022-11-23 17:17:59
**/
@Operation(summary = "更新人员档案的薪资状态", description = "更新人员档案的薪资状态")
@Inner
@PostMapping("/inner/updateEmployeeInfoSalaryStatus")
public Boolean updateEmployeeInfoSalaryStatus(@RequestBody EmpStatusVo vo) {
return tEmployeeInfoService.updateEmployeeInfoSalaryStatus(vo);
}
/**
* @Description: 每月1号更新人员档案、项目档案的薪资状态为2否
* @Author: hgw
* @Date: 2022/11/24 15:00
* @return: void
**/
@Operation(summary = "每月1号更新人员档案、项目档案的薪资状态为2否", description = "每月1号更新人员档案、项目档案的薪资状态为2否")
@Inner
@PostMapping("/inner/everyMonthUpdateSalaryStatus")
public void everyMonthUpdateSalaryStatus() {
tEmployeeInfoService.everyMonthUpdateSalaryStatus();
}
/**
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/24 15:00
* @return: void
**/
@Operation(summary = "每天更新人员档案、项目档案的过期合同为2不在用", description = "每天更新人员档案、项目档案的过期合同为2不在用")
@Inner
@PostMapping("/inner/everyDayUpdateEmployeeContractStatus")
public void everyDayUpdateEmployeeContractStatus() {
tEmployeeInfoService.everyDayUpdateEmployeeContractStatus();
}
} }
...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...@@ -314,4 +315,28 @@ public class TEmployeeProjectController { ...@@ -314,4 +315,28 @@ public class TEmployeeProjectController {
public Boolean updateProjectSocialFund(@RequestBody UpProjectSocialFundVo vo) { public Boolean updateProjectSocialFund(@RequestBody UpProjectSocialFundVo vo) {
return tEmployeeProjectService.updateProjectSocialFund(vo); return tEmployeeProjectService.updateProjectSocialFund(vo);
} }
/**
* @Description: 更新人员档案、项目档案的商险状态
* @Author: hgw
* @Date: 2022-11-23 17:17:59
**/
@Operation(summary = "更新人员档案、项目档案的商险状态", description = "更新人员档案、项目档案的商险状态")
@Inner
@PostMapping("/inner/updateEmployeeInsuranceStatus")
public Boolean updateEmployeeInsuranceStatus(@RequestBody EmpStatusVo vo) {
return tEmployeeProjectService.updateEmployeeInsuranceStatus(vo);
}
/**
* @Description: 更新人员档案、项目档案的商险状态
* @Author: hgw
* @Date: 2022-11-23 17:17:59
**/
@Operation(summary = "更新人员档案、项目档案的薪资状态", description = "更新人员档案、项目档案的薪资状态")
@Inner
@PostMapping("/inner/updateEmployeeSalaryStatus")
public Boolean updateEmployeeSalaryStatus(@RequestBody EmpStatusVo vo) {
return tEmployeeProjectService.updateEmployeeSalaryStatus(vo);
}
} }
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.controller; package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...@@ -26,10 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo; ...@@ -26,10 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain; import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService; import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
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.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
...@@ -41,7 +39,10 @@ import org.springframework.beans.BeanUtils; ...@@ -41,7 +39,10 @@ import org.springframework.beans.BeanUtils;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -272,7 +273,13 @@ public class TSettleDomainController { ...@@ -272,7 +273,13 @@ public class TSettleDomainController {
@Operation(summary = "修改项目表--EKP调用接口", description = "修改项目表--EKP调用接口") @Operation(summary = "修改项目表--EKP调用接口", description = "修改项目表--EKP调用接口")
@SysLog("修改项目表--EKP调用接口") @SysLog("修改项目表--EKP调用接口")
@PostMapping("/updateProjectInfo") @PostMapping("/updateProjectInfo")
public R updateProjectInfo(@RequestBody List<TSettleDomain> list) { public R updateProjectInfo(@RequestBody String jsonStr) {
try {
jsonStr = URLDecoder.decode(jsonStr, CommonConstants.UTF8).replace("=", "");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
List<TSettleDomainEkpVo> list= JSONObject.parseArray(jsonStr, TSettleDomainEkpVo.class);
return tSettleDomainService.updateProjectInfo(list); return tSettleDomainService.updateProjectInfo(list);
} }
......
...@@ -87,4 +87,37 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> { ...@@ -87,4 +87,37 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
int noPageCountLeaveDiy(@Param("tEmployeeInfo")EmployeeInfoSearchVo searchV); int noPageCountLeaveDiy(@Param("tEmployeeInfo")EmployeeInfoSearchVo searchV);
int updateSocialInfoById(@Param("tEmployeeInfo")TEmployeeInfo employee); int updateSocialInfoById(@Param("tEmployeeInfo")TEmployeeInfo employee);
/**
* @Description: 更新档案商险状态
* @Author: hgw
* @Date: 2022/11/23 17:38
* @return: int
**/
int updateEmployeeInfoInsuranceStatus(@Param("emp") EmpIdCardAndDeptVo emp);
/**
* @Description: 更新档案薪资状态
* @Author: hgw
* @Date: 2022/11/24 11:29
* @return: int
**/
int updateEmployeeInfoSalaryStatus(@Param("emp") EmpIdCardAndDeptVo emp);
/**
* @Description: 每月1号更新档案薪资状态为否薪资
* @Author: hgw
* @Date: 2022/11/24 14:51
* @return: int
**/
int everyMonthUpdateEmployeeInfoSalaryStatus();
/**
* @param
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/25 14:17
* @return: int
**/
int everyDayUpdateEmployeeInfoContractStatus();
} }
...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpIdCardAndDeptVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
...@@ -40,6 +41,8 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> { ...@@ -40,6 +41,8 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
void updateExcelEmpProject(@Param("list") List<TEmployeeProject> list); void updateExcelEmpProject(@Param("list") List<TEmployeeProject> list);
void updateReduceEmpProject(@Param("list") List<TEmployeeProject> list);
int insertExcelEmpProject(@Param("list") List<TEmployeeProject> list); int insertExcelEmpProject(@Param("list") List<TEmployeeProject> list);
void updateEmpIdById(@Param("list") List<TEmployeeInfo> list); void updateEmpIdById(@Param("list") List<TEmployeeInfo> list);
...@@ -63,4 +66,37 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> { ...@@ -63,4 +66,37 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
List<EmployeeProjectExportVO> noPageDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo); List<EmployeeProjectExportVO> noPageDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo);
int noPageCountDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo); int noPageCountDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo);
/**
* @Description: 更新项目档案商险状态
* @Author: hgw
* @Date: 2022/11/23 17:43
* @return: int
**/
int updateEmployeeInsuranceStatus(@Param("emp") EmpIdCardAndDeptVo emp);
/**
* @Description: 更新项目档案薪资状态
* @Author: hgw
* @Date: 2022/11/24 11:28
* @return: int
**/
int updateEmployeeSalaryStatus(@Param("emp") EmpIdCardAndDeptVo emp);
/**
* @Description: 每月1号更新档案薪资状态为无薪资
* @Author: hgw
* @Date: 2022/11/24 14:51
* @return: int
**/
int everyMonthUpdateEmployeeSalaryStatus();
/**
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/25 14:19
* @return: int
**/
int everyDayUpdateEmployeContractStatus();
} }
...@@ -186,4 +186,39 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> { ...@@ -186,4 +186,39 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
Boolean updateEmpInfo(UpdateEmpVo vo); Boolean updateEmpInfo(UpdateEmpVo vo);
Boolean checkMobile(String mobile); Boolean checkMobile(String mobile);
TEmployeeInfo getInfoByIdcard(String idcard);
/**
* @Description: 更新人员档案的商险状态
* @Author: hgw
* @Date: 2022/11/23 17:20
* @return: java.lang.Boolean
**/
Boolean updateEmployeeInfoInsuranceStatus(EmpStatusVo vo);
/**
* @Description: 更新人员档案的薪资状态
* @Author: hgw
* @Date: 2022/11/24 11:35
* @return: java.lang.Boolean
**/
Boolean updateEmployeeInfoSalaryStatus(EmpStatusVo vo);
/**
* @Description: 每月1号更新人员档案、项目档案的薪资状态
* @Author: hgw
* @Date: 2022/11/24 14:57
* @return: void
**/
void everyMonthUpdateSalaryStatus();
/**
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/24 14:57
* @return: void
**/
void everyDayUpdateEmployeeContractStatus();
} }
...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportParamVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
...@@ -189,4 +190,38 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> { ...@@ -189,4 +190,38 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
String getEmpNo(String deptNo); String getEmpNo(String deptNo);
Boolean updateProjectSocialFund(UpProjectSocialFundVo vo); Boolean updateProjectSocialFund(UpProjectSocialFundVo vo);
/**
* @param vo
* @Description: 更新人员档案、项目档案的商险状态
* @Author: hgw
* @Date: 2022/11/23 17:20
* @return: java.lang.Boolean
**/
Boolean updateEmployeeInsuranceStatus(EmpStatusVo vo);
/**
* @param vo
* @Description: 更新人员档案、项目档案的薪资状态
* @Author: hgw
* @Date: 2022/11/24 11:25
* @return: java.lang.Boolean
**/
Boolean updateEmployeeSalaryStatus(EmpStatusVo vo);
/**
* @Description: 每月1号定时更新项目档案薪资状态为否
* @Author: hgw
* @Date: 2022/11/24 14:55
* @return: void
**/
void everyMonthUpdateEmployeeSalaryStatus();
/**
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/24 14:55
* @return: void
**/
void everyDayUpdateEmployeContractStatus();
} }
...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain; import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainEkpVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
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.core.vo.YifuUser;
...@@ -84,6 +85,6 @@ public interface TSettleDomainService extends IService<TSettleDomain> { ...@@ -84,6 +85,6 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
**/ **/
List<TSettleDomainSelectVo> selectAllSettleDomainSelectVos(); List<TSettleDomainSelectVo> selectAllSettleDomainSelectVos();
R updateProjectInfo(List<TSettleDomain> list); R updateProjectInfo(List<TSettleDomainEkpVo> list);
} }
...@@ -40,11 +40,17 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*; ...@@ -40,11 +40,17 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
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.constant.ResultConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
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.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.cache.support.SimpleValueWrapper; import org.springframework.cache.support.SimpleValueWrapper;
...@@ -72,6 +78,7 @@ import java.util.List; ...@@ -72,6 +78,7 @@ import java.util.List;
@Log4j2 @Log4j2
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
@EnableConfigurationProperties({DaprSocialProperties.class})
public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContractInfoMapper, TEmployeeContractInfo> implements TEmployeeContractInfoService { public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContractInfoMapper, TEmployeeContractInfo> implements TEmployeeContractInfoService {
private static final String ID_NOT_EMPTY = "ID,EMP_ID不可为空"; private static final String ID_NOT_EMPTY = "ID,EMP_ID不可为空";
...@@ -85,7 +92,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -85,7 +92,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
private final TAttaInfoService tAttaInfoService; private final TAttaInfoService tAttaInfoService;
private final TEmployeeContractAuditService tEmployeeContractAuditService; private final TEmployeeContractAuditService tEmployeeContractAuditService;
private final TEmployeeLogService tEmployeeLogService; private final TEmployeeLogService tEmployeeLogService;
@Autowired
private DaprSocialProperties socialProperties;
// 缓存信息 // 缓存信息
private final CacheManager cacheManager; private final CacheManager cacheManager;
...@@ -315,6 +323,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -315,6 +323,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
//初始化审核类型 审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止 //初始化审核类型 审核类型:0派增-社保派单、1派增-无社保新签、2派增-续签、3派减-作废、4派减-终止
initType(tEmployeeContractInfo); initType(tEmployeeContractInfo);
// 标准合同、劳动派遣合同、其他。————社保公积金都派减,自动审核通过
this.judgeAuditStatus(tEmployeeContractInfo);
if (Common.isEmpty(tEmployeeContractInfo.getId())) { if (Common.isEmpty(tEmployeeContractInfo.getId())) {
// 针对编码再做一次重复性校验 // 针对编码再做一次重复性校验
String isCur = baseMapper.getContractByApplyNo(tEmployeeContractInfo.getApplyNo()); String isCur = baseMapper.getContractByApplyNo(tEmployeeContractInfo.getApplyNo());
...@@ -333,7 +344,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -333,7 +344,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
this.setAuditInfo(tEmployeeContractInfo); this.setAuditInfo(tEmployeeContractInfo);
// 更新档案合同状态 // 更新档案合同状态
this.updateEmployeeContractStatus(tEmployeeContractInfo.getEmpId()); if (tEmployeeContractInfo.getAuditStatus() == CommonConstants.TWO_INT) {
this.updateEmployeeContractStatus(tEmployeeContractInfo);
}
return R.ok(null, CommonConstants.SAVE_SUCCESS); return R.ok(null, CommonConstants.SAVE_SUCCESS);
} }
...@@ -431,11 +444,42 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -431,11 +444,42 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeContractAuditService.save(audit); tEmployeeContractAuditService.save(audit);
} }
private void updateEmployeeContractStatus(String empId) { private void updateEmployeeContractStatus(TEmployeeContractInfo tEmployeeContractInfo) {
//查看未作废合同数 TEmployeeInfo employeeInfo = tEmployeeInfoMapper.selectById(tEmployeeContractInfo.getEmpId());
TEmployeeInfo employeeInfo = tEmployeeInfoMapper.selectById(empId);
if (employeeInfo != null) { if (employeeInfo != null) {
employeeInfo.setContractStatus(CommonConstants.ONE_INT); employeeInfo.setContractStatus(CommonConstants.ONE_INT);
if (Common.isNotNull(tEmployeeContractInfo.getSituation())
&& (EmployeeConstants.SITUATION_SIX.equals(tEmployeeContractInfo.getSituation())
|| EmployeeConstants.SITUATION_SEVEN.equals(tEmployeeContractInfo.getSituation()))) {
TEmployeeContractInfo contractInfoInUse = this.getOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getEmpId, tEmployeeContractInfo.getEmpId())
.and(obj -> obj.ge(TEmployeeContractInfo::getContractEnd, DateUtil.getThisDayByPatten("yyyy-MM-dd"))
.or().isNull(TEmployeeContractInfo::getContractEnd))
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (contractInfoInUse != null) {
employeeInfo.setContractStatus(CommonConstants.ONE_INT);
} else {
employeeInfo.setContractStatus(CommonConstants.TWO_INT);
}
}
tEmployeeInfoMapper.updateById(employeeInfo);
}
TEmployeeProject tEmployeeProject = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query()
.lambda().eq(TEmployeeProject::getEmpId, tEmployeeContractInfo.getEmpId())
.eq(TEmployeeProject::getDeptId, tEmployeeContractInfo.getSettleDomain())
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.last(CommonConstants.LAST_ONE_SQL));
if (tEmployeeProject != null) {
tEmployeeProject.setContractStatus(CommonConstants.ONE_INT);
if (Common.isNotNull(tEmployeeContractInfo.getSituation())
&& (EmployeeConstants.SITUATION_SIX.equals(tEmployeeContractInfo.getSituation())
|| EmployeeConstants.SITUATION_SEVEN.equals(tEmployeeContractInfo.getSituation()))) {
tEmployeeProject.setContractStatus(CommonConstants.TWO_INT);
}
tEmployeeProjectService.updateById(tEmployeeProject);
} }
} }
@Override @Override
...@@ -518,6 +562,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -518,6 +562,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// 判断人员有无审核通过的其他合同 // 判断人员有无审核通过的其他合同
TEmployeeContractInfo contractInfoInUse = this.getOne(Wrappers.<TEmployeeContractInfo>query() TEmployeeContractInfo contractInfoInUse = this.getOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getEmpId, contractInfo.getEmpId()) .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::getInUse, CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT) .eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
...@@ -857,6 +903,18 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -857,6 +903,18 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} else { } else {
if (EmployeeConstants.SITUATION_SIX.equals(insert.getSituation()) if (EmployeeConstants.SITUATION_SIX.equals(insert.getSituation())
|| EmployeeConstants.SITUATION_SEVEN.equals(insert.getSituation())) { || EmployeeConstants.SITUATION_SEVEN.equals(insert.getSituation())) {
// 终止 离职日期 和减少原因必填
if (EmployeeConstants.SITUATION_SEVEN.equals(insert.getSituation())) {
if (Common.isEmpty(insert.getReduceReason()) || Common.isEmpty(insert.getLeaveDate())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CONTRACT_REDUCE_INFO_NOT_EMPTY));
return;
}
if (EmployeeConstants.OTHERS.equals(insert.getReduceReason()) &&
Common.isEmpty(insert.getReason())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), EmployeeConstants.CONTRACT_REDUCE_REASON_NOT_EMPTY));
return;
}
}
TEmployeeContractInfo contractInfo = this.getOne(Wrappers.<TEmployeeContractInfo>query().lambda() TEmployeeContractInfo contractInfo = this.getOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, insert.getEmpIdcard()) .eq(TEmployeeContractInfo::getEmpIdcard, insert.getEmpIdcard())
.eq(TEmployeeContractInfo::getDeptNo, insert.getDeptNo()) .eq(TEmployeeContractInfo::getDeptNo, insert.getDeptNo())
...@@ -868,7 +926,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -868,7 +926,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
insert.setOldContractId(contractInfo.getId()); insert.setOldContractId(contractInfo.getId());
insert.setContractName(contractInfo.getContractName()); insert.setContractName(contractInfo.getContractName());
insert.setContractSubName(contractInfo.getContractSubName()); insert.setContractSubName(contractInfo.getContractSubName());
insert.setReason(contractInfo.getReason());
insert.setSubjectUnit(contractInfo.getSubjectUnit()); insert.setSubjectUnit(contractInfo.getSubjectUnit());
insert.setContractParty(contractInfo.getContractParty()); insert.setContractParty(contractInfo.getContractParty());
insert.setContractType(contractInfo.getContractType()); insert.setContractType(contractInfo.getContractType());
...@@ -935,6 +992,30 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -935,6 +992,30 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} }
} }
/**
* @Description: 标准合同、劳动派遣合同、其他。————社保公积金都派减,自动审核通过,
* 判断同项目的社保公积金都已派减,则无需审核
* @Author: hgw
* @Date: 2022/11/28 10:05
* @return: void
**/
private void judgeAuditStatus(TEmployeeContractInfo insert) {
if (insert.getAuditStatus() != CommonConstants.TWO_INT
&& (EmployeeConstants.CONTRACT_NAME[0].equals(insert.getContractName())
|| EmployeeConstants.CONTRACT_NAME[1].equals(insert.getContractName())
|| EmployeeConstants.CONTRACT_NAME[2].equals(insert.getContractName()))) {
//
TSocialFundInfo sf = new TSocialFundInfo();
sf.setEmpIdcard(insert.getEmpIdcard());
sf.setSettleDomainCode(insert.getDeptNo());
R<Integer> socialFundR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tsocialfundinfo/inner/selectSocialFoundByContract", sf, Integer.class, SecurityConstants.FROM_IN);
if (socialFundR != null && socialFundR.getData() != null && socialFundR.getData() > 0) {
insert.setAuditStatus(CommonConstants.TWO_INT);
}
}
}
/** /**
* 导出 * 导出
*/ */
......
...@@ -61,7 +61,6 @@ import javax.servlet.ServletOutputStream; ...@@ -61,7 +61,6 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.lang.reflect.Field;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
...@@ -2007,23 +2006,22 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2007,23 +2006,22 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8")); response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list); //EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeExportVO.class).includeColumnFieldNames(searchVo.getExportFields()).build(); ExcelUtil<EmployeeExportVO> util = new ExcelUtil<>(EmployeeExportVO.class);
// 获取所有字典type
Map<String,String> nameAndDicTypeMap = util.getConverterDicType();
// 获取所有字典对应的值
Map<String,String> redisLabelMap = (Map<String, String>) RedisUtil.redis.opsForValue().get(CacheConstants.REDIS_DICT_LABLE);
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeExportVO.class)
.registerConverter(new DictConverter(nameAndDicTypeMap,redisLabelMap))
.includeColumnFieldNames(searchVo.getExportFields()).build();
int index = 0; int index = 0;
if (count > CommonConstants.ZERO_INT){ if (count > CommonConstants.ZERO_INT){
Field[] allFields = EmployeeExportVO.class.getDeclaredFields();
WriteSheet writeSheet; WriteSheet writeSheet;
ExcelUtil<EmployeeExportVO> util;
for (int i = 0; i <= count; ) { for (int i = 0; i <= count; ) {
// 获取实际记录 // 获取实际记录
searchVo.setLimitStart(i); searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo); list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
util = new ExcelUtil<>(EmployeeExportVO.class);
for (EmployeeExportVO vo:list){
util.convertEntityAsso(vo,null,null,null,allFields);
}
}
if (Common.isNotNull(list)){ if (Common.isNotNull(list)){
writeSheet = EasyExcel.writerSheet("人员档案批量导出"+index).build(); writeSheet = EasyExcel.writerSheet("人员档案批量导出"+index).build();
excelWriter.write(list,writeSheet); excelWriter.write(list,writeSheet);
...@@ -2088,7 +2086,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2088,7 +2086,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeLeaveExportVO.class).includeColumnFieldNames(searchVo.getExportFields()).build(); ExcelWriter excelWriter = EasyExcel.write(out, EmployeeLeaveExportVO.class).includeColumnFieldNames(searchVo.getExportFields()).build();
int index = 0; int index = 0;
if (count > CommonConstants.ZERO_INT){ if (count > CommonConstants.ZERO_INT){
Field[] allFields = EmployeeLeaveExportVO.class.getDeclaredFields();
WriteSheet writeSheet; WriteSheet writeSheet;
ExcelUtil<EmployeeLeaveExportVO> util; ExcelUtil<EmployeeLeaveExportVO> util;
for (int i = 0; i <= count; ) { for (int i = 0; i <= count; ) {
...@@ -2096,12 +2093,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2096,12 +2093,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
searchVo.setLimitStart(i); searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageLeaveDiy(searchVo); list = noPageLeaveDiy(searchVo);
/*if (Common.isNotNull(list)){
util = new ExcelUtil<>(EmployeeLeaveExportVO.class);
for (EmployeeLeaveExportVO vo:list){
util.convertEntityAsso(vo,null,null,null,allFields);
}
}*/
if (Common.isNotNull(list)){ if (Common.isNotNull(list)){
writeSheet = EasyExcel.writerSheet("离职档案批量导出"+index).build(); writeSheet = EasyExcel.writerSheet("离职档案批量导出"+index).build();
excelWriter.write(list,writeSheet); excelWriter.write(list,writeSheet);
...@@ -2275,6 +2266,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2275,6 +2266,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING)) > 0; .eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING)) > 0;
} }
@Override
public TEmployeeInfo getInfoByIdcard(String idcard) {
return baseMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, idcard)
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
}
private void saveContract(Map<String, EmpProjectDispatchVo> projectsMap, private void saveContract(Map<String, EmpProjectDispatchVo> projectsMap,
Map<String, EmpContractDispatchVo> contractsMap, Map<String, EmpContractDispatchVo> contractsMap,
Map<String, EmpAddDispatchVo> empAddsMap) { Map<String, EmpAddDispatchVo> empAddsMap) {
...@@ -2402,4 +2401,61 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2402,4 +2401,61 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} }
} }
/**
* @Description: 更新人员档案的商险状态
* @Author: hgw
* @Date: 2022/11/23 17:45
* @return: java.lang.Boolean
**/
@Override
public Boolean updateEmployeeInfoInsuranceStatus(EmpStatusVo vo) {
if (Common.isEmpty(vo) || null == vo.getEmpInfo() || vo.getEmpInfo().isEmpty()){
return false;
}
for (EmpIdCardAndDeptVo emp : vo.getEmpInfo()) {
baseMapper.updateEmployeeInfoInsuranceStatus(emp);
}
return true;
}
/**
* @Description: 更新人员档案的薪资状态
* @Author: hgw
* @Date: 2022/11/23 17:45
* @return: java.lang.Boolean
**/
@Override
public Boolean updateEmployeeInfoSalaryStatus(EmpStatusVo vo) {
if (Common.isEmpty(vo) || null == vo.getEmpInfo() || vo.getEmpInfo().isEmpty()){
return false;
}
for (EmpIdCardAndDeptVo emp : vo.getEmpInfo()) {
baseMapper.updateEmployeeInfoSalaryStatus(emp);
}
return true;
}
/**
* @Description: 每月1号更新人员档案、项目档案的薪资状态
* @Author: hgw
* @Date: 2022/11/23 17:45
* @return: java.lang.Boolean
**/
@Override
public void everyMonthUpdateSalaryStatus() {
baseMapper.everyMonthUpdateEmployeeInfoSalaryStatus();
tEmployeeProjectService.everyMonthUpdateEmployeeSalaryStatus();
}
/**
* @Description: 每天更新人员档案、项目档案的过期合同为2不在用
* @Author: hgw
* @Date: 2022/11/23 17:45
* @return: java.lang.Boolean
**/
@Override
public void everyDayUpdateEmployeeContractStatus() {
baseMapper.everyDayUpdateEmployeeInfoContractStatus();
tEmployeeProjectService.everyDayUpdateEmployeContractStatus();
}
} }
...@@ -4,9 +4,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; ...@@ -4,9 +4,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractAttachInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractAttachInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeLogService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeLogService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectNewOldVO;
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.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
...@@ -33,7 +34,7 @@ public class DoJointTask { ...@@ -33,7 +34,7 @@ public class DoJointTask {
private TEmployeeInfoService tEmployeeInfoService; private TEmployeeInfoService tEmployeeInfoService;
@Autowired @Autowired
private TEmployeeProjectService tEmployeeProjectService; private TEmployeeProjectMapper tEmployeeProjectMapper;
@Autowired @Autowired
private TEmployeeLogService tEmployeeLogService; private TEmployeeLogService tEmployeeLogService;
...@@ -48,10 +49,12 @@ public class DoJointTask { ...@@ -48,10 +49,12 @@ public class DoJointTask {
public void doUpdateEmployeeInfo(List<TEmployeeInfo> tEmployeeInfoList, YifuUser user) { public void doUpdateEmployeeInfo(List<TEmployeeInfo> tEmployeeInfoList, YifuUser user) {
log.info("档案-批量更新人员档案-线程开始"); log.info("档案-批量更新人员档案-线程开始");
try { try {
List<TEmployeeProject> list;
TEmployeeInfo tEmployeeInfoOld;
for(TEmployeeInfo tEmployeeInfo:tEmployeeInfoList) { for(TEmployeeInfo tEmployeeInfo:tEmployeeInfoList) {
TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoService.getById(tEmployeeInfo.getId()); tEmployeeInfoOld = tEmployeeInfoService.getById(tEmployeeInfo.getId());
//查询该人员所有的项目档案 //查询该人员所有的项目档案
List<TEmployeeProject> list = tEmployeeProjectService.list(Wrappers.<TEmployeeProject>query().lambda() list = tEmployeeProjectMapper.selectList(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, tEmployeeInfo.getEmpIdcard()) .eq(TEmployeeProject::getEmpIdcard, tEmployeeInfo.getEmpIdcard())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL) .eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT)); .eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT));
...@@ -90,10 +93,12 @@ public class DoJointTask { ...@@ -90,10 +93,12 @@ public class DoJointTask {
public void updateFddEmployeeInfo(List<TEmployeeInfo> tEmployeeInfoList, FddContractAttachInfo fddContractAttachInfo) { public void updateFddEmployeeInfo(List<TEmployeeInfo> tEmployeeInfoList, FddContractAttachInfo fddContractAttachInfo) {
log.info("法大大档案-批量更新人员档案-线程开始"); log.info("法大大档案-批量更新人员档案-线程开始");
try { try {
TEmployeeInfo tEmployeeInfoOld;
List<TEmployeeProject> list;
for(TEmployeeInfo tEmployeeInfo:tEmployeeInfoList) { for(TEmployeeInfo tEmployeeInfo:tEmployeeInfoList) {
TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoService.getById(tEmployeeInfo.getId()); tEmployeeInfoOld = tEmployeeInfoService.getById(tEmployeeInfo.getId());
//查询该人员所有的项目档案 //查询该人员所有的项目档案
List<TEmployeeProject> list = tEmployeeProjectService.list(Wrappers.<TEmployeeProject>query().lambda() list = tEmployeeProjectMapper.selectList(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, tEmployeeInfo.getEmpIdcard()) .eq(TEmployeeProject::getEmpIdcard, tEmployeeInfo.getEmpIdcard())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL) .eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT)); .eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT));
...@@ -120,4 +125,23 @@ public class DoJointTask { ...@@ -120,4 +125,23 @@ public class DoJointTask {
log.info("法大大档案-批量更新人员档案结束"); log.info("法大大档案-批量更新人员档案结束");
} }
/**
* @Description: 更新项目档案操作记录
* @Author: huyc
* @Date: 2022-11-22
* @return: void
**/
@Async
public void saveModificationRecord(List<EmployeeProjectNewOldVO> updateProjectList) {
try {
for (EmployeeProjectNewOldVO newOldVO : updateProjectList) {
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1]
, "", newOldVO.getNewProjectEmployee().getId()
, newOldVO.getOldProjectEmployee(), newOldVO.getNewProjectEmployee());
}
} catch (Exception e) {
log.error("档案-更新项目档案操作记录错误", e);
}
log.info("档案-更新项目档案操作记录结束");
}
} }
...@@ -235,10 +235,7 @@ ...@@ -235,10 +235,7 @@
</sql> </sql>
<sql id="Base_Export_List"> <sql id="Base_Export_List">
a a.EMP_CODE,
.
EMP_CODE
,
a.EMP_NATRUE, a.EMP_NATRUE,
a.EMP_NAME, a.EMP_NAME,
a.EMP_IDCARD, a.EMP_IDCARD,
...@@ -951,12 +948,65 @@ ...@@ -951,12 +948,65 @@
<!--tEmployeeInfo人员档案导出查询改造 fxj 2022-11-02--> <!--tEmployeeInfo人员档案导出查询改造 fxj 2022-11-02-->
<select id="noPageDiy" resultMap="tEmployeeExportMap"> <select id="noPageDiy" resultMap="tEmployeeExportMap">
select select
<include refid="Base_Export_List"/>, a.EMP_CODE,
a.EMP_NATRUE,
a.EMP_NAME,
a.EMP_IDCARD,
a.VALIDITY_START,
a.VALIDITY_END,
a.EMP_MARRI_STATUS,
a.EMP_NATIONAL,
a.POLITICAL_STATUS,
a.EMP_PHONE,
a.EMP_EMAIL,
a1.AREA_NAME as "ID_PROVINCE",
a2.AREA_NAME as "ID_CITY",
a3.AREA_NAME as "ID_TOWN",
a.EMP_REGIS_TYPE,
a4.AREA_NAME as "FILE_PROVINCE",
a5.AREA_NAME as "FILE_CITY",
a6.AREA_NAME as "FILE_TOWN",
CASE WHEN a.IS_COLLEGE=0 THEN "否"
WHEN a.IS_COLLEGE =1 THEN "是"
ELSE a.IS_COLLEGE END as "IS_COLLEGE",
a.HIGN_EDUCATION,
a.SCHOOL,
a.MAJOR,
a.ADMISSION_DATE,
a.GRADUTION_DATE,
a.REMARK,
CASE WHEN a.FILE_SOURCE=1 THEN "社保、公积金派单"
WHEN a.FILE_SOURCE =2 THEN "人员发薪"
WHEN a.FILE_SOURCE =3 THEN "商险派单"
WHEN a.FILE_SOURCE =4 THEN "档案新建"
WHEN a.FILE_SOURCE =5 THEN "批量导入"
ELSE a.FILE_SOURCE END as "FILE_SOURCE", # 1=社保、公积金派单,2=人员发薪,3=商险派单,4=档案新建,5=批量导入
a.PROJECT_NUM,
a.CONTRACT_STATUS,
a.INSURANCE_STATUS,
a.SOCIAL_STATUS,
a.FUND_STATUS,
CASE WHEN a.SALARY_STATUS=0 THEN "无"
WHEN a.SALARY_STATUS =1 THEN "是"
WHEN a.SALARY_STATUS =2 THEN "否"
ELSE a.SALARY_STATUS END as "SALARY_STATUS",# 0=无,1=是,2=否
a.CREATE_NAME,
a.CREATE_TIME,
CASE WHEN a.`STATUS`=0 THEN "草稿"
WHEN a.`STATUS` =1 THEN "已审核"
ELSE a.`STATUS` END as "STATUS", # 0=草稿,1=已审核
a.CONTACT_ADDRESS,
p.IS_PROJECTS , p.IS_PROJECTS ,
p.DEPT_NAME, p.DEPT_NAME,
p.DEPT_NO, p.DEPT_NO,
P.PROJECT_NUM P.PROJECT_NUM
from t_employee_info a from t_employee_info a
LEFT JOIN sys_area a1 on a1.id=a.ID_PROVINCE
LEFT JOIN sys_area a2 on a2.id=a.ID_CITY
LEFT JOIN sys_area a3 on a3.id=a.ID_TOWN
LEFT JOIN sys_area a4 on a4.id=a.FILE_PROVINCE
LEFT JOIN sys_area a5 on a5.id=a.FILE_CITY
LEFT JOIN sys_area a6 on a6.id=a.FILE_TOWN
LEFT JOIN view_project p on a.EMP_IDCARD=p.EMP_IDCARD LEFT JOIN view_project p on a.EMP_IDCARD=p.EMP_IDCARD
<where> <where>
a.DELETE_FLAG = '0' a.DELETE_FLAG = '0'
...@@ -1100,4 +1150,36 @@ ...@@ -1100,4 +1150,36 @@
</trim> </trim>
WHERE a.id=#{tEmployeeInfo.id} WHERE a.id=#{tEmployeeInfo.id}
</update> </update>
<!-- 更新档案商险状态 -->
<update id="updateEmployeeInfoInsuranceStatus" >
update t_employee_info a set a.INSURANCE_STATUS = #{emp.status} where a.EMP_IDCARD = #{emp.idCard}
</update>
<!-- 更新档案薪资状态 -->
<update id="updateEmployeeInfoSalaryStatus" >
update t_employee_info a set a.SALARY_STATUS = #{emp.status} where a.EMP_IDCARD = #{emp.idCard}
</update>
<!-- 每月1号更新档案薪资状态为否薪资 -->
<update id="everyMonthUpdateEmployeeInfoSalaryStatus" >
update t_employee_info e set e.SALARY_STATUS = 2
where e.SALARY_STATUS = 1
and NOT EXISTS (
select 1 from view_salary_account_3month a where a.emp_idcard = e.EMP_IDCARD
)
</update>
<!-- 每天更新人员档案、项目档案的过期合同为2不在用 -->
<update id="everyDayUpdateEmployeeInfoContractStatus" >
update t_employee_info e
left join t_employee_contract_info c on e.EMP_IDCARD=c.EMP_IDCARD and c.IN_USE='0'
set e.CONTRACT_STATUS=2
where e.CONTRACT_STATUS != 2 and c.CONTRACT_END <![CDATA[ < ]]> DATE_FORMAT(curdate(),"%Y-%m-%d")
and not EXISTS (
select 1 from t_employee_contract_info ec where ec.EMP_IDCARD=c.EMP_IDCARD and ec.IN_USE='0'
and (ec.CONTRACT_END is null or ec.CONTRACT_END >= DATE_FORMAT(curdate(),"%Y-%m-%d"))
)
</update>
</mapper> </mapper>
...@@ -383,35 +383,35 @@ ...@@ -383,35 +383,35 @@
<if test="tEmployeeProject.socialTown != null"> <if test="tEmployeeProject.socialTown != null">
AND a.SOCIAL_TOWN = #{tEmployeeProject.socialTown} AND a.SOCIAL_TOWN = #{tEmployeeProject.socialTown}
</if> </if>
<if test="tEmployeeProject.empNatureArray != null"> <if test="tEmployeeProject.empNatureArray != null and tEmployeeProject.empNatureArray.length > 0">
AND a.EMP_NATRUE in AND a.EMP_NATRUE in
<foreach item="idStr" index="index" collection="tEmployeeProject.empNatureArray" open="(" separator="," <foreach item="idStr" index="index" collection="tEmployeeProject.empNatureArray" open="(" separator=","
close=")"> close=")">
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tEmployeeProject.contractStatusArray != null"> <if test="tEmployeeProject.contractStatusArray != null and tEmployeeProject.contractStatusArray.length > 0">
AND a.CONTRACT_STATUS in AND a.CONTRACT_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.contractStatusArray" open="(" <foreach item="idStr" index="index" collection="tEmployeeProject.contractStatusArray" open="("
separator="," close=")"> separator="," close=")">
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tEmployeeProject.insuranceStatusArray != null"> <if test="tEmployeeProject.insuranceStatusArray != null and tEmployeeProject.insuranceStatusArray.length > 0">
AND a.INSURANCE_STATUS in AND a.INSURANCE_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.insuranceStatusArray" open="(" <foreach item="idStr" index="index" collection="tEmployeeProject.insuranceStatusArray" open="("
separator="," close=")"> separator="," close=")">
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tEmployeeProject.socialStatusArray != null"> <if test="tEmployeeProject.socialStatusArray != null and tEmployeeProject.socialStatusArray.length > 0">
AND a.SOCIAL_STATUS in AND a.SOCIAL_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.socialStatusArray" open="(" <foreach item="idStr" index="index" collection="tEmployeeProject.socialStatusArray" open="("
separator="," close=")"> separator="," close=")">
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tEmployeeProject.fundStatusArray != null"> <if test="tEmployeeProject.fundStatusArray != null and tEmployeeProject.fundStatusArray.length > 0">
AND a.FUND_STATUS in AND a.FUND_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.fundStatusArray" open="(" <foreach item="idStr" index="index" collection="tEmployeeProject.fundStatusArray" open="("
separator="," close=")"> separator="," close=")">
...@@ -540,35 +540,35 @@ ...@@ -540,35 +540,35 @@
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tEmployeeProject.empNatureArray != null"> <if test="tEmployeeProject.empNatureArray != null and tEmployeeProject.empNatureArray.length > 0">
AND a.EMP_NATRUE in AND a.EMP_NATRUE in
<foreach item="idStr" index="index" collection="tEmployeeProject.empNatureArray" open="(" separator="," <foreach item="idStr" index="index" collection="tEmployeeProject.empNatureArray" open="(" separator=","
close=")"> close=")">
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tEmployeeProject.contractStatusArray != null"> <if test="tEmployeeProject.contractStatusArray != null and tEmployeeProject.contractStatusArray.length > 0">
AND a.CONTRACT_STATUS in AND a.CONTRACT_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.contractStatusArray" open="(" <foreach item="idStr" index="index" collection="tEmployeeProject.contractStatusArray" open="("
separator="," close=")"> separator="," close=")">
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tEmployeeProject.insuranceStatusArray != null"> <if test="tEmployeeProject.insuranceStatusArray != null and tEmployeeProject.insuranceStatusArray.length > 0">
AND a.INSURANCE_STATUS in AND a.INSURANCE_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.insuranceStatusArray" open="(" <foreach item="idStr" index="index" collection="tEmployeeProject.insuranceStatusArray" open="("
separator="," close=")"> separator="," close=")">
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tEmployeeProject.socialStatusArray != null"> <if test="tEmployeeProject.socialStatusArray != null and tEmployeeProject.socialStatusArray.length > 0">
AND a.SOCIAL_STATUS in AND a.SOCIAL_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.socialStatusArray" open="(" <foreach item="idStr" index="index" collection="tEmployeeProject.socialStatusArray" open="("
separator="," close=")"> separator="," close=")">
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tEmployeeProject.fundStatusArray != null"> <if test="tEmployeeProject.fundStatusArray != null and tEmployeeProject.fundStatusArray.length > 0">
AND a.FUND_STATUS in AND a.FUND_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeProject.fundStatusArray" open="(" <foreach item="idStr" index="index" collection="tEmployeeProject.fundStatusArray" open="("
separator="," close=")"> separator="," close=")">
...@@ -727,32 +727,44 @@ ...@@ -727,32 +727,44 @@
) )
</foreach> </foreach>
</insert> </insert>
<update id="updateReduceEmpProject" parameterType="java.util.List">
update t_employee_project
<trim prefix="set" suffixOverrides=",">
<trim prefix="LEAVE_TIME =case" suffix="end,">
<foreach collection="list" item="i" index="index">
when ID=#{i.id} then now()
</foreach>
</trim>
<trim prefix="LEAVE_REASON =case" suffix="end,">
<foreach collection="list" item="i" index="index">
<if test="i.leaveReason!=null">
when ID=#{i.id} then #{i.leaveReason}
</if>
</foreach>
</trim>
<trim prefix="LEAVE_REMARK =case" suffix="end,">
<foreach collection="list" item="i" index="index">
<if test="i.leaveRemark!=null">
when ID=#{i.id} then #{i.leaveRemark}
</if>
</foreach>
</trim>
<trim prefix="PROJECT_STATUS =case" suffix="end,">
<foreach collection="list" item="i" index="index">
when ID=#{i.id} then 1
</foreach>
</trim>
</trim>
where
<foreach collection="list" separator="or" item="i" index="index" >
ID=#{i.id}
</foreach>
</update>
<!--查询部门编码和最大员工数--> <!--查询部门编码和最大员工数-->
<select id="findEmployeeMaxOnlyNoByDepId" resultType="java.lang.String"> <select id="findEmployeeMaxOnlyNoByDepId" resultType="java.lang.String">
SELECT select MAX(EMP_NO) from t_employee_project where
( id not like '%abc' and
SELECT EMP_NO like concat(#{deptNo},'%')
MAX(EMP_NO)
FROM
t_employee_project
WHERE
id not like '%abc'
and
EMP_NO LIKE CONCAT(
(
SELECT
DEPART_NO
FROM
t_settle_domain
WHERE
DEPART_NO = #{deptNo}
),
'%'
)
) AS 'empNo'
FROM
DUAL
</select> </select>
<update id="updateEmpIdById" parameterType="java.util.List"> <update id="updateEmpIdById" parameterType="java.util.List">
...@@ -837,4 +849,32 @@ ...@@ -837,4 +849,32 @@
</if> </if>
</where> </where>
</select> </select>
<!-- 更新项目档案商险状态 -->
<update id="updateEmployeeInsuranceStatus" >
update t_employee_project a set a.INSURANCE_STATUS = #{emp.status} where a.EMP_IDCARD = #{emp.idCard} and a.DEPT_ID = #{emp.deptId}
</update>
<!-- 更新项目档案薪资状态 -->
<update id="updateEmployeeSalaryStatus" >
update t_employee_project a set a.SALARY_STATUS = #{emp.status} where a.EMP_IDCARD = #{emp.idCard} and a.DEPT_NO = #{emp.deptNo}
</update>
<!-- 每月1号更新项目档案薪资状态 -->
<update id="everyMonthUpdateEmployeeSalaryStatus" >
update t_employee_project e set e.SALARY_STATUS = 2
where e.SALARY_STATUS = 1
and NOT EXISTS (
select 1 from view_salary_account_3month a where a.emp_idcard = e.EMP_IDCARD and a.dept_id=e.DEPT_ID
)
</update>
<!-- 每天更新人员档案、项目档案的过期合同为2不在用 -->
<update id="everyDayUpdateEmployeContractStatus" >
update t_employee_project e
join t_employee_contract_info c on e.EMP_IDCARD=c.EMP_IDCARD and e.DEPT_NO=c.DEPT_NO and c.IN_USE='0'
set e.CONTRACT_STATUS=2
where e.CONTRACT_STATUS != 2 and c.CONTRACT_END <![CDATA[ < ]]> DATE_FORMAT(curdate(),"%Y-%m-%d")
</update>
</mapper> </mapper>
...@@ -93,6 +93,16 @@ ...@@ -93,6 +93,16 @@
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
<version>30.1-jre</version> <version>30.1-jre</version>
<scope>compile</scope> <scope>compile</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel-core</artifactId>
<version>3.1.1</version>
<scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>
...@@ -53,6 +53,10 @@ public interface CacheConstants { ...@@ -53,6 +53,10 @@ public interface CacheConstants {
* 字典信息缓存 * 字典信息缓存
*/ */
String DICT_DETAILS = "dict_details"; String DICT_DETAILS = "dict_details";
/**
* 字典转义信息缓存
*/
String REDIS_DICT_LABLE = "redis_dict_lable";
/** /**
* 字典项信息缓存 * 字典项信息缓存
...@@ -113,6 +117,16 @@ public interface CacheConstants { ...@@ -113,6 +117,16 @@ public interface CacheConstants {
* 区域数据--值 * 区域数据--值
*/ */
String AREA_VALUE = "area_value:"; String AREA_VALUE = "area_value:";
/**
* 区域数据--标签
*/
String AREA_LABEL_GROUP = "area_label";
/**
* 区域数据--值
*/
String AREA_VALUE_GROUP = "area_value";
/** /**
* 用户登录的项目vo缓存 * 用户登录的项目vo缓存
*/ */
......
...@@ -294,6 +294,8 @@ public interface CommonConstants { ...@@ -294,6 +294,8 @@ public interface CommonConstants {
**/ **/
String RESULT_DATA_FAIL= "操作失败"; String RESULT_DATA_FAIL= "操作失败";
String RESULT_DATA_SUCESS= "操作成功";
String SAVE_SUCCESS = "保存成功!"; String SAVE_SUCCESS = "保存成功!";
String UPDATE_SUCCESS = "更新成功!"; String UPDATE_SUCCESS = "更新成功!";
...@@ -319,7 +321,7 @@ public interface CommonConstants { ...@@ -319,7 +321,7 @@ public interface CommonConstants {
public static final String ZIP_TYPE = "zip"; public static final String ZIP_TYPE = "zip";
int BATCH_COUNT = 100; int BATCH_COUNT = 100;
int BATCH_COUNT1 = 1000; int BATCH_COUNT1 = 2000;
String IMPORT_DATA_ANALYSIS_ERROR = "数据导入解析异常,请检查表数据格式(1.日期格式:yyyy-MM-dd,2.比例为整数且不含%)"; String IMPORT_DATA_ANALYSIS_ERROR = "数据导入解析异常,请检查表数据格式(1.日期格式:yyyy-MM-dd,2.比例为整数且不含%)";
String CREATE_TIME = "CREATE_TIME"; String CREATE_TIME = "CREATE_TIME";
String ID = "ID"; String ID = "ID";
...@@ -473,6 +475,8 @@ public interface CommonConstants { ...@@ -473,6 +475,8 @@ public interface CommonConstants {
public static final int TWENTY_INT = 20; public static final int TWENTY_INT = 20;
public static final String TWENTY_STRING = "20";
public static final int TWENTY_ONE_STRING = 21; public static final int TWENTY_ONE_STRING = 21;
public static final String ERROR_MSG_PRFIX = "error="; public static final String ERROR_MSG_PRFIX = "error=";
......
...@@ -1471,6 +1471,18 @@ public class DateUtil { ...@@ -1471,6 +1471,18 @@ public class DateUtil {
return thisYear - years + 1; return thisYear - years + 1;
} }
/**
* @param patten 格式
* @Description: 获取今天
* @Author: hgw
* @Date: 2022/11/28 18:06
* @return: java.lang.String
**/
public static String getThisDayByPatten(String patten){
SimpleDateFormat sf = new SimpleDateFormat(patten);
return sf.format(new Date());
}
/** /**
* @Description: 返回当前年月日字符串 * @Description: 返回当前年月日字符串
* @Author: hgw * @Author: hgw
......
package com.yifu.cloud.plus.v1.yifu.common.core.util;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.converters.WriteConverterContext;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.ReadCellData;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import java.util.Map;
/**
* @Author fxj
* @Date 2022/11/24
* @Description
* @Version 1.0
*/
public class DictConverter implements Converter<String>{
public DictConverter(Map<String,String> nameAndDicTypeMap,Map<String,String> redisLabelMap){
this.nameAndDicTypeMap=nameAndDicTypeMap;
this.redisLabelMap=redisLabelMap;
}
private Map<String,String> nameAndDicTypeMap;
private Map<String,String> redisLabelMap;
@Override
public Class<String> supportJavaTypeKey() {
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
/**
* @Author fxj
* @Description 转换成功java 导入用
* @Date 18:24 2022/11/24
**/
@Override
public String convertToJavaData(ReadCellData cellData, ExcelContentProperty contentProperty
, GlobalConfiguration globalConfiguration) {
return cellData.getStringValue();
}
/**
* @Author fxj
* @Description 装换成String 导出用
* @Date 18:25 2022/11/24
**/
@Override
public WriteCellData<String> convertToExcelData(String value, ExcelContentProperty contentProperty
, GlobalConfiguration globalConfiguration) {
if (null != nameAndDicTypeMap && nameAndDicTypeMap.size() > 0){
String dicType = nameAndDicTypeMap.get(contentProperty.getField().getName());
if (null != dicType){
String temp =redisLabelMap.get(dicType+CommonConstants.DOWN_LINE_STRING+value);
return new WriteCellData<>(null==temp?value:temp);
}
}
return new WriteCellData<>(String.valueOf(value));
}
@Override
public WriteCellData<?> convertToExcelData(WriteConverterContext<String> context) throws Exception {
return this.convertToExcelData(context.getValue(), context.getContentProperty(), context.getWriteContext().currentWriteHolder().globalConfiguration());
}
}
...@@ -1125,4 +1125,27 @@ public class ExcelUtil <T> implements Serializable { ...@@ -1125,4 +1125,27 @@ public class ExcelUtil <T> implements Serializable {
} }
} }
} }
public Map<String,String> getConverterDicType() {
// 得到所有定义字段
Field[] allFields = clazz.getDeclaredFields();
Map<String,String> nameDicMap = new HashMap<>();
List<Field> fields = new ArrayList<>();
// 将需要字典表头存起来备用,如果没传,则全部翻译
for (Field field : allFields) {
if (field.isAnnotationPresent(ExcelAttribute.class)) {
fields.add(field);
}
}
ExcelAttribute attr;
Field field;
for (int j = 0; j < fields.size(); j++) {
field = fields.get(j);
attr = field.getAnnotation(ExcelAttribute.class);
if (Common.isNotNull(field) && Common.isNotNull(attr)){
nameDicMap.put(field.getName(),attr.dataType());
}
}
return nameDicMap;
}
} }
/*
* 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.common.core.vo;
import lombok.Data;
import java.io.Serializable;
/**
* 封装更多信息-返回给前端的错误信息
*
* @author hgw
* @date 2022-11-24 16:41:21
*/
@Data
public class ErrorDetailVO implements Serializable {
private static final long serialVersionUID = 1L;
// 行号
private int lineNum;
// 员工姓名
private String empName;
// 身份证号
private String empIdCard;
// 社保户
private String socialHousehold;
// 公积金户
private String providentHousehold;
// 每一行的结果:0错误;1正确(例如:是否允许删除:0否;1是)
private int result = 0;
// 提示信息
private String message;
// 所有行的结果,当第一行的allTrue=1时,需要反馈文件,否则直接提示成功
private int allTrue = 0;
public ErrorDetailVO(Integer lineNum, String message) {
this.lineNum = lineNum;
this.result = 0;
this.message = message;
}
public ErrorDetailVO(Integer lineNum, int result, String empIdCard, String socialHousehold, String providentHousehold, String empName,String message) {
this.lineNum = lineNum;
this.result = result;
this.empIdCard = empIdCard;
this.socialHousehold = socialHousehold;
this.providentHousehold = providentHousehold;
this.empName = empName;
this.message = message;
}
}
...@@ -5,7 +5,6 @@ import com.alibaba.fastjson.TypeReference; ...@@ -5,7 +5,6 @@ import com.alibaba.fastjson.TypeReference;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; 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.vo.*; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
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.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
...@@ -13,7 +12,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; ...@@ -13,7 +12,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
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.dapr.config.DaprArchivesProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
...@@ -187,6 +185,23 @@ public class ArchivesDaprUtil { ...@@ -187,6 +185,23 @@ public class ArchivesDaprUtil {
return res; return res;
} }
/**
* @param idcard
* @Description: 获取档案基本信息
* @Author: huyc
* @Date: 2022/11/28 14:48
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo>
**/
public R<TEmployeeInfo> getTEmployeeInfoByIdcard(String idcard) {
R<TEmployeeInfo> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeinfo/inner/getTEmployeeInfoByIdcard" , idcard, TEmployeeInfo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("获取档案信息失败!");
}
return res;
}
/** /**
* @Description: 获取项目档案基本信息 * @Description: 获取项目档案基本信息
* @Author: hgw * @Author: hgw
...@@ -294,4 +309,38 @@ public class ArchivesDaprUtil { ...@@ -294,4 +309,38 @@ public class ArchivesDaprUtil {
} }
return res; return res;
} }
/**
* @Description: 更新人员档案与项目档案,状态一致。商险的status 0无2正常3失效4处理中
* @Author: hgw
* @Date: 2022/11/23 15:29
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public R<Boolean> updateEmployeeInsuranceStatus(EmpStatusVo empStatusVo){
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeproject/inner/updateEmployeeInsuranceStatus"
, JSON.toJSONString(empStatusVo) , Boolean.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("更新【人员档案、项目档案】的商险状态失败!");
}
return res;
}
/**
* @Description: 仅更新人员档案,项目档案另外更新。商险的status 0无2正常3失效4处理中
* @Author: hgw
* @Date: 2022-11-23 16:50:41
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public R<Boolean> updateEmployeeInfoInsuranceStatus(EmpStatusVo empStatusVo){
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeinfo/inner/updateEmployeeInfoInsuranceStatus"
, JSON.toJSONString(empStatusVo), Boolean.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("更新【人员档案】的商险状态失败!");
}
return res;
}
} }
package com.yifu.cloud.plus.v1.yifu.common.dapr.util; package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo; import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaMap;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo; import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysUserListVo; import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysUserListVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
...@@ -37,6 +38,19 @@ public class UpmsDaprUtils { ...@@ -37,6 +38,19 @@ public class UpmsDaprUtils {
} }
return areaListR; return areaListR;
} }
/**
* 获取所有区域数据
* @Author huyc
* @Date 2022-07-18
* @return
**/
public R<AreaMap> getAreaMapR() {
R<AreaMap> areaListR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(),daprUpmsProperties.getAppId(),"/area/inner/getAreaMap","", AreaMap.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(areaListR)){
return R.failed("获取所有区域数据失败!");
}
return areaListR;
}
/** /**
* @Author fxj * @Author fxj
......
...@@ -42,8 +42,6 @@ import org.springframework.security.core.userdetails.UserDetails; ...@@ -42,8 +42,6 @@ import org.springframework.security.core.userdetails.UserDetails;
@RequiredArgsConstructor @RequiredArgsConstructor
public class YifuUserDetailsServiceImpl implements YifuUserDetailsService { public class YifuUserDetailsServiceImpl implements YifuUserDetailsService {
//private final RemoteUserService remoteUserService;
private final CacheManager cacheManager; private final CacheManager cacheManager;
private final DaprUpmsProperties daprUpmsProperties; private final DaprUpmsProperties daprUpmsProperties;
...@@ -57,13 +55,11 @@ public class YifuUserDetailsServiceImpl implements YifuUserDetailsService { ...@@ -57,13 +55,11 @@ public class YifuUserDetailsServiceImpl implements YifuUserDetailsService {
@SneakyThrows @SneakyThrows
public UserDetails loadUserByUsername(String username) { public UserDetails loadUserByUsername(String username) {
Cache cache = cacheManager.getCache(CacheConstants.USER_DETAILS); Cache cache = cacheManager.getCache(CacheConstants.USER_DETAILS);
Object o = cache.get(username);
if (cache != null && cache.get(username) != null) { if (cache != null && cache.get(username) != null) {
return (YifuUser) cache.get(username).get(); return (YifuUser) cache.get(username).get();
} }
R<UserInfo> result;// = remoteUserService.info(username, SecurityConstants.FROM_IN); R<UserInfo> result = HttpDaprUtil.invokeMethodGet(daprUpmsProperties.getAppUrl(),daprUpmsProperties.getAppId(), "/user/getInfoByUsername", "?username="+username, UserInfo.class);
result = HttpDaprUtil.invokeMethodGet(daprUpmsProperties.getAppUrl(),daprUpmsProperties.getAppId(), "/user/getInfoByUsername", "?username="+username, UserInfo.class);
UserDetails userDetails = getUserDetails(result); UserDetails userDetails = getUserDetails(result);
if (cache != null) { if (cache != null) {
cache.put(username, userDetails); cache.put(username, userDetails);
......
...@@ -25,6 +25,12 @@ ...@@ -25,6 +25,12 @@
<version>1.0.0</version> <version>1.0.0</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-archives-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<!--选配: orm 模块--> <!--选配: orm 模块-->
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
......
...@@ -236,5 +236,15 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -236,5 +236,15 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
**/ **/
int ekpUpdateInsuranceDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept); int ekpUpdateInsuranceDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept);
/**
* @param idCardList
* @Description: 根据身份证列表,查找所有商险
* @Author: hgw
* @Date: 2022/11/23 15:17
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail>
**/
List<TInsuranceDetail> selectByIdCardList(@Param("idCardList") List<String> idCardList
, @Param("idList") List<String> idList);
List<TInsuranceDetail> selectPushList(); List<TInsuranceDetail> selectPushList();
} }
...@@ -19,8 +19,8 @@ spring: ...@@ -19,8 +19,8 @@ spring:
ekp: ekp:
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
username: hroread username: root
password: 123456 password: ekp!@#123
jdbc-url: jdbc:mysql://119.96.192.73:3306/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true jdbc-url: jdbc:mysql://119.96.192.73:3306/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari: hikari:
minimum-idle: 10 # 最小空闲连接数量 minimum-idle: 10 # 最小空闲连接数量
......
...@@ -19,9 +19,9 @@ spring: ...@@ -19,9 +19,9 @@ spring:
ekp: ekp:
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
username: hroread username: root
password: 123456 password: ekp!@#123
jdbc-url: jdbc:mysql://119.96.192.73:3306/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true jdbc-url: jdbc:mysql://36.7.147.19:20023/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari: hikari:
minimum-idle: 10 # 最小空闲连接数量 minimum-idle: 10 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟) idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
......
...@@ -1193,4 +1193,24 @@ ...@@ -1193,4 +1193,24 @@
t_insurance_detail t_insurance_detail
WHERE ERROR_STATUS = '1' WHERE ERROR_STATUS = '1'
</select> </select>
<!--查询所有商险,如果idList 不为空,则不含被替换的本身。 用来改变档案状态-->
<select id="selectByIdCardList" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM
t_insurance_detail
where
DELETE_FLAG = 0 AND EMP_IDCARD_NO in
<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
#{item}
</foreach>
<if test="idList != null">
AND id not in
<foreach item="item" index="index" collection="idList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper> </mapper>
package com.yifu.cloud.plus.v1.job.compont;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* @Author hgw
* @Description 定时任务具体执行类
* @Date 2022-11-24 15:03:14
* @Param
* @return
**/
@Component(value = "archiveTask")
@Slf4j
@EnableConfigurationProperties(DaprArchivesProperties.class)
public class ArchiveTask {
@Autowired
private DaprArchivesProperties daprArchivesProperties;
/**
* @Author hgw
* @Description 每月1号清理人员档案、项目档案的薪资状态
* @Date 2022-11-24 15:06:37
* @Param
**/
public void everyMonthUpdateSalaryStatus() {
log.info("-------------每月1号清理人员档案、项目档案的薪资状态-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(), daprArchivesProperties.getAppId(),
"/temployeeinfo/inner/everyMonthUpdateSalaryStatus", "", Object.class,
SecurityConstants.FROM_IN);
log.info("-------------每月1号清理人员档案、项目档案的薪资状态-定时任务结束------------");
}
/**
* @Author hgw
* @Description 每天更新人员档案、项目档案的过期合同为2不在用
* @Date 2022-11-24 15:06:37
* @Param
**/
public void everyDayUpdateEmployeeContractStatus() {
log.info("-------------每天更新人员档案、项目档案的过期合同为2不在用-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(), daprArchivesProperties.getAppId(),
"/temployeeinfo/inner/everyDayUpdateEmployeeContractStatus", "", Object.class,
SecurityConstants.FROM_IN);
log.info("-------------每天更新人员档案、项目档案的过期合同为2不在用-定时任务结束------------");
}
}
\ No newline at end of file
...@@ -1506,7 +1506,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1506,7 +1506,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
List<TSalaryAccount> aList = new ArrayList<>(); List<TSalaryAccount> aList = new ArrayList<>();
TSalaryAccount a;//定库: TSalaryAccount a;//定库:
BigDecimal relaySalarySum = BigDecimal.ZERO; //工资应发 BigDecimal relaySalarySum = BigDecimal.ZERO; //工资应发
List<TSalaryAccountItem> asList; //累计扣税
int size = savList.size(); int size = savList.size();
// 自有员工人数 // 自有员工人数
int ownNum = 0; int ownNum = 0;
...@@ -1617,7 +1616,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1617,7 +1616,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
/** /**
* @param itemList * @param itemList
* @param itemHistoryList
* @param saiList * @param saiList
* @Description: 计算劳务费个税、应发 * @Description: 计算劳务费个税、应发
* @Author: hgw * @Author: hgw
......
...@@ -117,12 +117,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -117,12 +117,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
searchVo.setLimitStart(i); searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo); list = noPageDiy(searchVo);
if (Common.isNotNull(list)) { /*if (Common.isNotNull(list)) {
util = new ExcelUtil<>(TSalaryEmployeeExportVo.class); util = new ExcelUtil<>(TSalaryEmployeeExportVo.class);
for (TSalaryEmployeeExportVo vo : list) { for (TSalaryEmployeeExportVo vo : list) {
util.convertEntity(vo, null, null, null); util.convertEntity(vo, null, null, null);
} }
} }*/
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
writeSheet = EasyExcel.writerSheet("薪酬人员表" + index).build(); writeSheet = EasyExcel.writerSheet("薪酬人员表" + index).build();
excelWriter.write(list, writeSheet); excelWriter.write(list, writeSheet);
......
...@@ -19,12 +19,15 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl; ...@@ -19,12 +19,15 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.alibaba.excel.EasyExcelFactory; import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpIdCardAndDeptVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
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.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
...@@ -537,12 +540,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -537,12 +540,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
Date sendTime = new Date(); Date sendTime = new Date();
String nowMonth = DateUtil.addMonth(0); String nowMonth = DateUtil.addMonth(0);
EkpSalaryParam salaryParam; EkpSalaryParam salaryParam;
EmpIdCardAndDeptVo empIdCardAndDeptVo;
List<EmpIdCardAndDeptVo> voList = new ArrayList<>();
for (EkpSalaryParamVo sendParam : ekpList) { for (EkpSalaryParamVo sendParam : ekpList) {
salaryParam = new EkpSalaryParam(); salaryParam = new EkpSalaryParam();
BeanUtils.copyProperties(sendParam, salaryParam); BeanUtils.copyProperties(sendParam, salaryParam);
// 转化报账表的参数 // 转化报账表的参数
account = new TSalaryAccount(); account = new TSalaryAccount();
account.setId(sendParam.getFd_3b10af838eab5c()); account.setId(sendParam.getFd_3b10af838eab5c());
// 社保 // 社保
if ((Common.isNotNull(sendParam.getUnitSocial()) if ((Common.isNotNull(sendParam.getUnitSocial())
&& !CommonConstants.ZERO_STRING.equals(sendParam.getUnitSocial())) && !CommonConstants.ZERO_STRING.equals(sendParam.getUnitSocial()))
...@@ -568,6 +574,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -568,6 +574,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
account.setSendStatus(CommonConstants.ONE_STRING); account.setSendStatus(CommonConstants.ONE_STRING);
account.setSendMonth(nowMonth); account.setSendMonth(nowMonth);
account.setEkpId(sendBack); account.setEkpId(sendBack);
empIdCardAndDeptVo = new EmpIdCardAndDeptVo();
empIdCardAndDeptVo.setIdCard(sendParam.getFd_3adfedfb8f76d4());
empIdCardAndDeptVo.setDeptNo(sendParam.getFd_3adfedf98ccba2());
empIdCardAndDeptVo.setStatus(CommonConstants.ONE_STRING);
voList.add(empIdCardAndDeptVo);
} else { } else {
sendStatus = false; sendStatus = false;
TSendEkpError error = new TSendEkpError(); TSendEkpError error = new TSendEkpError();
...@@ -584,6 +595,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -584,6 +595,15 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
accountList.add(account); accountList.add(account);
} }
salaryAccountService.updateBatchById(accountList); salaryAccountService.updateBatchById(accountList);
if (!voList.isEmpty()) {
// 改变档案状态
EmpStatusVo empStatusVo = new EmpStatusVo();
empStatusVo.setEmpInfo(voList);
HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
,"/temployeeproject/inner/updateEmployeeSalaryStatus"
, JSON.toJSONString(empStatusVo) , Boolean.class, SecurityConstants.FROM_IN);
}
if (sendStatus) { if (sendStatus) {
EkpSalaryStandardParam standardParam = new EkpSalaryStandardParam(); EkpSalaryStandardParam standardParam = new EkpSalaryStandardParam();
standardParam.setFd_3b3bf2c3b1a6cc(s.getDeptName()); standardParam.setFd_3b3bf2c3b1a6cc(s.getDeptName());
...@@ -595,12 +615,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -595,12 +615,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
standardParam.setFd_3b3d3ec85bfeb0(s.getSalaryMonth().substring(0,4) standardParam.setFd_3b3d3ec85bfeb0(s.getSalaryMonth().substring(0,4)
+ CommonConstants.CENTER_SPLIT_LINE_STRING + s.getSalaryMonth().substring(4,6)); + CommonConstants.CENTER_SPLIT_LINE_STRING + s.getSalaryMonth().substring(4,6));
// 推送主表信息 // 推送主表信息
String loginName; String loginName = user.getUsername();
if (user != null) {
loginName = user.getUsername();
} else {
loginName = s.getCreateName();
}
sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, standardParam); sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, standardParam);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) { if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, standardParam); sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, standardParam);
...@@ -644,6 +659,31 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -644,6 +659,31 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
} }
} }
/**
* @param isDept true :含项目,要分割字符串; false:不含项目,直接用身份证,仅更新人员档案
* @Description: 提取方法,塞值
* @Author: hgw
* @Date: 2022/11/23 16:48
* @return: com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo
**/
private EmpStatusVo getEmpStatusVo(Map<String, Integer> empStatusMap, boolean isDept) {
EmpStatusVo empStatusVo = new EmpStatusVo();
EmpIdCardAndDeptVo empIdCardAndDeptVo = new EmpIdCardAndDeptVo();
List<EmpIdCardAndDeptVo> voList = new ArrayList<>();
for (Map.Entry<String, Integer> entry : empStatusMap.entrySet()) {
if (isDept) {
empIdCardAndDeptVo.setIdCard(entry.getKey().split(CommonConstants.DOWN_LINE_STRING)[0]);
empIdCardAndDeptVo.setDeptId(entry.getKey().split(CommonConstants.DOWN_LINE_STRING)[1]);
} else {
empIdCardAndDeptVo.setIdCard(entry.getKey());
}
empIdCardAndDeptVo.setStatus(String.valueOf(entry.getValue()));
voList.add(empIdCardAndDeptVo);
}
empStatusVo.setEmpInfo(voList);
return empStatusVo;
}
/** /**
* @Description: 添加流程进展明细 * @Description: 添加流程进展明细
* @Author: hgw * @Author: hgw
......
...@@ -166,7 +166,6 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -166,7 +166,6 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
@Override @Override
public void importDiy(HttpServletResponse response, List<TStatisticsBonusImportVo> list, String deptId){ public void importDiy(HttpServletResponse response, List<TStatisticsBonusImportVo> list, String deptId){
String fileName = "全年一次性奖金测算导出" + DateUtil.getThisTime() + CommonConstants.XLSX; String fileName = "全年一次性奖金测算导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
ServletOutputStream out = null;
//本次纳税额 //本次纳税额
BigDecimal res; BigDecimal res;
//应发工资合计 //应发工资合计
...@@ -192,8 +191,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -192,8 +191,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
BigDecimal twlSalaryTax; BigDecimal twlSalaryTax;
//12月社保公积金扣费 //12月社保公积金扣费
BigDecimal socialFundTax; BigDecimal socialFundTax;
try { try(ServletOutputStream out = response.getOutputStream()) {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA); response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8")); response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
...@@ -373,10 +371,17 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -373,10 +371,17 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
if (wSalary.compareTo(oneBecimal) <= 0) { if (wSalary.compareTo(oneBecimal) <= 0) {
if (!isSend) { if (!isSend) {
minSalary = socialFundTax; minSalary = socialFundTax;
maxAnualSalary = BigDecimalUtils.safeSubtract(wSalary,socialFundTax);
} }
}else { }else {
minSalary = BigDecimalUtils.safeSubtract(wSalary,new BigDecimal("36000"));
maxAnualSalary = new BigDecimal("36000");
}
} else if (BigDecimalUtils.safeSubtract(BigDecimalUtils.safeAdd(ySalary, wSalary), sumDeductSalary).
compareTo(new BigDecimal("72000")) <= 0) {
if (wSalary.compareTo(new BigDecimal("36000")) <= 0) {
if (isSend) { if (isSend) {
minSalary = subOneBecimal; maxAnualSalary = wSalary;
} else { } else {
minSalary = subOneBecimal.compareTo(socialFundTax) >0 ? subOneBecimal : socialFundTax; minSalary = subOneBecimal.compareTo(socialFundTax) >0 ? subOneBecimal : socialFundTax;
} }
...@@ -386,10 +391,17 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -386,10 +391,17 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
if (wSalary.compareTo(oneBecimal) <= 0) { if (wSalary.compareTo(oneBecimal) <= 0) {
if (!isSend) { if (!isSend) {
minSalary = socialFundTax; minSalary = socialFundTax;
maxAnualSalary = BigDecimalUtils.safeSubtract(wSalary,socialFundTax);
} }
}else { }else {
minSalary = BigDecimalUtils.safeSubtract(wSalary,new BigDecimal("36000"));
maxAnualSalary = new BigDecimal("36000");
}
}else if (BigDecimalUtils.safeSubtract(BigDecimalUtils.safeAdd(ySalary, wSalary), sumDeductSalary).
compareTo(new BigDecimal("203100")) <= 0) {
if (wSalary.compareTo(new BigDecimal("36000")) <= 0) {
if (isSend) { if (isSend) {
minSalary = subOneBecimal; maxAnualSalary = wSalary;
} else { } else {
minSalary = subOneBecimal.compareTo(socialFundTax) >0 ? subOneBecimal : socialFundTax; minSalary = subOneBecimal.compareTo(socialFundTax) >0 ? subOneBecimal : socialFundTax;
} }
...@@ -412,10 +424,17 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -412,10 +424,17 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
if (wSalary.compareTo(twoBecimal) <= 0) { if (wSalary.compareTo(twoBecimal) <= 0) {
if (!isSend) { if (!isSend) {
minSalary = socialFundTax; minSalary = socialFundTax;
maxAnualSalary = BigDecimalUtils.safeSubtract(wSalary,socialFundTax);
} }
}else { }else {
minSalary = BigDecimalUtils.safeSubtract(wSalary,new BigDecimal("144000"));
maxAnualSalary = new BigDecimal("144000");
}
}else if (BigDecimalUtils.safeSubtract(BigDecimalUtils.safeAdd(ySalary, wSalary), sumDeductSalary).
compareTo(new BigDecimal("672000")) <= 0) {
if (wSalary.compareTo(new BigDecimal("144000")) <= 0) {
if (isSend) { if (isSend) {
minSalary = subTwoBecimal; maxAnualSalary = wSalary;
} else { } else {
minSalary = subTwoBecimal.compareTo(socialFundTax) >0 ? subTwoBecimal : socialFundTax; minSalary = subTwoBecimal.compareTo(socialFundTax) >0 ? subTwoBecimal : socialFundTax;
} }
...@@ -493,16 +512,8 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -493,16 +512,8 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
} }
out.flush(); out.flush();
excelWriter.finish(); excelWriter.finish();
}catch (Exception e){ }catch (Exception e) {
log.error("执行异常" ,e); log.error("执行异常", e);
}finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
} }
} }
...@@ -520,7 +531,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap ...@@ -520,7 +531,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
* @return: java.math.BigDecimal * @return: java.math.BigDecimal
**/ **/
private static JSONObject calculationPersonSalary(List<TSalaryTaxConfig> personTax, List<TSalaryTaxConfig> annousTax, private static JSONObject calculationPersonSalary(List<TSalaryTaxConfig> personTax, List<TSalaryTaxConfig> annousTax,
BigDecimal minSalary, BigDecimal wSalary, BigDecimal sumTax, BigDecimal ySalary, BigDecimal minSalary,BigDecimal wSalary, BigDecimal sumTax, BigDecimal ySalary,
BigDecimal sumDeductSalary, BigDecimal twlSalaryTax) { BigDecimal sumDeductSalary, BigDecimal twlSalaryTax) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
BigDecimal anRes; BigDecimal anRes;
......
...@@ -182,8 +182,34 @@ ...@@ -182,8 +182,34 @@
<select id="noPageDiy" resultMap="salaryEmployeeExportMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo"> <select id="noPageDiy" resultMap="salaryEmployeeExportMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo">
SELECT SELECT
<include refid="Base_Column_List"/> a.ID,
a.EMP_NAME,
a.EMP_IDCARD,
a.UNIT_ID,
a.UNIT_NAME,
a.UNIT_NO,
a.DEPT_ID,
a.DEPT_NAME,
a.DEPT_NO,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME,
a.BANK_NAME,
a.BANK_SUB_NAME,
a.BANK_NO,
a.INVOICE_TITLE,
a1.area_name as "BANK_PROVINCE",
a2.area_name as "BANK_CITY",
a.EMP_PHONE,
a.TAX_MONTH,
case when a.FILE_STATUS = 0 then "在职"
when a.FILE_STATUS = 1 then "离职"
else null end as "FILE_STATUS"
FROM t_salary_employee a FROM t_salary_employee a
left join sys_area a1 on a1.id=a.BANK_PROVINCE
left join sys_area a2 on a2.id=a.BANK_CITY
<where> <where>
1=1 1=1
<include refid="where_export"/> <include refid="where_export"/>
......
...@@ -22,9 +22,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; ...@@ -22,9 +22,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex; import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -43,7 +41,6 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable { ...@@ -43,7 +41,6 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
@Schema(description ="员工姓名") @Schema(description ="员工姓名")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工姓名") @ExcelProperty("员工姓名")
@Size(max = 20, message = "员工姓名不可超过20位")
private String empName; private String empName;
/** /**
...@@ -53,7 +50,6 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable { ...@@ -53,7 +50,6 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
@Schema(description ="员工编码") @Schema(description ="员工编码")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工编码") @ExcelProperty("员工编码")
@Size(max = 32, message = "员工编码不可超过32位")
private String empNo; private String empNo;
/** /**
...@@ -63,7 +59,6 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable { ...@@ -63,7 +59,6 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
@Schema(description ="身份证号") @Schema(description ="身份证号")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证号") @ExcelProperty("身份证号")
@Size(max = 32, message = "身份证号不可超过32位")
private String empIdcard; private String empIdcard;
/** /**
...@@ -87,7 +82,6 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable { ...@@ -87,7 +82,6 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
/** /**
* 项目编码 * 项目编码
*/ */
@Length(max = 50, message = "项目编码不能超过50个字符" )
@ExcelAttribute(name = "项目编码", maxLength = 50) @ExcelAttribute(name = "项目编码", maxLength = 50)
@Schema(description = "项目编码" ) @Schema(description = "项目编码" )
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
...@@ -124,9 +118,8 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable { ...@@ -124,9 +118,8 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
/** /**
* 社保缴纳月份 * 社保缴纳月份
*/ */
@ExcelAttribute(name = "社保缴纳月份", maxLength = 6,isInteger = true) @ExcelAttribute(name = "社保缴纳月份")
@Schema(description ="社保缴纳月份") @Schema(description ="社保缴纳月份")
@Length(max = 6, message = "社保缴纳月份不能超过6个字符")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保缴纳月份") @ExcelProperty("社保缴纳月份")
private String socialPayMonth; private String socialPayMonth;
...@@ -134,8 +127,7 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable { ...@@ -134,8 +127,7 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
/** /**
* 社保生成月份 * 社保生成月份
*/ */
@ExcelAttribute(name = "社保生成月份", maxLength = 6,isInteger = true) @ExcelAttribute(name = "社保生成月份")
@Length(max = 6, message = "社保生成月份不能超过6个字符")
@Schema(description ="社保生成月份") @Schema(description ="社保生成月份")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保生成月份") @ExcelProperty("社保生成月份")
...@@ -153,8 +145,7 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable { ...@@ -153,8 +145,7 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
/** /**
* 公积金缴纳月份 * 公积金缴纳月份
*/ */
@ExcelAttribute(name = "公积金缴纳月份", maxLength = 6,isInteger = true) @ExcelAttribute(name = "公积金缴纳月份")
@Length(max = 6, message = "公积金缴纳月份不能超过6个字符")
@Schema(description ="公积金缴纳月份") @Schema(description ="公积金缴纳月份")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金缴纳月份") @ExcelProperty("公积金缴纳月份")
...@@ -163,8 +154,7 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable { ...@@ -163,8 +154,7 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
/** /**
* 公积金生成月份 * 公积金生成月份
*/ */
@ExcelAttribute(name = "公积金生成月份", maxLength = 6,isInteger = true) @ExcelAttribute(name = "公积金生成月份")
@Length(max = 6, message = "公积金生成月份不能超过6个字符")
@Schema(description ="公积金生成月份") @Schema(description ="公积金生成月份")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金生成月份") @ExcelProperty("公积金生成月份")
...@@ -188,60 +178,6 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable { ...@@ -188,60 +178,6 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
@ExcelProperty("公积金缴纳地") @ExcelProperty("公积金缴纳地")
private String providentPayAddr; private String providentPayAddr;
/**
* 公积金缴纳地-省
*/
@ExcelAttribute(name = "公积金缴纳地-省", isArea = true)
@Schema(description ="公积金缴纳地-省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金缴纳地-省")
private String fundProvince;
/**
* 公积金缴纳地-市
*/
@ExcelAttribute(name = "公积金缴纳地-市",isArea = true, parentField = "fundProvince")
@Schema(description ="公积金缴纳地-市")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金缴纳地-市")
private String fundCity;
/**
* 公积金缴纳地-县
*/
@ExcelAttribute(name = "公积金缴纳地-县",isArea = true, parentField = "fundCity")
@Schema(description ="公积金缴纳地-县")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金缴纳地-县")
private String fundTown;
/**
* 社保缴纳地-省
*/
@ExcelAttribute(name = "社保缴纳地-省",isArea = true)
@Schema(description ="社保缴纳地-省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保缴纳地-省")
private String socialProvince;
/**
* 社保缴纳地-市
*/
@ExcelAttribute(name = "社保缴纳地-市", isArea = true, parentField = "socialProvince")
@Schema(description ="社保缴纳地-市")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保缴纳地-市")
private String socialCity;
/**
* 社保缴纳地-县
*/
@ExcelAttribute(name = "社保缴纳地-县", isArea = true, parentField = "socialCity")
@Schema(description ="社保缴纳地-县")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保缴纳地-县")
private String socialTown;
/** /**
* 社保合计 * 社保合计
*/ */
...@@ -304,35 +240,35 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable { ...@@ -304,35 +240,35 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
/** /**
* 单位养老基数 * 单位养老基数
*/ */
@ExcelAttribute(name = "养老基数", isFloat = true,max = "999999999.99") @ExcelAttribute(name = "养老基数")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老基数") @ExcelProperty("养老基数")
private BigDecimal unitPensionSet; private BigDecimal unitPensionSet;
/** /**
* 单位医疗基数 * 单位医疗基数
*/ */
@ExcelAttribute(name = "医疗基数", isFloat = true,max = "999999999.99") @ExcelAttribute(name = "医疗基数")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗基数") @ExcelProperty("医疗基数")
private BigDecimal unitMedicalSet; private BigDecimal unitMedicalSet;
/** /**
* 单位失业基数 * 单位失业基数
*/ */
@ExcelAttribute(name = "失业基数", isFloat = true,max = "999999999.99") @ExcelAttribute(name = "失业基数")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业基数") @ExcelProperty("失业基数")
private BigDecimal unitUnemploymentSet; private BigDecimal unitUnemploymentSet;
/** /**
* 单位工伤基数 * 单位工伤基数
*/ */
@ExcelAttribute(name = "工伤基数", isFloat = true,max = "999999999.99") @ExcelAttribute(name = "工伤基数")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤基数") @ExcelProperty("工伤基数")
private BigDecimal unitInjurySet; private BigDecimal unitInjurySet;
/** /**
* 单位生育基数 * 单位生育基数
*/ */
@ExcelAttribute(name = "生育基数", isFloat = true,max = "999999999.99") @ExcelAttribute(name = "生育基数")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育基数") @ExcelProperty("生育基数")
private BigDecimal unitBirthSet;; private BigDecimal unitBirthSet;;
...@@ -409,15 +345,14 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable { ...@@ -409,15 +345,14 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
/** /**
* 公积金编号 * 公积金编号
*/ */
@ExcelAttribute(name = "公积金编号", maxLength = 20) @ExcelAttribute(name = "公积金编号")
@Size(max = 20, message = "公积金编号不可超过20位")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金编号") @ExcelProperty("公积金编号")
private String providentNo; private String providentNo;
/** /**
* 单位公积金基数 * 单位公积金基数
*/ */
@ExcelAttribute(name = "单位公积金基数", isFloat = true,max = "999999999.99") @ExcelAttribute(name = "单位公积金基数")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位公积金基数") @ExcelProperty("单位公积金基数")
private BigDecimal unitProvidentSet; private BigDecimal unitProvidentSet;
...@@ -438,7 +373,7 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable { ...@@ -438,7 +373,7 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
/** /**
* 个人公积金基数 * 个人公积金基数
*/ */
@ExcelAttribute(name = "个人公积金基数", isFloat = true,max = "999999999.99") @ExcelAttribute(name = "个人公积金基数")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金基数") @ExcelProperty("个人公积金基数")
private BigDecimal personalProidentSet; private BigDecimal personalProidentSet;
...@@ -453,7 +388,7 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable { ...@@ -453,7 +388,7 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
/** /**
* 社保创建人姓名 * 社保创建人姓名
*/ */
@ExcelAttribute(name = "社保创建人姓名", maxLength = 32) @ExcelAttribute(name = "社保创建人姓名")
@Schema(description = "社保创建人姓名") @Schema(description = "社保创建人姓名")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保创建人姓名") @ExcelProperty("社保创建人姓名")
...@@ -468,7 +403,7 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable { ...@@ -468,7 +403,7 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
/** /**
* 公积金创建人姓名 * 公积金创建人姓名
*/ */
@ExcelAttribute(name = "公积金创建人姓名", maxLength = 32) @ExcelAttribute(name = "公积金创建人姓名")
@Schema(description = "公积金创建人姓名") @Schema(description = "公积金创建人姓名")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("公积金创建人姓名") @ExcelProperty("公积金创建人姓名")
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.social.vo; package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
...@@ -43,10 +45,18 @@ public class TPaymentInfoSearchVo extends TPaymentInfo { ...@@ -43,10 +45,18 @@ public class TPaymentInfoSearchVo extends TPaymentInfo {
private List<String> idList; private List<String> idList;
/** /**
* 创建时间区间 [开始时间,结束时间] * 开始时间(查询专用)
*/ */
@Schema(description = "创建时间区间") @ExcelAttribute(name = "创建开始时间")
private LocalDateTime[] createTimes; @TableField(exist = false)
private LocalDateTime createTimeStart;
/**
* 截止时间(查询专用)
*/
@ExcelAttribute(name = "创建截止时间")
@TableField(exist = false)
private LocalDateTime createTimeEnd;
/** /**
* @Author fxj * @Author fxj
* 查询数据起 * 查询数据起
......
...@@ -11,4 +11,5 @@ public class PaymentConstants { ...@@ -11,4 +11,5 @@ public class PaymentConstants {
public static final String UNEMPLOYEEMENT_RISK = "失业保险"; public static final String UNEMPLOYEEMENT_RISK = "失业保险";
public static final String INJURY_RISK = "工伤保险"; public static final String INJURY_RISK = "工伤保险";
public static final String MEDICAL = "医疗"; public static final String MEDICAL = "医疗";
public static final String EXPORT = "缴费库合并导出";
} }
...@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
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.ErrorDetailVO;
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.annotation.Inner; import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.HaveSalaryNoSocialSearchVo;
...@@ -146,7 +147,7 @@ public class TPaymentInfoController { ...@@ -146,7 +147,7 @@ public class TPaymentInfoController {
@SysLog("批量新增缴费库") @SysLog("批量新增缴费库")
@PostMapping("/importListAdd") @PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_batchImport')") @PreAuthorize("@pms.hasPermission('social_tpaymentinfo_batchImport')")
public R<List<ErrorMessage>> importListAdd(@RequestBody MultipartFile file, @RequestParam String random) { public R<List<ErrorDetailVO>> importListAdd(@RequestBody MultipartFile file, @RequestParam String random) {
return tPaymentInfoService.importSocialDiy(file.getInputStream()); return tPaymentInfoService.importSocialDiy(file.getInputStream());
} }
...@@ -160,7 +161,7 @@ public class TPaymentInfoController { ...@@ -160,7 +161,7 @@ public class TPaymentInfoController {
@Operation(description = "导入省市社保-合肥三险") @Operation(description = "导入省市社保-合肥三险")
@SysLog("批量新增缴费库-合肥三险") @SysLog("批量新增缴费库-合肥三险")
@PostMapping("/importListSocialHeFei") @PostMapping("/importListSocialHeFei")
public R<List<ErrorMessage>> importListSocialHeFei(@RequestBody MultipartFile file, @RequestParam String random, public R<List<ErrorDetailVO>> importListSocialHeFei(@RequestBody MultipartFile file, @RequestParam String random,
@RequestParam(value = "type") String type) { @RequestParam(value = "type") String type) {
return tPaymentInfoService.importSocialHeFeiDiy(file.getInputStream(), random, type); return tPaymentInfoService.importSocialHeFeiDiy(file.getInputStream(), random, type);
} }
...@@ -176,7 +177,7 @@ public class TPaymentInfoController { ...@@ -176,7 +177,7 @@ public class TPaymentInfoController {
@SysLog("导入公积金") @SysLog("导入公积金")
@PostMapping("/batchImportPaymentFundInfo") @PostMapping("/batchImportPaymentFundInfo")
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_batchImport')") @PreAuthorize("@pms.hasPermission('social_tpaymentinfo_batchImport')")
public R<List<ErrorMessage>> importListFund(@RequestBody MultipartFile file) { public R<List<ErrorDetailVO>> importListFund(@RequestBody MultipartFile file) {
return tPaymentInfoService.batchImportPaymentFundInfo(file.getInputStream()); return tPaymentInfoService.batchImportPaymentFundInfo(file.getInputStream());
} }
...@@ -402,9 +403,9 @@ public class TPaymentInfoController { ...@@ -402,9 +403,9 @@ public class TPaymentInfoController {
@Operation(summary = "手动推送社保缴费库明细的数据", description = "手动推送社保缴费库明细的数据") @Operation(summary = "手动推送社保缴费库明细的数据", description = "手动推送社保缴费库明细的数据")
@SysLog("手动推送社保缴费库明细的数据") @SysLog("手动推送社保缴费库明细的数据")
@PostMapping("/pushPaymentSocialFundInfo") @PostMapping("/pushPaymentSocialFundInfo")
public R<Boolean> pushPaymentSocialFundInfo() { public R<Boolean> pushPaymentSocialFundInfo(@RequestBody TPaymentInfoSearchVo searchVo) {
tPaymentInfoService.pushPaymentSocialFundInfo(); tPaymentInfoService.pushPaymentSocialFundInfo(searchVo);
return R.ok(null,"需要推送请联系系统管理员"); return R.ok();
} }
/** /**
...@@ -418,4 +419,17 @@ public class TPaymentInfoController { ...@@ -418,4 +419,17 @@ public class TPaymentInfoController {
public R<String> changeDeptByEkp(@RequestBody ChangeDeptVo changeDeptVo) { public R<String> changeDeptByEkp(@RequestBody ChangeDeptVo changeDeptVo) {
return tPaymentInfoService.changeDeptByEkp(changeDeptVo); return tPaymentInfoService.changeDeptByEkp(changeDeptVo);
} }
/**
* @Description: 批量标识可以推送的数据
* @Author: huyc
* @Date: 2022/11/16
* @return: R
**/
@Operation(summary = "批量标识可以推送的数据", description = "批量标识可以推送的数据")
@SysLog("批量标识可以推送的数据")
@PostMapping("/batchUpdatePaymentInfo")
public R<Boolean> batchUpdatePaymentInfo(@RequestBody TPaymentInfoSearchVo searchVo) {
return tPaymentInfoService.batchUpdatePaymentInfo(searchVo);
}
} }
...@@ -156,4 +156,16 @@ public class TSocialFundInfoController { ...@@ -156,4 +156,16 @@ public class TSocialFundInfoController {
tSocialFundInfoService.updateSocialAndFoundInfo(list); tSocialFundInfoService.updateSocialAndFoundInfo(list);
} }
/**
* @Description: 查找社保公积金,是否都派减或为空,允许直接审核通过合同——盛宇2022年11月28日09:18:38
* @Author: hgw
* @Date: 2022/11/28 9:18
* @return: void
**/
@Inner
@PostMapping("/inner/selectSocialFoundByContract")
public int selectSocialFoundByContract(@RequestBody TSocialFundInfo sf) {
return tSocialFundInfoService.selectSocialFoundByContract(sf);
}
} }
...@@ -24,7 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo; ...@@ -24,7 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptDetailVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoBatchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo;
...@@ -61,7 +61,7 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> { ...@@ -61,7 +61,7 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
* @param searchVo 缴费库 * @param searchVo 缴费库
* @return * @return
*/ */
List<TPaymentInfo> getTPaymentInfoNoPage(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo); List<TPaymentInfoBatchVo> getTPaymentInfoNoPage(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
/** /**
* 缴费库合并导出查询 * 缴费库合并导出查询
...@@ -91,13 +91,6 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> { ...@@ -91,13 +91,6 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
**/ **/
TPaymentInfoVo getAllInfoById(String id); TPaymentInfoVo getAllInfoById(String id);
/**
* 查询要删除的数据
* @param queryEntity
* @return
**/
List<TPaymentInfo> selectListForDelete(@Param("queryEntity")TPaymentInfo queryEntity);
/* /*
* 已存在社保缴费库数据 非删除状态 * 已存在社保缴费库数据 非删除状态
* @param months * @param months
...@@ -164,4 +157,43 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> { ...@@ -164,4 +157,43 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
**/ **/
int changePaymentDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept); int changePaymentDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept);
/**
* 缴费库未打标数据查询
* @param searchVo 缴费库
* @return
*/
List<String> getTPaymentInfoList(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
/**
* 缴费库社保推送查询
* @param searchVo 缴费库
* @return
*/
List<TPaymentInfo> getTPaymentSocialPushInfo(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
/**
* 缴费库公积金推送查询
* @param searchVo 缴费库
* @return
*/
List<TPaymentInfo> getTPaymentFundPushInfo(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
/**
* 缴费库社保收入推送查询
* @param searchVo 缴费库
* @return
*/
List<TPaymentInfo> getTPaymentSocialIncomeInfo(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
/**
* 缴费库公积金收入推送查询
* @param searchVo 缴费库
* @return
*/
List<TPaymentInfo> getTPaymentFundIncomeInfo(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
void updateBySocialPayment(@Param("id")String id);
void updateBySocialIncomePayment(@Param("id")String id);
} }
...@@ -67,4 +67,6 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> { ...@@ -67,4 +67,6 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> {
void updateSocialAndFoundInfoF(@Param("infoVo") UpdateSocialFoundVo infoVo); void updateSocialAndFoundInfoF(@Param("infoVo") UpdateSocialFoundVo infoVo);
int selectSocialFoundByContract(@Param("tSocialFundInfo") TSocialFundInfo tSocialFundInfo);
} }
...@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; ...@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
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.social.entity.TIncome; import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail; import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -65,7 +66,7 @@ public interface TIncomeService extends IService<TIncome> { ...@@ -65,7 +66,7 @@ public interface TIncomeService extends IService<TIncome> {
* @Date: 2022/9/9 11:42 * @Date: 2022/9/9 11:42
* @return: * @return:
**/ **/
void saveBathDetail(List<TIncomeDetail> tIncomeDetail); boolean saveBathDetail(TIncomeDetail tIncomeDetail, TPaymentInfo paymentInfo);
void pushDetail(); void pushDetail();
......
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