日期:2014-05-17 浏览次数:20979 次
@RequestMapping("/get_largeFacility.do")
public void getLargeFacility(HttpServletRequest req,
HttpServletResponse res, HttpSession session) throws IOException {
Integer id = !Check.isNullStr(req.getParameter("id")) ? Integer
.valueOf(req.getParameter("id")) : 0;
Map<String, Object> modelMap = new HashMap<String, Object>();
if (id > 0) {
String queryString = "SELECT facility FROM TjkwShqshFacilityFee as facility WHERE facility.feeId = "
+ id;
List<TjkwShqshFacilityFee> facility = (List<TjkwShqshFacilityFee>) this.dao
.search(queryString);
modelMap.put("errorCode", 0);
modelMap.put("facility", facility);
} else {
modelMap.put("errorCode", 1);
modelMap.put("errorMessage", CommonMessage.NO_RECORD);
}
JSONObject jsonObject = JSONObject.fromObject(modelMap);
res.getWriter().print(jsonObject.toString());
}
function showEditEquipmentDialog(id) {
//根据id获取大型设备的信息
$
.ajax({
url : "../jcjh/get_largeFacility.do?id=" + id,
type : 'get',
dataType : "json",
success : function(data, status, xhr) {
&n