提交修改
This commit is contained in:
commit
e8e99bd78b
@ -43,4 +43,5 @@ public interface FlowChartMapper extends BaseMapper<FlowChart> {
|
|||||||
|
|
||||||
List<FlowChart> selectFlowChartsByGroupId(Long groupId);
|
List<FlowChart> selectFlowChartsByGroupId(Long groupId);
|
||||||
|
|
||||||
|
List<FlowChartRoleDto> selectCanSetChartRoleByChartId(Long id);
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@ public interface ResultTagetLibMapper extends BaseMapper<ResultTagetLib> {
|
|||||||
int deleteResultTagetLibById(@Param("id")Long id);
|
int deleteResultTagetLibById(@Param("id")Long id);
|
||||||
|
|
||||||
|
|
||||||
List<ResultTagetLibDto> selectResultTagetLibByModelId(Long id);
|
List<ResultTagetLib> selectResultTagetLibByModelId(Long id);
|
||||||
|
|
||||||
List<ResultTagetLibDto> selectByCondition(@Param("page") IPage page, @Param("req") ResultTagetLibSearchReq req);
|
List<ResultTagetLibDto> selectByCondition(@Param("page") IPage page, @Param("req") ResultTagetLibSearchReq req);
|
||||||
|
|
||||||
|
|||||||
@ -41,4 +41,6 @@ public interface FlowChartService extends IService<FlowChart> {
|
|||||||
List<FlowChartDto> selectFlowChartDtoByFlowManagerId(Long id);
|
List<FlowChartDto> selectFlowChartDtoByFlowManagerId(Long id);
|
||||||
|
|
||||||
List<FlowChart> selectFlowChartsByGroupId(Long groupId);
|
List<FlowChart> selectFlowChartsByGroupId(Long groupId);
|
||||||
|
|
||||||
|
List<FlowChartRoleDto> selectCanSetChartRoleByChartId(Long id);
|
||||||
}
|
}
|
||||||
@ -82,6 +82,12 @@ public class FlowChartServiceImpl extends ServiceImpl<FlowChartMapper, FlowChart
|
|||||||
return flowChartMapper.selectFlowChartsByGroupId(groupId);
|
return flowChartMapper.selectFlowChartsByGroupId(groupId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FlowChartRoleDto> selectCanSetChartRoleByChartId(Long id)
|
||||||
|
{
|
||||||
|
return flowChartMapper.selectCanSetChartRoleByChartId(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -383,9 +383,21 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
evaluationGroup =
|
evaluationGroup =
|
||||||
evaluationGroupService.selectEvaluationGroupByCopyId(evaluationGroup.getId(),flowStart.getId());
|
evaluationGroupService.selectEvaluationGroupByCopyId(evaluationGroup.getId(),flowStart.getId());
|
||||||
if(evaluationGroup == null){
|
if(evaluationGroup == null){
|
||||||
log.info("无法assess/manager/detail找到拷贝组信息");
|
log.info("无法找到拷贝组信息");
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
resultModelDtos = resultModelService.selectResultDtoByGroupId(evaluationGroup.getId());
|
||||||
|
if(resultModelDtos.size() == 0){
|
||||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
||||||
|
log.info("拷贝组的维度信息错误");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
for (ResultModelDto modelDto:resultModelDtos
|
||||||
|
) {
|
||||||
|
List<ResultTagetLibDto> resultTagetLibDtos = resultTagetLibService.selectResultTagetLibDtoByModelId(modelDto.getId());
|
||||||
|
modelDto.setTagetLibs(resultTagetLibDtos);
|
||||||
|
}
|
||||||
|
|
||||||
//以下代码没必要更新,因为这个拷贝分用不到。正确的对应关系清查看lz_evaluation_start_staff
|
//以下代码没必要更新,因为这个拷贝分用不到。正确的对应关系清查看lz_evaluation_start_staff
|
||||||
//evaluationGroup.setStaffIds(evaluationGroup.getStaffIds() + ",");
|
//evaluationGroup.setStaffIds(evaluationGroup.getStaffIds() + ",");
|
||||||
|
|
||||||
@ -424,6 +436,8 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
resultRecord.setCurrentApprovalStaffName(staffInfo.getName());
|
resultRecord.setCurrentApprovalStaffName(staffInfo.getName());
|
||||||
|
|
||||||
resultRecordService.insertResultRecord(resultRecord);
|
resultRecordService.insertResultRecord(resultRecord);
|
||||||
|
//下面生成实际的考核流程
|
||||||
|
resultRecordService.initFlowRecord(resultRecord.getId());
|
||||||
staffInfo.setRecordId(resultRecord.getId());
|
staffInfo.setRecordId(resultRecord.getId());
|
||||||
|
|
||||||
for (ResultModelDto modelDto:resultModelDtos
|
for (ResultModelDto modelDto:resultModelDtos
|
||||||
@ -454,8 +468,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//下面生成实际的考核流程
|
|
||||||
resultRecordService.initFlowRecord(resultRecord.getId());
|
|
||||||
}
|
}
|
||||||
evaluationStartStaffService.insertEvaluationStartStaffs(evaluationStartStaffs);
|
evaluationStartStaffService.insertEvaluationStartStaffs(evaluationStartStaffs);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -181,7 +181,7 @@ public class ResultModelServiceImpl extends ServiceImpl<ResultModelMapper, Resul
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if(delCount == 0){
|
/*if(delCount == 0){
|
||||||
//如果全部被删除,或者没有传入具体维度,那么默认保存一个维度
|
//如果全部被删除,或者没有传入具体维度,那么默认保存一个维度
|
||||||
//没有传具体的维度
|
//没有传具体的维度
|
||||||
ResultModel resultModel = new ResultModel();
|
ResultModel resultModel = new ResultModel();
|
||||||
@ -192,7 +192,7 @@ public class ResultModelServiceImpl extends ServiceImpl<ResultModelMapper, Resul
|
|||||||
resultModel.setOrderBy(resultModelOrderBy);
|
resultModel.setOrderBy(resultModelOrderBy);
|
||||||
resultModelMapper.insertResultModel(resultModel);
|
resultModelMapper.insertResultModel(resultModel);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}*/
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -138,6 +138,7 @@ public class AssessManagerController extends AbstractController{
|
|||||||
@ApiResponses({@ApiResponse(code = 200,message = "成功")})
|
@ApiResponses({@ApiResponse(code = 200,message = "成功")})
|
||||||
public R assessToScore(@RequestBody @ApiParam AssessToScoreReq req){
|
public R assessToScore(@RequestBody @ApiParam AssessToScoreReq req){
|
||||||
try {
|
try {
|
||||||
|
log.info("开始评分,当前登陆用户,userId:" + getUserId());
|
||||||
assessManagerService.toScore(req);
|
assessManagerService.toScore(req);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("开始评分异常" ,e);
|
log.error("开始评分异常" ,e);
|
||||||
|
|||||||
@ -57,8 +57,8 @@ public class FlowChartController {
|
|||||||
List<FlowChartDto> flowChartDtos = flowChartService.selectFlowChartDtoByFlowManagerId(flowManager.getId());
|
List<FlowChartDto> flowChartDtos = flowChartService.selectFlowChartDtoByFlowManagerId(flowManager.getId());
|
||||||
for (FlowChartDto dto:flowChartDtos
|
for (FlowChartDto dto:flowChartDtos
|
||||||
) {
|
) {
|
||||||
List<FlowChartRoleDto> flowCharts = flowChartService.selectChartRoleByChartId(dto.getId());
|
List<FlowChartRoleDto> flowChartRoles = flowChartService.selectCanSetChartRoleByChartId(dto.getId());
|
||||||
dto.setRoleDtos(flowCharts);
|
dto.setRoleDtos(flowChartRoles);
|
||||||
if(groupId > 0){
|
if(groupId > 0){
|
||||||
//获取节点已保存的数据
|
//获取节点已保存的数据
|
||||||
FlowChartDetailRecordListDto flowChartDetailRecordListDto = new FlowChartDetailRecordListDto();
|
FlowChartDetailRecordListDto flowChartDetailRecordListDto = new FlowChartDetailRecordListDto();
|
||||||
|
|||||||
@ -37,7 +37,7 @@ public interface ResultTagetLibService extends IService<ResultTagetLib> {
|
|||||||
int deleteResultTagetLibById(Long id);
|
int deleteResultTagetLibById(Long id);
|
||||||
|
|
||||||
|
|
||||||
List<ResultTagetLibDto> selectResultTagetLibByModelId(Long id);
|
List<ResultTagetLib> selectResultTagetLibByModelId(Long id);
|
||||||
|
|
||||||
PageUtils selectResultTagetLibByReq(ResultTagetLibSearchReq req);
|
PageUtils selectResultTagetLibByReq(ResultTagetLibSearchReq req);
|
||||||
|
|
||||||
|
|||||||
@ -292,33 +292,34 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
|||||||
log.info("更新evaluationStartStaff 数据 为已评分 " + i);
|
log.info("更新evaluationStartStaff 数据 为已评分 " + i);
|
||||||
|
|
||||||
List<ToScoreDingTalkDto> dtos = resultRecordMapper.selectToScoreList(req.getStartId(), evaluation);
|
List<ToScoreDingTalkDto> dtos = resultRecordMapper.selectToScoreList(req.getStartId(), evaluation);
|
||||||
if(CollectionUtils.isEmpty(dtos)){
|
if(CollectionUtils.isNotEmpty(dtos)){
|
||||||
log.info("该考评组无数据 evaluationId:" + evaluation);
|
log.info("本次评分更新操作 num: " + dtos.size());
|
||||||
continue;
|
dtos.forEach(dto -> {
|
||||||
|
Long recordId = dto.getId();
|
||||||
|
//更新流程绩效
|
||||||
|
ApprovalDto approvalDto = new ApprovalDto();
|
||||||
|
approvalDto.setStatus(1);
|
||||||
|
approvalDto.setResultRecordId(recordId);
|
||||||
|
approvalDto.setMenuName("开始评分");
|
||||||
|
try {
|
||||||
|
R r = resultRecordService.newApproval(approvalDto);
|
||||||
|
log.info("绩效id aLong :" + recordId + " ,res" + JSON.toJSONString(r));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("执行中状态跳过失败 recorId:" + recordId,e);
|
||||||
|
}
|
||||||
|
//钉钉通知评分构建
|
||||||
|
StaffSimpleInfo staffSimpleInfo = new StaffSimpleInfo();
|
||||||
|
staffSimpleInfo.setId(dto.getStaffId());
|
||||||
|
staffSimpleInfo.setRecordId(recordId);
|
||||||
|
staffSimpleInfo.setStartId(req.getStartId());
|
||||||
|
toStaffids.add(staffSimpleInfo);
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
log.info("该考评组无数据 evaluationId:" + evaluation);
|
||||||
}
|
}
|
||||||
log.info("本次评分更新操作 num: " + dtos.size());
|
|
||||||
dtos.forEach(dto -> {
|
|
||||||
Long recordId = dto.getId();
|
|
||||||
//更新流程绩效
|
|
||||||
ApprovalDto approvalDto = new ApprovalDto();
|
|
||||||
approvalDto.setStatus(1);
|
|
||||||
approvalDto.setResultRecordId(recordId);
|
|
||||||
approvalDto.setMenuName("开始评分");
|
|
||||||
try {
|
|
||||||
R r = resultRecordService.newApproval(approvalDto);
|
|
||||||
log.info("绩效id aLong :" + recordId + " ,res" + JSON.toJSONString(r));
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("执行中状态跳过失败 recorId:" + recordId,e);
|
|
||||||
}
|
|
||||||
//钉钉通知评分构建
|
|
||||||
StaffSimpleInfo staffSimpleInfo = new StaffSimpleInfo();
|
|
||||||
staffSimpleInfo.setId(dto.getStaffId());
|
|
||||||
staffSimpleInfo.setRecordId(recordId);
|
|
||||||
staffSimpleInfo.setStartId(req.getStartId());
|
|
||||||
toStaffids.add(staffSimpleInfo);
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
//更新flowRecord记录
|
//更新flowRecord记录
|
||||||
List<Object> objects = resultRecordService.listObjs(new QueryWrapper<ResultRecord>()
|
List<Object> objects = resultRecordService.listObjs(new QueryWrapper<ResultRecord>()
|
||||||
.eq("is_delete", 0)
|
.eq("is_delete", 0)
|
||||||
@ -332,15 +333,16 @@ public class AssessManagerServiceImpl implements AssessManagerService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//通知评分
|
if(CollectionUtils.isNotEmpty(toStaffids)){
|
||||||
try {
|
//通知评分
|
||||||
String s = dingtalkBusiness.sendWorkMSGWithAsyn(toStaffids, WorkMsgTypeEnum.START_SCORE.getType());
|
try {
|
||||||
log.info("钉钉评分响应返回,res:" + s);
|
String s = dingtalkBusiness.sendWorkMSGWithAsyn(toStaffids, WorkMsgTypeEnum.START_SCORE.getType());
|
||||||
} catch (Exception e) {
|
log.info("钉钉评分响应返回,res:" + s);
|
||||||
log.error("通知评分异常:ids: " + JSON.toJSONString(toStaffids) + " ,e: " ,e);
|
} catch (Exception e) {
|
||||||
|
log.error("通知评分异常:ids: " + JSON.toJSONString(toStaffids) + " ,e: " ,e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -102,6 +102,7 @@ public class AssessServiceImpl implements AssessService {
|
|||||||
log.info("获取 roleDepartment,staffRole: " + JSON.toJSONString(staffRole));
|
log.info("获取 roleDepartment,staffRole: " + JSON.toJSONString(staffRole));
|
||||||
// 0 标识全部部门
|
// 0 标识全部部门
|
||||||
if (staffRole.getDepartmentId() == 0) {
|
if (staffRole.getDepartmentId() == 0) {
|
||||||
|
log.info("staffRole 为0,管理全部部门");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -55,7 +55,7 @@ public class ResultTagetLibServiceImpl extends ServiceImpl<ResultTagetLibMapper,
|
|||||||
if(resultModel == null){
|
if(resultModel == null){
|
||||||
return R.error("找不到相关考核模板");
|
return R.error("找不到相关考核模板");
|
||||||
}
|
}
|
||||||
List<ResultTagetLibDto> resultTagetLibDtos = selectResultTagetLibByModelId(resultModel.getId());
|
List<ResultTagetLibDto> resultTagetLibDtos = selectResultTagetLibDtoByModelId(resultModel.getId());
|
||||||
BigDecimal weight = BigDecimal.ZERO;
|
BigDecimal weight = BigDecimal.ZERO;
|
||||||
for(int i = 0; i < resultTagetLibDtos.size(); i++){
|
for(int i = 0; i < resultTagetLibDtos.size(); i++){
|
||||||
ResultTagetLibDto dto = resultTagetLibDtos.get(i);
|
ResultTagetLibDto dto = resultTagetLibDtos.get(i);
|
||||||
@ -92,7 +92,7 @@ public class ResultTagetLibServiceImpl extends ServiceImpl<ResultTagetLibMapper,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ResultTagetLibDto> selectResultTagetLibByModelId(Long id){
|
public List<ResultTagetLib> selectResultTagetLibByModelId(Long id){
|
||||||
return resultTagetLibMapper.selectResultTagetLibByModelId(id);
|
return resultTagetLibMapper.selectResultTagetLibByModelId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -119,5 +119,11 @@
|
|||||||
) and is_delete=0 order by step_index asc
|
) and is_delete=0 order by step_index asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectCanSetChartRoleByChartId" resultType="com.lz.modules.flow.model.FlowChartRoleDto" >
|
||||||
|
SELECT crole.id as id, crole.chart_id as chart_id, crole.role_id as role_id, role.name as role_name,
|
||||||
|
crole.type as type FROM lz_flow_chart_role crole left join lz_record_role role on role.id=crole.role_id
|
||||||
|
where crole.chart_id=#{id} and crole.type = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
@ -89,7 +89,7 @@
|
|||||||
update lz_result_taget_lib set is_delete = 1 where id=#{id} limit 1
|
update lz_result_taget_lib set is_delete = 1 where id=#{id} limit 1
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectResultTagetLibByModelId" resultType="com.lz.modules.flow.model.ResultTagetLibDto" >
|
<select id="selectResultTagetLibByModelId" resultType="com.lz.modules.flow.entity.ResultTagetLib" >
|
||||||
select * from lz_result_taget_lib where model_id=#{id} and is_delete = 0 order by order_by desc
|
select * from lz_result_taget_lib where model_id=#{id} and is_delete = 0 order by order_by desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user