13 changed files with 283 additions and 51 deletions
			
			
		| @ -0,0 +1,40 @@ | |||
| package com.epmet.task; | |||
| 
 | |||
| 
 | |||
| import com.alibaba.fastjson.JSON; | |||
| import com.epmet.commons.tools.utils.Result; | |||
| import com.epmet.dto.form.NatInfoScanTaskFormDTO; | |||
| import com.epmet.feign.EpmetUserOpenFeignClient; | |||
| import lombok.extern.slf4j.Slf4j; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Component; | |||
| 
 | |||
| /** | |||
|  * @author zxc | |||
|  * @dscription | |||
|  * 大数据局部门配置on | |||
|  * 根据范围搜索居民,调接口查询最近一次核酸检测记录 | |||
|  * 检测时间 + 身份证 不存在就插入 | |||
|  */ | |||
| @Slf4j | |||
| @Component("natInfoScanTask") | |||
| public class NatInfoScanTask implements ITask { | |||
| 
 | |||
|     @Autowired | |||
|     private EpmetUserOpenFeignClient userOpenFeignClient; | |||
| 
 | |||
|     @Override | |||
|     public void run(String params) { | |||
|         NatInfoScanTaskFormDTO formDTO = new NatInfoScanTaskFormDTO(); | |||
|         if (StringUtils.isNotBlank(params)) { | |||
|             formDTO = JSON.parseObject(params, NatInfoScanTaskFormDTO.class); | |||
|         } | |||
|         Result result = userOpenFeignClient.natInfoScanTask(formDTO); | |||
|         if (result.success()) { | |||
|             log.info("NatInfoScanTask定时任务执行成功"); | |||
|         } else { | |||
|             log.error("NatInfoScanTask定时任务执行失败:" + result.getMsg()); | |||
|         } | |||
|     } | |||
| } | |||
| @ -0,0 +1,18 @@ | |||
| package com.epmet.dto.form; | |||
| 
 | |||
| import lombok.Data; | |||
| 
 | |||
| import java.io.Serializable; | |||
| 
 | |||
| /** | |||
|  * @Author zxc | |||
|  * @DateTime 2022/9/26 17:04 | |||
|  * @DESC | |||
|  */ | |||
| @Data | |||
| public class NatInfoScanTaskFormDTO implements Serializable { | |||
| 
 | |||
|     private static final long serialVersionUID = 3053943501957102943L; | |||
| 
 | |||
|     private String customerId; | |||
| } | |||
| @ -0,0 +1,29 @@ | |||
| package com.epmet.dto.form; | |||
| 
 | |||
| import com.epmet.dto.DataSyncScopeDTO; | |||
| import lombok.Data; | |||
| 
 | |||
| import javax.validation.Valid; | |||
| import javax.validation.constraints.NotBlank; | |||
| import java.io.Serializable; | |||
| import java.util.List; | |||
| 
 | |||
| /** | |||
|  * @Author zxc | |||
|  * @DateTime 2022/9/26 15:35 | |||
|  * @DESC | |||
|  */ | |||
| @Data | |||
| public class ScopeSaveFormDTO implements Serializable { | |||
| 
 | |||
|     private static final long serialVersionUID = -489844541905303736L; | |||
| 
 | |||
|     public interface ScopeSaveForm{} | |||
| 
 | |||
|     @NotBlank(message = "dataSyncConfigId不能为空",groups = ScopeSaveForm.class) | |||
|     private String dataSyncConfigId; | |||
|     private String customerId; | |||
| 
 | |||
|     @Valid | |||
|     private List<DataSyncScopeDTO> scopeList; | |||
| } | |||
					Loading…
					
					
				
		Reference in new issue