| | |
| | | * @param start 起始时间 |
| | | * @param end 截止时间 |
| | | */ |
| | | public void syncData(String deptId, Date start, Date end) { |
| | | public void syncData(String kqdm, String deptId, Date start, Date end) { |
| | | log.info("-------------1304接口数据开始同步------------------"); |
| | | //同步数据,只记录失败的信息 |
| | | ApiLog apiLog = new ApiLog(); |
| | |
| | | return; |
| | | } |
| | | |
| | | Date syncTime = new Date(); |
| | | Api1304 api1304; |
| | | Api1105 api1105; |
| | | List<Api1304> api1304List; |
| | |
| | | } |
| | | |
| | | api1304 = new Api1304(); |
| | | // api1304.setQtndjcdh(api1105.getHwdm() + DateFormatUtils.format(gas.getReceiveDate(), "yyyyMMdd") + String.valueOf(index).substring(1)); |
| | | api1304.setQtndjcdh(api1105.getHwdm() + fz40Gas.getBatchId()); |
| | | api1304.setJcsj(fz40Gas.getReceiveDate()); |
| | | api1304.setHwdm(api1105.getHwdm()); |
| | | api1304.setZylx("5"); |
| | | |
| | | api1304 = updateGasInfo(api1304, fz40Gas.getPoints()); |
| | | |
| | | api1304.setZhgxsj(syncTime); |
| | | api1304.setZhgxsj(new Date()); |
| | | |
| | | api1304.setBizId(fz40Gas.getBatchId()); |
| | | api1304.setKqdm(api1105.getKqdm()); |
| | | api1304.setSyncTime(syncTime); |
| | | api1304.setSyncTime(new Date()); |
| | | api1304List = api1304Rep.getDataByQtndjcdh(api1304.getQtndjcdh()); |
| | | if(null == api1304List || api1304List.isEmpty()){ |
| | | if (null == api1304List || api1304List.isEmpty()) { |
| | | api1304.setCzbz(Constant.CZBZ_I); |
| | | }else { |
| | | } else { |
| | | api1304.setCzbz(api1304List.get(0).getCzbz()); |
| | | } |
| | | api1304Rep.save(api1304); |
| | |
| | | String[] attr = points.split(";"); |
| | | |
| | | String[] arrt2; |
| | | String o2 = "", co2 = "", ph3 = ""; |
| | | String o2 = "", co2 = "", ph3 = "", n2 = ""; |
| | | for (String temp : attr) { |
| | | arrt2 = temp.split(","); |
| | | o2 += arrt2[2] + ","; |
| | | co2 += arrt2[1] + ","; |
| | | ph3 += arrt2[3] + ","; |
| | | o2 += "," + arrt2[2]; |
| | | co2 += "," + arrt2[1]; |
| | | ph3 += "," + arrt2[3]; |
| | | n2 += "," + arrt2[4]; |
| | | } |
| | | |
| | | if(o2.length() > 0){ |
| | | o2 = o2.substring(1); |
| | | } |
| | | if(co2.length() > 0){ |
| | | co2 = co2.substring(1); |
| | | } |
| | | if(ph3.length() > 0){ |
| | | ph3 = ph3.substring(1); |
| | | } |
| | | if(n2.length() > 0){ |
| | | n2 = n2.substring(1); |
| | | } |
| | | co2 += "|ppm"; |
| | | ph3 += "|ppm"; |
| | | api1304.setYqhlzjh(o2); |
| | | api1304.setEyhthlzjh(co2); |
| | | api1304.setLhqndzjh(ph3); |
| | | api1304.setDqndzjh(n2); |
| | | return api1304; |
| | | } |
| | | |