diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml
index 51f9a0fcb6..f132877210 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml
@@ -394,61 +394,61 @@
diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/utils/ImportTaskUtils.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/utils/ImportTaskUtils.java
new file mode 100644
index 0000000000..80bf086374
--- /dev/null
+++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/utils/ImportTaskUtils.java
@@ -0,0 +1,51 @@
+package com.epmet.utils;
+
+import com.epmet.commons.tools.constant.AppClientConstant;
+import com.epmet.commons.tools.feign.ResultDataResolver;
+import com.epmet.commons.tools.utils.EpmetRequestHolder;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.utils.SpringContextUtils;
+import com.epmet.dto.form.ImportTaskCommonFormDTO;
+import com.epmet.dto.result.ImportTaskCommonResultDTO;
+import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
+
+/**
+ * 导入任务工具类,用于创建/完成导入工具
+ */
+public class ImportTaskUtils implements ResultDataResolver {
+
+ /**
+ * 创建导入任务,可能抛出8000异常,请考虑捕获异常
+ * @param originFileName 上传的文件的名称
+ * @param bizType 业务类型,见ImportTaskConstants常量
+ * @return Result
+ */
+ public static Result createImportTask(String originFileName, String bizType) {
+ ImportTaskCommonFormDTO form = new ImportTaskCommonFormDTO();
+ form.setOriginFileName(originFileName);
+ form.setOperatorId(EpmetRequestHolder.getHeader(AppClientConstant.USER_ID));
+ form.setBizType(bizType);
+
+ return SpringContextUtils.getBean(EpmetCommonServiceOpenFeignClient.class).createImportTask(form);
+ }
+
+ /**
+ * 结束导入任务
+ * @param taskId 任务ID
+ * @param processStatus 处理状态 见ImportTaskConstants
+ * @param resultDescFilePath 结果描述文件的路径
+ * @param resultDesc 结果简要描述文字
+ * @return Result
+ */
+ public static Result finishImportTask(String taskId, String processStatus, String resultDescFilePath, String resultDesc) {
+ ImportTaskCommonFormDTO form = new ImportTaskCommonFormDTO();
+ form.setTaskId(taskId);
+ form.setOperatorId(EpmetRequestHolder.getHeader(AppClientConstant.USER_ID));
+ form.setProcessStatus(processStatus);
+ form.setResultDescFilePath(resultDescFilePath);
+ form.setResultDesc(resultDesc);
+
+ return SpringContextUtils.getBean(EpmetCommonServiceOpenFeignClient.class).finishImportTask(form);
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java
index 25cf270549..5c71e7bcf1 100644
--- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java
@@ -12,6 +12,7 @@ import com.epmet.dto.result.demand.IcResiDemandDictDTO;
import com.epmet.dto.result.resi.PageVolunteerInfoResultDTO;
import com.epmet.feign.fallback.EpmetHeartOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -92,4 +93,14 @@ public interface EpmetHeartOpenFeignClient {
*/
@PostMapping("/heart/resi/volunteer/modifyVolunteerGrid")
Result modifyVolunteerGrid(@RequestBody VolunteerInfoDTO volunteerInfoDTO);
+
+ /**
+ * 客户初始化数据
+ * @Param customerId
+ * @Return {@link Result}
+ * @Author zhaoqifeng
+ * @Date 2022/4/14 14:50
+ */
+ @GetMapping("/heart/serviceitem/initCustomer/{customerId}")
+ Result customerInit(@PathVariable(value = "customerId") String customerId);
}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java
index 06bdc642c9..28e1fc50b8 100644
--- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java
@@ -88,4 +88,18 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli
public Result modifyVolunteerGrid(VolunteerInfoDTO volunteerInfoDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "modifyVolunteerGrid", volunteerInfoDTO);
}
+
+ /**
+ * 客户初始化数据
+ *
+ * @param customerId
+ * @Param customerId
+ * @Return {@link Result}
+ * @Author zhaoqifeng
+ * @Date 2022/4/14 14:50
+ */
+ @Override
+ public Result customerInit(String customerId) {
+ return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "customerInit", customerId);
+ }
}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java
index 12b617b6bc..7608069b76 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java
@@ -12,13 +12,12 @@ import com.epmet.dto.form.demand.ServiceItemSelectFormDTO;
import com.epmet.dto.form.demand.StatusFormDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.demand.ServiceItemResultDTO;
+import com.epmet.service.IcResiDemandDictService;
import com.epmet.service.IcServiceItemDictService;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+import javax.annotation.Resource;
import java.util.List;
/**
@@ -33,6 +32,8 @@ public class IcServiceItemDictController {
@Autowired
private IcServiceItemDictService icServiceItemDictService;
+ @Resource
+ private IcResiDemandDictService icResiDemandDictService;
/**
@@ -85,4 +86,18 @@ public class IcServiceItemDictController {
ValidatorUtils.validateEntity(formDTO,ServiceItemSelectFormDTO.AddUserInternalGroup.class);
return new Result>().ok(icServiceItemDictService.queryDictListForSelect(formDTO));
}
+
+ /**
+ * 客户初始化数据
+ * @Param customerId
+ * @Return {@link Result}
+ * @Author zhaoqifeng
+ * @Date 2022/4/14 14:50
+ */
+ @GetMapping("initCustomer/{customerId}")
+ public Result customerInit(@PathVariable(value = "customerId") String customerId) {
+ icServiceItemDictService.customerInit(customerId);
+ icResiDemandDictService.customerInit(customerId);
+ return new Result();
+ }
}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java
index ce861497cf..4510a34341 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcResiDemandDictService.java
@@ -20,7 +20,6 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.dto.result.OptionResultDTO;
import com.epmet.commons.tools.page.PageData;
-import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.demand.DemandCategoryResDTO;
import com.epmet.dto.result.demand.DemandPageResDTO;
@@ -147,4 +146,13 @@ public interface IcResiDemandDictService extends BaseService queryLatestOrder(String userId, String customerId);
+
+ /**
+ * 客户初始化
+ * @Param customerId
+ * @Return
+ * @Author zhaoqifeng
+ * @Date 2022/4/14 14:31
+ */
+ void customerInit(String customerId);
}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java
index 4e704aff54..af01c8a4c3 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java
@@ -70,4 +70,13 @@ public interface IcServiceItemDictService extends BaseService queryDictListForSelect(ServiceItemSelectFormDTO formDTO);
+
+ /**
+ * 客户初始化
+ * @Param customerId
+ * @Return
+ * @Author zhaoqifeng
+ * @Date 2022/4/14 14:31
+ */
+ void customerInit(String customerId);
}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java
index c6d0e0946f..5081bfd574 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java
@@ -333,5 +333,34 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl();
}
+ /**
+ * 客户初始化
+ *
+ * @param customerId
+ * @Param customerId
+ * @Return
+ * @Author zhaoqifeng
+ * @Date 2022/4/14 14:31
+ */
+ @Override
+ public void customerInit(String customerId) {
+ String defaultCustomerId = "default";
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(IcResiDemandDictEntity::getCustomerId, defaultCustomerId);
+ List list = baseDao.selectList(wrapper);
+ if (CollectionUtils.isNotEmpty(list)) {
+ list.forEach(item -> {
+ String uuid = UUID.randomUUID().toString().replaceAll("-","");
+ item.setId(uuid);
+ item.setCustomerId(customerId);
+ item.setCreatedBy("init_user");
+ item.setCreatedTime(new Date());
+ item.setUpdatedBy("init_user");
+ item.setUpdatedTime(new Date());
+ baseDao.insert(item);
+ });
+ }
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java
index 76e431aa44..3fbda7cd37 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java
@@ -42,6 +42,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
+import java.util.UUID;
/**
* 服务事项分类字典表
@@ -171,5 +172,34 @@ public class IcServiceItemDictServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(IcServiceItemDictEntity::getCustomerId, defaultCustomerId);
+ List list = baseDao.selectList(wrapper);
+ if (CollectionUtils.isNotEmpty(list)) {
+ list.forEach(item -> {
+ String uuid = UUID.randomUUID().toString().replaceAll("-","");
+ item.setId(uuid);
+ item.setCustomerId(customerId);
+ item.setCreatedBy("init_user");
+ item.setCreatedTime(new Date());
+ item.setUpdatedBy("init_user");
+ item.setUpdatedTime(new Date());
+ baseDao.insert(item);
+ });
+ }
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml
index 6c38707498..f67db1aaa1 100644
--- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml
+++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml
@@ -41,7 +41,7 @@
ORDER BY sort ASC
-