HttpServletResponse response) throws Exception {
String currentUserName = null;
Integer goodsTypeId = StringUtil.getIntValue(request, "id");
try {
currentUserName = UserUtil.getCurrentUserName(request);
GoodsType goodsType = (GoodsType) getBaseManager().get(GoodsType.class, goodsTypeId);
JSONObject jsonObject = new JSONObject();
jsonObject.accumulate("createDate", StringUtil.getValue(goodsType.getCreateDate(),"date"));
//jsonObject.accumulate("parentId", goodsTypeManager.getParentTypes(goodsTypeId));
jsonObject.accumulate("parentId", goodsType.getParentId() == null ? 0 : goodsType.getParentId());
jsonObject.accumulate("typeName", goodsType.getTypeName());
jsonObject.accumulate("remark", goodsType.getRemark());
print(response, jsonObject.toString());
log.debug(currentUserName + ">载入物品类型[name=" + goodsType.getTypeName() + "]");
} catch(JSONException je) {
je.printStackTrace();
log.error(currentUserName + ">载入物品类型>解析JSON数据出错:" + je.getMessage());
} catch (Exception ex) {
ex.printStackTrace();