Browse Source

建设方案 填写错误

master
PoffyZhang 1 year ago
parent
commit
03a0814efe
2 changed files with 6 additions and 6 deletions
  1. +5
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/common/config/ConfigurerAdapter.java
  2. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java

+ 5
- 5
pmapi/src/main/java/com/ningdatech/pmapi/common/config/ConfigurerAdapter.java View File

@@ -28,15 +28,15 @@ public class ConfigurerAdapter implements WebMvcConfigurer {
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
// 使用 fastjson 序列化,会导致 @JsonIgnore 失效,可以使用 @JSONField(serialize = false) 替换
FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
// FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
List<MediaType> supportMediaTypeList = new ArrayList<>();
supportMediaTypeList.add(MediaType.APPLICATION_JSON);
FastJsonConfig config = new FastJsonConfig();
config.setDateFormat("yyyy-MM-dd HH:mm:ss");
config.setSerializerFeatures(SerializerFeature.DisableCircularReferenceDetect);
converter.setFastJsonConfig(config);
converter.setSupportedMediaTypes(supportMediaTypeList);
converter.setDefaultCharset(StandardCharsets.UTF_8);
converters.add(converter);
// converter.setFastJsonConfig(config);
// converter.setSupportedMediaTypes(supportMediaTypeList);
// converter.setDefaultCharset(StandardCharsets.UTF_8);
// converters.add(converter);
}
}

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java View File

@@ -102,7 +102,7 @@ public class ConstructionPlanManage {
VUtils.isTrue(Objects.isNull(projectDto.getId())).throwMessage("提交失败 缺少项目ID!");
Project projectInfo = projectService.getById(projectDto.getId());
VUtils.isTrue(Objects.isNull(projectInfo)).throwMessage("提交失败 此项目不存在!");
VUtils.isTrue(StringUtils.isBlank(projectInfo.getConstructionPlanFile())).throwMessage("提交失败 请提交建设方案!");
VUtils.isTrue(StringUtils.isBlank(projectDto.getConstructionPlanFile())).throwMessage("提交失败 请提交建设方案!");

String regionCode = projectInfo.getAreaCode();



Loading…
Cancel
Save