|
@@ -660,19 +660,21 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
sorts1.add(resultTab.getSort());
|
|
|
}
|
|
|
}
|
|
|
- if(!sorts1.isEmpty()){
|
|
|
- String idss = ids.substring(0, ids.length() - 1);
|
|
|
- //tableType=1 的表单sort的最大值
|
|
|
- Integer maxSort = Collections.max(sorts1);
|
|
|
- resultTabs.forEach(r->{
|
|
|
- if(idss.contains(r.getPKeyId()+"")){
|
|
|
- if(!Objects.equals(r.getSort(), maxSort)){
|
|
|
- r.setSort(maxSort);
|
|
|
- String sql2="update m_wbs_tree_contract set sort="+maxSort+" where p_key_id="+r.getPKeyId();
|
|
|
- jdbcTemplate.update(sql2);
|
|
|
+ if(!sorts1.isEmpty()) {
|
|
|
+ if (ids.length() > 0) {
|
|
|
+ String idss = ids.substring(0, ids.length() - 1);
|
|
|
+ //tableType=1 的表单sort的最大值
|
|
|
+ Integer maxSort = Collections.max(sorts1);
|
|
|
+ resultTabs.forEach(r -> {
|
|
|
+ if (idss.contains(r.getPKeyId() + "")) {
|
|
|
+ if (!Objects.equals(r.getSort(), maxSort)) {
|
|
|
+ r.setSort(maxSort);
|
|
|
+ String sql2 = "update m_wbs_tree_contract set sort=" + maxSort + " where p_key_id=" + r.getPKeyId();
|
|
|
+ jdbcTemplate.update(sql2);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
});
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|