|
@@ -1,15 +1,12 @@
|
|
|
package org.jeecg.modules.system.service.impl;
|
|
|
|
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import io.netty.util.internal.StringUtil;
|
|
|
import org.jeecg.common.constant.CacheConstant;
|
|
|
import org.jeecg.common.constant.CommonConstant;
|
|
|
-import org.jeecg.common.constant.FillRuleConstant;
|
|
|
-import org.jeecg.common.util.FillRuleUtil;
|
|
|
import org.jeecg.common.util.YouBianCodeUtil;
|
|
|
import org.jeecg.modules.system.entity.*;
|
|
|
import org.jeecg.modules.system.mapper.*;
|
|
@@ -116,19 +113,15 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
|
|
|
String parentId = sysDepart.getParentId();
|
|
|
//update-begin--Author:baihailong Date:20191209 for:部门编码规则生成器做成公用配置
|
|
|
|
|
|
- if (!Check.isNull(parentId)) {
|
|
|
- JSONObject formData = new JSONObject();
|
|
|
- formData.put("parentId", parentId);
|
|
|
- String[] codeArray = (String[]) FillRuleUtil.executeRule(FillRuleConstant.DEPART, formData);
|
|
|
- sysDepart.setOrgCode(codeArray[0]);
|
|
|
- String orgType = codeArray[1];
|
|
|
- sysDepart.setOrgType(String.valueOf(orgType));
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
+ String[] codeArray = generateOrgCode(parentId);
|
|
|
+ /* JSONObject formData = new JSONObject();
|
|
|
+ formData.put("parentId", parentId);
|
|
|
+ String[] codeArray = (String[]) FillRuleUtil.executeRule(FillRuleConstant.DEPART, formData);*/
|
|
|
+ sysDepart.setOrgCode(codeArray[0]);
|
|
|
+ String orgType = codeArray[1];
|
|
|
+ sysDepart.setOrgType(String.valueOf(orgType));
|
|
|
//update-end--Author:baihailong Date:20191209 for:部门编码规则生成器做成公用配置
|
|
|
-
|
|
|
-
|
|
|
sysDepart.setCreateTime(new Date());
|
|
|
sysDepart.setDelFlag(CommonConstant.DEL_FLAG_0.toString());
|
|
|
this.save(sysDepart);
|