Browse Source

代码调整

dev
sunyuchao 3 years ago
parent
commit
e0c09eaba3
  1. 12
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java
  2. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcCityManagementController.java
  3. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPublicServiceController.java
  4. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcSuperiorResourceController.java
  5. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcCityManagementExcel.java
  6. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPublicServiceExcel.java
  7. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcSuperiorResourceExcel.java
  8. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcCityManagementExcelImportListener.java
  9. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcPublicServiceExcelImportListener.java
  10. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcSuperiorResourceExcelImportListener.java
  11. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcCityManagementServiceImpl.java
  12. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPublicServiceServiceImpl.java
  13. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcSuperiorResourceServiceImpl.java
  14. BIN
      epmet-module/gov-org/gov-org-server/src/main/resources/excel/city_management_template.xlsx
  15. BIN
      epmet-module/gov-org/gov-org-server/src/main/resources/excel/public_service_template.xlsx
  16. BIN
      epmet-module/gov-org/gov-org-server/src/main/resources/excel/superior_resource_template.xlsx

12
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/constants/ImportTaskConstants.java

@ -47,4 +47,16 @@ public interface ImportTaskConstants {
* 处理状态完成但未完全成功 * 处理状态完成但未完全成功
*/ */
String PROCESS_STATUS_FINISHED_FAIL = "finished_fail"; String PROCESS_STATUS_FINISHED_FAIL = "finished_fail";
/**
* 优势资源
*/
String IC_SUPERIOR_RESOURCE = "ic_superior_resource";
/**
* 公共服务
*/
String IC_PUBLIC_SERVICE = "ic_public_service";
/**
* 城市管理
*/
String IC_CITY_MANAGEMENT = "ic_city_management";
} }

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcCityManagementController.java

@ -197,7 +197,7 @@ public class IcCityManagementController implements ResultDataResolver {
// 2.生成导入任务记录 // 2.生成导入任务记录
ImportTaskCommonResultDTO rstData = getResultDataOrThrowsException( ImportTaskCommonResultDTO rstData = getResultDataOrThrowsException(
ImportTaskUtils.createImportTask(originalFilename, ImportTaskConstants.BIZ_TYPE_IC_VACCINE), ImportTaskUtils.createImportTask(originalFilename, ImportTaskConstants.IC_CITY_MANAGEMENT),
ServiceConstant.EPMET_COMMON_SERVICE, ServiceConstant.EPMET_COMMON_SERVICE,
EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),
"excel导入优势资源管理信息错误", "excel导入优势资源管理信息错误",

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPublicServiceController.java

@ -198,7 +198,7 @@ public class IcPublicServiceController implements ResultDataResolver {
// 2.生成导入任务记录 // 2.生成导入任务记录
ImportTaskCommonResultDTO rstData = getResultDataOrThrowsException( ImportTaskCommonResultDTO rstData = getResultDataOrThrowsException(
ImportTaskUtils.createImportTask(originalFilename, ImportTaskConstants.BIZ_TYPE_IC_VACCINE), ImportTaskUtils.createImportTask(originalFilename, ImportTaskConstants.IC_PUBLIC_SERVICE),
ServiceConstant.EPMET_COMMON_SERVICE, ServiceConstant.EPMET_COMMON_SERVICE,
EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),
"excel导入优势资源管理信息错误", "excel导入优势资源管理信息错误",

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcSuperiorResourceController.java

@ -198,7 +198,7 @@ public class IcSuperiorResourceController implements ResultDataResolver {
// 2.生成导入任务记录 // 2.生成导入任务记录
ImportTaskCommonResultDTO rstData = getResultDataOrThrowsException( ImportTaskCommonResultDTO rstData = getResultDataOrThrowsException(
ImportTaskUtils.createImportTask(originalFilename, ImportTaskConstants.BIZ_TYPE_IC_VACCINE), ImportTaskUtils.createImportTask(originalFilename, ImportTaskConstants.IC_SUPERIOR_RESOURCE),
ServiceConstant.EPMET_COMMON_SERVICE, ServiceConstant.EPMET_COMMON_SERVICE,
EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),
"excel导入优势资源管理信息错误", "excel导入优势资源管理信息错误",

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcCityManagementExcel.java

@ -20,12 +20,12 @@ public class IcCityManagementExcel {
@NotBlank(message = "场所名称为必填项") @NotBlank(message = "场所名称为必填项")
private String name; private String name;
@ExcelProperty(value = "场所类") @ExcelProperty(value = "场所类")
@ColumnWidth(20) @ColumnWidth(20)
@NotBlank(message = "场所类为必填项") @NotBlank(message = "场所类为必填项")
private String categoryName; private String categoryName;
@ExcelProperty(value = "占地面积") @ExcelProperty(value = "占地面积(平方公里)")
@ColumnWidth(25) @ColumnWidth(25)
private String areaCoveredName; private String areaCoveredName;
@ -45,7 +45,7 @@ public class IcCityManagementExcel {
@ColumnWidth(20) @ColumnWidth(20)
private String name; private String name;
@ExcelProperty("场所类") @ExcelProperty("场所类")
@ColumnWidth(20) @ColumnWidth(20)
private String categoryName; private String categoryName;

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcPublicServiceExcel.java

@ -20,12 +20,12 @@ public class IcPublicServiceExcel {
@NotBlank(message = "场所名称为必填项") @NotBlank(message = "场所名称为必填项")
private String name; private String name;
@ExcelProperty(value = "场所类") @ExcelProperty(value = "场所类")
@ColumnWidth(20) @ColumnWidth(20)
@NotBlank(message = "场所类为必填项") @NotBlank(message = "场所类为必填项")
private String categoryName; private String categoryName;
@ExcelProperty(value = "占地面积") @ExcelProperty(value = "占地面积(平方公里)")
@ColumnWidth(25) @ColumnWidth(25)
private String areaCoveredName; private String areaCoveredName;
@ -45,7 +45,7 @@ public class IcPublicServiceExcel {
@ColumnWidth(20) @ColumnWidth(20)
private String name; private String name;
@ExcelProperty("场所类") @ExcelProperty("场所类")
@ColumnWidth(20) @ColumnWidth(20)
private String categoryName; private String categoryName;

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcSuperiorResourceExcel.java

@ -20,12 +20,12 @@ public class IcSuperiorResourceExcel {
@NotBlank(message = "场所名称为必填项") @NotBlank(message = "场所名称为必填项")
private String name; private String name;
@ExcelProperty(value = "场所类") @ExcelProperty(value = "场所类")
@ColumnWidth(20) @ColumnWidth(20)
@NotBlank(message = "场所类别为必填项") @NotBlank(message = "场所类别为必填项")
private String categoryName; private String categoryName;
@ExcelProperty(value = "占地面积") @ExcelProperty(value = "占地面积(平方公里)")
@ColumnWidth(25) @ColumnWidth(25)
private String areaCoveredName; private String areaCoveredName;
@ -45,7 +45,7 @@ public class IcSuperiorResourceExcel {
@ColumnWidth(20) @ColumnWidth(20)
private String name; private String name;
@ExcelProperty("场所类") @ExcelProperty("场所类")
@ColumnWidth(20) @ColumnWidth(20)
private String categoryName; private String categoryName;

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcCityManagementExcelImportListener.java

@ -71,6 +71,9 @@ public class IcCityManagementExcelImportListener implements ReadListener<IcCityM
} }
IcCityManagementEntity IcCityManagementEntity = ConvertUtils.sourceToTarget(data, IcCityManagementEntity.class); IcCityManagementEntity IcCityManagementEntity = ConvertUtils.sourceToTarget(data, IcCityManagementEntity.class);
IcCityManagementEntity.setCustomerId(currentCustomerId);
IcCityManagementEntity.setAgencyId(currentAgencyId);
IcCityManagementEntity.setAgencyIdPath(currentAgencyPids);
IcCityManagementEntity.setSourceType("import"); IcCityManagementEntity.setSourceType("import");
IcCityManagementEntity.setCategory(data.getCategoryName()); IcCityManagementEntity.setCategory(data.getCategoryName());
IcCityManagementEntity.setAreaCovered(data.getAreaCoveredName()); IcCityManagementEntity.setAreaCovered(data.getAreaCoveredName());

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcPublicServiceExcelImportListener.java

@ -71,6 +71,9 @@ public class IcPublicServiceExcelImportListener implements ReadListener<IcPublic
} }
IcPublicServiceEntity IcPublicServiceEntity = ConvertUtils.sourceToTarget(data, IcPublicServiceEntity.class); IcPublicServiceEntity IcPublicServiceEntity = ConvertUtils.sourceToTarget(data, IcPublicServiceEntity.class);
IcPublicServiceEntity.setCustomerId(currentCustomerId);
IcPublicServiceEntity.setAgencyId(currentAgencyId);
IcPublicServiceEntity.setAgencyIdPath(currentAgencyPids);
IcPublicServiceEntity.setSourceType("import"); IcPublicServiceEntity.setSourceType("import");
IcPublicServiceEntity.setCategory(data.getCategoryName()); IcPublicServiceEntity.setCategory(data.getCategoryName());
IcPublicServiceEntity.setAreaCovered(data.getAreaCoveredName()); IcPublicServiceEntity.setAreaCovered(data.getAreaCoveredName());

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/handler/IcSuperiorResourceExcelImportListener.java

@ -73,6 +73,9 @@ public class IcSuperiorResourceExcelImportListener implements ReadListener<IcSup
} }
IcSuperiorResourceEntity icSuperiorResourceEntity = ConvertUtils.sourceToTarget(data, IcSuperiorResourceEntity.class); IcSuperiorResourceEntity icSuperiorResourceEntity = ConvertUtils.sourceToTarget(data, IcSuperiorResourceEntity.class);
icSuperiorResourceEntity.setCustomerId(currentCustomerId);
icSuperiorResourceEntity.setAgencyId(currentAgencyId);
icSuperiorResourceEntity.setAgencyIdPath(currentAgencyPids);
icSuperiorResourceEntity.setSourceType("import"); icSuperiorResourceEntity.setSourceType("import");
icSuperiorResourceEntity.setCategory(data.getCategoryName()); icSuperiorResourceEntity.setCategory(data.getCategoryName());
icSuperiorResourceEntity.setAreaCovered(data.getAreaCoveredName()); icSuperiorResourceEntity.setAreaCovered(data.getAreaCoveredName());

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

@ -207,10 +207,11 @@ public class IcCityManagementServiceImpl extends BaseServiceImpl<IcCityManagemen
throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", userId)); throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", userId));
} }
String agencyId = staffInfo.getAgencyId(); String agencyId = staffInfo.getAgencyId();
String agencyIdPath = StringUtils.isNotBlank(staffInfo.getAgencyPIds()) ? staffInfo.getAgencyPIds() + ":" + staffInfo.getAgencyId() : staffInfo.getAgencyId();
IcCityManagementExcelImportListener listener = new IcCityManagementExcelImportListener(userId, customerId, agencyId, staffInfo.getAgencyPIds().replace(":".concat(agencyId), ""), this, coverageService); IcCityManagementExcelImportListener listener = new IcCityManagementExcelImportListener(userId, customerId, agencyId, agencyIdPath, this, coverageService);
EasyExcel.read(filePath.toFile(), IcCityManagementExcel.class, listener).headRowNumber(2).sheet(0).doRead(); EasyExcel.read(filePath.toFile(), IcCityManagementExcel.class, listener).headRowNumber(1).sheet(0).doRead();
String errorDesFileUrl = null; String errorDesFileUrl = null;

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

@ -207,10 +207,11 @@ public class IcPublicServiceServiceImpl extends BaseServiceImpl<IcPublicServiceD
throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", userId)); throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", userId));
} }
String agencyId = staffInfo.getAgencyId(); String agencyId = staffInfo.getAgencyId();
String agencyIdPath = StringUtils.isNotBlank(staffInfo.getAgencyPIds()) ? staffInfo.getAgencyPIds() + ":" + staffInfo.getAgencyId() : staffInfo.getAgencyId();
IcPublicServiceExcelImportListener listener = new IcPublicServiceExcelImportListener(userId, customerId, agencyId, staffInfo.getAgencyPIds().replace(":".concat(agencyId), ""), this, coverageService); IcPublicServiceExcelImportListener listener = new IcPublicServiceExcelImportListener(userId, customerId, agencyId, agencyIdPath, this, coverageService);
EasyExcel.read(filePath.toFile(), IcPublicServiceExcel.class, listener).headRowNumber(2).sheet(0).doRead(); EasyExcel.read(filePath.toFile(), IcPublicServiceExcel.class, listener).headRowNumber(1).sheet(0).doRead();
String errorDesFileUrl = null; String errorDesFileUrl = null;

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

@ -207,10 +207,11 @@ public class IcSuperiorResourceServiceImpl extends BaseServiceImpl<IcSuperiorRes
throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", userId)); throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", userId));
} }
String agencyId = staffInfo.getAgencyId(); String agencyId = staffInfo.getAgencyId();
String agencyIdPath = StringUtils.isNotBlank(staffInfo.getAgencyPIds()) ? staffInfo.getAgencyPIds() + ":" + staffInfo.getAgencyId() : staffInfo.getAgencyId();
IcSuperiorResourceExcelImportListener listener = new IcSuperiorResourceExcelImportListener(userId, customerId, agencyId, staffInfo.getAgencyPIds().replace(":".concat(agencyId), ""), this, coverageService); IcSuperiorResourceExcelImportListener listener = new IcSuperiorResourceExcelImportListener(userId, customerId, agencyId, agencyIdPath, this, coverageService);
EasyExcel.read(filePath.toFile(), IcSuperiorResourceExcel.class, listener).headRowNumber(2).sheet(0).doRead(); EasyExcel.read(filePath.toFile(), IcSuperiorResourceExcel.class, listener).headRowNumber(1).sheet(0).doRead();
String errorDesFileUrl = null; String errorDesFileUrl = null;

BIN
epmet-module/gov-org/gov-org-server/src/main/resources/excel/city_management_template.xlsx

Binary file not shown.

BIN
epmet-module/gov-org/gov-org-server/src/main/resources/excel/public_service_template.xlsx

Binary file not shown.

BIN
epmet-module/gov-org/gov-org-server/src/main/resources/excel/superior_resource_template.xlsx

Binary file not shown.
Loading…
Cancel
Save