增加部分氢气惧日志

This commit is contained in:
wulin 2020-11-20 10:16:06 +08:00
parent c227832a0e
commit cbf0ced7f5
10 changed files with 61 additions and 4 deletions

View File

@ -224,7 +224,8 @@ public class DingtalkBusiness {
public String delWorkMSGWithStart(List<Long> recordIds){
ThreadSendMessage threadSendMessage = new ThreadSendMessage(recordIds, WorkMsgTypeEnum.CLEARN, appid);
ThreadSendMessage threadSendMessage = new ThreadSendMessage();
threadSendMessage.setUpdateData(recordIds, WorkMsgTypeEnum.CLEARN, appid);
Thread thread = new Thread(threadSendMessage);
thread.start();
@ -383,11 +384,18 @@ public class DingtalkBusiness {
this.appid = appid;
}
public ThreadSendMessage(List<Long> recordIds, WorkMsgTypeEnum typeEnum, String appid){
public void setUpdateData(List<Long> recordIds, WorkMsgTypeEnum typeEnum, String appid){
this.recordIds = recordIds;
workMsgTypeEnum = typeEnum;
this.appid = appid;
}
public ThreadSendMessage(){
}
private void sendNotic(Long staffId, String employeeId,
String content1, String content2, String content3,
@ -417,7 +425,13 @@ public class DingtalkBusiness {
logger.info("绩效清空");
//List<ThreadSendMessage> threadSendMessages = thirdMsgSendRecordService.selectThirdMsgSendRecordsByRecordIds(resultRecordIds);
List<ThirdMsgSendRecord> threadSendMessages
= thirdMsgSendRecordService.selectThirdMsgSendRecordsByRecordIds(recordIds, 1, 1);
logger.info("需要删除的条数为{}", threadSendMessages.size());
for (ThirdMsgSendRecord thirdMsgSendRecord:threadSendMessages
) {
dingTalkUtil.updateWorkMSG(thirdMsgSendRecord, token);
}
}else{
for (StaffSimpleInfo info:toStaffids
) {

View File

@ -16,6 +16,7 @@ import com.lz.modules.performance.req.CheckStaffReq;
import com.lz.modules.sys.controller.AbstractController;
import com.lz.modules.sys.entity.SysUserEntity;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -27,6 +28,7 @@ import java.util.stream.Collectors;
@RestController
@RequestMapping("/evaluationGroup")
@Api(tags="考评组")
@Slf4j
public class EvaluationGroupController extends AbstractController {
@ -116,6 +118,7 @@ public class EvaluationGroupController extends AbstractController {
@ApiOperation("获取考评组列表")
@ApiResponses({@ApiResponse(code=200,message = "成功", response=EvaluationGroup.class)})
public R getGroups(@RequestBody @ApiParam EvaluationGroupReq req) {
log.info("获取考评组列表数据{}", req);
SysUserEntity sysUserEntity = getUser();
PageUtils pageUtils = evaluationGroupService.selectEvaluationGroupByReq(req, sysUserEntity);
return R.ok().put("data",pageUtils);
@ -134,6 +137,7 @@ public class EvaluationGroupController extends AbstractController {
@ApiOperation("保存考评组")
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = EvaluationGroup.class)})
public R save(@RequestBody @ApiParam EvaluationGroup evaluationGroup) {
log.info("保存考评组数据{}", evaluationGroup);
EvaluationGroup evaluationGroup1 = evaluationGroupService.selectEvaluationGroupByName(evaluationGroup.getName());
List<StaffRole> staffRoles = null;
if(evaluationGroup.getId() != null && evaluationGroup.getId().intValue() > 0){
@ -228,6 +232,7 @@ public class EvaluationGroupController extends AbstractController {
@ApiOperation("校验是否有跨组人员")
@ApiResponses({@ApiResponse(code = 200,message = "成功"),@ApiResponse(code = 504,message = "已跨组",response = StaffSimpleDto.class)})
public R checkStaff(@RequestBody @ApiParam(required = true,name = "body") CheckStaffReq checkStaffReq) {
log.info("校验跨组人员接受数据{}", checkStaffReq);
return evaluationGroupService.checkStaff(checkStaffReq);
}
}

View File

@ -17,6 +17,7 @@ import com.lz.modules.flow.service.FlowChartRoleService;
import com.lz.modules.flow.service.FlowChartService;
import com.lz.modules.flow.service.FlowManagerService;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -30,6 +31,7 @@ import java.util.stream.Stream;
@RestController
@RequestMapping("/flowChart")
@Api(tags={"考核节点"})
@Slf4j
public class FlowChartController {
@ -142,6 +144,7 @@ public class FlowChartController {
@ApiOperation("保存流程节点小流程列表")
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = FlowChartDetailRecord.class)})
public R saveDetailProcs(@RequestBody @ApiParam FlowChartDetailRecordListReq flowChartDetailRecordListReq) {
log.info("保存流程小结点接受的数据{}", flowChartDetailRecordListReq);
if(flowChartDetailRecordListReq.getRecordSimpleDtos() != null && flowChartDetailRecordListReq.getRecordSimpleDtos().size() > 0){
List<FlowChartDetailRecord> inserts = new ArrayList<>();
List<FlowChartDetailRecord> updaes = new ArrayList<>();

View File

@ -23,6 +23,7 @@ import com.lz.modules.sys.entity.app.ResultRecord;
import com.lz.modules.sys.service.app.ResultDetailService;
import com.lz.modules.sys.service.app.ResultRecordService;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.map.HashedMap;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -37,6 +38,7 @@ import java.util.stream.Collectors;
@RestController
@RequestMapping("/flowStart")
@Api(tags = "发起考核")
@Slf4j
public class FlowStartController {
@ -69,6 +71,7 @@ public class FlowStartController {
@ApiOperation("发起新的考核任务")
@ApiResponses({@ApiResponse(code = 200, message = "成功", response = FlowStart.class)})
public R save(@RequestBody @ApiParam FlowStart flowStart) {
log.info("发起考核接受数据{}", flowStart);
return flowStartService.saveStart(flowStart);
}

View File

@ -12,6 +12,7 @@ import com.lz.modules.flow.req.ResultTagetLibItemReq;
import com.lz.modules.flow.service.ResultModelService;
import com.lz.modules.performance.service.ResultTagetLibService;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
@ -24,6 +25,7 @@ import java.util.List;
@RestController
@RequestMapping("/resultModel")
@Api(tags = "考核模板相关")
@Slf4j
public class ResultModelController {
@ -86,6 +88,7 @@ public class ResultModelController {
@PostMapping("/save")
@ApiOperation("保存模板中的考核维度")
public R save(@RequestBody @ApiParam ResultModel resultModel) {
log.info("保存模板中的考核数据{}", resultModel);
if(resultModel.getId() != null && resultModel.getId().intValue() > 0){
return update(resultModel);
}
@ -96,6 +99,7 @@ public class ResultModelController {
@PostMapping("/saveDetail")
@ApiOperation("保存模板中的考核维度及指标")
public R saveDetail(@RequestBody @ApiParam ResultModelDetailReq resultModelDetailReq) {
log.info("保存指标的数据{}", resultModelDetailReq);
return resultModelService.saveDetail(resultModelDetailReq);
}

View File

@ -8,12 +8,14 @@ import com.lz.modules.flow.model.ResultTagetLibDto;
import com.lz.modules.flow.req.ResultTagetLibSearchReq;
import com.lz.modules.performance.service.ResultTagetLibService;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/resultTagetLib")
@Api(tags = "考核指标相关")
@Slf4j
public class ResultTagetLibController {
@ -28,6 +30,7 @@ public class ResultTagetLibController {
@ApiOperation("搜索指标库")
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = ResultTagetLibDto.class)})
public R GetTargetLibs(@RequestBody @ApiParam ResultTagetLibSearchReq req) {
log.info("搜索指标请求的数据{}", req);
PageUtils pageUtils = resultTagetLibService.selectResultTagetLibByReq(req);
return R.ok().put("data",pageUtils);
}
@ -50,7 +53,7 @@ public class ResultTagetLibController {
@PostMapping("/save")
@ApiOperation("保存考核指标")
public R save(@RequestBody @ApiParam ResultTagetLib resultTagetLib) {
log.info("保存考核指标{}", resultTagetLib);
if(resultTagetLib.getId() != null && resultTagetLib.getId().intValue() > 0){
return update(resultTagetLib);
}

View File

@ -11,6 +11,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.modules.third.entity.ThirdMsgSendRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface ThirdMsgSendRecordMapper extends BaseMapper<ThirdMsgSendRecord> {
@ -35,4 +38,8 @@ public interface ThirdMsgSendRecordMapper extends BaseMapper<ThirdMsgSendRecord>
@Param("staffId") Long staffId,
@Param("workType") int workType,
@Param("status") int status);
List<ThirdMsgSendRecord> selectThirdMsgSendRecordsByRecordIds(@Param("list") List<Long> recordIds,
@Param("type") int type,
@Param("status") int status);
}

View File

@ -2,8 +2,10 @@ package com.lz.modules.third.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.common.utils.PageUtils;
import com.lz.modules.job.business.DingtalkBusiness;
import com.lz.modules.third.entity.ThirdMsgSendRecord;
import java.util.List;
import java.util.Map;
/**
@ -38,4 +40,6 @@ public interface ThirdMsgSendRecordService extends IService<ThirdMsgSendRecord>
void insert(ThirdMsgSendRecord thirdMsgSendRecord);
ThirdMsgSendRecord selectThirdMsgSendRecordByWorkIdAndStaffIdAndTypeAndStatus(Long workId, Long staffId, int workType, int status);
List<ThirdMsgSendRecord> selectThirdMsgSendRecordsByRecordIds(List<Long> recordIds, int type, int status);
}

View File

@ -12,6 +12,7 @@ import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
@ -96,4 +97,9 @@ public class ThirdMsgSendRecordServiceImpl extends ServiceImpl<ThirdMsgSendRecor
status);
}
@Override
public List<ThirdMsgSendRecord> selectThirdMsgSendRecordsByRecordIds(List<Long> recordIds, int type, int status){
return thirdMsgSendRecordMapper.selectThirdMsgSendRecordsByRecordIds(recordIds, type, status);
}
}

View File

@ -193,5 +193,13 @@
and work_type = #{workType} and status=#{status} and is_delete = 0 limit 1
</select>
<select id="selectThirdMsgSendRecordsByRecordIds" resultType="ThirdMsgSendRecord" >
select * from third_msg_send_record where status=#{status} and is_delete = 0 and work_type = #{type} and work_id in (
<foreach collection="list" item="item" separator=",">
#{item}
</foreach>
)
</select>
</mapper>