Browse Source

双实信息录入-表必填项调整

feature/teamB_zz_wgh
Jackwang 3 years ago
parent
commit
bce6914e12
  1. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java
  2. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java
  3. 5
      epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.32__alter_ic_organization_code_info.sql

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java

@ -210,5 +210,5 @@ public interface IcNeighborHoodDao extends BaseDao<IcNeighborHoodEntity> {
* @Author zhaoqifeng * @Author zhaoqifeng
* @Date 2022/6/29 16:48 * @Date 2022/6/29 16:48
*/ */
List<HomeListResultDTO> getHouseList(HouseInformationFormDTO formDTO) List<HomeListResultDTO> getHouseList(HouseInformationFormDTO formDTO);
} }

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcOrganizationCodeInfoServiceImpl.java

@ -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);

5
epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.32__alter_ic_organization_code_info.sql

@ -2,3 +2,8 @@ alter table ic_organization_code_info add COLUMN`UNIT_MAX_NUM` varchar(10) NOT N
alter table ic_building_unit add COLUMN `CODING` varchar(64) DEFAULT NULL COMMENT '单元编码'; alter table ic_building_unit add COLUMN `CODING` varchar(64) DEFAULT NULL COMMENT '单元编码';
alter table ic_building_unit add COLUMN `SYS_CODING` varchar(64) DEFAULT NULL COMMENT '单元系统编码'; alter table ic_building_unit add COLUMN `SYS_CODING` varchar(64) DEFAULT NULL COMMENT '单元系统编码';
ALTER TABLE ic_organization_code_info MODIFY COLUMN `NEIGHBOR_MAX_NUM` varchar(10) DEFAULT NULL COMMENT '该社区下最大的小区编码序列号';
ALTER TABLE ic_organization_code_info MODIFY COLUMN `BUILDING_MAX_NUM` varchar(10) DEFAULT NULL COMMENT '该社区下最大的楼栋编码序列号';
ALTER TABLE ic_organization_code_info MODIFY COLUMN `UNIT_MAX_NUM` varchar(10) DEFAULT NULL COMMENT '该社区下最大的单元编码序列号';
ALTER TABLE ic_organization_code_info MODIFY COLUMN `HOUSE_MAX_NUM` varchar(10) DEFAULT NULL COMMENT '该社区下最大的房屋编码序列号';

Loading…
Cancel
Save