|
@ -229,10 +229,10 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl<IcOrganiz |
|
|
//查询该社区下是否存在单元数据
|
|
|
//查询该社区下是否存在单元数据
|
|
|
IcOrganizationCodeInfoEntity unitEntity = baseDao.selectByCommunityIdAndCustomerId(customerId, communResult.getCommunityId()); |
|
|
IcOrganizationCodeInfoEntity unitEntity = baseDao.selectByCommunityIdAndCustomerId(customerId, communResult.getCommunityId()); |
|
|
if (StringUtils.isBlank(unitEntity.getUnitMaxNum())) { |
|
|
if (StringUtils.isBlank(unitEntity.getUnitMaxNum())) { |
|
|
result.setCoding(communResult.getCoding() + "001"); |
|
|
result.setCoding(communResult.getCoding() + "01"); |
|
|
result.setSysCoding(communResult.getSysCoding() + "001"); |
|
|
result.setSysCoding(communResult.getSysCoding() + "01"); |
|
|
//补充该社区的单元最大数
|
|
|
//补充该社区的单元最大数
|
|
|
unitEntity.setUnitMaxNum("001"); |
|
|
unitEntity.setUnitMaxNum("01"); |
|
|
} else { |
|
|
} else { |
|
|
Integer unitMaxNum = Integer.valueOf(unitEntity.getUnitMaxNum()) + 1; |
|
|
Integer unitMaxNum = Integer.valueOf(unitEntity.getUnitMaxNum()) + 1; |
|
|
//验证可编辑的编码是否有重复
|
|
|
//验证可编辑的编码是否有重复
|
|
@ -282,7 +282,7 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl<IcOrganiz |
|
|
if (StringUtils.isBlank(houseEntity.getUnitMaxNum())) { |
|
|
if (StringUtils.isBlank(houseEntity.getUnitMaxNum())) { |
|
|
result.setCoding(communResult.getCoding() + "001"); |
|
|
result.setCoding(communResult.getCoding() + "001"); |
|
|
//补充该社区的单元最大数
|
|
|
//补充该社区的单元最大数
|
|
|
houseEntity.setUnitMaxNum("001"); |
|
|
houseEntity.setHouseMaxNum("001"); |
|
|
} else { |
|
|
} else { |
|
|
Integer houseMaxNum = Integer.valueOf(houseEntity.getUnitMaxNum()) + 1; |
|
|
Integer houseMaxNum = Integer.valueOf(houseEntity.getUnitMaxNum()) + 1; |
|
|
//验证可编辑的编码是否有重复
|
|
|
//验证可编辑的编码是否有重复
|
|
@ -296,7 +296,7 @@ public class IcOrganizationCodeInfoServiceImpl extends BaseServiceImpl<IcOrganiz |
|
|
result.setCoding(houseCode); |
|
|
result.setCoding(houseCode); |
|
|
|
|
|
|
|
|
//更新该社区下最大的房屋编号
|
|
|
//更新该社区下最大的房屋编号
|
|
|
houseEntity.setUnitMaxNum(getNewMaxIndex(4, houseMaxNum)); |
|
|
houseEntity.setHouseMaxNum(getNewMaxIndex(4, houseMaxNum)); |
|
|
} |
|
|
} |
|
|
baseDao.updateHouseByCuIdAndCoId(houseEntity); |
|
|
baseDao.updateHouseByCuIdAndCoId(houseEntity); |
|
|
return new Result<OrganizationCodeResultDTO>().ok(result); |
|
|
return new Result<OrganizationCodeResultDTO>().ok(result); |
|
|