|
|
|
@ -100,11 +100,53 @@ public class ParkServiceImpl extends ServiceImpl<ParkMapper, Park> implements IP
|
|
|
|
|
|
|
|
|
|
Integer count = parkMapper.selectCount(new EntityWrapper<Park>());
|
|
|
|
|
List<Park> result = parkMapper.selectPage(new Page<>((pageNum - 1) * pageSize, pageSize), new EntityWrapper<Park>().eq("1", "1").orderBy("create_date", false));
|
|
|
|
|
for(Park park:result){
|
|
|
|
|
String industryCategory = park.getIndustryCategory();
|
|
|
|
|
String[] split = industryCategory.split(",");
|
|
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
|
|
for(int i=0;i<split.length;i++){
|
|
|
|
|
Industry industry = industryMapper.selectById(split[i]);
|
|
|
|
|
jsonArray.add(industry);
|
|
|
|
|
}
|
|
|
|
|
park.setIndustry(jsonArray);
|
|
|
|
|
|
|
|
|
|
String invoiceCategory = park.getInvoiceCategory();
|
|
|
|
|
String[] split1 = invoiceCategory.split(",");
|
|
|
|
|
JSONArray jsonArray1 = new JSONArray();
|
|
|
|
|
for(int i=0;i<split1.length;i++){
|
|
|
|
|
InvoiceCategory invoiceCategory1 = invoiceCategoryMapper.selectById(split1[i]);
|
|
|
|
|
jsonArray1.add(invoiceCategory1);
|
|
|
|
|
}
|
|
|
|
|
park.setInvoiceCategoryList(jsonArray1);
|
|
|
|
|
}
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
jsonObject.put("count",count);
|
|
|
|
|
jsonObject.put("data",result);
|
|
|
|
|
return jsonObject;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<Park> queryParkList(){
|
|
|
|
|
List<Park> result = parkMapper.selectList(new EntityWrapper<Park>().eq("1", "1").orderBy("create_date", false));
|
|
|
|
|
for(Park park:result){
|
|
|
|
|
String industryCategory = park.getIndustryCategory();
|
|
|
|
|
String[] split = industryCategory.split(",");
|
|
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
|
|
for(int i=0;i<split.length;i++){
|
|
|
|
|
Industry industry = industryMapper.selectById(split[i]);
|
|
|
|
|
jsonArray.add(industry);
|
|
|
|
|
}
|
|
|
|
|
park.setIndustry(jsonArray);
|
|
|
|
|
|
|
|
|
|
String invoiceCategory = park.getInvoiceCategory();
|
|
|
|
|
String[] split1 = invoiceCategory.split(",");
|
|
|
|
|
JSONArray jsonArray1 = new JSONArray();
|
|
|
|
|
for(int i=0;i<split1.length;i++){
|
|
|
|
|
InvoiceCategory invoiceCategory1 = invoiceCategoryMapper.selectById(split1[i]);
|
|
|
|
|
jsonArray1.add(invoiceCategory1);
|
|
|
|
|
}
|
|
|
|
|
park.setInvoiceCategoryList(jsonArray1);
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|