Browse Source

Merge remote-tracking branch 'origin/dev_epidemic_situation' into dev_epidemic_situation

dev
yinzuomei 3 years ago
parent
commit
fb2211c83e
  1. 33
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerUserDao.java
  2. 96
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/CustomerUserEntity.java
  3. 6
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerUserDao.xml
  4. 4
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java
  5. 2
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ImportTaskController.java
  6. 11
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
  7. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java
  8. 30
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java
  9. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java

33
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerUserDao.java

@ -1,33 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<CustomerUserEntity> {
}

96
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/CustomerUserEntity.java

@ -1,96 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

6
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerUserDao.xml

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dataaggre.dao.epmetuser.CustomerUserDao">
</mapper>

4
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<ImportTaskCommonResultDTO> createImportTask(@RequestBody ImportTaskCommonFormDTO input);
/**

2
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<ImportTaskCommonResultDTO> createTask(@RequestBody ImportTaskCommonFormDTO input) {
ValidatorUtils.validateEntity(input, ImportTaskCommonFormDTO.Create.class);
String operatorId = input.getOperatorId();

11
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<List<Map<String, Object>>> test(@LoginUser TokenDto tokenDto, @RequestBody DynamicQueryFormDTO formDTO) {
formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc");
//formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<List<Map<String, Object>>>().ok(icResiUserService.dynamicQuery(formDTO.getCustomerId(),
formDTO.getFormCode(),
formDTO.getResultTableName(),
formDTO.getConditions(),
tokenDto.getUserId(), null));
}
/**
* @param formDTO
* @Description 查询个人数据

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java

@ -310,7 +310,7 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp
}
}
@Async
@Async("executorService")
@Override
public void execAsyncExcelImport(Path filePath, String importTaskId) {
String userId = null;

30
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<String, String> existingResiMap = icResiUserDao.selectResiInfoMap(idCard, null);
if (existingResiMap == null) {
@ -526,6 +529,33 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
}
}
/**
* 执行指定的检查
* @param columnAndValues
*/
private void specifiedCheck(LinkedHashMap<String, String> columnAndValues) {
String idCard = columnAndValues.get("ID_CARD");
String mobile = columnAndValues.get("MOBILE");
List<String> 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 数据库列包装信息

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java

@ -160,7 +160,7 @@ public class IcVaccineServiceImpl extends BaseServiceImpl<IcVaccineDao, IcVaccin
}
}
@Async
@Async("executorService")
@Override
public void execAsyncExcelImport(Path filePath, String importTaskId) {
String userId = null;

Loading…
Cancel
Save