| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.parser.Feature; |
| | | import com.java110.core.component.BaseComponentSMO; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.entity.component.ComponentValidateResult; |
| | |
| | | |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @ClassName AssetImportSmoImpl |
| | |
| | | return null; |
| | | } |
| | | |
| | | JSONObject savedRoomInfoResults = JSONObject.parseObject(responseEntity.getBody()); |
| | | JSONObject savedRoomInfoResults = JSONObject.parseObject(responseEntity.getBody(), Feature.OrderedField); |
| | | |
| | | |
| | | if (!savedRoomInfoResults.containsKey("data")) { |
| | |
| | | //查询楼栋信息 |
| | | JSONArray rooms = this.getExistsRoomFee(pd, componentValidateResult); |
| | | if (rooms == null || rooms.size() < 1) { |
| | | CellRangeAddress region = new CellRangeAddress(0, 0, 0, 6); |
| | | CellRangeAddress region = new CellRangeAddress(0, 0, 0, 1); |
| | | sheet.addMergedRegion(region); |
| | | return; |
| | | } |
| | | JSONObject dataObj = rooms.getJSONObject(0); |
| | | int dataKeyIndex = 1; |
| | | for (String key : dataObj.keySet()) { |
| | | if (key.contains("-")) { |
| | | row.createCell(dataKeyIndex).setCellValue(key.substring(key.indexOf("-") + 1)); |
| | | if (key.contains("_")) { |
| | | row.createCell(dataKeyIndex).setCellValue(key.substring(key.indexOf("_") + 1)); |
| | | } else { |
| | | row.createCell(dataKeyIndex).setCellValue(key); |
| | | } |
| | | dataKeyIndex++; |
| | | } |
| | | row.createCell(dataKeyIndex).setCellValue("备注"); |
| | | |
| | | |
| | | for (int roomIndex = 0; roomIndex < rooms.size(); roomIndex++) { |
| | | row = sheet.createRow(roomIndex + 2); |
| | |
| | | row.createCell(dataKeyIndex).setCellValue(dataObj.getString(key)); |
| | | dataKeyIndex++; |
| | | } |
| | | row.createCell(dataKeyIndex+2).setCellValue(""); |
| | | } |
| | | |
| | | CellRangeAddress region = new CellRangeAddress(0, 0, 0, 6); |
| | | CellRangeAddress region = new CellRangeAddress(0, 0, 0, dataKeyIndex); |
| | | sheet.addMergedRegion(region); |
| | | } |
| | | |