|
@@ -794,6 +794,24 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
|
|
|
return httpRespMsg;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public HttpRespMsg cancellationReceive(Integer id) {
|
|
|
+ HttpRespMsg msg=new HttpRespMsg();
|
|
|
+ String userId = request.getHeader("token");
|
|
|
+ List<ProdProcedureTeam> prodProcedureTeams = prodProcedureTeamService.list(new QueryWrapper<ProdProcedureTeam>().eq("plan_procedure_id", id));
|
|
|
+ if(prodProcedureTeams.size()>0){
|
|
|
+ Optional<ProdProcedureTeam> first = prodProcedureTeams.stream().filter(ps -> ps.getUserId().equals(userId)).findFirst();
|
|
|
+ if(first.isPresent()){
|
|
|
+ ProdProcedureTeam prodProcedureTeam = first.get();
|
|
|
+ prodProcedureTeam.setStatus(0);
|
|
|
+ if(!prodProcedureTeamService.updateById(prodProcedureTeam)){
|
|
|
+ msg.setError("验证失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public HttpRespMsg receivePlan(String ids) {
|
|
|
HttpRespMsg msg=new HttpRespMsg();
|
|
@@ -983,6 +1001,9 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
|
|
|
if(procedureTeamList.stream().anyMatch(pl->pl.getProgress()>0&&pl.getStatus()==4)){
|
|
|
ps.setNeedAddCircle(true);
|
|
|
}
|
|
|
+ if(procedureTeamList.stream().anyMatch(pl->pl.getUserId().equals(userId)&&pl.getStatus()==1)){
|
|
|
+ ps.setCancellationReceive(true);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
msg.setData(procedureTotals);
|