/** * @Name:elecCommonMsgVOToPO @Description : 页面传递的代办事宜信息从VO对象转换成PO对象 * * @author 屈卞忠 * @version :V1.0.0(版本号) @Create Date :2015-08-03 @Parameters: ElecCommonMsgForm elecCommonMsgForm * VO对象,页面传递的参数值 * @return: ElecCommonMsg PO对象 */ private ElecCommonMsg elecCommonMsgVOToPO(ElecCommonMsgForm elecCommonMsgForm) { ElecCommonMsg elecCommonMsg = new ElecCommonMsg(); if (elecCommonMsgForm != null) { elecCommonMsg.setStationRun(elecCommonMsgForm.getStationRun()); elecCommonMsg.setDevRun(elecCommonMsgForm.getDevRun()); elecCommonMsg.setCreateDate(new Date()); } return elecCommonMsg; }
/** * @Name:elecCommonMsgPOListToVOList @Description : 将待办事宜的结果信息,从PO对象转换为VO对象 * * @author 屈卞忠 * @version :V1.0.0(版本号) @Create Date :2015-08-03 @Parameters: List<ElecCommonMsg> list PO对象结果集 * @return:List<ElecCommonMsgForm> VO对象结果集 */ private List<ElecCommonMsgForm> elecCommonMsgPOListToVOList(List<ElecCommonMsg> list) { List<ElecCommonMsgForm> formlist = new ArrayList<ElecCommonMsgForm>(); ElecCommonMsgForm elecCommonMsgForm = null; for (int i = 0; list != null && i < list.size(); i++) { ElecCommonMsg elecCommonMsg = list.get(i); elecCommonMsgForm = new ElecCommonMsgForm(); elecCommonMsgForm.setComID(elecCommonMsg.getComID()); elecCommonMsgForm.setStationRun(elecCommonMsg.getStationRun()); elecCommonMsgForm.setDevRun(elecCommonMsg.getDevRun()); elecCommonMsgForm.setCreateDate( String.valueOf( elecCommonMsg.getCreateDate() != null ? elecCommonMsg.getCreateDate() : "")); formlist.add(elecCommonMsgForm); } return formlist; }