@@ -142,8 +142,8 @@ public class CompareUtils<T> { | |||||
if (!sv.equals(tv)) { | if (!sv.equals(tv)) { | ||||
JSONObject valueChange = new JSONObject(); | JSONObject valueChange = new JSONObject(); | ||||
valueChange.put("fieldKey",sn.getFieldKey()); | 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); | res.put(sn.getFieldName(),valueChange); | ||||
} | } | ||||
} | } | ||||
@@ -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 | * @param projectId | ||||
* @return | * @return | ||||
@@ -1172,7 +1142,7 @@ public class ProjectLibManage { | |||||
//2.要判断 项目在当前状态 有没有被驳回和退回过 | //2.要判断 项目在当前状态 有没有被驳回和退回过 | ||||
//当前项目状态流程的 实例 看看是不是有2个以上 有2个说明 有退回 驳回 | //当前项目状态流程的 实例 看看是不是有2个以上 有2个说明 有退回 驳回 | ||||
Boolean isChangeRecord = isChangeRecord(projectId); | |||||
Boolean isChangeRecord = todoService.isChangeRecord(projectId); | |||||
if(!isChangeRecord){ | if(!isChangeRecord){ | ||||
return res; | return res; | ||||
} | } | ||||
@@ -25,6 +25,7 @@ import com.ningdatech.pmapi.todocenter.handle.WithDrawHandle; | |||||
import com.ningdatech.pmapi.todocenter.model.dto.*; | import com.ningdatech.pmapi.todocenter.model.dto.*; | ||||
import com.ningdatech.pmapi.todocenter.model.vo.*; | import com.ningdatech.pmapi.todocenter.model.vo.*; | ||||
import com.ningdatech.pmapi.todocenter.model.vo.TodoNumVO; | 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.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; | ||||
import com.wflow.contants.HisProInsEndActId; | import com.wflow.contants.HisProInsEndActId; | ||||
import com.wflow.workflow.bean.dto.ReqAuditOpinionSaveDTO; | import com.wflow.workflow.bean.dto.ReqAuditOpinionSaveDTO; | ||||
@@ -137,6 +138,8 @@ public class TodoCenterManage { | |||||
private final RepositoryService repositoryService; | private final RepositoryService repositoryService; | ||||
private final IRegionService regionService; | private final IRegionService regionService; | ||||
private final ITodoService todoService; | |||||
/** | /** | ||||
* 待办中心待我处理项目列表查询 | * 待办中心待我处理项目列表查询 | ||||
* | * | ||||
@@ -564,7 +567,7 @@ public class TodoCenterManage { | |||||
res.setIsHighLine(isHighLine); | res.setIsHighLine(isHighLine); | ||||
passHandle.checkCanPassOrSeal(request.getInstanceId(),request.getTaskId(),employeeCode,res); | passHandle.checkCanPassOrSeal(request.getInstanceId(),request.getTaskId(),employeeCode,res); | ||||
//是不是被 驳回|退回 | //是不是被 驳回|退回 | ||||
res.setIsChange(projectLibManage.isChangeRecord(projectId)); | |||||
res.setIsChange(todoService.isChangeRecord(projectId)); | |||||
return res; | return res; | ||||
} | } | ||||
@@ -16,4 +16,6 @@ public interface ITodoService { | |||||
* @return | * @return | ||||
*/ | */ | ||||
ProcessProgressDetailVo getProcessDetail(ProcessDetailReq request) ; | ProcessProgressDetailVo getProcessDetail(ProcessDetailReq request) ; | ||||
Boolean isChangeRecord(Long projectId) ; | |||||
} | } |
@@ -137,7 +137,7 @@ public class TodoServiceImpl implements ITodoService { | |||||
* @param projectId | * @param projectId | ||||
* @return | * @return | ||||
*/ | */ | ||||
private Boolean isChangeRecord(Long projectId) { | |||||
public Boolean isChangeRecord(Long projectId) { | |||||
//1.先判断下 项目存不存在 | //1.先判断下 项目存不存在 | ||||
Project project = projectService.getById(projectId); | Project project = projectService.getById(projectId); | ||||
if(Objects.isNull(project)){ | if(Objects.isNull(project)){ | ||||