Browse Source

Merge branch 'develop' into release_temp

master
sunyuchao 4 years ago
parent
commit
f1143bd47f
  1. 1
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java
  2. 1
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java
  3. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/NeighborHoodController.java
  4. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java
  5. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  6. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java
  7. 5
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/IcResiCategoryStatsConfigFormDTO.java
  8. 20
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java
  9. 4
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/ResiCategoryStatsConfigServiceImpl.java

1
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java

@ -194,6 +194,7 @@ public class BuildingController {
if(resultList.size()> NumConstant.ZERO){
Collections.sort(resultList);
String subList = resultList.stream().map(String::valueOf).collect(Collectors.joining("、"));
log.warn(str + "第" + subList + "行未成功!");
return new Result().error(9999, str+"第"+subList+"行未成功!");
}
return new Result().ok(str);

1
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java

@ -163,6 +163,7 @@ public class HouseController {
if(resultList.size()> NumConstant.ZERO){
Collections.sort(resultList);
String subList = resultList.stream().map(String::valueOf).collect(Collectors.joining("、"));
log.warn(str + "第" + subList + "行未成功!");
return new Result().error(9999, str+"第"+subList+"行未成功!");
}
return new Result().ok(str);

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/NeighborHoodController.java

@ -219,10 +219,11 @@ public class NeighborHoodController {
// log.info(JSON.toJSONString(result));
List<Integer> resultList = neighborHoodService.importExcel(customerId,result,tokenDTO.getUserId(),numList);
String str = String.format("共%s条,成功导入%s条。",numList.size()+result.size(),numList.size()+result.size()-resultList.size());
if(resultList.size()> NumConstant.ZERO){
if (resultList.size() > NumConstant.ZERO) {
Collections.sort(resultList);
String subList = resultList.stream().map(String::valueOf).collect(Collectors.joining("、"));
return new Result().error(9999, str+"第"+subList+"行未成功!");
log.warn(str + "第" + subList + "行未成功!");
return new Result().error(9999, str + "第" + subList + "行未成功!");
}
return new Result().ok(str);
}

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java

@ -278,7 +278,10 @@ public class BuildingServiceImpl implements BuildingService {
//同一小区下不能存在楼栋名字一样的
Integer count = icBuildingDao.checkBuildName(entity.getNeighborHoodId(),entity.getBuildingName(),null);
if (null != count && count > 0) {
throw new RenException(EpmetErrorCode.BUILDING_NAME_EXITED.getCode(),EpmetErrorCode.BUILDING_NAME_EXITED.getMsg());
//throw new RenException(EpmetErrorCode.BUILDING_NAME_EXITED.getCode(),EpmetErrorCode.BUILDING_NAME_EXITED.getMsg());
log.error(EpmetErrorCode.BUILDING_NAME_EXITED.getMsg());
numList.add(icBuildingExcel.getRowNum());
continue;
}
icBuildingUnitEntityList.addAll(unitList);
}

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java

@ -187,7 +187,10 @@ public class HouseServiceImpl implements HouseService {
//同一楼栋,单元内,房屋名称唯一
Integer count = icHouseDao.checkDoorNameUq(entity.getNeighborHoodId(), entity.getBuildingId(), entity.getBuildingUnitId(), entity.getDoorName(),null);
if (null != count && count > 0) {
throw new RenException(EpmetErrorCode.DOOR_NAME_EXITED.getCode(), EpmetErrorCode.DOOR_NAME_EXITED.getMsg());
//throw new RenException(EpmetErrorCode.DOOR_NAME_EXITED.getCode(), EpmetErrorCode.DOOR_NAME_EXITED.getMsg());
log.error(EpmetErrorCode.DOOR_NAME_EXITED.getMsg());
numList.add(icHouseExcel.getRowNum());
continue;
}
houseEntityList.add(entity);
}

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java

@ -298,7 +298,10 @@ public class NeighborHoodServiceImpl implements NeighborHoodService {
//同一客户下,小区名称唯一
Integer count = icNeighborHoodDao.checkNameUq(customerId,icNeighborHoodExcel.getNeighborHoodName(),null);
if (null != count && count > 0) {
throw new RenException(EpmetErrorCode.NEIGHBOOR_NAME_EXITED.getCode(), icNeighborHoodExcel.getNeighborHoodName()+EpmetErrorCode.NEIGHBOOR_NAME_EXITED.getMsg());
//throw new RenException(EpmetErrorCode.NEIGHBOOR_NAME_EXITED.getCode(), icNeighborHoodExcel.getNeighborHoodName()+EpmetErrorCode.NEIGHBOOR_NAME_EXITED.getMsg());
log.error(icNeighborHoodExcel.getNeighborHoodName()+EpmetErrorCode.NEIGHBOOR_NAME_EXITED.getMsg());
numList.add(icNeighborHoodExcel.getRowNum());
continue;
}
IcNeighborHoodEntity entity = new IcNeighborHoodEntity();

5
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/IcResiCategoryStatsConfigFormDTO.java

@ -53,13 +53,13 @@ public class IcResiCategoryStatsConfigFormDTO implements Serializable {
/**
* 数据平台分类图标
*/
@NotBlank(message = "管理平台分类图标不能为空",groups = {UpdateGroup.class})
@NotBlank(message = "数据平台分类图标不能为空",groups = {UpdateGroup.class})
private String dataIcon;
/**
* 房屋显示分类图标
*/
@NotBlank(message = "管理平台分类图标不能为空",groups = {UpdateGroup.class})
@NotBlank(message = "房屋显示分类图标不能为空",groups = {UpdateGroup.class})
private String houseShowIcon;
/**
@ -72,7 +72,6 @@ public class IcResiCategoryStatsConfigFormDTO implements Serializable {
private String warn;
private Integer level1;
private Integer level2;
private Integer level3;

20
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java

@ -29,6 +29,7 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.constant.IcResiCategoryStatsConfigConstant;
import com.epmet.dao.IcResiCategoryStatsConfigDao;
import com.epmet.dao.IcResiCategoryWarnConfigDao;
import com.epmet.dto.IcResiCategoryStatsConfigDTO;
@ -89,8 +90,23 @@ public class ResiCategoryStatsConfigController {
ValidatorUtils.validateEntity(formDTO, UpdateGroup.class);
String customerId = tokenDTO.getCustomerId();
// String customerId = "123123";
Integer level1 = formDTO.getLevel1();
Integer level2 = formDTO.getLevel2();
Integer level3 = formDTO.getLevel3();
if(IcResiCategoryStatsConfigConstant.WARN_YES.equals(formDTO.getWarn())){
//判断level1 和level2 的值
if(null ==level1 || level1==0){
return new Result().error(8001,"等级1阈值需大于0");
}
if(null == level2 || level2==0){
return new Result().error(8001,"等级2阈值需大于0");
}
if(level1<=level2){
return new Result().error(8001,"等级1阈值需大于等级2阈值");
}
}
resiCategoryStatsConfigService.update(customerId,formDTO);
return new Result();
return new Result().ok("修改成功");
}
@PostMapping("updatestatus")
public Result updateStatus(@LoginUser TokenDto tokenDTO,@RequestBody IcResiCategoryStatsConfigFormDTO formDTO){
@ -98,7 +114,7 @@ public class ResiCategoryStatsConfigController {
String customerId = tokenDTO.getCustomerId();
// String customerId = "123123";
resiCategoryStatsConfigService.updateStatus(customerId,formDTO);
return new Result();
return new Result().ok("修改成功");
}
@PostMapping("updatesort")
public Result updateSort(@LoginUser TokenDto tokenDTO,@RequestBody List<IcResiCategoryStatsConfigSortFormDTO> formDTOs){

4
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/ResiCategoryStatsConfigServiceImpl.java

@ -103,7 +103,7 @@ public class ResiCategoryStatsConfigServiceImpl implements ResiCategoryStatsConf
entity.setDataIcon("");
entity.setHouseShowIcon("");
entity.setStatus("show");
entity.setSort(0);
entity.setSort(icFormItemEntity.getSort());
newStatsEntityList.add(entity);
});
if(!CollectionUtils.isEmpty(newStatsEntityList)){
@ -205,8 +205,6 @@ public class ResiCategoryStatsConfigServiceImpl implements ResiCategoryStatsConf
//更新配置预警
if(IcResiCategoryStatsConfigConstant.WARN_YES.equals(formDTO.getWarn())){
//TODO 判断阈值范围
//更新
IcResiCategoryWarnConfigEntity icResiCategoryWarnConfigEntity = icResiCategoryWarnConfigDao.selectOne(new QueryWrapper<IcResiCategoryWarnConfigEntity>().lambda()
.eq(IcResiCategoryWarnConfigEntity::getTableName, icResiCategoryStatsConfigDTO.getTableName())

Loading…
Cancel
Save