| | |
| | | import com.fzzy.api.dto.ResponseDto; |
| | | import com.fzzy.api.entity.*; |
| | | import com.fzzy.api.service.ApiRemoteService; |
| | | import com.fzzy.api.service.PushService11; |
| | | import com.fzzy.api.service.PushService12; |
| | | import com.fzzy.api.view.repository.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class NX2023PushService12 implements PushService11 { |
| | | public class NX2023PushService12 implements PushService12 { |
| | | |
| | | |
| | | @Autowired |
| | | private NX2023ApiRemoteService apiRemoteService; |
| | | @Autowired |
| | | private Api1109Rep api1109Rep; |
| | | @Autowired |
| | | private Api1201Rep api1201Rep; |
| | | @Autowired |
| | |
| | | this.pushData1211(apiRemoteService, param); |
| | | //客户信息 |
| | | this.pushData1212(apiRemoteService, param); |
| | | //文件信息 |
| | | this.pushData1109(apiRemoteService, param); |
| | | |
| | | log.info("------->>>>粮食购销 接口模块上报结束"); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 1109 文件信息 |
| | | */ |
| | | public void pushData1109(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | //获取文件信息 |
| | | List<Api1109> list = api1109Rep.findPushDataByTime(param.getKqdm(), param.getStart(), param.getEnd()); |
| | | |
| | | if (null == list || list.isEmpty()) { |
| | | log.error("-----宁夏省平台2023版:未获取到文件信息,不推送-----"); |
| | | return; |
| | | } |
| | | param.setInteCategory(Constant.API_CATEGORY_11); |
| | | param.setInteId(NX2023Constant.NX_2023_API_CODE_1109); |
| | | |
| | | ResponseDto responseDto; |
| | | for (Api1109 data : list) { |
| | | param.setBizId(data.getBizId()); |
| | | responseDto = apiRemoteService.pushData(param, data); |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | api1109Rep.updateStatus(data.getId(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |