|
|
|
@ -389,13 +389,20 @@ public class XmTestPlanCaseController { |
|
|
|
if(xmProductDb==null){ |
|
|
|
return failed("product-not-exists","产品已不存在"); |
|
|
|
} |
|
|
|
if(StringUtils.hasText(xmTestPlanCase.getExecUserid())){ |
|
|
|
tips=productQxService.checkProductQx(xmProductDb,1,user,xmTestPlanCase.getExecUserid(),xmTestPlanCase.getExecUsername(),null); |
|
|
|
}else { |
|
|
|
tips=productQxService.checkProductQx(xmProductDb,1,user); |
|
|
|
} |
|
|
|
if(!tips.isOk()){ |
|
|
|
return failed(tips); |
|
|
|
} |
|
|
|
boolean isPm=groupService.checkUserIsProductAdm(xmProductDb,user.getUserid()); |
|
|
|
if(isPm){ |
|
|
|
can=xmTestPlanCasesDb; |
|
|
|
}else { |
|
|
|
for (XmTestPlanCase pcDb : xmTestPlanCasesDb) { |
|
|
|
Tips tips2 = new Tips("成功"); |
|
|
|
tips2=productQxService.checkProductQx(xmProductDb,1,user,pcDb.getExecUserid(),pcDb.getExecUsername(),null); |
|
|
|
Tips tips2 = productQxService.checkProductQx(xmProductDb, 1, user, pcDb.getExecUserid(), pcDb.getExecUsername(), null); |
|
|
|
if (!tips2.isOk()) { |
|
|
|
no.add(xmTestPlanCaseDb); |
|
|
|
noTipsSet.add(tips2.getMsg()); |
|
|
|
@ -403,6 +410,7 @@ public class XmTestPlanCaseController { |
|
|
|
can.add(xmTestPlanCaseDb); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(can.size()>0){ |
|
|
|
xmTestPlanCaseMap.put("pkList",can.stream().map(i->map( "caseId",i.getCaseId(), "planId",i.getPlanId())).collect(Collectors.toList())); |
|
|
|
xmTestPlanCaseService.editSomeFields(xmTestPlanCaseMap); |
|
|
|
@ -458,10 +466,10 @@ public class XmTestPlanCaseController { |
|
|
|
if(xmProductDb==null){ |
|
|
|
return failed("product-not-exists","产品已不存在"); |
|
|
|
} |
|
|
|
tips=productQxService.checkProductQx(xmProductDb,1,user); |
|
|
|
if(!tips.isOk()){ |
|
|
|
return failed(tips); |
|
|
|
} |
|
|
|
boolean isPm=groupService.checkUserIsProductAdm(xmProductDb,user.getUserid()); |
|
|
|
if(isPm){ |
|
|
|
can=datasDb; |
|
|
|
}else { |
|
|
|
for (XmTestPlanCase pcDb : datasDb) { |
|
|
|
Tips tips1=productQxService.checkProductQx(xmProductDb,1,user,pcDb.getExecUserid(),pcDb.getExecUsername(),null); |
|
|
|
if(tips1.isOk()){ |
|
|
|
@ -471,6 +479,8 @@ public class XmTestPlanCaseController { |
|
|
|
noTipsSet.add(tips1.getMsg()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
List<String> msgs=new ArrayList<>(); |
|
|
|
if(can.size()>0){ |
|
|
|
xmTestPlanCaseService.batchDelete(can); |
|
|
|
|