插入wh_house_set,建立仓库和type的关系
This commit is contained in:
parent
de6358d7a7
commit
925f678827
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue