Commit 5c5e034f authored by huyuchen's avatar huyuchen

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

parents 7a92fab3 2558dfee
......@@ -48,6 +48,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
......@@ -597,5 +598,12 @@ public class TEmployeeInfoController {
public R<String> updateEmpPhone(@RequestParam String id, @RequestParam String empPhoneOld, @RequestParam String empPhoneNew) {
return tEmployeeInfoService.updateEmpPhone(id, empPhoneOld, empPhoneNew);
}
/**
* 远程接口获取非在职档案(无档案或已离职)
*/
@Inner
@PostMapping("/inner/getEmpOnlineMap")
public Set<String> getCustomerUserMap(@RequestBody List<String> empIdCardList) {
return tEmployeeInfoService.getEmpOnlineMap(empIdCardList);
}
}
......@@ -26,6 +26,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* 人员档案表
......@@ -143,4 +144,6 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
List<HcmEmployeeInfoVO> getHcmEmpInfoList(@Param("idCardList") List<String> idCardList);
void updateEmployeeAgeTask();
Set<String> getEmpOnlineMap(@Param("empIdCardList")List<String> empIdCardList);
}
......@@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* 人员档案表
......@@ -291,4 +292,5 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
**/
R<TEmployeeInfo> getByEmpNameAndCard(String empName, String empIdCard);
Set<String> getEmpOnlineMap(List<String> empIdCardList);
}
......@@ -4283,5 +4283,15 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
return R.failed("无该员工信息");
}
}
/**
* 远程接口获取非在职档案(无档案或已离职)
*/
@Override
public Set<String> getEmpOnlineMap(List<String> empIdCardList) {
if (empIdCardList == null || empIdCardList.isEmpty()) {
return null; // 返回空
}
return baseMapper.getEmpOnlineMap(empIdCardList);
}
}
......@@ -1400,4 +1400,17 @@
<update id="updateEmployeeAgeTask">
update t_employee_info set EMP_AGE = YEAR(CURRENT_DATE())-YEAR(STR_TO_DATE(SUBSTRING(EMP_IDCARD,7,4),'%Y')) where EMP_IDCARD is not null and DELETE_FLAG='0' and SUBSTRING(EMP_IDCARD,7,1) in ('1','2')
</update>
<select id="getEmpOnlineMap" resultType="java.lang.String">
SELECT EMP_IDCARD
FROM t_employee_info
WHERE EMP_IDCARD IN
<foreach item="idCard" index="index" collection="empIdCardList"
open="(" separator="," close=")">
#{idCard}
</foreach>
and FILE_STATUS = '1' <!-- 已减档 -->
and DELETE_FLAG ='0' <!-- 未删除 -->
</select>
</mapper>
......@@ -40,6 +40,22 @@ public class Common {
public static boolean isEmpty(String str) {
return null == str || "".equals(str.trim()) || "null".equals(str.trim()) || "undefinded".equals(str.trim());
}
/**
* @Author fxj
* @Description 字符串空 转换为0 异常转换为0
* @Date 15:17 2025/4/24
**/
public static int isEmptyToZero(String str) {
if (isEmpty(str)){
return 0;
}
try {
return Integer.parseInt(str);
}catch (Exception e){
return 0;
}
}
/**
* 截取startStr和endStr中间的字符串(开区间)
*
......
......@@ -22,6 +22,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* @Author fxj
......@@ -574,4 +575,18 @@ public class ArchivesDaprUtil {
}
return res;
}
/**
* @Author fxj
* @Description 远程接口获取非在职档案(无档案或已离职)
* @Date 10:51 2025/4/24
**/
public R<Set<String>> getEmpOnlineMap(List<String> empIdCardList){
R<Set> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/temployeeinfo/inner/getEmpOnlineMap" , JSON.toJSONString(empIdCardList), Set.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("获取档案派单信息失败!");
}
Set<String> map = JSON.parseObject(JSON.toJSONString(res.getData()),new TypeReference<Set<String>>(){});
return R.ok(map);
}
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
/**
* @Author fxj
* @Description 企业微信推送商险到期提醒
* @Date 19:13 2025/4/23
* @Param
* @return
**/
@Data
@Tag(name = "企业微信推送商险待办信息")
public class InsuranceAlertWx implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String projectName;
/**
* 临期
*/
@Schema(description = "临期")
private String lq;
/**
* 过期
*/
@Schema(description = "过期")
private String gq;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
/**
* @Author fxj
* @Description 企业微信推送商险到期提醒组装信息
* @Date 19:13 2025/4/23
* @Param
* @return
**/
@Data
@Tag(name = "企业微信推送商险待办信息组装信息")
public class InsuranceAlertWxVo implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
/**
* 项目数
*/
@Schema(description = "项目数")
private int domainNum;
/**
* 临期数
*/
@Schema(description = "临期数")
private int lqNum;
/**
* 过期数
*/
@Schema(description = "过期数")
private int gqNum;
}
......@@ -139,4 +139,17 @@ public class TInsurancesWarnController {
public void createInsuranceAlert() {
insuranceWarnService.createInsuranceAlert();
}
/**
* @Author fxj
* @Description 每日09:00推送一条整合的待办数据——只推送前端客服,详情去HRO处理——消息待定:项目名称-项目编码、商险临期人数:**;商险过期人数:**;
* ——项目数:***、商险临期人数:***、商险过期人数:***,请及时至HRO系统进行处理,以免人员脱保!;
* @Date 18:55 2025/4/23
**/
@Operation(description = "每天9:00推送整合后的待办商险数据给对应项目的前端客服信息")
@Inner
@PostMapping("/inner/pushInsuranceAlertToWx")
public void pushInsuranceAlertToWx() {
insuranceWarnService.pushInsuranceAlertToWx();
}
}
......@@ -318,7 +318,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
int noPageCountDiy(@Param("param")InsuranceSearchVo searchVo);
void batchexpireIgnore(@Param("idList")List<String> idList);
void batchexpireIgnore(@Param("idList")List<String> idList,@Param("remark")String remark);
void batchexpireAlertIgnore(@Param("idList")List<String> idList,@Param("remark")String remark);
......
......@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAlertWx;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
......@@ -22,4 +23,7 @@ public interface TInsuranceWarnMapper extends BaseMapper<TInsuranceAlert> {
* @return {@link List < TInsuranceAlert >}
*/
List<TInsuranceAlert> selectInsuranceAlert();
List<InsuranceAlertWx> getInsuranceAlertToWx();
}
......@@ -12,4 +12,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceAlert;
public interface TInsuranceWarnService extends IService<TInsuranceAlert> {
void createInsuranceAlert();
void pushInsuranceAlertToWx();
}
......@@ -7915,7 +7915,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isEmpty(ids) || Common.isEmpty(remark)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
baseMapper.batchexpireIgnore(ids);
baseMapper.batchexpireIgnore(ids,remark);
//更新商险到期提醒表
baseMapper.batchexpireAlertIgnore(ids,remark);
return R.ok();
......
......@@ -144,4 +144,16 @@
AND ll.endTime = a.POLICY_END
where a.DELETE_FLAG = '0'
</select>
<resultMap id="PushWxResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAlertWx">
<result property="projectName" column="DEPT_NAME" jdbcType="VARCHAR"/>
<result property="deptNo" column="DEPT_NO" jdbcType="VARCHAR"/>
<result property="lq" column="lq" jdbcType="VARCHAR"/>
<result property="gq" column="gq" jdbcType="VARCHAR"/>
</resultMap>
<select id="getInsuranceAlertToWx" resultMap="PushWxResultMap">
select a.DEPT_NAME,a.DEPT_NO,
SUM(case when a.IS_OVERDUE='0' THEN 1 ELSE 0 END) as 'lq',
SUM(CASE WHEN a.IS_OVERDUE='1' THEN 1 ELSE 0 END) as 'gq'
from t_insurance_alert a GROUP BY a.DEPT_NO,a.IS_OVERDUE
</select>
</mapper>
......@@ -98,4 +98,16 @@ public class UpdateOverdueTask {
"/temployeeinsurancepre/inner/pushDisConfrimInsurances","", Void.class, SecurityConstants.FROM_IN);
log.info("-------------每天三点二十推送商险待确认信息-定时任务开始------------");
}
/**
* @Author fxj
* @Description 每天刷新商险待办信息到微信
* @Date 20:22 2025/4/23
**/
public void everyDaypushInsuranceAlertToWx() {
log.info("-------------每天刷新商险待办信息到微信-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId(),
"/insuranceWarn/inner/pushInsuranceAlertToWx","", Void.class, SecurityConstants.FROM_IN);
log.info("-------------每天刷新商险待办信息到微信-定时任务结束------------");
}
}
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