public JSONObject getSearchResultJsonData(List<ChinaProductVO> listChinaProduct,int from, int to, int pageNum, int rowsCount)
{
// TODO Auto-generated method stub
JSONObject jsonObj = new JSONObject();
int count = 0;
int iTotal=listChinaProduct.size();
List<ChinaProductVO> listChinaProductTemp=拖的拼音和组词new ArrayList<ChinaProductVO>();
if(iTotal>0){
for (ChinaProductVO chinaProductVO : listChinaProduct) {
count++;
if (count > from && count <= to) {
if(!ains(chinaProductVO)){
listChinaProductTemp.add(chinaProductVO);
}
}
}
int iRecords=iTotal % rowsCount == 0 ? iTotal / rowsCount : iTotal / rowsCount + 1;
jsonObj.put("page", pageNum);
jsonObj.put("total", iRecords); //
jsonObj.put("records", iTotal);
// 露篓脪氓rows拢卢麓忙路脜脢媒戮脻
JSONArray rows = new JSONArray();
for(ChinaProductVO chinaProductVO: listChinaProductTemp){
// 麓忙路脜脪禄脤玫录脟脗录碌脛露脭脧贸
JSONObject cell = new JSONObject();
cell.put("CASNo", StrCASNo());
cell.put("ChineseChemicalName", StrChineseChemicalName());
cell.put("ChineseSynonyms", StrChineseSynonyms());
cell.put("EnglishChemicalName", StrEnglishChemicalName());
cell.put("EnglishSynonyms", StrEnglishSynonyms());
cell.put("MolecularFormula", StrMolecularFormula());
cell.put("UNNo", StrUNNo());
cell.put("CNNo", StrCNNo());
cell.put("HSCode", StrHSCode());
cell.put("Category", StrCategory());
cell.put("Listing", StrListing());
cell.put("Geography", StrGeography());
cell.put("ScopeOfLimitation", StrScopeOfLimitation());
cell.put("LimitedProcess", StrLimitedProcess());
cell.put("MainHazardousClassificationForFlammabilityAndExplosives", StrMainHazardousClassificationForFlammabilityAndExplosives());
cell.put("AdjustedSuperviseConditions", StrAdjustedSuperviseConditions());
String strDateAdded=CommonClass.formatDate("yyyy-mm-dd", DateDateAdded());
cell.put("DateAdded", ((DateDateAdded()==null)?"":strDateAdded));
String strExpirationDate=CommonClass.formatDate("yyyy-mm-dd", DateExpirationDate());
cell.put("ExpirationDate", ((DateDateAdded()==null)?"":strExpirationDate));
rows.add(cell);
}
// 陆芦rows路脜脠毛json露脭脧贸脰脨
jsonObj.put("rows", rows);
}
return jsonObj;
}
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论