| | |
| | | import com.fzzy.push.gd2022.dto.Gd2022Api1208; |
| | | import com.fzzy.push.gd2022.dto.Gd2022Api1307; |
| | | import com.fzzy.push.gd2022.dto.Gd2022Api1308; |
| | | import com.fzzy.push.sh2023.SH2023Constant; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | |
| | | if (Constant.API_CODE_1101.equals(inteId)) { |
| | | Gd2022Api1101 api1101 = new Gd2022Api1101(); |
| | | BeanUtils.copyProperties(data, api1101); |
| | | api1101.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1101); |
| | | } |
| | | if (Constant.API_CODE_1102.equals(inteId)) { |
| | | Gd2022Api1102 api1102 = new Gd2022Api1102(); |
| | | BeanUtils.copyProperties(data, api1102); |
| | | api1102.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1102); |
| | | } |
| | | if (Constant.API_CODE_1103.equals(inteId)) { |
| | | Gd2022Api1103 api1103 = new Gd2022Api1103(); |
| | | BeanUtils.copyProperties(data, api1103); |
| | | changeObject(api1103); |
| | | api1103.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1103); |
| | | } |
| | | if (Constant.API_CODE_1104.equals(inteId)) { |
| | | Gd2022Api1104 api1104 = new Gd2022Api1104(); |
| | | BeanUtils.copyProperties(data, api1104); |
| | | changeObject(api1104); |
| | | api1104.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1104); |
| | | } |
| | | if (Constant.API_CODE_1105.equals(inteId)) { |
| | | Gd2022Api1105 api1105 = new Gd2022Api1105(); |
| | | BeanUtils.copyProperties(data, api1105); |
| | | api1105.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1105); |
| | | } |
| | | if (Constant.API_CODE_1106.equals(inteId)) { |
| | | Api1106 api1106 = (Api1106) data; |
| | | api1106.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1106); |
| | | } |
| | | if (Constant.API_CODE_1107.equals(inteId)) { |
| | | Api1107 api1107 = (Api1107) data; |
| | | api1107.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1107); |
| | | } |
| | | if (Constant.API_CODE_1108.equals(inteId)) { |
| | | Api1108 api1108 = (Api1108) data; |
| | | api1108.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1108); |
| | | } |
| | | if (Constant.API_CODE_1109.equals(inteId)) { |
| | | //封装数据 |
| | |
| | | System.out.println((String) responseDto.getData()); |
| | | //设置上传文件id |
| | | api1109.setFileStorageId((String) responseDto.getData()); |
| | | api1109.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1109); |
| | | } |
| | | if (Constant.API_CODE_1110.equals(inteId)) { |
| | | Api1110 api1110 = (Api1110) data; |
| | | api1110.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1110); |
| | | } |
| | | if (Constant.API_CODE_1111.equals(inteId)) { |
| | | Gd2022Api1111 api1111 = new Gd2022Api1111(); |
| | |
| | | if(null != api1101List && api1101List.size() > 0){ |
| | | api1111.setDwmc(api1101List.get(0).getDwmc()); |
| | | } |
| | | api1111.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1111); |
| | | } |
| | | if (Constant.API_CODE_1112.equals(inteId)) { |
| | | Api1112 api1112 = (Api1112) data; |
| | | api1112.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1112); |
| | | } |
| | | if (Constant.API_CODE_1113.equals(inteId)) { |
| | | Api1113 api1113 = (Api1113) data; |
| | | api1113.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1113); |
| | | } |
| | | if (Constant.API_CODE_1201.equals(inteId)) { |
| | | Api1201 apiData = (Api1201) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1202.equals(inteId)) { |
| | | Api1202 apiData = (Api1202) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1203.equals(inteId)) { |
| | | Api1203 apiData = (Api1203) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1204.equals(inteId)) { |
| | | Api1204 apiData = (Api1204) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1205.equals(inteId)) { |
| | | Api1205 apiData = (Api1205) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1206.equals(inteId)) { |
| | | Api1206 apiData = (Api1206) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1207.equals(inteId)) { |
| | | Api1207 apiData = (Api1207) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1208.equals(inteId)) { |
| | | Gd2022Api1208 api1208 = new Gd2022Api1208(); |
| | | //包装储粮是,核查包存粮包数 |
| | | if(null == api1208.getBclbs()){ |
| | | api1208.setBclbs(0); |
| | | } |
| | | if("2".equals(api1208.getClfs()) && api1208.getBclbs() == 0){ |
| | | api1208.setBclbs((int)(api1208.getSjsl()/25)); |
| | | } |
| | | BeanUtils.copyProperties(data, api1208); |
| | | return JSON.toJSONString(api1208); |
| | | } |
| | | if (Constant.API_CODE_1209.equals(inteId)) { |
| | | Api1209 apiData = (Api1209) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1210.equals(inteId)) { |
| | | Gd2022Api1210 api1210 = new Gd2022Api1210(); |
| | | BeanUtils.copyProperties(data, api1210); |
| | | api1210.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1210); |
| | | } |
| | | if (Constant.API_CODE_1211.equals(inteId)) { |
| | | Api1211 apiData = (Api1211) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1212.equals(inteId)) { |
| | | Api1212 apiData = (Api1212) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1301.equals(inteId)) { |
| | | Api1301 apiData = (Api1301) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1302.equals(inteId)) { |
| | | Api1302 apiData = (Api1302) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1303.equals(inteId)) { |
| | | Api1303 apiData = (Api1303) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1304.equals(inteId)) { |
| | | Api1304 apiData = (Api1304) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1305.equals(inteId)) { |
| | | Api1305 apiData = (Api1305) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1306.equals(inteId)) { |
| | | Api1306 apiData = (Api1306) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1307.equals(inteId)) { |
| | | //封装数据 |
| | |
| | | GD2022ResponseDto responseDto = GD2022HttpClientUtil.postUploadData(url, authToken, api1307.getWjdz()); |
| | | //设置上传文件id |
| | | api1307.setFileStorageId((String) responseDto.getData()); |
| | | api1307.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1307); |
| | | } |
| | | if (Constant.API_CODE_1308.equals(inteId)) { |
| | |
| | | GD2022ResponseDto responseDto = GD2022HttpClientUtil.postUploadData(url, authToken, api1308.getWjdz()); |
| | | //设置上传文件id |
| | | api1308.setFileStorageId((String) responseDto.getData()); |
| | | api1308.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1308); |
| | | } |
| | | if (Constant.API_CODE_1309.equals(inteId)) { |
| | | Api1309 apiData = (Api1309) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1310.equals(inteId)) { |
| | | Gd2022Api1310 api1310 = new Gd2022Api1310(); |
| | | BeanUtils.copyProperties(data, api1310); |
| | | api1310.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1310); |
| | | } |
| | | if (Constant.API_CODE_1401.equals(inteId)) { |
| | | Api1401 apiData = (Api1401) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1402.equals(inteId)) { |
| | | Api1402 apiData = (Api1402) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | if (Constant.API_CODE_1403.equals(inteId)) { |
| | | //轮换计划,单独查询轮换计划明细信息,统一封装后上传 |
| | |
| | | if(null!= gd2022Api1404.getLhlx() && "1".equals(gd2022Api1404.getLhlx())){ |
| | | lcsl += gd2022Api1404.getLhsl(); |
| | | } |
| | | gd2022Api1404.setZhgxsj(new Date()); |
| | | dtls.add(gd2022Api1404); |
| | | } |
| | | } |
| | | api1403.setRotationInQty(lrsl); |
| | | api1403.setRotationOutQty(lcsl); |
| | | api1403.setDtls(dtls); |
| | | //先上传文件,获取文件id |
| | | GD2022ResponseDto responseDto = GD2022HttpClientUtil.postUploadData(url, authToken, api1403.getWjdz()); |
| | | //设置上传文件id |
| | | api1403.setFileStorageId((String) responseDto.getData()); |
| | | api1403.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(api1403); |
| | | } |
| | | if (Constant.API_CODE_1404.equals(inteId)) { |
| | | //轮换计划明细,不单独上传,在轮换计划中统一上传 |
| | | return null; |
| | | } |
| | | |
| | | // changeObject(data); |
| | | if (Constant.API_CODE_1405.equals(inteId)) { |
| | | Api1405 apiData = (Api1405) data; |
| | | apiData.setZhgxsj(new Date()); |
| | | return JSON.toJSONString(apiData); |
| | | } |
| | | return JSON.toJSONString(data); |
| | | } |
| | | |
| | |
| | | gdFinanceDto.setBbsj(DateFormatUtils.format(api1503.getBbsj(), "yyyyMMdd")); |
| | | gdFinanceDto.setBbm("03"); |
| | | gdFinanceDto.setCzbz(api1503.getCzbz()); |
| | | gdFinanceDto.setZhgxsj(DateFormatUtils.format(api1503.getZhgxsj(), "yyyy-MM-dd HH:mm:ss")); |
| | | gdFinanceDto.setZhgxsj(DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss")); |
| | | |
| | | paddingData(gdFinanceDto, list, 1, "项目//t", "本期金额//t", "本年累计//t"); |
| | | paddingData(gdFinanceDto, list, 2, "一、营业收入", api1503.getYyzsrbqye() + "", api1503.getYyzsrbnlj() + ""); |
| | |
| | | gdFinanceDto.setBbsj(DateFormatUtils.format(api1502.getBbsj(), "yyyyMMdd")); |
| | | gdFinanceDto.setBbm("02"); |
| | | gdFinanceDto.setCzbz(api1502.getCzbz()); |
| | | gdFinanceDto.setZhgxsj(DateFormatUtils.format(api1502.getZhgxsj(), "yyyy-MM-dd HH:mm:ss")); |
| | | gdFinanceDto.setZhgxsj(DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss")); |
| | | |
| | | paddingData(gdFinanceDto, list, 1, "项目//t", "本月数//t", "本年累计数//t"); |
| | | paddingData(gdFinanceDto, list, 2, "一、经营活动产生的现金流量:", api1502.getJyhdxjllbys() + "", api1502.getJyhdxjllbnljs() + ""); |
| | |
| | | gdFinanceDto.setBbsj(DateFormatUtils.format(api1501.getBbsj(), "yyyyMMdd")); |
| | | gdFinanceDto.setBbm("01"); |
| | | gdFinanceDto.setCzbz(api1501.getCzbz()); |
| | | gdFinanceDto.setZhgxsj(DateFormatUtils.format(api1501.getZhgxsj(), "yyyy-MM-dd HH:mm:ss")); |
| | | gdFinanceDto.setZhgxsj(DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss")); |
| | | |
| | | paddingData(gdFinanceDto, list, 1, "资产//t", "期末余额//t", "年初余额//t"); |
| | | paddingData(gdFinanceDto, list, 2, "流动资产:", api1501.getLdzchjqmye() + "", api1501.getLdzchjncye() + ""); |
| | |
| | | return inteId; |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public ResponseDto pullData(ApiParam param, ApiConfs conf) { |
| | | //该协议无此实现 |
| | | return null; |
| | | } |
| | | } |