feat: update configuration and enhance MaType handling with new state grid property

This commit is contained in:
syruan 2025-09-19 17:49:36 +08:00
parent bd3f58d888
commit fb0ec77c8f
5 changed files with 16 additions and 3 deletions

View File

@ -9,6 +9,7 @@ import java.util.List;
public interface ITypeService {
List<TreeSelect> getMaTypeList(String typeName, String parentId);
List<TreeSelect> getMaTypeSelect(String typeName, String parentId);
List<MaType> getListByMaType(Long typeId, String typeName);

View File

@ -330,7 +330,7 @@ public class MaTypeServiceImpl implements ITypeService {
*/
@Override
public List<MaType> buildDeptTree(List<MaType> maTypeList) {
List<MaType> returnList = new ArrayList<MaType>();
List<MaType> returnList = new ArrayList<>();
List<Long> tempList = maTypeList.stream().map(MaType::getTypeId).collect(Collectors.toList());
for (MaType maType : maTypeList) {
// 如果是顶级节点, 遍历该父节点的所有子节点

View File

@ -33,6 +33,7 @@ public class TreeSelect implements Serializable {
private String unitName;
private Boolean isStateGrid;
private List<MaTypeProperty> maTypeProperties;
@ -62,6 +63,7 @@ public class TreeSelect implements Serializable {
this.companyId = maType.getCompanyId();
this.unitName = maType.getUnitName();
this.maTypeProperties = maType.getMaTypeProperties();
this.isStateGrid = maType.getIsStateGrid();
this.children = maType.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
}
// public TreeSelect(SysDept dept)
@ -72,6 +74,14 @@ public class TreeSelect implements Serializable {
// }
public Boolean getStateGrid() {
return isStateGrid;
}
public void setStateGrid(Boolean stateGrid) {
isStateGrid = stateGrid;
}
public Long getParentId() {
return parentId;
}

View File

@ -5,4 +5,4 @@ spring:
name: bonus-material-mall
profiles:
# 环境配置
active: material_mall_local
active: material_mall_test

View File

@ -28,6 +28,7 @@
<result property="updateTime" column="update_time"/>
<result property="isPlan" column="is_plan"/>
<result property="isAncuo" column="is_ancuo"/>
<result property="isStateGrid" column="is_state_grid"/>
<result property="remark" column="remark"/>
<result property="childPhoto" column="childPhoto"/>
<result property="intelligentCode" column="intelligent_code"/>
@ -392,6 +393,7 @@
m.unit_name,
m.manage_type,
m.lease_price,
m.is_state_grid,
m.eff_time,
m.rent_price,
m.buy_price,
@ -405,11 +407,11 @@
m.create_by,
m.create_time,
m.remark,
m.company_id,
m.maintenance_alarm_day
from ma_type m
where del_flag = '0'
</select>
<select id="getMaTypeSelect" resultType="com.bonus.material.ma.vo.MaType">
select m.type_id, m.type_name, m.parent_id, m.storage_num, m.manage_type,
m.lease_price,m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,