Java Code Examples for org.jeecg.modules.system.entity.SysDepart#getParentId()

The following examples show how to use org.jeecg.modules.system.entity.SysDepart#getParentId() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SysDepartTreeModel.java    From jeecg-cloud with Apache License 2.0 6 votes vote down vote up
/**
    * 将SysDepart对象转换成SysDepartTreeModel对象
    * @param sysDepart
    */
public SysDepartTreeModel(SysDepart sysDepart) {
	this.key = sysDepart.getId();
       this.value = sysDepart.getId();
       this.title = sysDepart.getDepartName();
       this.id = sysDepart.getId();
       this.parentId = sysDepart.getParentId();
       this.departName = sysDepart.getDepartName();
       this.departNameEn = sysDepart.getDepartNameEn();
       this.departNameAbbr = sysDepart.getDepartNameAbbr();
       this.departOrder = sysDepart.getDepartOrder();
       this.description = sysDepart.getDescription();
       this.orgCategory = sysDepart.getOrgCategory();
       this.orgType = sysDepart.getOrgType();
       this.orgCode = sysDepart.getOrgCode();
       this.mobile = sysDepart.getMobile();
       this.fax = sysDepart.getFax();
       this.address = sysDepart.getAddress();
       this.memo = sysDepart.getMemo();
       this.status = sysDepart.getStatus();
       this.delFlag = sysDepart.getDelFlag();
       this.createBy = sysDepart.getCreateBy();
       this.createTime = sysDepart.getCreateTime();
       this.updateBy = sysDepart.getUpdateBy();
       this.updateTime = sysDepart.getUpdateTime();
   }
 
Example 2
Source File: SysDepartTreeModel.java    From jeecg-boot-with-activiti with MIT License 6 votes vote down vote up
/**
    * 将SysDepart对象转换成SysDepartTreeModel对象
    * @param sysDepart
    */
public SysDepartTreeModel(SysDepart sysDepart) {
	this.key = sysDepart.getId();
       this.value = sysDepart.getId();
       this.title = sysDepart.getDepartName();
       this.id = sysDepart.getId();
       this.parentId = sysDepart.getParentId();
       this.departName = sysDepart.getDepartName();
       this.departNameEn = sysDepart.getDepartNameEn();
       this.departNameAbbr = sysDepart.getDepartNameAbbr();
       this.departOrder = sysDepart.getDepartOrder();
       this.description = sysDepart.getDescription();
       this.orgCategory = sysDepart.getOrgCategory();
       this.orgType = sysDepart.getOrgType();
       this.orgCode = sysDepart.getOrgCode();
       this.mobile = sysDepart.getMobile();
       this.fax = sysDepart.getFax();
       this.address = sysDepart.getAddress();
       this.memo = sysDepart.getMemo();
       this.status = sysDepart.getStatus();
       this.delFlag = sysDepart.getDelFlag();
       this.createBy = sysDepart.getCreateBy();
       this.createTime = sysDepart.getCreateTime();
       this.updateBy = sysDepart.getUpdateBy();
       this.updateTime = sysDepart.getUpdateTime();
   }
 
Example 3
Source File: SysDepartServiceImpl.java    From jeecg-boot-with-activiti with MIT License 6 votes vote down vote up
/**
 * saveDepartData 对应 add 保存用户在页面添加的新的部门对象数据
 */
@Override
@Transactional
public void saveDepartData(SysDepart sysDepart, String username) {
	if (sysDepart != null && username != null) {
		if (sysDepart.getParentId() == null) {
			sysDepart.setParentId("");
		}
		String s = UUID.randomUUID().toString().replace("-", "");
		sysDepart.setId(s);
		// 先判断该对象有无父级ID,有则意味着不是最高级,否则意味着是最高级
		// 获取父级ID
		String parentId = sysDepart.getParentId();
		String[] codeArray = generateOrgCode(parentId);
		sysDepart.setOrgCode(codeArray[0]);
		String orgType = codeArray[1];
		sysDepart.setOrgType(String.valueOf(orgType));
		sysDepart.setCreateTime(new Date());
		sysDepart.setDelFlag(CommonConstant.DEL_FLAG_0.toString());
		this.save(sysDepart);
	}

}
 
Example 4
Source File: SysDepartTreeModel.java    From teaching with Apache License 2.0 6 votes vote down vote up
/**
    * 将SysDepart对象转换成SysDepartTreeModel对象
    * @param sysDepart
    */
public SysDepartTreeModel(SysDepart sysDepart) {
	this.key = sysDepart.getId();
       this.value = sysDepart.getId();
       this.title = sysDepart.getDepartName();
       this.id = sysDepart.getId();
       this.parentId = sysDepart.getParentId();
       this.departName = sysDepart.getDepartName();
       this.departNameEn = sysDepart.getDepartNameEn();
       this.departNameAbbr = sysDepart.getDepartNameAbbr();
       this.departOrder = sysDepart.getDepartOrder();
       this.description = sysDepart.getDescription();
       this.orgCategory = sysDepart.getOrgCategory();
       this.orgType = sysDepart.getOrgType();
       this.orgCode = sysDepart.getOrgCode();
       this.mobile = sysDepart.getMobile();
       this.fax = sysDepart.getFax();
       this.address = sysDepart.getAddress();
       this.memo = sysDepart.getMemo();
       this.status = sysDepart.getStatus();
       this.delFlag = sysDepart.getDelFlag();
       this.createBy = sysDepart.getCreateBy();
       this.createTime = sysDepart.getCreateTime();
       this.updateBy = sysDepart.getUpdateBy();
       this.updateTime = sysDepart.getUpdateTime();
   }
 
Example 5
Source File: SysDepartTreeModel.java    From jeecg-boot with Apache License 2.0 6 votes vote down vote up
/**
    * 将SysDepart对象转换成SysDepartTreeModel对象
    * @param sysDepart
    */
public SysDepartTreeModel(SysDepart sysDepart) {
	this.key = sysDepart.getId();
       this.value = sysDepart.getId();
       this.title = sysDepart.getDepartName();
       this.id = sysDepart.getId();
       this.parentId = sysDepart.getParentId();
       this.departName = sysDepart.getDepartName();
       this.departNameEn = sysDepart.getDepartNameEn();
       this.departNameAbbr = sysDepart.getDepartNameAbbr();
       this.departOrder = sysDepart.getDepartOrder();
       this.description = sysDepart.getDescription();
       this.orgCategory = sysDepart.getOrgCategory();
       this.orgType = sysDepart.getOrgType();
       this.orgCode = sysDepart.getOrgCode();
       this.mobile = sysDepart.getMobile();
       this.fax = sysDepart.getFax();
       this.address = sysDepart.getAddress();
       this.memo = sysDepart.getMemo();
       this.status = sysDepart.getStatus();
       this.delFlag = sysDepart.getDelFlag();
       this.createBy = sysDepart.getCreateBy();
       this.createTime = sysDepart.getCreateTime();
       this.updateBy = sysDepart.getUpdateBy();
       this.updateTime = sysDepart.getUpdateTime();
   }
 
Example 6
Source File: SysDepartServiceImpl.java    From teaching with Apache License 2.0 5 votes vote down vote up
/**
 * saveDepartData 对应 add 保存用户在页面添加的新的部门对象数据
 */
@Override
@Transactional
public void saveDepartData(SysDepart sysDepart, String username) {
	if (sysDepart != null && username != null) {
		if (sysDepart.getParentId() == null) {
			sysDepart.setParentId("");
		}
		String s = UUID.randomUUID().toString().replace("-", "");
		sysDepart.setId(s);
		// 先判断该对象有无父级ID,有则意味着不是最高级,否则意味着是最高级
		// 获取父级ID
		String parentId = sysDepart.getParentId();
		//update-begin--Author:baihailong  Date:20191209 for:部门编码规则生成器做成公用配置
		JSONObject formData = new JSONObject();
		formData.put("parentId",parentId);
		String[] codeArray = (String[]) FillRuleUtil.executeRule("org_num_role",formData);
		//update-end--Author:baihailong  Date:20191209 for:部门编码规则生成器做成公用配置
		sysDepart.setOrgCode(codeArray[0]);
		String orgType = codeArray[1];
		sysDepart.setOrgType(String.valueOf(orgType));
		sysDepart.setCreateTime(new Date());
		sysDepart.setDelFlag(CommonConstant.DEL_FLAG_0.toString());
		this.save(sysDepart);
	}

}