修复子类型带houseId问题

This commit is contained in:
sxu 2024-10-28 15:31:05 +08:00
parent e6ab7ce194
commit 4c9d5f7a4f
1 changed files with 8 additions and 6 deletions

View File

@ -257,12 +257,14 @@ public class TypeServiceImpl implements ITypeService {
type.setCreateTime(DateUtils.getNowDate());
type.setCreateBy(SecurityUtils.getUserId().toString());
int count = typeMapper.insertType(type);
long newTypeId = type.getTypeId();
if ((type.getParentId()).equals(0L)) {
// 插入wh_house_set建立仓库和type的关系
long newTypeId = type.getTypeId();
WhHouseSet whHouseSet = new WhHouseSet();
whHouseSet.setHouseId(type.getHouseId());
whHouseSet.setTypeId(newTypeId);
houseSetService.insertWhHouseSet(whHouseSet);
}
return count;
}