|
|
@ -60,6 +60,8 @@ public class XmTestCasedbController { |
|
|
Map<String,Object> m = new HashMap<>(); |
|
|
Map<String,Object> m = new HashMap<>(); |
|
|
Tips tips=new Tips("查询成功"); |
|
|
Tips tips=new Tips("查询成功"); |
|
|
RequestUtils.transformArray(xmTestCasedb, "ids"); |
|
|
RequestUtils.transformArray(xmTestCasedb, "ids"); |
|
|
|
|
|
User user=LoginUtils.getCurrentUserInfo(); |
|
|
|
|
|
xmTestCasedb.put("cbranchId",user.getBranchId()); |
|
|
PageUtils.startPage(xmTestCasedb); |
|
|
PageUtils.startPage(xmTestCasedb); |
|
|
List<Map<String,Object>> xmTestCasedbList = xmTestCasedbService.selectListMapByWhere(xmTestCasedb); //列出XmTestCasedb列表 |
|
|
List<Map<String,Object>> xmTestCasedbList = xmTestCasedbService.selectListMapByWhere(xmTestCasedb); //列出XmTestCasedb列表 |
|
|
PageUtils.responePage(m, xmTestCasedbList); |
|
|
PageUtils.responePage(m, xmTestCasedbList); |
|
|
@ -90,6 +92,14 @@ public class XmTestCasedbController { |
|
|
return failed("pk-exists","编号重复,请修改编号再提交"); |
|
|
return failed("pk-exists","编号重复,请修改编号再提交"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if(!StringUtils.hasText(xmTestCasedb.getProductId())){ |
|
|
|
|
|
return failed("productId-0","产品编号不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
User user=LoginUtils.getCurrentUserInfo(); |
|
|
|
|
|
xmTestCasedb.setCtime(new Date()); |
|
|
|
|
|
xmTestCasedb.setCuserid(user.getUserid()); |
|
|
|
|
|
xmTestCasedb.setCusername(user.getUsername()); |
|
|
|
|
|
xmTestCasedb.setCbranchId(user.getBranchId()); |
|
|
xmTestCasedbService.insert(xmTestCasedb); |
|
|
xmTestCasedbService.insert(xmTestCasedb); |
|
|
m.put("data",xmTestCasedb); |
|
|
m.put("data",xmTestCasedb); |
|
|
}catch (BizException e) { |
|
|
}catch (BizException e) { |
|
|
@ -118,6 +128,10 @@ public class XmTestCasedbController { |
|
|
XmTestCasedb xmTestCasedbDb = xmTestCasedbService.selectOneObject(xmTestCasedb); |
|
|
XmTestCasedb xmTestCasedbDb = xmTestCasedbService.selectOneObject(xmTestCasedb); |
|
|
if( xmTestCasedbDb == null ){ |
|
|
if( xmTestCasedbDb == null ){ |
|
|
return failed("data-not-exists","数据不存在,无法删除"); |
|
|
return failed("data-not-exists","数据不存在,无法删除"); |
|
|
|
|
|
} |
|
|
|
|
|
User user=LoginUtils.getCurrentUserInfo(); |
|
|
|
|
|
if(!user.getBranchId().equals(xmTestCasedbDb.getCbranchId())){ |
|
|
|
|
|
return failed("cbranchId-err","该测试库不属于您企业,不能删除"); |
|
|
} |
|
|
} |
|
|
xmTestCasedbService.deleteByPk(xmTestCasedb); |
|
|
xmTestCasedbService.deleteByPk(xmTestCasedb); |
|
|
}catch (BizException e) { |
|
|
}catch (BizException e) { |
|
|
@ -147,6 +161,11 @@ public class XmTestCasedbController { |
|
|
if( xmTestCasedbDb == null ){ |
|
|
if( xmTestCasedbDb == null ){ |
|
|
return failed("data-not-exists","数据不存在,无法修改"); |
|
|
return failed("data-not-exists","数据不存在,无法修改"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
User user=LoginUtils.getCurrentUserInfo(); |
|
|
|
|
|
if(!user.getBranchId().equals(xmTestCasedbDb.getCbranchId())){ |
|
|
|
|
|
return failed("cbranchId-err","该测试库不属于您企业,不能修改"); |
|
|
|
|
|
} |
|
|
xmTestCasedbService.updateSomeFieldByPk(xmTestCasedb); |
|
|
xmTestCasedbService.updateSomeFieldByPk(xmTestCasedb); |
|
|
m.put("data",xmTestCasedb); |
|
|
m.put("data",xmTestCasedb); |
|
|
}catch (BizException e) { |
|
|
}catch (BizException e) { |
|
|
@ -198,6 +217,9 @@ public class XmTestCasedbController { |
|
|
User user = LoginUtils.getCurrentUserInfo(); |
|
|
User user = LoginUtils.getCurrentUserInfo(); |
|
|
for (XmTestCasedb xmTestCasedbDb : xmTestCasedbsDb) { |
|
|
for (XmTestCasedb xmTestCasedbDb : xmTestCasedbsDb) { |
|
|
Tips tips2 = new Tips("检查通过"); |
|
|
Tips tips2 = new Tips("检查通过"); |
|
|
|
|
|
if(!user.getBranchId().equals(xmTestCasedbDb.getCbranchId())){ |
|
|
|
|
|
return failed("cbranchId-err","该测试库不属于您企业,不能修改"); |
|
|
|
|
|
} |
|
|
if(!tips2.isOk()){ |
|
|
if(!tips2.isOk()){ |
|
|
no.add(xmTestCasedbDb); |
|
|
no.add(xmTestCasedbDb); |
|
|
}else{ |
|
|
}else{ |
|
|
@ -248,7 +270,12 @@ public class XmTestCasedbController { |
|
|
|
|
|
|
|
|
List<XmTestCasedb> can=new ArrayList<>(); |
|
|
List<XmTestCasedb> can=new ArrayList<>(); |
|
|
List<XmTestCasedb> no=new ArrayList<>(); |
|
|
List<XmTestCasedb> no=new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
User user=LoginUtils.getCurrentUserInfo(); |
|
|
for (XmTestCasedb data : datasDb) { |
|
|
for (XmTestCasedb data : datasDb) { |
|
|
|
|
|
if(!user.getBranchId().equals(data.getCbranchId())){ |
|
|
|
|
|
return failed("cbranchId-err","该测试库不属于您企业,不能删除"); |
|
|
|
|
|
} |
|
|
if(true){ |
|
|
if(true){ |
|
|
can.add(data); |
|
|
can.add(data); |
|
|
}else{ |
|
|
}else{ |
|
|
|