修改是删除待办jiekou

This commit is contained in:
wulin 2020-11-20 09:50:56 +08:00
parent 94bc2dd60e
commit 7b87828450
6 changed files with 167 additions and 122 deletions

View File

@ -23,6 +23,7 @@ public enum WorkMsgTypeEnum {
SCORE(9, "绩效考评待办事项", "评分", "\n @的绩效\n \n 需您去评分"), SCORE(9, "绩效考评待办事项", "评分", "\n @的绩效\n \n 需您去评分"),
SKIP(10, "绩效跳过", "跳过", "# @的绩效\n ## 己经跳过"), SKIP(10, "绩效跳过", "跳过", "# @的绩效\n ## 己经跳过"),
TRANSFER(11, "绩效转交", "转交", "# @的绩效\n ## 己经转交"), TRANSFER(11, "绩效转交", "转交", "# @的绩效\n ## 己经转交"),
CLEARN(10, "绩效转交", "转交", "# @的绩效\n ## 己经转交"),
// 您的2020年10月绩效考核已经开始请尽快制定绩效目标 // 您的2020年10月绩效考核已经开始请尽快制定绩效目标
// 吴林的2020年12月绩效考核的目标需要您确认点击前往确认 // 吴林的2020年12月绩效考核的目标需要您确认点击前往确认
; ;

View File

@ -221,8 +221,14 @@ public class DingtalkBusiness {
return sendWorkMSGByEntity(appid, fromStaffEntity, toStaffEntity, workMsgTypeEnum, "https://www.baidu.com"); return sendWorkMSGByEntity(appid, fromStaffEntity, toStaffEntity, workMsgTypeEnum, "https://www.baidu.com");
} }
public String delWorkMSGWithStart(Long startId){ public String delWorkMSGWithStart(List<Long> recordIds){
return "";
ThreadSendMessage threadSendMessage = new ThreadSendMessage(recordIds, WorkMsgTypeEnum.CLEARN, appid);
Thread thread = new Thread(threadSendMessage);
thread.start();
return "OK";
} }
@ -284,7 +290,7 @@ public class DingtalkBusiness {
} }
WorkMsgTypeEnum workMsgTypeEnum = WorkMsgTypeEnum.findRoleTypeByCode(type); WorkMsgTypeEnum workMsgTypeEnum = WorkMsgTypeEnum.findRoleTypeByCode(type);
ThreadSendMessage threadSendMessage = new ThreadSendMessage(fromStaff, toStaffids, workMsgTypeEnum, appid); ThreadSendMessage threadSendMessage = new ThreadSendMessage(toStaffids, workMsgTypeEnum, appid);
Thread thread = new Thread(threadSendMessage); Thread thread = new Thread(threadSendMessage);
thread.start(); thread.start();
@ -366,14 +372,20 @@ public class DingtalkBusiness {
public class ThreadSendMessage implements Runnable{ public class ThreadSendMessage implements Runnable{
List<StaffSimpleInfo> toStaffids; List<StaffSimpleInfo> toStaffids;
StaffSimpleInfo fromStaff = null; //StaffSimpleInfo fromStaff = null;
List<Long> recordIds;
WorkMsgTypeEnum workMsgTypeEnum; WorkMsgTypeEnum workMsgTypeEnum;
String appid; String appid;
String hostUrl = "https://lzmanagement.ldxinyong.com/digitization"; String hostUrl = "https://lzmanagement.ldxinyong.com/digitization";
public ThreadSendMessage(StaffSimpleInfo fromStaff, List<StaffSimpleInfo> toStaffids, WorkMsgTypeEnum typeEnum, String appid){ public ThreadSendMessage(List<StaffSimpleInfo> toStaffids, WorkMsgTypeEnum typeEnum, String appid){
this.toStaffids = toStaffids; this.toStaffids = toStaffids;
workMsgTypeEnum = typeEnum; workMsgTypeEnum = typeEnum;
this.fromStaff = fromStaff; this.appid = appid;
}
public ThreadSendMessage(List<Long> recordIds, WorkMsgTypeEnum typeEnum, String appid){
this.recordIds = recordIds;
workMsgTypeEnum = typeEnum;
this.appid = appid; this.appid = appid;
} }
@ -400,6 +412,13 @@ public class DingtalkBusiness {
logger.info("开始批量推送消息,数量{}, appid{}", toStaffids.size(), appid); logger.info("开始批量推送消息,数量{}, appid{}", toStaffids.size(), appid);
ThirdAppConfig thirdAppConfig = thirdAppConfigService.getByAppId(appid); ThirdAppConfig thirdAppConfig = thirdAppConfigService.getByAppId(appid);
String token = dingTalkUtil.getAccessTokenWitchEntity(thirdAppConfig); String token = dingTalkUtil.getAccessTokenWitchEntity(thirdAppConfig);
if(workMsgTypeEnum.getType() == WorkMsgTypeEnum.URGING.getType()){
//绩效催办
logger.info("绩效清空");
//List<ThreadSendMessage> threadSendMessages = thirdMsgSendRecordService.selectThirdMsgSendRecordsByRecordIds(resultRecordIds);
}else{
for (StaffSimpleInfo info:toStaffids for (StaffSimpleInfo info:toStaffids
) { ) {
if(token != null && token.length() > 0){ if(token != null && token.length() > 0){
@ -543,5 +562,7 @@ public class DingtalkBusiness {
} }
} }
} }
}
} }
} }

View File

@ -106,4 +106,6 @@ public interface ResultRecordMapper extends BaseMapper<ResultRecord> {
int batchDeleteByResultRecordIds(@Param("resultRecordIds")List<Long> resultRecordIds); int batchDeleteByResultRecordIds(@Param("resultRecordIds")List<Long> resultRecordIds);
List<ResultRecord> selectResultRecordsByStartId(Long startId);
} }

View File

@ -122,4 +122,7 @@ public interface ResultRecordService extends IService<ResultRecord> {
ResultRecord selectLastResultRecordByUserId(Long userId); ResultRecord selectLastResultRecordByUserId(Long userId);
ResultRecord selectResultRecordByStaffIdAndStartId(Long userId, Long startId); ResultRecord selectResultRecordByStaffIdAndStartId(Long userId, Long startId);
List<ResultRecord> selectResultRecordsByStartId(Long startId);
List<Long> selectResultRecordIdsByStartId(Long startId);
} }

View File

@ -1334,4 +1334,14 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
public ResultRecord selectResultRecordByStaffIdAndStartId(Long userId, Long startId){ public ResultRecord selectResultRecordByStaffIdAndStartId(Long userId, Long startId){
return resultRecordMapper.selectResultRecordByStaffIdAndStartId(userId, startId); return resultRecordMapper.selectResultRecordByStaffIdAndStartId(userId, startId);
} }
@Override
public List<ResultRecord> selectResultRecordsByStartId(Long startId){
return resultRecordMapper.selectResultRecordsByStartId(startId);
}
@Override
public List<Long> selectResultRecordIdsByStartId(Long startId){
return resultRecordMapper.selectIdsByStartId(startId);
}
} }

View File

@ -612,5 +612,13 @@
</foreach> </foreach>
) )
</update> </update>
<select id="selectResultRecordsByStartId" resultType="ResultRecord">
select * from lz_result_record where
is_delete = 0
and start_id = #{startId}
</select>
</mapper> </mapper>