插入wh_house_set,建立仓库和type的关系

This commit is contained in:
sxu 2024-10-28 14:25:26 +08:00
parent de6358d7a7
commit 925f678827
2 changed files with 12 additions and 1 deletions

View File

@ -37,6 +37,10 @@ public class Type extends BaseEntity {
@ApiModelProperty(value = "物资仓库名称")
private String houseName;
/** 仓库Id */
@ApiModelProperty(value = "物资仓库Id")
private Long houseId;
/** 上级ID */
@Excel(name = "上级ID")
@ApiModelProperty(value = "上级ID")

View File

@ -256,7 +256,14 @@ public class TypeServiceImpl implements ITypeService {
type.setLevel(String.valueOf(Integer.parseInt(type.getLevel()) + 1));
type.setCreateTime(DateUtils.getNowDate());
type.setCreateBy(SecurityUtils.getUserId().toString());
return typeMapper.insertType(type);
int count = typeMapper.insertType(type);
long newTypeId = type.getTypeId();
// 插入wh_house_set建立仓库和type的关系
WhHouseSet whHouseSet = new WhHouseSet();
whHouseSet.setHouseId(type.getHouseId());
whHouseSet.setTypeId(newTypeId);
houseSetService.insertWhHouseSet(whHouseSet);
return count;
}
/**