Commit 28ff2267 authored by huyuchen's avatar huyuchen

假勤信息优化修改

parent 8d64e01e
......@@ -91,4 +91,6 @@ public interface TBusWarningEmployeeMapper extends BaseMapper<TBusWarningEmploye
**/
String getVacationInfoEmpName();
String getVacationEmpName();
}
......@@ -93,4 +93,6 @@ public interface TBusWarningEmployeeService extends IService<TBusWarningEmployee
**/
String getVacationInfoEmpName();
String getVacationEmpName();
}
......@@ -179,5 +179,15 @@ public class TBusWarningEmployeeServiceImpl extends ServiceImpl<TBusWarningEmplo
return baseMapper.getVacationInfoEmpName();
}
/**
* @Description: 获取假期结束人员姓名
* @Author: hgw
* @Date: 2021/8/24 17:54
* @return: int
**/
@Override
public String getVacationEmpName() {
return baseMapper.getVacationEmpName();
}
}
......@@ -188,7 +188,7 @@ public class TBusWarningServiceImpl extends ServiceImpl<TBusWarningMapper, TBusW
empList = busWarningEmployeeService.getByBizId(bizId);
// 1添加复审、到期、年假系统消息
this.getRemindInfo(empList, sysBus);
this.getRemindInfo(empList, sysBus, monthDay);
si.setEmpList(empList);
siList.add(si);
}
......@@ -197,9 +197,19 @@ public class TBusWarningServiceImpl extends ServiceImpl<TBusWarningMapper, TBusW
return siList;
}
private void getRemindInfo(List<TBusWarningEmployee> empList, TBusWarning sysBus) {
if (empList != null && !empList.isEmpty()) {
TBusWarningMessage message = new TBusWarningMessage();
private void getRemindInfo(List<TBusWarningEmployee> empList, TBusWarning sysBus, String monthDay) {
TBusWarningMessage message = new TBusWarningMessage();
if (sysBus.getRemindType() == 2 && Common.isNotNull(sysBus.getSendDate()) && sysBus.getSendDate().equals(monthDay)) {
String name = busWarningEmployeeService.getVacationEmpName();
if (Common.isNotNull(name)) {
message.setRemindContent(name + sysBus.getRemindTemplate());
message.setRemindObject(sysBus.getRemindObject());
message.setRemindType(sysBus.getRemindType());
message.setWarningId(sysBus.getId());
message.setCreateDate(LocalDateTime.now());
busWarningMessageService.save(message);
}
} else if (empList != null && !empList.isEmpty()) {
message.setRemindContent(empList.get(0).getEmpName() + sysBus.getRemindTemplate());
message.setRemindObject(sysBus.getRemindObject());
message.setRemindType(sysBus.getRemindType());
......
......@@ -199,6 +199,17 @@
GROUP BY c.id
</insert>
<!--假期结束提醒-->
<select id="getVacationEmpName" resultType="java.lang.String">
SELECT c.EMP_NAME
FROM t_vacation_monitor c
where c.NOT_USED_VACATION_DURATION>0 and DATE_FORMAT(now(),'%Y') = c.VACATION_YEAR
and not exists (
select 1 from t_bus_leave l where l.tele_no = c.business_telecom_number
)
limit 1
</select>
<!--假期结束提醒-->
<select id="getVacationInfoEmpName" resultType="java.lang.String">
SELECT c.EMP_NAME
......
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