|  |  |  | 
|---|
|  |  |  | package com.fzzy.push.shjdjw2023; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.fzzy.api.Constant; | 
|---|
|  |  |  | import com.fzzy.api.data.ApiParam; | 
|---|
|  |  |  | import com.fzzy.api.data.PushProtocol; | 
|---|
|  |  |  | import com.fzzy.api.dto.ResponseDto; | 
|---|
|  |  |  | import com.fzzy.api.entity.Api1101; | 
|---|
|  |  |  | import com.fzzy.api.entity.Api1109; | 
|---|
|  |  |  | import com.fzzy.api.service.ApiRemoteService; | 
|---|
|  |  |  | import com.fzzy.api.service.PushService11; | 
|---|
|  |  |  | import com.fzzy.api.view.repository.Api1101Rep; | 
|---|
|  |  |  | import com.fzzy.push.impl.ComPushService11; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.beans.BeanUtils; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.stereotype.Component; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 上海嘉定纪委监管平台-基础数据上传 | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ComPushService11 pushService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private Api1101Rep api1101Rep; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public String getProtocol() { | 
|---|
|  |  |  | return PushProtocol.SB_GD_2022.getCode(); | 
|---|
|  |  |  | return PushProtocol.SB_SHJdJW_2023.getCode(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void pushData(ApiParam param) { | 
|---|
|  |  |  | log.info("------->>>>基础信息 接口模块上报开始"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //单位信息 | 
|---|
|  |  |  | this.pushData(param); | 
|---|
|  |  |  | pushService.pushData1101(apiRemoteService, param); | 
|---|
|  |  |  | pushService.pushData1102(apiRemoteService, param); | 
|---|
|  |  |  | pushService.pushData1103(apiRemoteService, param); | 
|---|
|  |  |  | pushService.pushData1104(apiRemoteService, param); | 
|---|
|  |  |  | pushService.pushData1105(apiRemoteService, param); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | log.info("------->>>>基础信息 接口模块上报结束"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 1101 单位信息 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | private void pushData1101(ApiParam param) { | 
|---|
|  |  |  | List<Api1101> items = api1101Rep.findPushData(param.getKqdm()); | 
|---|
|  |  |  | if (null == items || items.isEmpty()) { | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | param.setInteCategory(Constant.API_CATEGORY_11); | 
|---|
|  |  |  | param.setInteId(Constant.API_CODE_1111); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ResponseDto responseDto = apiRemoteService.pushData(param, items); | 
|---|
|  |  |  | if (responseDto.getSuccess() == 0) { | 
|---|
|  |  |  | for (Api1101 data : items) { | 
|---|
|  |  |  | if (Constant.CZBZ_I.equals(data.getCzbz())) { | 
|---|
|  |  |  | api1101Rep.updateStatus(data.getDwdm(), Constant.CZBZ_U); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|