Package net.sf.json

Examples of net.sf.json.JSONObject.accumulate()


      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();
View Full Code Here


      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());
View Full Code Here

       
      });
      GroupRelation group = (GroupRelation) getBaseManager().get(GroupRelation.class, groupId);
      JSONObject jsonObject = JSONObject.fromObject(group, config);
      GroupRelation parentGroup = group.getParentGroup();
      jsonObject.accumulate("parentId", parentGroup.getId());
      jsonObject.accumulate("parentName", parentGroup.getGroupName());
      print(response, jsonObject.toString());
      log.info(currentUserName + ">载入分组:" + group + "");
    } catch(JSONException je) {
      je.printStackTrace();
View Full Code Here

      });
      GroupRelation group = (GroupRelation) getBaseManager().get(GroupRelation.class, groupId);
      JSONObject jsonObject = JSONObject.fromObject(group, config);
      GroupRelation parentGroup = group.getParentGroup();
      jsonObject.accumulate("parentId", parentGroup.getId());
      jsonObject.accumulate("parentName", parentGroup.getGroupName());
      print(response, jsonObject.toString());
      log.info(currentUserName + ">载入分组:" + group + "");
    } catch(JSONException je) {
      je.printStackTrace();
      log.error(currentUserName + ">载入分组>解析JSON数据出错:" + je.getMessage());
View Full Code Here

    Long goodsDetailId = StringUtil.getLongValue(request, "id");
    try {
      currentUserName = UserUtil.getCurrentUserName(request);
      GoodsDetail goodsDetail = (GoodsDetail) getBaseManager().get(GoodsDetail.class, goodsDetailId);
      JSONObject jsonObject = new JSONObject();
      jsonObject.accumulate("createDate", StringUtil.getValue(goodsDetail.getCreateDate(), "date"));
      jsonObject.accumulate("goodsTypeId", goodsDetail.getGoodsType().getId());
      jsonObject.accumulate("goodsName", goodsDetail.getGoodsName());
      jsonObject.accumulate("goodsUnit", goodsDetail.getGoodsUnit());
      jsonObject.accumulate("unitPrice", goodsDetail.getUnitPrice());
      jsonObject.accumulate("remark", goodsDetail.getRemark());
View Full Code Here

    try {
      currentUserName = UserUtil.getCurrentUserName(request);
      GoodsDetail goodsDetail = (GoodsDetail) getBaseManager().get(GoodsDetail.class, goodsDetailId);
      JSONObject jsonObject = new JSONObject();
      jsonObject.accumulate("createDate", StringUtil.getValue(goodsDetail.getCreateDate(), "date"));
      jsonObject.accumulate("goodsTypeId", goodsDetail.getGoodsType().getId());
      jsonObject.accumulate("goodsName", goodsDetail.getGoodsName());
      jsonObject.accumulate("goodsUnit", goodsDetail.getGoodsUnit());
      jsonObject.accumulate("unitPrice", goodsDetail.getUnitPrice());
      jsonObject.accumulate("remark", goodsDetail.getRemark());
      print(response, jsonObject.toString());
View Full Code Here

      currentUserName = UserUtil.getCurrentUserName(request);
      GoodsDetail goodsDetail = (GoodsDetail) getBaseManager().get(GoodsDetail.class, goodsDetailId);
      JSONObject jsonObject = new JSONObject();
      jsonObject.accumulate("createDate", StringUtil.getValue(goodsDetail.getCreateDate(), "date"));
      jsonObject.accumulate("goodsTypeId", goodsDetail.getGoodsType().getId());
      jsonObject.accumulate("goodsName", goodsDetail.getGoodsName());
      jsonObject.accumulate("goodsUnit", goodsDetail.getGoodsUnit());
      jsonObject.accumulate("unitPrice", goodsDetail.getUnitPrice());
      jsonObject.accumulate("remark", goodsDetail.getRemark());
      print(response, jsonObject.toString());
      log.debug(currentUserName + ">载入物品详细[id=" + goodsDetailId + "]");
View Full Code Here

      GoodsDetail goodsDetail = (GoodsDetail) getBaseManager().get(GoodsDetail.class, goodsDetailId);
      JSONObject jsonObject = new JSONObject();
      jsonObject.accumulate("createDate", StringUtil.getValue(goodsDetail.getCreateDate(), "date"));
      jsonObject.accumulate("goodsTypeId", goodsDetail.getGoodsType().getId());
      jsonObject.accumulate("goodsName", goodsDetail.getGoodsName());
      jsonObject.accumulate("goodsUnit", goodsDetail.getGoodsUnit());
      jsonObject.accumulate("unitPrice", goodsDetail.getUnitPrice());
      jsonObject.accumulate("remark", goodsDetail.getRemark());
      print(response, jsonObject.toString());
      log.debug(currentUserName + ">载入物品详细[id=" + goodsDetailId + "]");
    } catch(JSONException je) {
View Full Code Here

      JSONObject jsonObject = new JSONObject();
      jsonObject.accumulate("createDate", StringUtil.getValue(goodsDetail.getCreateDate(), "date"));
      jsonObject.accumulate("goodsTypeId", goodsDetail.getGoodsType().getId());
      jsonObject.accumulate("goodsName", goodsDetail.getGoodsName());
      jsonObject.accumulate("goodsUnit", goodsDetail.getGoodsUnit());
      jsonObject.accumulate("unitPrice", goodsDetail.getUnitPrice());
      jsonObject.accumulate("remark", goodsDetail.getRemark());
      print(response, jsonObject.toString());
      log.debug(currentUserName + ">载入物品详细[id=" + goodsDetailId + "]");
    } catch(JSONException je) {
      je.printStackTrace();
View Full Code Here

      jsonObject.accumulate("createDate", StringUtil.getValue(goodsDetail.getCreateDate(), "date"));
      jsonObject.accumulate("goodsTypeId", goodsDetail.getGoodsType().getId());
      jsonObject.accumulate("goodsName", goodsDetail.getGoodsName());
      jsonObject.accumulate("goodsUnit", goodsDetail.getGoodsUnit());
      jsonObject.accumulate("unitPrice", goodsDetail.getUnitPrice());
      jsonObject.accumulate("remark", goodsDetail.getRemark());
      print(response, jsonObject.toString());
      log.debug(currentUserName + ">载入物品详细[id=" + goodsDetailId + "]");
    } catch(JSONException je) {
      je.printStackTrace();
      log.error(currentUserName + ">载入物品详细>解析JSON数据出错:" + je.getMessage());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.