Commit f0bb0dfe authored by fangxinjiang's avatar fangxinjiang

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

parents 7aa084e3 28ff2267
...@@ -91,4 +91,6 @@ public interface TBusWarningEmployeeMapper extends BaseMapper<TBusWarningEmploye ...@@ -91,4 +91,6 @@ public interface TBusWarningEmployeeMapper extends BaseMapper<TBusWarningEmploye
**/ **/
String getVacationInfoEmpName(); String getVacationInfoEmpName();
String getVacationEmpName();
} }
...@@ -93,4 +93,6 @@ public interface TBusWarningEmployeeService extends IService<TBusWarningEmployee ...@@ -93,4 +93,6 @@ public interface TBusWarningEmployeeService extends IService<TBusWarningEmployee
**/ **/
String getVacationInfoEmpName(); String getVacationInfoEmpName();
String getVacationEmpName();
} }
...@@ -179,5 +179,15 @@ public class TBusWarningEmployeeServiceImpl extends ServiceImpl<TBusWarningEmplo ...@@ -179,5 +179,15 @@ public class TBusWarningEmployeeServiceImpl extends ServiceImpl<TBusWarningEmplo
return baseMapper.getVacationInfoEmpName(); 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 ...@@ -188,7 +188,7 @@ public class TBusWarningServiceImpl extends ServiceImpl<TBusWarningMapper, TBusW
empList = busWarningEmployeeService.getByBizId(bizId); empList = busWarningEmployeeService.getByBizId(bizId);
// 1添加复审、到期、年假系统消息 // 1添加复审、到期、年假系统消息
this.getRemindInfo(empList, sysBus); this.getRemindInfo(empList, sysBus, monthDay);
si.setEmpList(empList); si.setEmpList(empList);
siList.add(si); siList.add(si);
} }
...@@ -197,9 +197,19 @@ public class TBusWarningServiceImpl extends ServiceImpl<TBusWarningMapper, TBusW ...@@ -197,9 +197,19 @@ public class TBusWarningServiceImpl extends ServiceImpl<TBusWarningMapper, TBusW
return siList; return siList;
} }
private void getRemindInfo(List<TBusWarningEmployee> empList, TBusWarning sysBus) { private void getRemindInfo(List<TBusWarningEmployee> empList, TBusWarning sysBus, String monthDay) {
if (empList != null && !empList.isEmpty()) {
TBusWarningMessage message = new TBusWarningMessage(); 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.setRemindContent(empList.get(0).getEmpName() + sysBus.getRemindTemplate());
message.setRemindObject(sysBus.getRemindObject()); message.setRemindObject(sysBus.getRemindObject());
message.setRemindType(sysBus.getRemindType()); message.setRemindType(sysBus.getRemindType());
......
...@@ -199,6 +199,17 @@ ...@@ -199,6 +199,17 @@
GROUP BY c.id GROUP BY c.id
</insert> </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 id="getVacationInfoEmpName" resultType="java.lang.String">
SELECT c.EMP_NAME 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