diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerUserDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerUserDao.java
deleted file mode 100644
index efd5cde8c0..0000000000
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerUserDao.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Copyright 2018 人人开源 https://www.renren.io
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package com.epmet.dataaggre.dao.epmetuser;
-
-import com.epmet.commons.mybatis.dao.BaseDao;
-import com.epmet.dataaggre.entity.epmetuser.CustomerUserEntity;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * 居民用户信息,此表已作废
- *
- * @author generator generator@elink-cn.com
- * @since v1.0.0 2020-12-25
- */
-@Mapper
-public interface CustomerUserDao extends BaseDao {
-
-}
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/CustomerUserEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/CustomerUserEntity.java
deleted file mode 100644
index bad1b5b830..0000000000
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/CustomerUserEntity.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * Copyright 2018 人人开源 https://www.renren.io
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package com.epmet.dataaggre.entity.epmetuser;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-
-import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.util.Date;
-
-/**
- * 居民用户信息,此表已作废
- *
- * @author generator generator@elink-cn.com
- * @since v1.0.0 2020-12-25
- */
-@Data
-@EqualsAndHashCode(callSuper=false)
-@TableName("customer_user")
-public class CustomerUserEntity extends BaseEpmetEntity {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * 客户Id CUSTOMER.id
- */
- private String customerId;
-
- /**
- * 微信openId
- */
- private String wxOpenId;
-
- /**
- * 微信unionId
- */
- private String wxUnionId;
-
- /**
- * 手机号
- */
- private String mobile;
-
- /**
- * 昵称
- */
- private String nickname;
-
- /**
- * 性别:0.未知 1.男性2女性
- */
- private Integer sex;
-
- /**
- * 头像
- */
- private String headImgUrl;
-
- /**
- * 国家
- */
- private String country;
-
- /**
- * 省份
- */
- private String province;
-
- /**
- * 城市
- */
- private String city;
-
- /**
- * 语言
- */
- private String language;
-
-}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerUserDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerUserDao.xml
deleted file mode 100644
index 9676ace2cc..0000000000
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerUserDao.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java
index 7dc71f336e..4214e77cf8 100644
--- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java
+++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java
@@ -22,7 +22,7 @@ import java.util.Map;
* @date 2020/6/4 10:28
*/
@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallbackFactory = EpmetCommonServiceOpenFeignClientFallbackFactory.class)
- //@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallbackFactory = EpmetCommonServiceOpenFeignClientFallbackFactory.class, url = "http://192.168.1.132:8103")
+ //@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallbackFactory = EpmetCommonServiceOpenFeignClientFallbackFactory.class, url = "http://localhost:8103")
public interface EpmetCommonServiceOpenFeignClient {
/**
* @param formDTO
@@ -131,7 +131,7 @@ public interface EpmetCommonServiceOpenFeignClient {
* @param input
* @return
*/
- @RequestMapping("/commonservice/import-task/create")
+ @PostMapping("/commonservice/import-task/create")
Result createImportTask(@RequestBody ImportTaskCommonFormDTO input);
/**
diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ImportTaskController.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ImportTaskController.java
index 8af4083542..8b03c4465b 100644
--- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ImportTaskController.java
+++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ImportTaskController.java
@@ -39,7 +39,7 @@ public class ImportTaskController {
* @param input
* @return
*/
- @RequestMapping("create")
+ @PostMapping("create")
public Result createTask(@RequestBody ImportTaskCommonFormDTO input) {
ValidatorUtils.validateEntity(input, ImportTaskCommonFormDTO.Create.class);
String operatorId = input.getOperatorId();
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
index 7289670c7a..fbc82de26d 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
@@ -502,17 +502,6 @@ public class IcResiUserController implements ResultDataResolver {
return new Result();
}
- @PostMapping("test")
- public Result>> test(@LoginUser TokenDto tokenDto, @RequestBody DynamicQueryFormDTO formDTO) {
- formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc");
- //formDTO.setCustomerId(tokenDto.getCustomerId());
- return new Result>>().ok(icResiUserService.dynamicQuery(formDTO.getCustomerId(),
- formDTO.getFormCode(),
- formDTO.getResultTableName(),
- formDTO.getConditions(),
- tokenDto.getUserId(), null));
- }
-
/**
* @param formDTO
* @Description 查询个人数据
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java
index 5f2deb846e..715f820896 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java
@@ -310,7 +310,7 @@ public class IcNatServiceImpl extends BaseServiceImpl imp
}
}
- @Async
+ @Async("executorService")
@Override
public void execAsyncExcelImport(Path filePath, String importTaskId) {
String userId = null;
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java
index 313c18c16d..1d3c3b2cc8 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java
@@ -424,6 +424,9 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
String idCard = columnAndValues.get("ID_CARD");
+ // 执行指定的检查
+ specifiedCheck(columnAndValues);
+
Map existingResiMap = icResiUserDao.selectResiInfoMap(idCard, null);
if (existingResiMap == null) {
@@ -526,6 +529,33 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
}
}
+ /**
+ * 执行指定的检查
+ * @param columnAndValues
+ */
+ private void specifiedCheck(LinkedHashMap columnAndValues) {
+ String idCard = columnAndValues.get("ID_CARD");
+ String mobile = columnAndValues.get("MOBILE");
+
+ List errors = new ArrayList<>();
+
+ if (idCard.length() > 18) {
+ // 身份证号超长了哦,不可以的
+ errors.add("身份证号过长,限制18位");
+ }
+
+ if (StringUtils.isNotBlank(mobile) && mobile.length() > 15) {
+ // 手机号超长也是不可以的
+ errors.add("手机号过长,限制15位");
+ }
+
+ if (errors.size() > 0) {
+ // 有错误
+ String errorMsg = String.join(";", errors);
+ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg);
+ }
+ }
+
/**
* 持久化IC居民附加信息
* @param headerColumnWrapper 数据库列包装信息
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java
index ec33974bf8..29a0109fa2 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java
@@ -160,7 +160,7 @@ public class IcVaccineServiceImpl extends BaseServiceImpl