Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
60eb8789
由
康伟
编写于
2025-01-07 15:14:54 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei: 类别保存后,子类别不显示问题
1 个父辈
9551780d
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
32 行增加
和
16 行删除
sk-module-equipment/src/main/java/com/skua/modules/supplies/controller/web/EquipmentSparepartTypeController.java
sk-module-equipment/src/main/java/com/skua/modules/supplies/entity/EquipmentSparepartType.java
sk-module-equipment/src/main/java/com/skua/modules/supplies/service/impl/EquipmentSparepartTypeServiceImpl.java
sk-module-equipment/src/main/java/com/skua/modules/supplies/vo/EquipmentSparepartTypeVO.java
sk-module-equipment/src/main/java/com/skua/modules/supplies/controller/web/EquipmentSparepartTypeController.java
查看文件 @
60eb878
...
...
@@ -159,26 +159,26 @@ public class EquipmentSparepartTypeController {
if
(
equipmentSparepartTypeEntity
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
if
(
StringUtils
.
isNotEmpty
(
equipmentSparepartType
.
getParentId
()
)){
/*
if(StringUtils.isNotEmpty( equipmentSparepartType.getParentId() )){
EquipmentSparepartType parentSparepartType = equipmentSparepartTypeService.getById( equipmentSparepartType.getParentId() );
equipmentSparepartType.setAncestors( parentSparepartType.getAncestors() +","+ equipmentSparepartType.getId()) ;
//
跟新父节点
节点状态
//
更新父级叶子
节点状态
if( parentSparepartType.getIsLeaf()){
parentSparepartType.setIsLeaf(false);
equipmentSparepartTypeService.updateById( parentSparepartType );
}
}
}*/
//修改信息
boolean
ok
=
equipmentSparepartTypeService
.
updateById
(
equipmentSparepartType
);
//批量更改祖籍信息
equipmentSparepartTypeService
.
updateAncestors
(
equipmentSparepartTypeEntity
.
getAncestors
(),
equipmentSparepartType
.
getAncestors
()
);
/* //批量更改祖籍信息
equipmentSparepartTypeService.updateAncestors(equipmentSparepartTypeEntity.getAncestors(), equipmentSparepartType.getAncestors() );*/
//更新父级叶子节点状态
/*
String parentId = equipmentSparepartType.getParentId();
String
parentId
=
equipmentSparepartType
.
getParentId
();
if
(
StringUtils
.
isNotEmpty
(
parentId
))
{
EquipmentSparepartType
parentEquipmentSparepartTypeEntity
=
equipmentSparepartTypeService
.
getById
(
parentId
);
parentEquipmentSparepartTypeEntity
.
putIsLeaf
(
false
);
equipmentSparepartTypeService
.
updateById
(
parentEquipmentSparepartTypeEntity
);
}
*/
}
if
(
ok
)
{
result
.
success
(
"修改成功!"
);
}
...
...
sk-module-equipment/src/main/java/com/skua/modules/supplies/entity/EquipmentSparepartType.java
查看文件 @
60eb878
...
...
@@ -3,6 +3,7 @@ package com.skua.modules.supplies.entity;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
org.apache.commons.lang3.StringUtils
;
import
org.jeecgframework.poi.excel.annotation.Excel
;
import
org.springframework.format.annotation.DateTimeFormat
;
...
...
@@ -71,11 +72,11 @@ public class EquipmentSparepartType {
*/
@Excel
(
name
=
"是否叶子节点,1:是 0:不是"
,
width
=
15
)
@ApiModelProperty
(
value
=
"是否叶子节点,1:是 0:不是"
)
private
b
oolean
isLeaf
=
true
;
private
B
oolean
isLeaf
=
true
;
@Excel
(
name
=
"是否药剂,1:是 0:不是"
,
width
=
15
)
@ApiModelProperty
(
value
=
"是否药剂,1:是 0:不是"
)
private
boolean
medicament
=
false
;
private
Boolean
medicament
;
/**
* 创建人
...
...
@@ -112,12 +113,20 @@ public class EquipmentSparepartType {
@ApiModelProperty
(
value
=
"删除状态 0正常 1已删除"
)
private
Integer
delFlag
;
public
boolean
getIs
Leaf
()
{
public
Boolean
get
Leaf
()
{
return
isLeaf
;
}
public
void
setIsLeaf
(
boolean
isLeaf
)
{
this
.
isLeaf
=
isLeaf
;
public
void
setLeaf
(
Boolean
leaf
)
{
isLeaf
=
leaf
;
}
public
Boolean
getMedicament
()
{
return
medicament
;
}
public
void
setMedicament
(
Boolean
medicament
)
{
this
.
medicament
=
medicament
;
}
public
void
putIsLeaf
(
Boolean
isLeaf
)
{
...
...
@@ -126,4 +135,10 @@ public class EquipmentSparepartType {
}
}
public
String
getAncestors
()
{
if
(
StringUtils
.
isEmpty
(
ancestors
)){
ancestors
=
id
;
}
return
ancestors
;
}
}
...
...
sk-module-equipment/src/main/java/com/skua/modules/supplies/service/impl/EquipmentSparepartTypeServiceImpl.java
查看文件 @
60eb878
...
...
@@ -100,8 +100,8 @@ public class EquipmentSparepartTypeServiceImpl extends ServiceImpl<EquipmentSpar
queryWrapper
.
like
(
"item_text"
,
itemText
);
}
List
<
EquipmentSparepartType
>
equipmentSparepartTypeList
=
this
.
list
(
queryWrapper
);
if
(
equipmentSparepartType
.
isMedicament
()
)
{
//查询药剂类别
queryWrapper
.
eq
(
"medicament"
,
equipmentSparepartType
.
is
Medicament
());
if
(
equipmentSparepartType
.
getMedicament
()
!=
null
)
{
//查询药剂类别
queryWrapper
.
eq
(
"medicament"
,
equipmentSparepartType
.
get
Medicament
());
//药剂的物料分类
List
<
EquipmentSparepartType
>
medicamentList
=
this
.
list
(
queryWrapper
);
equipmentSparepartTypeList
=
this
.
equipmentSparepartTypeListByMedicament
(
equipmentSparepartTypeList
,
medicamentList
);
...
...
sk-module-equipment/src/main/java/com/skua/modules/supplies/vo/EquipmentSparepartTypeVO.java
查看文件 @
60eb878
...
...
@@ -3,6 +3,7 @@ package com.skua.modules.supplies.vo;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.skua.core.util.ConvertUtils
;
import
com.skua.modules.supplies.entity.EquipmentSparepartType
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -41,7 +42,7 @@ public class EquipmentSparepartTypeVO {
this
.
remark
=
entity
.
getRemark
();
this
.
sort
=
entity
.
getSort
();
this
.
isLeaf
=
entity
.
getIsLeaf
();
this
.
medicament
=
entity
.
is
Medicament
();
this
.
medicament
=
entity
.
get
Medicament
();
if
(!
entity
.
getIsLeaf
())
{
this
.
children
=
new
ArrayList
<>();
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论