Commit 64940e92 authored by hongguangwu's avatar hongguangwu

1.7.24 - 发起时,联动合同续签待办。

parent ea1ceb01
......@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasc.open.api.exception.ApiException;
import com.fasc.open.api.v5_1.res.template.SignTemplateListInfo;
import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeConstants;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.*;
import com.yifu.cloud.plus.v1.yifu.archives.service.*;
......@@ -63,6 +64,7 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
private final TEmployeeContractInfoMapper tEmployeeContractInfoMapper;
private final TEmployeeInfoMapper tEmployeeInfoMapper;
private final TEmpContactInfoMapper tEmpContactInfoMapper;
private final TEmpContractAlertMapper tEmpContractAlertMapper;
private final TAttaInfoMapper tAttaInfoMapper;
private final TFascCompanyService tFascCompanyService;
......@@ -383,6 +385,16 @@ public class FascServiceImpl extends ServiceImpl<FddContractInfoMapper, FddContr
if (contract == null) {
return R.failed(FASC_NO_CONTRACT);
}
if (Common.isEmpty(contract.getContractId())) {
return R.failed(EmployeeConstants.ERROR_NO_ALERT_FOUND);
}
TEmpContractAlert renewalAlert = tEmpContractAlertMapper.selectOne(Wrappers.<TEmpContractAlert>query().lambda()
.eq(TEmpContractAlert::getContractId, contract.getContractId())
.eq(TEmpContractAlert::getAutoFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (renewalAlert == null) {
return R.failed(EmployeeConstants.ERROR_NO_ALERT_FOUND);
}
TEmployeeContractInfo empContract = tEmployeeContractInfoMapper.selectOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getPreNewId,id)
.eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
......
......@@ -682,7 +682,9 @@
'无' as tryPeriod,
a.id preNewId,a.contract_id contractId,
if(#{type} = '1',concat('自动化手动-',a.customer_username),concat('自动化自动-',a.customer_username)) preName
FROM t_employee_contract_pre_new a,(select @i:=0) as itable
FROM t_employee_contract_pre_new a
INNER JOIN t_emp_contract_alert alert ON a.contract_id = alert.CONTRACT_ID AND alert.AUTO_FLAG = '0'
,(select @i:=0) as itable
<where>
1=1
AND a.id in
......@@ -701,7 +703,9 @@
SELECT
a.id
FROM t_employee_contract_pre_new a
where a.process_status in('1','5') and (a.expected_collection_time <![CDATA[ <= ]]> now())
INNER JOIN t_emp_contract_alert b ON a.contract_id = b.CONTRACT_ID AND b.AUTO_FLAG = '0'
WHERE a.process_status IN ('1','5')
AND a.expected_collection_time <![CDATA[ <= ]]> NOW()
</select>
<!--tEmployeeContractPreNew简单分页查询-->
......@@ -796,7 +800,7 @@
a.CONTRACT_START as "CONTRACT_START_PRE",
a.CONTRACT_END as "CONTRACT_END_PRE"
FROM t_employee_contract_pre_new b
LEFT JOIN t_emp_contract_alert a on b.contract_id=a.contract_id
INNER JOIN t_emp_contract_alert a ON b.contract_id = a.contract_id AND a.AUTO_FLAG = '0'
<where>
1=1 AND (b.expected_collection_time is null or b.expected_collection_time <![CDATA[ <= ]]> concat(DATE_FORMAT(curdate(),'%Y-%m-%d'), ' 23:59:59'))
<if test="tEmpContractAlert != null">
......@@ -834,7 +838,7 @@
SELECT
count(1)
FROM t_employee_contract_pre_new b
LEFT JOIN t_emp_contract_alert a on b.contract_id=a.contract_id
INNER JOIN t_emp_contract_alert a ON b.contract_id = a.contract_id AND a.AUTO_FLAG = '0'
<where>
1=1 AND (b.expected_collection_time is null or b.expected_collection_time <![CDATA[ <= ]]> concat(DATE_FORMAT(curdate(),'%Y-%m-%d'), ' 23:59:59'))
<if test="tEmpContractAlert != 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