|
@@ -91,10 +91,10 @@ public class ErpDataServiceImpl implements IErpDataService {
|
|
|
public String getParturitionRate(String startDate,String endDate) {
|
|
|
log.info(" 开始日期(分娩率) startDate:"+startDate);
|
|
|
log.info(" 结束日期(分娩率) endDate:"+endDate);
|
|
|
- List<Object[]> reEstrusRateFieldList = tDeliveryRepo.getParturitionRate(startDate,endDate);
|
|
|
- log.info(" 分娩率查询数量:"+reEstrusRateFieldList.size());
|
|
|
+ List<Object[]> fieldList = tDeliveryRepo.getParturitionRate(startDate,endDate);
|
|
|
+ log.info(" 分娩率查询数量:"+fieldList.size());
|
|
|
JSONArray resultJa = new JSONArray();
|
|
|
- for (Object[] fieldObj : reEstrusRateFieldList) {
|
|
|
+ for (Object[] fieldObj : fieldList) {
|
|
|
String farmVal = fieldObj[0].toString();
|
|
|
String varietyVal = fieldObj[1].toString();
|
|
|
String reEstrusRateVal = fieldObj[2].toString();
|
|
@@ -119,7 +119,39 @@ public class ErpDataServiceImpl implements IErpDataService {
|
|
|
*/
|
|
|
@Override
|
|
|
public String getStorage() {
|
|
|
- return null;
|
|
|
+ List<Object[]> fieldList = tDeliveryRepo.getStorage();
|
|
|
+ log.info(" 各种存栏查询数量:"+fieldList.size());
|
|
|
+ JSONArray resultJa = new JSONArray();
|
|
|
+ for (Object[] fieldObj : fieldList) {
|
|
|
+ //
|
|
|
+ String farm = "";
|
|
|
+ if(fieldObj[0] == null){
|
|
|
+ farm = "";
|
|
|
+ }else{
|
|
|
+ farm = fieldObj[0].toString();
|
|
|
+ }
|
|
|
+ //
|
|
|
+ String name = "";
|
|
|
+ if(fieldObj[1] == null){
|
|
|
+ name = "";
|
|
|
+ }else{
|
|
|
+ name = fieldObj[1].toString();
|
|
|
+ }
|
|
|
+ //
|
|
|
+ String quantity = "";
|
|
|
+ if(quantity == null)
|
|
|
+ {
|
|
|
+ quantity = "";
|
|
|
+ }else{
|
|
|
+ quantity = fieldObj[2].toString();
|
|
|
+ }
|
|
|
+ JSONObject dataJo = new JSONObject();
|
|
|
+ dataJo.put("farm",farm);
|
|
|
+ dataJo.put("name",name);
|
|
|
+ dataJo.put("quantity",quantity);
|
|
|
+ resultJa.add(dataJo);
|
|
|
+ }
|
|
|
+ return resultJa.toJSONString();
|
|
|
}
|
|
|
|
|
|
/**
|