| | |
| | | package com.fzzy.push.whhpjl; |
| | | |
| | | 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.whjl.WhjlConstant; |
| | | import com.fzzy.whjl.dto.WhjlApi1101; |
| | | 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.ArrayList; |
| | |
| | | if (null == items || items.isEmpty()) { |
| | | return; |
| | | } |
| | | |
| | | param.setInteCategory(WhjlConstant.API_CATEGORY_11); |
| | | param.setInteId(WhjlConstant.API_CODE_1101); |
| | | |
| | | ResponseDto responseDto; |
| | | for (WhjlApi1101 data : items) { |
| | | param.setBizId(data.getBizId()); |
| | | responseDto = apiRemoteService.pushData(param, data); |
| | | |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | |
| | | //TODO 更新操作标志状态 |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | WhjlApi1101 d; |
| | | for (WhjlApi1101 data : items) { |
| | | d = new WhjlApi1101(); |
| | | BeanUtils.copyProperties(data, d); |
| | | if("i".equals(d.getCzbz())){ |
| | | d.setCzbz("u"); |
| | | //TODO 更新状态,待实现 |
| | | |
| | | } |
| | | } |