Commit 5fc31baa authored by hongguangwu's avatar hongguangwu

Merge branch 'develop'

parents 7cdbe5c5 875e844b
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* HCM档案子Vo
* @author hgw
* @date 2023-11-23 12:02:03
*/
@Data
@ColumnWidth(30)
public class HcmArchiveBasicVo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "员工姓名")
private String empName;
@Schema(description = "身份证号")
private String empIdCard;
@Schema(description = "邮箱")
private String email;
@Schema(description = "出生日期")
private String bornDate;
@Schema(description = "性别")
private String sex;
@Schema(description = "最高学历")
private String education;
// 户口性质
@Schema(description = "户口类型")
private String residentType;
@Schema(description = "婚姻状况")
private String maritalStatus;
@Schema(description = "民族")
private String nation;
// 户籍所在地
@Schema(description = "籍贯")
private String nativePlace;
@Schema(description = "政治面貌")
private String political;
// 通讯地址
@Schema(description = "联系地址")
private String contactAddress;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* HCM档案子Vo
*
* @author hgw
* @date 2023-11-23 12:02:03
*/
@Data
@ColumnWidth(30)
public class HcmArchiveCertificateVo implements Serializable {
private static final long serialVersionUID = 1L;
// 资格类型
@Schema(description = "证照名称")
private String certificateName;
// 证书编号
@Schema(description = "证照编号")
private String certificateNo;
// 评定机构
@Schema(description = "发证机构")
private String certificateOrg;
// 无
@Schema(description = "发证日期")
private String certificateDate;
// 无
@Schema(description = "到期时间")
private String certificateExpireDate;
// 附件
@Schema(description = "证照附件")
private String annex;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* HCM档案子Vo
*
* @author hgw
* @date 2023-11-23 12:02:03
*/
@Data
@ColumnWidth(30)
public class HcmArchiveEducationVo implements Serializable {
private static final long serialVersionUID = 1L;
// 学校
@Schema(description = "学校名称")
private String schoolName;
// 工作部门
@Schema(description = "专业")
private String major;
// 工作岗位
@Schema(description = "学历")
private String education;
// 入学时间
@Schema(description = "入校日期")
private String joinDate;
// 毕业时间
@Schema(description = "毕业日期")
private String leaveDate;
// 学制类型
@Schema(description = "是否全日制")
private String isFullTime;
// 附件
@Schema(description = "学历附件")
private String annex;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* HCM档案子Vo
*
* @author hgw
* @date 2023-11-23 12:02:03
*/
@Data
@ColumnWidth(30)
public class HcmArchiveFamilyVo implements Serializable {
private static final long serialVersionUID = 1L;
// 与本人关系
@Schema(description = "称谓")
private String relationName;
// 成员姓名
@Schema(description = "姓名")
private String trueName;
// 出生日期
@Schema(description = "出生年月")
private String bornTime;
// 无
@Schema(description = "政治面貌")
private String political;
// 工作单位
@Schema(description = "工作/学习单位")
private String company;
// 无
@Schema(description = "职位/职务")
private String jobName;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* HCM档案子Vo
*
* @author hgw
* @date 2023-11-23 12:02:03
*/
@Data
@ColumnWidth(30)
public class HcmArchiveJobVo implements Serializable {
private static final long serialVersionUID = 1L;
// 工作单位
@Schema(description = "公司名称")
private String companyName;
// 工作部门
@Schema(description = "部门")
private String deptName;
// 工作岗位
@Schema(description = "职位")
private String jobName;
// 开始工作日期
@Schema(description = "开始日期")
private String joinDate;
// 结束工作日期
@Schema(description = "结束日期")
private String leaveDate;
// 无
@Schema(description = "职位描述")
private String remark;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* HCM档案子Vo
*
* @author hgw
* @date 2023-11-23 12:02:03
*/
@Data
@ColumnWidth(30)
public class HcmContractVo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "合同类型")
private String contractType;
// 签订期限
@Schema(description = "期限类型")
private String termType;
// 无
@Schema(description = "合同签订日期")
private String contractDate;
// 合同甲方
@Schema(description = "合同公司")
private String contractCompany;
// 合同编码
@Schema(description = "合同编号")
private String contractCode;
// 合同起始日期
@Schema(description = "合同开始日期")
private String startDate;
// 合同截止日期
@Schema(description = "合同结束日期")
private String endDate;
@Schema(description = "合同状态")
private String contractStatus;
// 附件
@Schema(description = "合同附件")
private String annexArray;
// 无
@Schema(description = "合同负责人")
private String contractOwner;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 项目档案表excel对应的实体
*
* @author huyc
* @date 2022-06-20 17:54:40
*/
@Data
@ColumnWidth(30)
public class HcmEmployeeInfoVO extends RowIndex implements Serializable {
private static final long serialVersionUID = 1L;
// 基本信息
private HcmArchiveBasicVo archiveBasic;
// 工作经历
private List<HcmArchiveJobVo> archiveJob;
// 教育经历-含附件
private List<HcmArchiveEducationVo> archiveEducation;
// 资格证书-含附件
private List<HcmArchiveCertificateVo> archiveCertificate;
// 家庭成员
private List<HcmArchiveFamilyVo> archiveFamily;
// 合同信息-含附件
private List<HcmContractVo> contract;
}
......@@ -8,6 +8,7 @@
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu</artifactId>
<version>1.0.0</version>
<relativePath/>
</parent>
<artifactId>yifu-archives-biz</artifactId>
......
......@@ -477,4 +477,32 @@ public class TEmployeeInfoController {
tEmployeeInfoService.everyDayUpdateEmployeeContractStatus();
}
/**
* @param idCard
* @Description: HCM获取人员信息
* @Author: hgw
* @Date: 2023/11/23 11:42
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.vo.HcmEmployeeInfoVO>
**/
@Operation(description = "HCM获取人员信息")
@SysLog("HCM获取人员信息--HCM调用接口")
@GetMapping("/getHcmEmpInfo")
public R<HcmEmployeeInfoVO> getHcmEmpInfo(@RequestParam String idCard) {
return tEmployeeInfoService.getHcmEmpInfo(idCard);
}
/**
* @param idCardList
* @Description: HCM获取人员信息列表
* @Author: hgw
* @Date: 2023/11/23 11:43
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.archives.vo.HcmEmployeeInfoVO>>
**/
@Operation(description = "HCM获取人员信息列表")
@SysLog("HCM获取人员信息列表--HCM调用接口")
@PostMapping("/getHcmEmpInfoList")
public R<List<HcmEmployeeInfoVO>> getHcmEmpInfoList(@RequestBody List<String> idCardList) {
return tEmployeeInfoService.getHcmEmpInfoList(idCardList);
}
}
......@@ -122,4 +122,16 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
int everyDayUpdateEmployeeInfoContractStatus();
void updateContractStatus(@Param("empId") String empId, @Param("status")int status);
// hgw 2023-11-23 11:38:00 HCM获取人员信息
HcmArchiveBasicVo getHcmArchiveBasicVo(@Param("idCard") String idCard);
List<HcmArchiveJobVo> getHcmArchiveJobVo(@Param("idCard") String idCard);
List<HcmArchiveEducationVo> getHcmArchiveEducationVo(@Param("idCard") String idCard);
List<HcmArchiveCertificateVo> getHcmArchiveCertificateVo(@Param("idCard") String idCard);
List<HcmArchiveFamilyVo> getHcmArchiveFamilyVo(@Param("idCard") String idCard);
List<HcmContractVo> getHcmContractVo(@Param("idCard") String idCard);
// hgw 2023-11-23 11:38:00 HCM获取人员信息列表
List<HcmEmployeeInfoVO> getHcmEmpInfoList(@Param("idCardList") List<String> idCardList);
}
......@@ -222,4 +222,23 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
void everyDayUpdateEmployeeContractStatus();
void updateContractStatus(String empId, int status);
/**
* @param idCard
* @Description: HCM获取人员信息
* @Author: hgw
* @Date: 2023/11/23 11:35
* @return: com.yifu.cloud.plus.v1.yifu.archives.vo.HcmEmployeeInfoVO
**/
R<HcmEmployeeInfoVO> getHcmEmpInfo(String idCard);
/**
* @param idCardList
* @Description: HCM获取人员信息列表
* @Author: hgw
* @Date: 2023/11/23 11:35
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.vo.HcmEmployeeInfoVO>
**/
R<List<HcmEmployeeInfoVO>> getHcmEmpInfoList(List<String> idCardList);
}
......@@ -2533,4 +2533,40 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
public void updateContractStatus(String empId, int status) {
baseMapper.updateContractStatus(empId,status);
}
@Override
public R<HcmEmployeeInfoVO> getHcmEmpInfo(String idCard) {
HcmEmployeeInfoVO a = this.getHcmEmployeeInfoVoByIdCard(idCard);
return R.ok(a);
}
@Override
public R<List<HcmEmployeeInfoVO>> getHcmEmpInfoList(List<String> idCardList) {
List<HcmEmployeeInfoVO> list = new ArrayList<>();
HcmEmployeeInfoVO vo;
for (String idCard : idCardList) {
vo = this.getHcmEmployeeInfoVoByIdCard(idCard);
list.add(vo);
}
return R.ok(list);
}
/**
* @param idCard
* @Description: 组装vo
* @Author: hgw
* @Date: 2023/11/23 15:24
* @return: com.yifu.cloud.plus.v1.yifu.archives.vo.HcmEmployeeInfoVO
**/
private HcmEmployeeInfoVO getHcmEmployeeInfoVoByIdCard(String idCard) {
HcmEmployeeInfoVO vo= new HcmEmployeeInfoVO();
// 基础信息
vo.setArchiveBasic(baseMapper.getHcmArchiveBasicVo(idCard));
vo.setArchiveJob(baseMapper.getHcmArchiveJobVo(idCard));
vo.setArchiveEducation(baseMapper.getHcmArchiveEducationVo(idCard));
vo.setArchiveCertificate(baseMapper.getHcmArchiveCertificateVo(idCard));
vo.setArchiveFamily(baseMapper.getHcmArchiveFamilyVo(idCard));
vo.setContract(baseMapper.getHcmContractVo(idCard));
return vo;
}
}
......@@ -44,6 +44,8 @@ security:
- /actuator/**
- /swagger-ui/**
- /fdd/*
- /temployeeinfo/getHcmEmpInfo
- /temployeeinfo/getHcmEmpInfoList
......
......@@ -1191,4 +1191,109 @@
set CONTRACT_STATUS = #{status}
WHERE a.id=#{empId}
</update>
<!-- hgw 根据身份证查询-基础信息 -->
<select id="getHcmArchiveBasicVo" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveBasicVo">
select
a.EMP_NAME empName
,a.EMP_IDCARD empIdCard
,a.EMP_EMAIL email
,a.EMP_EMAIL email
,a.EMP_BIRTHDAY bornDate
,if(a.EMP_SEX='2','女',if(a.EMP_SEX='1','男','-')) sex
,education.label education
,registype.label residentType
,married.label maritalStatus
,nation.label nation
,concat(ifnull(p.AREA_NAME,''),ifnull(c.AREA_NAME,''),ifnull(t.AREA_NAME,'')) nativePlace
,politicalStatus.label political
,a.contact_Address contactAddress
from t_employee_info a
left join sys_area p on p.id=a.ID_PROVINCE
left join sys_area c on c.id=a.ID_CITY
left join sys_area t on t.id=a.ID_TOWN
left join view_sys_dict_item nation on nation.value=a.EMP_NATIONAL and nation.type='emp_national'
left join view_sys_dict_item education on education.value=a.HIGN_EDUCATION and education.type='education'
left join view_sys_dict_item registype on registype.value=a.EMP_REGIS_TYPE and registype.type='emp_registype'
left join view_sys_dict_item married on married.value=a.EMP_MARRI_STATUS and married.type='emp_married'
left join view_sys_dict_item politicalStatus on politicalStatus.value=a.POLITICAL_STATUS and politicalStatus.type='emp_political'
where a.DELETE_FLAG = '0' and a.EMP_IDCARD = #{idCard} limit 1
</select>
<select id="getHcmArchiveJobVo" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveJobVo">
select
a.WORK_UNIT companyName
,a.WORK_DEPART deptName
,a.WORK_JOB jobName
,a.START_DATE joinDate
,a.END_DATE leaveDate
,a.REMARK remark
from t_emp_work_recording a
where a.EMP_IDCARD = #{idCard}
</select>
<select id="getHcmArchiveEducationVo" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveEducationVo">
select
a.SCHOOL schoolName
,a.MAJOR major
,education.label education
,a.ENTRY_DATE joinDate
,a.GRADUTION_DATE leaveDate
,educationType.label isFullTime
,'' annex
from t_emp_education a
left join view_sys_dict_item education on education.value=a.EDUCATION_NAME and education.type='education'
left join view_sys_dict_item educationType on educationType.value=a.type and educationType.type='education_type'
where a.EMP_IDCARD = #{idCard}
</select>
<select id="getHcmArchiveCertificateVo" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveCertificateVo">
select
qualification.label certificateName
,a.CERTIFICATION_NO certificateNo
,a.ASSESSMENT_UNIT certificateOrg
,'' certificateDate
,'' certificateExpireDate
,'' annex
from t_emp_professional_qualification a
left join view_sys_dict_item qualification on qualification.value=a.QUALIFICATION_TYPE and qualification.type='qualification_type'
where a.EMP_IDCARD = #{idCard}
</select>
<select id="getHcmArchiveFamilyVo" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveFamilyVo">
select
relation.label relationName
,a.FAMILY_NAME trueName
,a.BIRTHDAY bornTime
,'' political
,a.WORK_UNIT company
,'' jobName
from t_emp_family a
left join view_sys_dict_item relation on relation.value=a.RELATIONSHIP_SELF and relation.type='family_relation'
where a.EMP_IDCARD = #{idCard}
</select>
<select id="getHcmContractVo" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmContractVo">
select
a.CONTRACT_NAME contractType
,contractType.label termType
,'' contractDate
,a.CONTRACT_PARTY contractCompany
,a.CONTRACT_NO contractCode
,a.CONTRACT_START startDate
,a.CONTRACT_END endDate
,if(a.IN_USE='0','可用','不可用') contractStatus
,'' annexArray
,'' contractOwner
from t_employee_contract_info a
left join view_sys_dict_item contractType on contractType.value=a.CONTRACT_TYPE and contractType.type='employee_contract_type'
where a.EMP_IDCARD = #{idCard}
</select>
<!-- hgw 根据身份证查询 -->
<select id="getHcmEmpInfoList" resultMap="tEmployeeInfoMap">
select
<include refid="baseParam"/>
from t_employee_info a
where a.DELETE_FLAG = '0' and a.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper>
dapr.upms.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.upms.appUrl=http://yifu-upms.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.upms.appId=yifu-upms
dapr.check.appUrl=http://127.0.0.1:3500/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883
#dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883
dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.check.appId=yifu-check
#\u751F\u4EA7
dapr.archives.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.archives.appId=yifu-archives
#\u751F\u4EA7
dapr.social.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.social.appId=yifu-social
#\u6D4B\u8BD5\u73AF\u5883
dapr.archives.appUrl=http://yifu-archives.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.archives.appId=yifu-archives
#\u751F\u4EA7
dapr.salary.appUrl=http://127.0.0.1:3500/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883
dapr.salary.appUrl=http://yifu-salary.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.salary.appId=yifu-salary
#\u6D4B\u8BD5\u73AF\u5883
dapr.social.appUrl=http://yifu-social.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.social.appId=yifu-social
#\u751F\u4EA7
dapr.insurances.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.insurances.appId=yifu-insurances
#\u751F\u4EA7
dapr.business.appUrl=http://127.0.0.1:3500/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883-B\u7AEF\u670D\u52A1
dapr.business.appUrl=http://yifu-business.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.business.appId=yifu-business
#\u751F\u4EA7
dapr.msg.appUrl=http://127.0.0.1:3500/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883-\u6D88\u606F\u63D0\u9192\u670D\u52A1
dapr.msg.appUrl=http://yifu-msg.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.msg.appId=yifu-msg
#\u751F\u4EA7
dapr.permission.appUrl=http://127.0.0.1:3500/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883-EKP\u6743\u9650
dapr.permission.appUrl=http://yifu-permission.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.permission.appId=yifu-permission
\ No newline at end of file
......@@ -279,6 +279,12 @@ public class EkpInsuranceUtil {
}else{
pushParam.setFd_3b178f8ba1a91c(CommonConstants.EMPTY_STRING);
}
//派单客服姓名
if(null != param.getCreateName()){
pushParam.setFd_3c6f0118af2ba6(param.getCreateName());
}else{
pushParam.setFd_3c6f0118af2ba6(CommonConstants.EMPTY_STRING);
}
return pushParam;
}
......
......@@ -130,6 +130,10 @@ public class EKPInsurancePushParam {
*/
private String fd_3b178f8ba1a91c;
/**
* 派单客服姓名
*/
private String fd_3c6f0118af2ba6;
......
ekpfund.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
#ekpfund.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
ekpfund.url=http://36.7.147.29:27007/api/sys-modeling/appModelRestService/addModel
ekpfund.fdModelId=181d741547a691aa68b16149a40de901
ekpfund.fdFlowId=18290af372be55308327273487abf72a
ekpfund.docStatus=20
......
income.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
#income.url=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
#income.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
income.url=http://36.7.147.29:27007/api/sys-modeling/appModelRestService/addModel
income.fdModelIdManage=181d76db26e419a88dba97b0c406689e
income.fdFlowIdManage=182d3b6e522b2690119e70d4ff082136
income.fdModelIdRisk=181d76db26e4112e14b9bb4274d06ba1
......
insurance.insuranceUrl=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
#insurance.insuranceUrl=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
#insurance.insuranceUrl=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
insurance.insuranceUrl=http://36.7.147.29:27007/api/sys-modeling/appModelRestService/addModel
insurance.insuranceFdModelId=181d73279372e5a55438a47d7436ab7e
insurance.insuranceFdFlowId=18267f206233f29cbd3c5ee425c9408a
insurance.insuranceDocStatus=20
......
ekporder.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
#ekporder.url=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
#ekporder.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
ekporder.url=http://36.7.147.29:27007/api/sys-modeling/appModelRestService/addModel
ekporder.orderFdModelId=182f1b7ffe2e96f975564e44e559847d
ekporder.orderFdFlowId=182f1c098ce991ca96bc927408792beb
ekporder.replyFdModelId=182f1bb35bb2156fb9a02904bc88dd8a
......
ekp.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
#ekp.url=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
#ekp.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
ekp.url=http://36.7.147.29:27007/api/sys-modeling/appModelRestService/addModel
ekp.fdModelId=181d7633ff8bc797276d0d3a54e80ad6
ekp.fdFlowId=182b40249c1bc940d7226b941c7a4183
ekp.docStatus=20
......
#ekpsocial.url=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
ekpsocial.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
ekpsocial.url=http://36.7.147.29:27007/api/sys-modeling/appModelRestService/addModel
#ekpsocial.url=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
ekpsocial.fdModelId=181d741547a69ba9dbc12377948e98fd
ekpsocial.fdFlowId=18233028fe91511376b00f74b3a8f3a7
ekpsocial.docStatus=20
......
......@@ -28,7 +28,7 @@ seata:
enable-degrade: false # 降级开关
disable-global-transaction: false # 禁用全局事务(默认false)
grouplist:
default: 192.168.0.153:33091
default: 192.168.1.65:33091
transport:
shutdown:
wait: 3
......
......@@ -178,6 +178,12 @@ public class EkpInteractiveParam implements Serializable {
@Schema(description = "状态:有,无")
private String estimateStatus;
/**
* 客服姓名
*/
@Schema(description = "客服姓名")
private String createName;
/**
* EKP的 是否BPO: 是 否
*/
......
......@@ -24,6 +24,15 @@ public interface EkpSettleMapper {
*/
SettleVo getSettle(String id);
/**
* 从商险订单明细中获取当前保单的结算状态
*
* @author huyc
* @param id
* @return {@link SettleVo}
*/
String getSettleStatusFromEkpInsuranceDetail(String id);
List<EkpInsuranceViewVo> selectSettleStatusBySettleNo(@Param("settleNo") String settleNo, @Param("payFlag") String payFlag);
List<EkpSocialViewVo> selectSocialViewStatusBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag);
......
......@@ -25,6 +25,15 @@ public interface EkpSettleService extends IService<TInsuranceTypeRate> {
*/
SettleVo getSettle(String id);
/**
* 从商险订单明细中获取当前保单的结算状态
*
* @author huyc
* @param id 新增类
* @return {@link R}
*/
String getSettleStatusFromEkpInsuranceDetail(String id);
/**
* 根据结算单编号查询商险视图信息
*
......
......@@ -31,6 +31,11 @@ public class EkpSettleServiceImpl implements EkpSettleService {
return ekpSettleMapper.getSettle(id);
}
@Override
public String getSettleStatusFromEkpInsuranceDetail(String id) {
return ekpSettleMapper.getSettleStatusFromEkpInsuranceDetail(id);
}
@Override
public List<EkpInsuranceViewVo> selectViewBySettleNo(String settleNo,String payFlag) {
return ekpSettleMapper.selectSettleStatusBySettleNo(settleNo,payFlag);
......
......@@ -3671,6 +3671,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
InsuranceRegisterParam param;
SettleVo settleVo;
List<TInsuranceEkp> ekpList;
String status;
for (int i = 0; i < distinctList.size(); i++) {
param = distinctList.get(i);
param.setFlag(CommonConstants.ONE_STRING);
......@@ -3856,26 +3857,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setErrorMessage(InsurancesConstants.BUY_HANDLE_FOUR_NOT_REGISTERED);
continue;
}
//保单号是否更新
boolean booleanPolicyNo = StringUtils.isNotBlank(param.getPolicyNo()) && !param.getPolicyNo().equals(detail.getPolicyNo());
//发票号是否更新
boolean booleanInvoiceNo = StringUtils.isNotBlank(param.getInvoiceNo()) && !param.getInvoiceNo().equals(detail.getInvoiceNo());
//保费是否更新
boolean booleanActualPremium = true;
if (Common.isNotNull(detail.getActualPremium())) {
booleanActualPremium = StringUtils.isNotBlank(param.getActualPremium()) && detail.getActualPremium().compareTo(new BigDecimal(param.getActualPremium())) != 0;
}
if (StringUtils.isNotBlank(detail.getDefaultSettleId())){
settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
if (Optional.ofNullable(settle).isPresent()){
settleVo = getInsuranceDetailSettleStatus(detail.getId(), detail.getDefaultSettleId());
if(!Common.isEmpty(settleVo) && (booleanActualPremium || booleanPolicyNo || booleanInvoiceNo)){
status = getSettleStatusFromEkpInsuranceDetail(detail.getId(), detail.getDefaultSettleId());
if(null != status){
//保费更新或者保单号发票号更新
if (InsurancesConstants.SETTLE_TWO.equals(settleVo.getActualStatus())) {
if (InsurancesConstants.SETTLE_TWO.equals(status)) {
param.setErrorMessage(InsurancesConstants.SETTLE_HANDLE_THREE_NOT_REGISTERED);
continue;
}
if (InsurancesConstants.SETTLE_ONE.equals(settleVo.getActualStatus())) {
if (InsurancesConstants.SETTLE_ONE.equals(status)) {
param.setErrorMessage(InsurancesConstants.SETTLE_HANDLE_TWO_NOT_REGISTERED);
continue;
}
......@@ -7310,6 +7302,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return ekpSettleService.getSettle(id);
}
/**
* 从商险订单明细中获取当前保单的结算状态
*
* @author huyc
* @param
* @return {@link String}
*/
public String getSettleStatusFromEkpInsuranceDetail(String detailId,String settleId){
String id = detailId+CommonConstants.DOWN_LINE_STRING+settleId;
//获取ekp结算信息
return ekpSettleService.getSettleStatusFromEkpInsuranceDetail(id);
}
/**
* 保存失败信息
*
......
......@@ -45,6 +45,16 @@
where
fd_3b05ba46bb042e = #{id}
</select>
<select id="getSettleStatusFromEkpInsuranceDetail" resultType="java.lang.String">
select
fd_3adfe6ec6a8cbe
from
ekp_e96a0a28442447c81ec0
where
fd_3b0a5743acab7e = #{id} limit 1
</select>
<!-- 根据结算单编码获取视图信息 -->
<select id="selectSettleStatusBySettleNo" resultMap="BaseResultStatusMap">
select
......
......@@ -56,4 +56,5 @@ public interface MsgInfoMapper extends BaseMapper<MsgInfo> {
List<String> getOrderNos();
int insertMsg(@Param("vo") EkpInsertMsgVo vo);
}
......@@ -49,7 +49,7 @@
</appender>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root level="INFO">
<root level="error">
<appender-ref ref="console"/>
<appender-ref ref="debug"/>
<appender-ref ref="error"/>
......
......@@ -50,7 +50,7 @@
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root level="INFO">
<root level="debug">
<appender-ref ref="console"/>
<appender-ref ref="debug"/>
<appender-ref ref="error"/>
......
......@@ -163,4 +163,10 @@ public class SysMenu extends BaseEntity {
@Schema(description = "查询字段维度,如果fdId超长,则使用本字段")
private String queryFields;
/**
* 税务主体字段ID
*/
@Schema(description = "税务主体字段ID")
private String taxId;
}
......@@ -53,7 +53,7 @@ public class SysUserPermission extends BaseEntity {
/**
* 权限类型 客户、商机、报价单、
* 1客户权限;2商机;3报价单;4合同;5项目;6BU;7条线;8部门;9收入归属
* 1客户权限;2商机;3报价单;4合同;5项目;6BU;7条线;8部门;9收入归属;10二级指标归属;11税务主体
*/
@Schema(description = "权限类型")
private String permissionType;
......
package com.yifu.cloud.plus.v1.yifu.permission.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* 税务主体
* @author hgw
* @date 2024-1-10 18:05:30
*/
@Data
public class SysTaxVo implements Serializable {
/**
* id
*/
@Schema(description = "id")
private String id;
/**
* 名称
*/
@Schema(description = "名称")
private String name;
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ 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.permission.entity.SysMenu;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysMenuSearchVo;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysTaxVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -94,4 +95,17 @@ public class SysMenuController {
public R<SysMenu> getById(@PathVariable("id") String id) {
return R.ok(sysMenuService.getById(id));
}
/**
* @Description: 获取税务主体分页列表
* @Author: hgw
* @Date: 2024/1/10 10:18
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.baomidou.mybatisplus.core.metadata.IPage < com.yifu.cloud.plus.v1.yifu.permission.vo.SysTaxVo>>
**/
@Operation(description = "获取税务主体分页列表")
@GetMapping("/getSysTaxVoPage")
public R<IPage<SysTaxVo>> getSysTaxVoPage(Page<SysTaxVo> page, SysTaxVo vo) {
return new R<>(sysMenuService.getSysTaxVoPage(page, vo));
}
}
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysMenu;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysMenuSearchVo;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysTaxVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -22,6 +23,8 @@ public interface SysMenuMapper extends BaseMapper<SysMenu> {
*/
IPage<SysMenu> getSysMenuPage(Page<SysMenu> page, @Param("sysMenu") SysMenuSearchVo sysMenu);
IPage<SysTaxVo> getSysTaxVoPage(Page<SysTaxVo> page, @Param("vo") SysTaxVo vo);
/**
* 判断是否存在此菜单
*
......
......@@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserPermission;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysDictVo;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserDeptVo;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserPermissionExportVo;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserPermissionSearchVo;
import com.yifu.cloud.plus.v1.yifu.permission.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -117,6 +114,14 @@ public interface SysUserPermissionMapper extends BaseMapper<SysUserPermission> {
*/
IPage<SysUserDeptVo> selectTwoGsVO(Page<SysUserDeptVo> page, @Param("name") String name);
/**
* @Description: 查找税务主体分页
* @Author: hgw
* @Date: 2024/1/10 16:27
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserDeptVo>
**/
IPage<SysUserDeptVo> selectTaxVO(Page<SysUserDeptVo> page, @Param("name") String name);
/**
* 根据类型查询字典值
*
......@@ -197,6 +202,14 @@ public interface SysUserPermissionMapper extends BaseMapper<SysUserPermission> {
*/
Integer selectTwoGsCount(@Param("name") String name);
/**
* @Description: 查询税务主体是否存在
* @Author: hgw
* @Date: 2024/1/10 16:22
* @return: java.lang.Integer
**/
Integer selectTaxCount(@Param("name") String name);
/**
* @param userId
* @Description: 查找当前用户的所有权限
......
......@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysMenu;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysMenuSearchVo;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysTaxVo;
/**
* 新权限-菜单表
......@@ -35,4 +36,12 @@ public interface SysMenuService extends IService<SysMenu> {
* @return
*/
R<Boolean> updateMenu(SysMenu menu);
/**
* @Description: 获取税务主体分页列表
* @Author: hgw
* @Date: 2024/1/10 10:19
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.permission.vo.SysTaxVo>
**/
IPage<SysTaxVo> getSysTaxVoPage(Page<SysTaxVo> page, SysTaxVo vo);
}
......@@ -11,6 +11,7 @@ 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.permission.entity.SysMenu;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysMenuSearchVo;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysTaxVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
......@@ -39,6 +40,11 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
return baseMapper.getSysMenuPage(page, sysMenu);
}
@Override
public IPage<SysTaxVo> getSysTaxVoPage(Page<SysTaxVo> page, SysTaxVo vo) {
return baseMapper.getSysTaxVoPage(page, vo);
}
/**
* 新增菜单表
*
......
......@@ -72,7 +72,8 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
}
if (CommonConstants.SIX_STRING.equals(sysUserPermission.getPermissionType())
|| CommonConstants.SEVEN_STRING.equals(sysUserPermission.getPermissionType())
|| CommonConstants.TEN_STRING.equals(sysUserPermission.getPermissionType())) {
|| CommonConstants.TEN_STRING.equals(sysUserPermission.getPermissionType())
|| CommonConstants.TWELVE_STRING.equals(sysUserPermission.getPermissionType())) {
permission = this.getOne(Wrappers.<SysUserPermission>query().lambda()
.eq(SysUserPermission::getEmpLoginName, sysUserPermission.getEmpLoginName())
.eq(SysUserPermission::getPermissionType, sysUserPermission.getPermissionType())
......@@ -167,6 +168,9 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
} else if (CommonConstants.TEN_STRING.equals(searchVo.getType()) ) {
//二级指标归属权限
iPage = baseMapper.selectTwoGsVO(page, searchVo.getName());
} else if (CommonConstants.TWELVE_STRING.equals(searchVo.getType()) ) {
//税务主体
iPage = baseMapper.selectTaxVO(page, searchVo.getName());
} else {
//项目权限
if (Common.isNotNull(user.getId()) && CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
......@@ -310,7 +314,8 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
flag.append("_");
if (CommonConstants.SIX_STRING.equals(insert.getPermissionType()) ||
CommonConstants.SEVEN_STRING.equals(insert.getPermissionType()) ||
CommonConstants.TEN_STRING.equals(insert.getPermissionType())) {
CommonConstants.TEN_STRING.equals(insert.getPermissionType())
|| CommonConstants.TWELVE_STRING.equals(insert.getPermissionType())) {
flag.append(excel.getName());
} else {
flag.append(excel.getCode());
......@@ -326,13 +331,16 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
//判断此登录名是否已经存在此权限维度
if (CommonConstants.SIX_STRING.equals(insert.getPermissionType())
|| CommonConstants.SEVEN_STRING.equals(insert.getPermissionType())
|| CommonConstants.TEN_STRING.equals(insert.getPermissionType())) {
|| CommonConstants.TEN_STRING.equals(insert.getPermissionType())
|| CommonConstants.TWELVE_STRING.equals(insert.getPermissionType())) {
//判断对应维度的名称是否存在
Integer count;
if (CommonConstants.SIX_STRING.equals(insert.getPermissionType())) {
count = baseMapper.selectDictByName(excel.getName(), "bu");
} else if (CommonConstants.TEN_STRING.equals(insert.getPermissionType())) {
count = baseMapper.selectTwoGsCount(excel.getName());
} else if (CommonConstants.TWELVE_STRING.equals(insert.getPermissionType())) {
count = baseMapper.selectTaxCount(excel.getName());
} else {
count = baseMapper.selectDictByName(excel.getName(), "line");
}
......
......@@ -31,6 +31,7 @@
<result property="isOpen" column="IS_OPEN"/>
<result property="tableName" column="TABLE_NAME"/>
<result property="queryFields" column="QUERY_FIELDS"/>
<result property="taxId" column="TAX_ID"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -55,7 +56,8 @@
a.VIEW_ID,
a.CREATE_TIME,
a.TABLE_NAME,
a.QUERY_FIELDS
a.QUERY_FIELDS,
a.TAX_ID
</sql>
<sql id="sysMenu_where">
<if test="sysMenu != null">
......@@ -116,4 +118,17 @@
limit 1
</select>
<!-- 获取税务主体列表-->
<select id="getSysTaxVoPage" resultType="com.yifu.cloud.plus.v1.yifu.permission.vo.SysTaxVo">
select fd_id AS id,a.fd_3afab4c6755286 AS name
from ekp_7e091e5e36848fb97451 a
where a.fd_3afab4c6755286 is not null
<if test="vo != null">
<if test="vo.name != null and vo.name.trim() != ''">
AND a.fd_3afab4c6755286 like concat('%',#{vo.name},'%')
</if>
</if>
GROUP BY a.fd_3afab4c6755286 ORDER BY a.fd_3afab4c6755286 desc
</select>
</mapper>
......@@ -217,6 +217,17 @@
</if>
</select>
<!-- 查找税务主体分页 -->
<select id="selectTaxVO" resultMap="nameAndCodeMap">
select a.fd_3afab4c6755286 AS name
from ekp_7e091e5e36848fb97451 a
where a.fd_3afab4c6755286 is not null
<if test="name != null and name.trim() != ''">
AND a.fd_3afab4c6755286 like concat('%',#{name},'%')
</if>
GROUP BY a.fd_3afab4c6755286 ORDER BY a.fd_3afab4c6755286 desc
</select>
<!--根据部门编码查询id-->
<select id="selectSettleByCode" resultType="java.lang.String">
SELECT
......@@ -298,6 +309,13 @@
where a.fd_3b1235d8f35c6c = #{name}
</select>
<select id="selectTaxCount" resultType="java.lang.Integer">
SELECT
count(1)
from ekp_7e091e5e36848fb97451 a
where a.fd_3afab4c6755286 = #{name}
</select>
<!-- 查找当前用户的所有权限 -->
<select id="getUserPermissionByUserId" resultMap="sysUserPermissionMap">
select
......
......@@ -18,6 +18,8 @@ package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -43,6 +45,7 @@ public class TStatisticsBonusImportVo implements Serializable {
@Schema(description = "员工姓名")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工姓名")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private String empName;
/**
* 身份证号
......@@ -52,6 +55,7 @@ public class TStatisticsBonusImportVo implements Serializable {
@Schema(description = "身份证号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证号")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private String empIdcard;
/**
* 待发年终奖
......@@ -60,6 +64,7 @@ public class TStatisticsBonusImportVo implements Serializable {
@Schema(description = "待发年终奖")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("待发年终奖")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private BigDecimal annualBonus;
/**
* 待发12月工资
......@@ -68,6 +73,7 @@ public class TStatisticsBonusImportVo implements Serializable {
@Schema(description = "待发12月工资")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("待发12月工资")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private BigDecimal annualTSalary;
/**
* 12月工资是否已经发放
......@@ -76,55 +82,86 @@ public class TStatisticsBonusImportVo implements Serializable {
@Schema(description = "12月工资是否已经发放")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("12月工资是否已经发放")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private String isTSend;
/**
* 年终奖单独扣税12月税费
* 12月份应纳税所得额扣除费用
*/
@ExcelAttribute(name = "12月份应纳税所得额扣除费用")
@Schema(description = "12月份应纳税所得额扣除费用")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("12月份应纳税所得额扣除费用")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private BigDecimal deductTaxSalary;
/**
* 年终奖单独扣税额
*/
@ExcelAttribute(name = "年终奖单独扣税额")
@Schema(description = "年终奖单独扣税额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("年终奖单独扣税额")
private BigDecimal annualSingleTax;
/**
* 工资单独计税额
*/
@ExcelAttribute(name = "工资单独计税额")
@Schema(description = "工资单独计税额")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工资单独计税额")
private BigDecimal salarySingleTax;
/**
* 合计
*/
@ExcelAttribute(name = "合计")
@Schema(description = "合计")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合计")
private BigDecimal sumTax;
/**
* 待发工资按年终奖扣税12月税费
*/
@ExcelAttribute(name = "年终奖单独扣税12月税费")
@Schema(description = "年终奖单独扣税12月税费")
@ExcelAttribute(name = "待发工资按年终奖扣税12月税费")
@Schema(description = "待发工资按年终奖扣税12月税费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("年终奖单独扣税12月税费")
@ExcelProperty("待发工资按年终奖扣税12月税费")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private BigDecimal annualATax;
/**
* 年终奖合并扣税12月税费
* 年终奖按工资扣税12月税费
*/
@ExcelAttribute(name = "年终奖合并扣税12月税费")
@Schema(description = "年终奖合并扣税12月税费")
@ExcelAttribute(name = "年终奖按工资扣税12月税费")
@Schema(description = "年终奖按工资扣税12月税费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("年终奖合并扣税12月税费")
@ExcelProperty("年终奖按工资扣税12月税费")
private BigDecimal annualSTax;
/**
* 最优方案-12月工资
* 最优方案-12月工资(建议值)
*/
@ExcelAttribute(name = "最优方案-12月工资")
@Schema(description = "最优方案-12月工资")
@ExcelAttribute(name = "最优方案-12月工资(建议值)")
@Schema(description = "最优方案-12月工资(建议值)")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("最优方案-12月工资")
@ExcelProperty("最优方案-12月工资(建议值)")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private BigDecimal bestPlanTSalary;
/**
* 最优方案-年终奖
* 最优方案-年终奖(建议值)
*/
@ExcelAttribute(name = "最优方案-年终奖")
@Schema(description = "最优方案-年终奖")
@ExcelAttribute(name = "最优方案-年终奖(建议值)")
@Schema(description = "最优方案-年终奖(建议值)")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("最优方案-年终奖")
@ExcelProperty("最优方案-年终奖(建议值)")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private BigDecimal bestPlanBonus;
/**
* 最优方案-12月扣税
* 最优方案-12月扣税(建议值)
*/
@ExcelAttribute(name = "最优方案-12月扣税")
@Schema(description = "最优方案-12月扣税")
@ExcelAttribute(name = "最优方案-12月扣税(建议值)")
@Schema(description = "最优方案-12月扣税(建议值)")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("最优方案-12月扣税")
@ExcelProperty("最优方案-12月扣税(建议值)")
@HeadStyle(fillPatternType = FillPatternTypeEnum.NO_FILL, fillForegroundColor = 9)
private BigDecimal bestPlanTax;
/**
* 12月份应纳税所得额扣除费用
*/
@ExcelAttribute(name = "12月份应纳税所得额扣除费用")
@Schema(description = "12月份应纳税所得额扣除费用")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("12月份应纳税所得额扣除费用")
private BigDecimal deductTaxSalary;
}
......@@ -26,19 +26,16 @@ import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.esotericsoftware.minlog.Log;
import com.yifu.cloud.plus.v1.check.entity.TCheckBankNo;
import com.yifu.cloud.plus.v1.check.entity.TCheckIdCard;
import com.yifu.cloud.plus.v1.check.entity.TCheckMobile;
import com.yifu.cloud.plus.v1.check.vo.CheckBankNoVo;
import com.yifu.cloud.plus.v1.check.vo.CheckBatchVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
......@@ -59,7 +56,6 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......
......@@ -841,7 +841,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
**/
public R<String> backSalaryByApplyNo(String applyNo) {
if (Common.isNotNull(applyNo)) {
List<TSalaryStandard> salaryList = this.list(Wrappers.<TSalaryStandard>query().lambda().eq(TSalaryStandard::getApplyNo, applyNo));
List<TSalaryStandard> salaryList = this.list(Wrappers.<TSalaryStandard>query().lambda()
.eq(TSalaryStandard::getApplyNo, applyNo)
.eq(TSalaryStandard::getDeleteFlag, CommonConstants.ZERO_INT));
if (salaryList != null && !salaryList.isEmpty()) {
TSalaryStandard ss = salaryList.get(0);
if (ss.getStatus() != SalaryConstants.STATUS[6]) {
......
......@@ -36,11 +36,13 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils;
import com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryTaxConfig;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsBonusMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountItemService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryTaxConfigService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSpecialDeducationSumService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsBonusService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsBonusImportVo;
......@@ -57,6 +59,7 @@ import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
......@@ -82,6 +85,8 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
private final SocialDaprUtils socialDaprUtils;
private final TSpecialDeducationSumService deducationSumService;
/**
* 全年一次性奖金申报表简单分页查询
* @param tStatisticsBonus 全年一次性奖金申报表
......@@ -191,6 +196,10 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
BigDecimal twlSalaryTax;
//12月社保公积金扣费
BigDecimal socialFundTax;
//年终奖单独扣税
BigDecimal singleAnualTax;
//工资单独扣税
BigDecimal singleSalaryTax;
try(ServletOutputStream out = response.getOutputStream()) {
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
......@@ -222,6 +231,8 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
}
}
Map<String, List<TSalaryAccountItem>> itemMap = tSalaryAccountItemService.getSalaryItemVoList(idCardList, invoiceTitle);
TSpecialDeducationSum specialDeducation;
for (TStatisticsBonusImportVo infoVo: list) {
//本次纳税额
res = BigDecimal.ZERO;
......@@ -248,8 +259,12 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
//12月份应纳税所得额扣除费用
//12月社保公积金扣费
socialFundTax = BigDecimal.ZERO;
//专项扣除列表
List<BigDecimal> sdSumList = new ArrayList<>();
//年终奖单独扣税
singleAnualTax = BigDecimal.ZERO;
//工资单独扣税
singleSalaryTax = BigDecimal.ZERO;
// //专项扣除列表
// List<BigDecimal> sdSumList = new ArrayList<>();
//减除费用列表
List<BigDecimal> costReductionList = new ArrayList<>();
......@@ -273,15 +288,15 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
if (SalaryConstants.RELAY_SALARY_JAVA.equals(item.getJavaFiedName())) {
ySalary = ySalary.add(item.getSalaryMoney());
}
if (item.getSettlementMonth().contains(CommonConstants.TWELVE_STRING)) {
if (item.getSettlementMonth().equals(DateUtil.getYearAndMonth(LocalDateTime.now(),0))) {
//减除费用
if (SalaryConstants.COST_REDUCTION_JAVA.equals(item.getJavaFiedName())) {
costReductionList.add(item.getSalaryMoney());
}
//专项扣除
if (SalaryConstants.SPECIAL_DEDU_MONEY_SUM_JAVA.equals(item.getJavaFiedName())) {
sdSumList.add(item.getSalaryMoney());
}
// //专项扣除
// if (SalaryConstants.SPECIAL_DEDU_MONEY_SUM_JAVA.equals(item.getJavaFiedName())) {
// sdSumList.add(item.getSalaryMoney());
// }
}
if (SalaryConstants.SALARY_TAX_JAVA.equals(item.getJavaFiedName())) {
//12月份个税
......@@ -300,8 +315,22 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
if (CommonConstants.IS_TRUE.equals(infoVo.getIsTSend())) {
isSend = true;
}
if (Common.isNotNull(sdSumList)) {
sdSum = Collections.max(sdSumList);
// if (Common.isNotNull(sdSumList)) {
// sdSum = Collections.max(sdSumList);
// }
//专项扣除从专项扣除表中直接获取
specialDeducation = deducationSumService.getOne(Wrappers.<TSpecialDeducationSum>query().lambda()
.eq(TSpecialDeducationSum::getIdNumber,infoVo.getEmpIdcard())
.eq(TSpecialDeducationSum::getCreateMonth,DateUtil.getYearAndMonth(LocalDateTime.now(),0))
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(specialDeducation)) {
sdSum = BigDecimalUtils.safeAdd(specialDeducation.getSumChildEduMoney()
,specialDeducation.getSumContinuingEducationMoney()
,specialDeducation.getSumHousingLoanMoney()
,specialDeducation.getSumHousingRentMoney()
,specialDeducation.getSumSupportElderlyMoney()
,specialDeducation.getSumBabyMoney()
,specialDeducation.getSumPrivatePension());
}
if (Common.isNotNull(costReductionList)) {
costReduction = Collections.max(costReductionList);
......@@ -316,6 +345,7 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
BigDecimalUtils.safeAdd(sdSum,isTax,costReduction))),sumTax);
//12月薪资扣除额合计
sumDeductSalary = BigDecimalUtils.safeAdd(sdSum,isTax,costReduction);
singleSalaryTax = twlSalaryTax;
} else {
//当月工资未发
//年终奖单独扣税
......@@ -327,7 +357,11 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
infoVo.getDeductTaxSalary(),isTax))),sumTax);
//12月薪资扣除额合计
sumDeductSalary = BigDecimalUtils.safeAdd(isTax,infoVo.getDeductTaxSalary());
singleSalaryTax = BigDecimalUtils.safeSubtract(calculationSalaryT(personTax,BigDecimalUtils.safeSubtract(
BigDecimalUtils.safeAdd(infoVo.getAnnualTSalary(),ySalary),BigDecimalUtils.safeAdd(
infoVo.getDeductTaxSalary(),isTax))),sumTax);
}
singleAnualTax = calculationSalary(annousTax,infoVo.getAnnualBonus());
//最优解计算区间
BigDecimal oneBecimal = new BigDecimal("36000");
......@@ -459,6 +493,9 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
infoVo.setAnnualSTax(finalSalaryWithSalary);
infoVo.setBestPlanTSalary(anRes);
infoVo.setBestPlanBonus(BigDecimalUtils.safeSubtract(wSalary,anRes));
infoVo.setAnnualSingleTax(singleAnualTax);
infoVo.setSalarySingleTax(singleSalaryTax);
infoVo.setSumTax(BigDecimalUtils.safeAdd(singleAnualTax,singleSalaryTax));
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("全年一次性奖金测算").build();
......
......@@ -83,7 +83,7 @@ public interface TForecastLibraryMapper extends BaseMapper<TForecastLibrary> {
**/
int updatePushStatus(@Param("idList") List<String> idList);
int checkForecastChange(@Param("idSet") Set<String> idSet);
List<String> checkForecastChange(@Param("idSet") Set<String> idSet);
/**
* @param idSet
......
......@@ -208,7 +208,7 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
* @Date: 2022/11/16 17:32
* @return: int
**/
int checkPaymentChange(@Param("idSet") Set<String> idSet);
List<String> checkPaymentChange(@Param("idSet") Set<String> idSet);
/**
* @param idSet
......
......@@ -3198,7 +3198,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List<TPaymentInfo> sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getEmpIdcard, info.getEmpIdcard())
.eq(TPaymentInfo::getSettleDomainId, info.getSettleDomainId())
.eq(TPaymentInfo::getSocialCreateMonth, "202212"));
.eq(TPaymentInfo::getSocialCreateMonth, DateUtil.getYearAndMonth(LocalDateTime.now(),0)));
TPaymentVo paymentVo = new TPaymentVo();
paymentVo.setPaymentInfoList(sumList);
return paymentVo;
......@@ -3449,10 +3449,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
if (!idSet.isEmpty()) {
// 查询是否允许划转缴费库、预估库 的 社保、公积金
boolean flag = this.checkChange(idSet);
if (!flag) {
return R.failed("社保公积金已被结算,请先退回并删除工资表!");
// 查询是否允许划转缴费库、预估库 的 社保、公积金
List<String> settleList = baseMapper.checkPaymentChange(idSet);
if (settleList.isEmpty()) {
settleList = tForecastLibraryMapper.checkForecastChange(idSet);
}
if (!settleList.isEmpty()) {
String idStr = Common.ListToStr(settleList,",");
return R.failed(idStr + "的社保公积金已被结算,请先退回并删除工资表!");
}
// 1划转缴费率、预估库的项目(社保公积金)
......@@ -3585,23 +3589,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return true;
}
/**
* @param idSet
* @Description: 校验是否存在已结算薪资的数据
* @Author: hgw
* @Date: 2022/11/16 17:30
* @return: boolean
**/
private boolean checkChange(Set<String> idSet) {
int settleCount = baseMapper.checkPaymentChange(idSet);
if (settleCount == 0) {
settleCount = tForecastLibraryMapper.checkForecastChange(idSet);
return settleCount == 0;
} else {
return false;
}
}
private Map<String, TSettleDomainSelectVo> getSelectVoMap() {
R<TSettleDomainListVo> settleDomainR = archivesDaprUtil.selectAllSettleDomainSelectVos();
Map<String,TSettleDomainSelectVo> mapSelectVo = null;
......
......@@ -32,7 +32,7 @@ spring:
type: CLASS_BASED
tables:
t_payment_info:
actual-data-nodes: ds0.t_payment_info_20$->{17..23}
actual-data-nodes: ds0.t_payment_info_20$->{17..24}
key-generate-strategy:
column: ID
key-generator-name: snowflake
......
......@@ -32,7 +32,7 @@ spring:
type: CLASS_BASED
tables:
t_payment_info:
actual-data-nodes: ds0.t_payment_info_20$->{17..23}
actual-data-nodes: ds0.t_payment_info_20$->{17..24}
key-generate-strategy:
column: ID
key-generator-name: snowflake
......
......@@ -32,7 +32,7 @@ spring:
type: CLASS_BASED
tables:
t_payment_info:
actual-data-nodes: ds0.t_payment_info_20$->{17..23}
actual-data-nodes: ds0.t_payment_info_20$->{17..24}
key-generate-strategy:
column: ID
key-generator-name: snowflake
......
......@@ -710,8 +710,8 @@
</update>
<!-- 校验预估库库是否有已结算的数据,有,则不允许ekp费用划转 -->
<select id="checkForecastChange" resultType="java.lang.Integer">
select count(1) from t_forecast_library p
<select id="checkForecastChange" resultType="java.lang.String">
select p.EMP_IDCARD from t_forecast_library p
where (p.SALARY_SOCIAL_FLAG = '1' or p.SALARY_FUND_FLAG = '1') and p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
......
......@@ -2433,8 +2433,8 @@
</update>
<!-- 校验缴费库是否有已结算的数据,有,则不允许ekp费用划转 -->
<select id="checkPaymentChange" resultType="java.lang.Integer">
select count(1) from t_payment_info p
<select id="checkPaymentChange" resultType="java.lang.String">
select p.EMP_IDCARD from t_payment_info p
where (p.SALARY_SOCIAL_FLAG = '1' or p.SALARY_FUND_FLAG = '1') and p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
......
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