Browse Source

修改字段对比 和 当时的审批记录

tags/24080901
PoffyZhang 1 year ago
parent
commit
992dab5bd4
5 changed files with 10 additions and 35 deletions
  1. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/common/compare/CompareUtils.java
  2. +1
    -31
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java
  3. +4
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
  4. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/service/ITodoService.java
  5. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/service/impl/TodoServiceImpl.java

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/common/compare/CompareUtils.java View File

@@ -142,8 +142,8 @@ public class CompareUtils<T> {
if (!sv.equals(tv)) {
JSONObject valueChange = new JSONObject();
valueChange.put("fieldKey",sn.getFieldKey());
valueChange.put("old",sv);
valueChange.put("new",tv);
valueChange.put("old",tv);
valueChange.put("new",sv);
res.put(sn.getFieldName(),valueChange);
}
}


+ 1
- 31
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java View File

@@ -1128,36 +1128,6 @@ public class ProjectLibManage {
}

/**
* 判断 当前项目是不是被驳回 或者 退回过
* @param projectId
* @return
*/
public Boolean isChangeRecord(Long projectId) {
//1.先判断下 项目存不存在
Project project = projectService.getById(projectId);
if(Objects.isNull(project)){
return Boolean.FALSE;
}

List<Long> projectIds = projectService.getAllVersionProjectId(project);
//2.要判断 项目在当前状态 有没有被驳回和退回过
//当前项目状态流程的 实例 看看是不是有2个以上 有2个说明 有退回 驳回
List<ProjectInst> pis = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class)
.in(ProjectInst::getProjectId, projectIds)
.orderByDesc(ProjectInst::getInstType)
.last("limit 2"));
if(CollUtil.isEmpty(pis)){
return Boolean.FALSE;
}
if( pis.size() < 2 ||
!pis.get(0).getInstType().equals(pis.get(1).getInstType())) {
return Boolean.FALSE;
}

return Boolean.TRUE;
}

/**
* 查看 项目的 变更记录(驳回 重新发起的 和上个版本的变更字段)
* @param projectId
* @return
@@ -1172,7 +1142,7 @@ public class ProjectLibManage {

//2.要判断 项目在当前状态 有没有被驳回和退回过
//当前项目状态流程的 实例 看看是不是有2个以上 有2个说明 有退回 驳回
Boolean isChangeRecord = isChangeRecord(projectId);
Boolean isChangeRecord = todoService.isChangeRecord(projectId);
if(!isChangeRecord){
return res;
}


+ 4
- 1
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -25,6 +25,7 @@ import com.ningdatech.pmapi.todocenter.handle.WithDrawHandle;
import com.ningdatech.pmapi.todocenter.model.dto.*;
import com.ningdatech.pmapi.todocenter.model.vo.*;
import com.ningdatech.pmapi.todocenter.model.vo.TodoNumVO;
import com.ningdatech.pmapi.todocenter.service.ITodoService;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
import com.wflow.contants.HisProInsEndActId;
import com.wflow.workflow.bean.dto.ReqAuditOpinionSaveDTO;
@@ -137,6 +138,8 @@ public class TodoCenterManage {
private final RepositoryService repositoryService;
private final IRegionService regionService;

private final ITodoService todoService;

/**
* 待办中心待我处理项目列表查询
*
@@ -564,7 +567,7 @@ public class TodoCenterManage {
res.setIsHighLine(isHighLine);
passHandle.checkCanPassOrSeal(request.getInstanceId(),request.getTaskId(),employeeCode,res);
//是不是被 驳回|退回
res.setIsChange(projectLibManage.isChangeRecord(projectId));
res.setIsChange(todoService.isChangeRecord(projectId));
return res;
}



+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/service/ITodoService.java View File

@@ -16,4 +16,6 @@ public interface ITodoService {
* @return
*/
ProcessProgressDetailVo getProcessDetail(ProcessDetailReq request) ;

Boolean isChangeRecord(Long projectId) ;
}

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/service/impl/TodoServiceImpl.java View File

@@ -137,7 +137,7 @@ public class TodoServiceImpl implements ITodoService {
* @param projectId
* @return
*/
private Boolean isChangeRecord(Long projectId) {
public Boolean isChangeRecord(Long projectId) {
//1.先判断下 项目存不存在
Project project = projectService.getById(projectId);
if(Objects.isNull(project)){


Loading…
Cancel
Save