✨ 组织类型改业务字典,并完善金蝶部门代码与MK再提交
组织类型翻译切换为 organization_type;新增金蝶部门代码字段;流程已结束或已通过时强制新建MK表单实例。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-3
@@ -44,11 +44,10 @@ import org.springblade.core.tenant.annotation.NonDS;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.support.Kv;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.DictCache;
|
||||
import org.springblade.system.cache.DictBizCache;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.system.pojo.entity.Dept;
|
||||
import org.springblade.system.pojo.entity.User;
|
||||
import org.springblade.system.pojo.enums.DictEnum;
|
||||
import org.springblade.system.pojo.vo.DeptVO;
|
||||
import org.springblade.system.pojo.vo.OaOrgSyncPageVO;
|
||||
import org.springblade.system.pojo.vo.UserVO;
|
||||
@@ -156,7 +155,7 @@ public class DeptController extends BladeController {
|
||||
CacheUtil.clear(SYS_CACHE, Boolean.FALSE);
|
||||
// 返回懒加载树更新节点所需字段
|
||||
Kv kv = Kv.create().set("id", String.valueOf(dept.getId())).set("tenantId", dept.getTenantId())
|
||||
.set("deptCategoryName", DictCache.getValue(DictEnum.ORG_CATEGORY, dept.getDeptCategory()));
|
||||
.set("deptCategoryName", DictBizCache.getValue("organization_type", dept.getDeptCategory()));
|
||||
return R.data(kv);
|
||||
}
|
||||
return R.fail("操作失败");
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<result column="leader_id" property="leaderId"/>
|
||||
<result column="dept_category" property="deptCategory"/>
|
||||
<result column="dept_code" property="deptCode"/>
|
||||
<result column="kingdee_dept_code" property="kingdeeDeptCode"/>
|
||||
<result column="short_name" property="shortName"/>
|
||||
<result column="pinyin_mnemonic" property="pinyinMnemonic"/>
|
||||
<result column="mnemonic_code" property="mnemonicCode"/>
|
||||
@@ -32,6 +33,7 @@
|
||||
<result column="leader_id" property="leaderId"/>
|
||||
<result column="dept_category" property="deptCategory"/>
|
||||
<result column="dept_code" property="deptCode"/>
|
||||
<result column="kingdee_dept_code" property="kingdeeDeptCode"/>
|
||||
<result column="short_name" property="shortName"/>
|
||||
<result column="pinyin_mnemonic" property="pinyinMnemonic"/>
|
||||
<result column="mnemonic_code" property="mnemonicCode"/>
|
||||
|
||||
+9
-5
@@ -30,10 +30,9 @@ import org.springblade.core.tool.constant.BladeConstant;
|
||||
import org.springblade.core.tool.node.ForestNodeMerger;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.DictCache;
|
||||
import org.springblade.system.cache.DictBizCache;
|
||||
import org.springblade.system.cache.SysCache;
|
||||
import org.springblade.system.pojo.entity.Dept;
|
||||
import org.springblade.system.pojo.enums.DictEnum;
|
||||
import org.springblade.system.pojo.vo.DeptVO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -47,6 +46,11 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
public class DeptWrapper extends BaseEntityWrapper<Dept, DeptVO> {
|
||||
|
||||
/**
|
||||
* 组织类型业务字典编码
|
||||
*/
|
||||
private static final String ORGANIZATION_TYPE_CODE = "organization_type";
|
||||
|
||||
public static DeptWrapper build() {
|
||||
return new DeptWrapper();
|
||||
}
|
||||
@@ -60,7 +64,7 @@ public class DeptWrapper extends BaseEntityWrapper<Dept, DeptVO> {
|
||||
Dept parent = SysCache.getDept(dept.getParentId());
|
||||
deptVO.setParentName(parent.getDeptName());
|
||||
}
|
||||
String category = DictCache.getValue(DictEnum.ORG_CATEGORY, dept.getDeptCategory());
|
||||
String category = DictBizCache.getValue(ORGANIZATION_TYPE_CODE, dept.getDeptCategory());
|
||||
deptVO.setDeptCategoryName(category);
|
||||
return deptVO;
|
||||
}
|
||||
@@ -69,7 +73,7 @@ public class DeptWrapper extends BaseEntityWrapper<Dept, DeptVO> {
|
||||
public List<DeptVO> listNodeVO(List<Dept> list) {
|
||||
List<DeptVO> collect = list.stream().map(dept -> {
|
||||
DeptVO deptVO = BeanUtil.copyProperties(dept, DeptVO.class);
|
||||
String category = DictCache.getValue(DictEnum.ORG_CATEGORY, dept.getDeptCategory());
|
||||
String category = DictBizCache.getValue(ORGANIZATION_TYPE_CODE, dept.getDeptCategory());
|
||||
Objects.requireNonNull(deptVO).setDeptCategoryName(category);
|
||||
return deptVO;
|
||||
}).collect(Collectors.toList());
|
||||
@@ -78,7 +82,7 @@ public class DeptWrapper extends BaseEntityWrapper<Dept, DeptVO> {
|
||||
|
||||
public List<DeptVO> listNodeLazyVO(List<DeptVO> list) {
|
||||
List<DeptVO> collect = list.stream().peek(dept -> {
|
||||
String category = DictCache.getValue(DictEnum.ORG_CATEGORY, dept.getDeptCategory());
|
||||
String category = DictBizCache.getValue(ORGANIZATION_TYPE_CODE, dept.getDeptCategory());
|
||||
Objects.requireNonNull(dept).setDeptCategoryName(category);
|
||||
}).collect(Collectors.toList());
|
||||
return ForestNodeMerger.merge(collect);
|
||||
|
||||
Reference in New Issue
Block a user