fix
This commit is contained in:
parent
1adcd6f556
commit
785ffda67f
@ -1,11 +1,13 @@
|
||||
package com.lz.modules.job.task;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.lz.modules.app.entity.StaffEntity;
|
||||
import com.lz.modules.app.service.StaffService;
|
||||
import com.lz.modules.job.business.DingtalkBusiness;
|
||||
import com.lz.modules.performance.enums.ResultFlowProcessEnum;
|
||||
import com.lz.modules.sys.service.app.ResultRecordService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -36,11 +38,15 @@ public class ResultTaskNoticJob implements ITask {
|
||||
|
||||
@Override
|
||||
public void run(String params) {
|
||||
|
||||
logger.info("绩效任务填写通知开始。。。");
|
||||
List<Long> ids = resultRecordService.selectStaffIdsByFlowProcess(process);
|
||||
List<StaffEntity> staffEntities = staffService.selectByIds(ids);
|
||||
String res = dingtalkBusiness.sendTaskInputMsg(staffEntities);
|
||||
logger.info("绩效任务填写通知响应:" + res);
|
||||
if(CollectionUtils.isNotEmpty(ids)){
|
||||
logger.info("通知人员id: " + JSON.toJSONString(ids));
|
||||
List<StaffEntity> staffEntities = staffService.selectByIds(ids);
|
||||
String res = dingtalkBusiness.sendTaskInputMsg(staffEntities);
|
||||
logger.info("绩效任务填写通知响应:" + res);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ public class ExportController {
|
||||
|
||||
}
|
||||
|
||||
/* @GetMapping("/testDingTalkTask")
|
||||
@GetMapping("/testDingTalkTask")
|
||||
public void testDingTalkTask(){
|
||||
List<Long> ids = resultRecordService.selectStaffIdsByFlowProcess(process);
|
||||
log.info(JSON.toJSONString(ids));
|
||||
@ -114,7 +114,7 @@ public class ExportController {
|
||||
List<StaffEntity> staffEntities = staffService.selectByIds(objects);
|
||||
String res = dingtalkBusiness.sendTaskInputMsg(staffEntities);
|
||||
logger.info("绩效任务填写通知响应:" + res);
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -645,7 +645,7 @@
|
||||
|
||||
|
||||
<select id="selectStaffIdsByFlowProcess" resultType="long">
|
||||
select staff_id from lz_result_record where is_delete = 0
|
||||
select DISTINCT (staff_id) from lz_result_record where is_delete = 0 and start_id !=0
|
||||
and flow_process in (
|
||||
<foreach collection="flowProcess" item="process" separator=",">
|
||||
#{process}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user