wuxw
2021-04-26 17e62bc5b2253930ecb67d9e85954cc2c83e4ba1
优化代码
1个文件已修改
10 ■■■■■ 已修改文件
service-store/src/main/java/com/java110/store/api/ContractApi.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-store/src/main/java/com/java110/store/api/ContractApi.java
@@ -850,11 +850,19 @@
        contractChangePlanPo.setRemark(reqJson.getString("changeRemark"));
        List<ContractChangePlanRoomPo> contractChangePlanRoomPos = new ArrayList<>();
        ContractChangePlanRoomPo contractChangePlanRoomPo = null;
        JSONObject roomInfo = null;
        if (reqJson.containsKey("rooms")) {
            JSONArray rooms = reqJson.getJSONArray("rooms");
            if (rooms != null && rooms.size() > 0) {
                for (int roomIndex = 0; roomIndex < rooms.size(); roomIndex++) {
                    contractChangePlanRoomPos.add(BeanConvertUtil.covertBean(rooms.getJSONObject(roomIndex), ContractChangePlanRoomPo.class));
//                    contractChangePlanRoomPos.add(BeanConvertUtil.covertBean(rooms.getJSONObject(roomIndex), ContractChangePlanRoomPo.class));
                    roomInfo = rooms.getJSONObject(roomIndex);
                    contractChangePlanRoomPo = BeanConvertUtil.covertBean(roomInfo, ContractChangePlanRoomPo.class);
                    contractChangePlanRoomPo.setRoomName(roomInfo.getString("floorNum")
                            +"-"+roomInfo.getString("unitNum")
                            +"-"+roomInfo.getString("roomNum"));
                    contractChangePlanRoomPos.add(contractChangePlanRoomPo);
                }
            }
        }