| | |
| | | package com.fzzy.push.whhpjl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.fzzy.api.Constant; |
| | | import com.fzzy.api.data.ApiParam; |
| | |
| | | import com.fzzy.api.service.ApiRemoteService; |
| | | import com.fzzy.api.service.PushService11; |
| | | import com.fzzy.api.view.repository.ApiInfoDataRep; |
| | | import com.fzzy.whjl.WhjlConstant; |
| | | import com.fzzy.whjl.dto.*; |
| | | import com.fzzy.otherview.whhpjl.WhjlConstant; |
| | | import com.fzzy.otherview.whhpjl.dto.*; |
| | | 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; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | // 推送仓房信息 |
| | | this.pushData1105(apiRemoteService, param); |
| | | // 推送廒间信息 |
| | | this.pushData1106(apiRemoteService, param); |
| | | // 推送货位信息 |
| | | this.pushData1107(apiRemoteService, param); |
| | | // 推送货位信息 |
| | | this.pushData1108(apiRemoteService, param); |
| | | // 推送仓储设备信息 |
| | | this.pushData1111(apiRemoteService, param); |
| | | |
| | |
| | | /** |
| | | * 1106 廒间信息 |
| | | */ |
| | | private void pushData1106(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | private void pushData1107(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | |
| | | //获取军工企业信息 |
| | | List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(WhjlConstant.API_CODE_1106); |
| | | List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(WhjlConstant.API_CODE_1107); |
| | | |
| | | if (null == items || items.isEmpty()) { |
| | | return; |
| | | } |
| | | param.setInteCategory(WhjlConstant.API_CATEGORY_11); |
| | | param.setInteId(WhjlConstant.API_CODE_1106); |
| | | List<WhjlApi1106> list = new ArrayList<>(); |
| | | WhjlApi1106 whjlApi1106; |
| | | param.setInteId(WhjlConstant.API_CODE_1107); |
| | | List<WhjlApi1107> list = new ArrayList<>(); |
| | | WhjlApi1107 whjlApi1106; |
| | | for (ApiInfoData infoData : items) { |
| | | whjlApi1106 = JSONObject.parseObject(infoData.getData(), WhjlApi1106.class); |
| | | whjlApi1106 = JSONObject.parseObject(infoData.getData(), WhjlApi1107.class); |
| | | whjlApi1106.setKqdm(infoData.getKqdm()); |
| | | whjlApi1106.setCzbz(infoData.getCzbz()); |
| | | whjlApi1106.setUpdateTime(infoData.getUpdateTime()); |
| | |
| | | /** |
| | | * 1107 货位信息 |
| | | */ |
| | | private void pushData1107(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | private void pushData1108(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | |
| | | //获取军工企业信息 |
| | | List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(WhjlConstant.API_CODE_1107); |
| | | List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(WhjlConstant.API_CODE_1108); |
| | | |
| | | if (null == items || items.isEmpty()) { |
| | | return; |
| | | } |
| | | param.setInteCategory(WhjlConstant.API_CATEGORY_11); |
| | | param.setInteId(WhjlConstant.API_CODE_1107); |
| | | List<WhjlApi1107> list = new ArrayList<>(); |
| | | WhjlApi1107 whjlApi1107; |
| | | param.setInteId(WhjlConstant.API_CODE_1108); |
| | | List<WhjlApi1108> list = new ArrayList<>(); |
| | | WhjlApi1108 whjlApi1107; |
| | | for (ApiInfoData infoData : items) { |
| | | whjlApi1107 = JSONObject.parseObject(infoData.getData(), WhjlApi1107.class); |
| | | whjlApi1107 = JSONObject.parseObject(infoData.getData(), WhjlApi1108.class); |
| | | whjlApi1107.setKqdm(infoData.getKqdm()); |
| | | whjlApi1107.setCzbz(infoData.getCzbz()); |
| | | whjlApi1107.setUpdateTime(infoData.getUpdateTime()); |
| | |
| | | } |
| | | param.setInteCategory(WhjlConstant.API_CATEGORY_11); |
| | | param.setInteId(WhjlConstant.API_CODE_1111); |
| | | List<WhjlApi1111> list = new ArrayList<>(); |
| | | WhjlApi1111 whjlApi1111; |
| | | List<WhjlApi1112> list = new ArrayList<>(); |
| | | WhjlApi1112 whjlApi1111; |
| | | for (ApiInfoData infoData : items) { |
| | | whjlApi1111 = JSONObject.parseObject(infoData.getData(), WhjlApi1111.class); |
| | | whjlApi1111 = JSONObject.parseObject(infoData.getData(), WhjlApi1112.class); |
| | | whjlApi1111.setKqdm(infoData.getKqdm()); |
| | | whjlApi1111.setCzbz(infoData.getCzbz()); |
| | | whjlApi1111.setUpdateTime(infoData.getUpdateTime()); |