Commit afce3123 authored by hongguangwu's avatar hongguangwu

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

parents 93ec9752 aad22092
......@@ -9,6 +9,7 @@ import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 入职确认信息公积金已购买记录
......@@ -32,7 +33,7 @@ public class TFundPreDetailVo implements Serializable {
@Length(max = 32, message = "公积金缴纳地-省不能超过32个字符")
@ExcelProperty("公积金缴纳地-省")
@Schema(description = "公积金缴纳地-省")
private String socialProvince;
private String fundProvince;
/**
* 公积金缴纳地-市
*/
......@@ -40,7 +41,7 @@ public class TFundPreDetailVo implements Serializable {
@Length(max = 32, message = "公积金缴纳地-市不能超过32个字符")
@ExcelProperty("公积金缴纳地-市")
@Schema(description = "公积金缴纳地-市")
private String socialCity;
private String fundCity;
/**
* 公积金缴纳地-县
*/
......@@ -48,7 +49,7 @@ public class TFundPreDetailVo implements Serializable {
@Length(max = 32, message = "公积金缴纳地-县不能超过32个字符")
@ExcelProperty("公积金缴纳地-县")
@Schema(description = "公积金缴纳地-县")
private String socialTown;
private String fundTown;
/**
* 项目名称
*/
......@@ -72,7 +73,7 @@ public class TFundPreDetailVo implements Serializable {
@Length(max = 50, message = "公积金户名称不能超过50个字符")
@ExcelProperty("公积金户名称")
@Schema(description = "公积金户名称")
private String socialHouseholdName;
private String fundHouseholdName;
/**
* 入职确认信息主表id
*/
......@@ -107,4 +108,18 @@ public class TFundPreDetailVo implements Serializable {
@Schema(description = "派单时间")
private String dispatchTime;
/**
* 单位公积金缴纳比例
*/
private BigDecimal unitProvidentPer;
/**
* 个人公积金缴纳比例
*/
private BigDecimal personalProvidentPer;
/**
* 单位公积金缴纳基数
*/
private BigDecimal providentCardinal;
}
......@@ -825,7 +825,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
return R.other(CommonConstants.THREE_INT, null, "该人员存在在途/有效的公积金数据,请将“是否已参保”调整为“是”");
}
//判断公积金基数 是否小于 公积金户配置的最低基数
if (Common.isNotNull(employeeRegistrationPre.getDispatchInfoFundPreVo().getConfigHouseId())
if (Common.isNotNull(employeeRegistrationPre)
&& Common.isNotNull(employeeRegistrationPre.getDispatchInfoFundPreVo())
&& Common.isNotNull(employeeRegistrationPre.getDispatchInfoFundPreVo().getConfigHouseId())
&& Common.isNotNull(employeeRegistrationPre.getDispatchInfoFundPreVo().getProvidentCardinal())){
R<SysBaseSetInfoVo> resR = socialDaprUtils.getSocialHouseBaseSet(employeeRegistrationPre.getDispatchInfoFundPreVo().getConfigHouseId());
if (Common.isNotNull(resR) && resR.getData() != null) {
......
......@@ -573,9 +573,12 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
}
if (newInfo.getServerItem().contains("公积金") && dispatchInfoFundPreOldVo != null && dispatchInfoFundPreVo != null) {
Date expectedCollectionTime = dispatchInfoFundPreVo.getExpectedCollectionTime();
Date expectedConfirmTime = dispatchInfoFundPreVo.getExpectedConfirmTime();
//如果自动触发派增为是,计算派单发起时间和派单确认时间
initFundTime(dispatchInfoFundPreVo);
differenceFundKey = HrEquator.comparisonValueIgnoreField(dispatchInfoFundPreOldVo
, dispatchInfoFundPreVo, SOCIAL_IGNORE_FIELD);
//如果自动触发派增为是,计算派单发起时间和派单确认时间
if (differenceFundKey.length() > 0) {
if (Common.isNotNull(diffTitle)) {
diffTitle += "、公积金信息";
......@@ -589,6 +592,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
differenceFundKey, logId, detailEmpLog);
detailList.add(detailEmpLog);
}
dispatchInfoFundPreVo.setExpectedCollectionTime(expectedCollectionTime);
dispatchInfoFundPreVo.setExpectedConfirmTime(expectedConfirmTime);
}
// 有修改,则加日志
......@@ -660,7 +665,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
}
}
private TDispatchInfoPreVo initFundTime(TDispatchInfoPreVo preVo ,Date joinLeaveDate) {
private TDispatchInfoPreVo initFundTime(TDispatchInfoPreVo preVo) {
if (null == preVo){
preVo = new TDispatchInfoPreVo();
}
......@@ -678,12 +683,12 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
//用户选择起缴日期类型为入职日期,以入职日期为基准
vo.setMonthAfter(CommonConstants.ZERO_INT);
vo.setYearAfter(0);
vo.setRegistDate(joinLeaveDate);
vo.setRegistDate(preVo.getFundStartDate());
}else if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职满一年次月,以入职日期为基准 加上年月调整
vo.setMonthAfter(CommonConstants.ONE_INT);
vo.setYearAfter(CommonConstants.ONE_INT);
vo.setRegistDate(joinLeaveDate);
vo.setRegistDate(preVo.getFundStartDate());
}else if (CommonConstants.TWO_STRING.equals(preVo.getFundDateType())){
//用户自定义取值用户填写的起缴日期为基准
vo.setMonthAfter(CommonConstants.ZERO_INT);
......
......@@ -889,15 +889,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if (CommonConstants.ONE_STRING.equals(preVo.getFundDateType())){
date = DateUtil.getFirstDay(date);
}
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.TWO_STRING);
dayVo.setRegistDate(date);
dayVo.setRegistType(0);
R<TEmployeeInsuranceWorkDayVo> dataR = socialDaprUtils.getContractAfterWorkDay(dayVo);
if (Common.isNotNull(dataR) && Common.isNotNull(dataR.getData())
&& Common.isNotNull(dataR.getData().getRegistDate())) {
preVo.setFundStartDate(dataR.getData().getRegistDate());
}
preVo.setFundStartDate(date);
}
}
......
......@@ -11,6 +11,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.math.BigDecimal;
/**
* @Author fxj
* @Description 入职确认信息公积金已购买记录
......@@ -112,4 +114,18 @@ public class TFundPreDetail extends BaseEntity {
@Schema(description = "派单时间")
private String dispatchTime;
/**
* 单位公积金缴纳比例
*/
private BigDecimal unitProvidentPer;
/**
* 个人公积金缴纳比例
*/
private BigDecimal personalProvidentPer;
/**
* 单位公积金缴纳基数
*/
private BigDecimal providentCardinal;
}
......@@ -50,4 +50,6 @@ public interface TDispatchInfoPreMapper extends BaseMapper<TDispatchInfoPre> {
long selectFundExportCount(@Param("tDispatchInfoPre") TDispatchInfoPreSearchVo searchVo);
long selectFundCount(@Param("tDispatchInfoPre") TDispatchInfoPreSearchVo searchVo);
}
......@@ -183,8 +183,9 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
@Override
public long getDispatchInfoFundCount(TDispatchInfoPreSearchVo searchVo) {
searchVo.setType(CommonConstants.ONE_STRING);
initSearchVo(searchVo);
return baseMapper.selectFundExportCount(searchVo);
return baseMapper.selectFundCount(searchVo);
}
@Override
......@@ -363,7 +364,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
vo.setYearAfter(0);
vo.setRegistDate(preVo.getFundStartDate());
}else {
if (null == preVo.getFundDateType()){
if (null == preVo.getFundStartDate()){
//先计算起缴日期
if (CommonConstants.ZERO_STRING.equals(preVo.getFundDateType())){
//用户选择起缴日期类型为入职日期,以入职日期为基准
......
......@@ -402,10 +402,23 @@
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
1=1 and a.type_sub = '1'
and a.DELETE_FLAG = '0'
<include refid="tDispatchInfoPre_where"/>
</where>
</select>
<select id="selectFundCount" resultType="java.lang.Long">
SELECT
count(1)
FROM t_dispatch_info_pre a
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
1=1 and a.type_sub = '1'
and a.DELETE_FLAG = '0'
<include refid="tDispatchInfoPre_other_where"/>
</where>
</select>
<select id="selectExportList" resultMap="tDispatchInfoPreExportMap">
SELECT
a.dept_name,
......@@ -518,7 +531,7 @@
a.id preId,
a.TRUST_REMARK trustRemark,
a.CUSTOMER_USER_LOGIN_NAME as preLoginName,
if(#{type} = '1',concat('手动派单-',a.customer_username),concat('自动化派单-',a.customer_username)) preName
if(#{type} = '1',concat('自动化手动-',a.customer_username),concat('自动化自动-',a.customer_username)) preName
FROM t_dispatch_info_pre a,(select @i:=0) as itable
<where>
1=1
......@@ -541,7 +554,9 @@
a.dept_no settleDomainCode,
a.RECORD_BASE recordBase,
a.PROVIDENT_HOUSEHOLD_NAME providentHousehold,
a.PROVIDENT_CARDINAL providentCardinal,
CASE WHEN a.PAYMENT_TYPE ='0' THEN c.LOWER_LIMIT
WHEN a.PAYMENT_TYPE ='2' THEN c.UPPER_LIMIT
ELSE a.PROVIDENT_CARDINAL END as 'providentCardinal',
a.FUND_START_DATE providentStart,
a.FUND_PER_FLAG perFlag,
a.UNIT_PROVIDENT_PER providentPer,
......@@ -549,8 +564,13 @@
a.id preId,
a.TRUST_REMARK trustRemark,
a.CUSTOMER_USER_LOGIN_NAME as preLoginName,
if(#{type} = '1',concat('手动派单-',a.customer_username),concat('自动化派单-',a.customer_username)) preName
FROM t_dispatch_info_pre a,(select @i:=0) as itable
if(#{type} = '1',concat('自动化手动-',a.customer_username),concat('自动化自动-',a.customer_username)) preName
FROM t_dispatch_info_pre a
LEFT JOIN sys_base_set_info b ON a.CONFIG_HOUSE_ID = b.ID
LEFT JOIN (select * from sys_base_set_info t where
DATE_FORMAT(t.APPLY_START_DATE,'%Y%m%d') <![CDATA[ <= ]]> DATE_FORMAT(CURDATE(),'%Y%m%d') and DATE_FORMAT(CURDATE(),'%Y%m%d') <![CDATA[ <= ]]> IFNULL(t.APPLY_END_DATE,DATE_FORMAT(CURDATE(),'%Y%m%d'))
) c ON c.DEPART_NAME = b.DEPART_NAME
,(select @i:=0) as itable
<where>
1=1
AND a.id in
......@@ -562,6 +582,7 @@
#{status}
</foreach>
</where>
group by a.id
</select>
<select id="getAllUnDisSocialData" resultMap="tDispatchInfoPreMap">
SELECT
......
......@@ -20,6 +20,9 @@
<result property="createTime" column="CREATE_TIME"/>
<result property="dispatchName" column="DISPATCH_NAME"/>
<result property="dispatchTime" column="DISPATCH_TIME"/>
<result property="unitProvidentPer" column="UNIT_PROVIDENT_PER"/>
<result property="personalProvidentPer" column="PERSONAL_PROVIDENT_PER"/>
<result property="providentCardinal" column="UNIT_PROVIDENG_CARDINAL"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -37,7 +40,10 @@
a.UPDATE_TIME,
a.CREATE_TIME,
a.DISPATCH_NAME,
a.DISPATCH_TIME
a.DISPATCH_TIME,
a.UNIT_PROVIDENT_PER,
a.PERSONAL_PROVIDENT_PER,
a.UNIT_PROVIDENG_CARDINAL
</sql>
<sql id="tFundPreDetail_where">
<if test="tFUNDPreDetail != null">
......
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