package com.fzzy.push.gb2022;
|
|
import com.fzzy.api.data.ApiParam;
|
import com.fzzy.api.data.PushProtocol;
|
import com.fzzy.api.service.PushService13;
|
import com.fzzy.push.impl.ComPushService13;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Component;
|
|
/**
|
* 粮库管理-推送
|
*/
|
@Component
|
public class GBPushService13 implements PushService13 {
|
|
@Autowired
|
private GBApiRemoteService apiRemoteService;
|
@Autowired
|
private ComPushService13 pushService;
|
|
|
@Override
|
public String getProtocol() {
|
return PushProtocol.GB_2022.getCode();
|
}
|
|
@Override
|
public void pushData(ApiParam param) {
|
|
//粮情推送
|
pushService.pushData1302(apiRemoteService, param);
|
|
}
|
|
|
// public void pushData1302(ApiParam param) {
|
//
|
// //获取需要推送的数据
|
// List<Api1302> items = apiRep1302.findPushData(param.getKqdm());
|
//
|
// if (null == items || items.isEmpty()) {
|
// log.info("-------------没有粮情数据需要推送-----------");
|
// return;
|
// }
|
//
|
// param.setInteCategory(Constant.API_CATEGORY_13);
|
// param.setInteId(Constant.API_CODE_1302);
|
//
|
// ResponseDto responseDto;
|
//
|
// for (Api1302 data : items) {
|
// param.setBizId(data.getBizId());
|
// responseDto = apiRemoteService.pushData(param, data);
|
//
|
// if (responseDto.getSuccess() == 0) {
|
// if (Constant.CZBZ_I.equals(data.getCzbz())) {
|
// apiRep1302.updateStatus(data.getWsdjcdh(), Constant.CZBZ_U);
|
// }
|
// }
|
// }
|
// }
|
}
|