|
|
@@ -17,6 +17,7 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
@Service
|
|
|
@@ -74,15 +75,15 @@ public class OrgService extends BaseService<Org> {
|
|
|
// organization.setOrgCode(codeMap.get("outNote").toString());
|
|
|
|
|
|
//查询 本次要加的 部门的 父级下 最大的DisplayNo 然后加1 就是现在要加的DisplayNo
|
|
|
- String parentId = organization.getParentId();
|
|
|
- int maxDisplayNo = orgMapper.maxDisplayNo(parentId) != null ? orgMapper.maxDisplayNo(parentId) + 1 : 0;
|
|
|
-
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ param.put("otherCond", "parent_id = #{parentID} ::uuid");
|
|
|
+ organization.setDisplayNo(commonService.getMaxDisplayNo(Constant.DisplayNoTable.ORG ,param));
|
|
|
if (organization.getParentId() != null) {
|
|
|
//插入TOPid
|
|
|
organization.setTopId(organization.getParentId());
|
|
|
}
|
|
|
|
|
|
- organization.setDisplayNo(maxDisplayNo);
|
|
|
+
|
|
|
// 插入组织部门数据
|
|
|
super.insert(organization);
|
|
|
//执行函数
|