Java Code Examples for org.jeecg.modules.system.entity.SysDepart#setCreateTime()
The following examples show how to use
org.jeecg.modules.system.entity.SysDepart#setCreateTime() .
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: SysDepartServiceImpl.java From jeecg-boot-with-activiti with MIT License | 6 votes |
/** * 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 2
Source File: SysDepartServiceImpl.java From teaching with Apache License 2.0 | 5 votes |
/** * 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); } }