|
@@ -510,20 +510,22 @@ public class ErpDataServiceImpl implements IErpDataService {
|
|
Date startDate = dateUtils.parseDate(startDateText);
|
|
Date startDate = dateUtils.parseDate(startDateText);
|
|
Date endDate = dateUtils.parseDate(endDateText);
|
|
Date endDate = dateUtils.parseDate(endDateText);
|
|
//
|
|
//
|
|
- List<Object[]> workPlanList = tDeliveryRepo.getWorkPlan(startDate,endDate);
|
|
|
|
|
|
+ List<Object[]> workPlanList = tDeliveryRepo.getWorkPlan1(startDate,endDate);
|
|
System.out.println("workPlanList.size="+workPlanList.size());
|
|
System.out.println("workPlanList.size="+workPlanList.size());
|
|
-
|
|
|
|
JSONArray produceJa = new JSONArray();
|
|
JSONArray produceJa = new JSONArray();
|
|
for(int a=0;a<workPlanList.size();a++){
|
|
for(int a=0;a<workPlanList.size();a++){
|
|
Object[] planObj = (Object[]) workPlanList.get(a);
|
|
Object[] planObj = (Object[]) workPlanList.get(a);
|
|
JSONObject dataJo = new JSONObject();
|
|
JSONObject dataJo = new JSONObject();
|
|
produceJa.add(dataJo);
|
|
produceJa.add(dataJo);
|
|
|
|
+ System.out.println("length="+planObj.length);
|
|
|
|
+ //牧场名称
|
|
|
|
+ dataJo.put("mcmc", planObj[0]);
|
|
//计划名称
|
|
//计划名称
|
|
- dataJo.put("jhmc", planObj[0]);
|
|
|
|
- //计划数量
|
|
|
|
- dataJo.put("jhsl", planObj[1]);
|
|
|
|
- //实际数量
|
|
|
|
- dataJo.put("sjsl", planObj[2]);
|
|
|
|
|
|
+ dataJo.put("jhmc", planObj[1]);
|
|
|
|
+ //计划条数
|
|
|
|
+ dataJo.put("jhts", planObj[2]);
|
|
|
|
+ //猪只数量
|
|
|
|
+ dataJo.put("zzsl", planObj[3]);
|
|
}
|
|
}
|
|
return new Result(ResultCode.SUCCESS,produceJa);
|
|
return new Result(ResultCode.SUCCESS,produceJa);
|
|
}
|
|
}
|
|
@@ -585,6 +587,8 @@ public class ErpDataServiceImpl implements IErpDataService {
|
|
System.out.println("planObj[6].toString()="+salesObj[6]);
|
|
System.out.println("planObj[6].toString()="+salesObj[6]);
|
|
System.out.println("planObj[7].toString()="+salesObj[7]);
|
|
System.out.println("planObj[7].toString()="+salesObj[7]);
|
|
System.out.println("planObj[8].toString()="+salesObj[8]);
|
|
System.out.println("planObj[8].toString()="+salesObj[8]);
|
|
|
|
+ //牧场名称
|
|
|
|
+ dataJo.put("farm_name", salesObj[0]);
|
|
//今日数量
|
|
//今日数量
|
|
// float f1 = 0;
|
|
// float f1 = 0;
|
|
// if(salesObj[0] != null){
|
|
// if(salesObj[0] != null){
|
|
@@ -592,55 +596,55 @@ public class ErpDataServiceImpl implements IErpDataService {
|
|
// }else{
|
|
// }else{
|
|
// System.out.println("==null");
|
|
// System.out.println("==null");
|
|
// }
|
|
// }
|
|
- dataJo.put("today_quantity", salesObj[0]);
|
|
|
|
|
|
+ dataJo.put("today_quantity", salesObj[1]);
|
|
//今日重量
|
|
//今日重量
|
|
// float f2 = 0;
|
|
// float f2 = 0;
|
|
// if(salesObj[1] != null){
|
|
// if(salesObj[1] != null){
|
|
// f2 = Float.parseFloat(salesObj[1].toString().replace(",",""));
|
|
// f2 = Float.parseFloat(salesObj[1].toString().replace(",",""));
|
|
// }
|
|
// }
|
|
- dataJo.put("today_weight", salesObj[1]);
|
|
|
|
|
|
+ dataJo.put("today_weight", salesObj[2]);
|
|
//今日金额
|
|
//今日金额
|
|
// float f3 = 0;
|
|
// float f3 = 0;
|
|
// if(salesObj[2] != null){
|
|
// if(salesObj[2] != null){
|
|
// f3 = Float.parseFloat(salesObj[2].toString().replace(",",""));
|
|
// f3 = Float.parseFloat(salesObj[2].toString().replace(",",""));
|
|
// }
|
|
// }
|
|
- dataJo.put("today_money", salesObj[2]);
|
|
|
|
|
|
+ dataJo.put("today_money", salesObj[3]);
|
|
//本周数量
|
|
//本周数量
|
|
// float f4 = 0;
|
|
// float f4 = 0;
|
|
// if(salesObj[3] != null){
|
|
// if(salesObj[3] != null){
|
|
// f4 = Float.parseFloat(salesObj[3].toString().replace(",",""));
|
|
// f4 = Float.parseFloat(salesObj[3].toString().replace(",",""));
|
|
// }
|
|
// }
|
|
- dataJo.put("week_quantity", salesObj[3]);
|
|
|
|
|
|
+ dataJo.put("week_quantity", salesObj[4]);
|
|
//本周重量
|
|
//本周重量
|
|
// float f5 = 0;
|
|
// float f5 = 0;
|
|
// if(salesObj[4] != null){
|
|
// if(salesObj[4] != null){
|
|
// f5 = Float.parseFloat(salesObj[4].toString().replace(",",""));
|
|
// f5 = Float.parseFloat(salesObj[4].toString().replace(",",""));
|
|
// }
|
|
// }
|
|
- dataJo.put("week_weight", salesObj[4]);
|
|
|
|
|
|
+ dataJo.put("week_weight", salesObj[5]);
|
|
//本周金额
|
|
//本周金额
|
|
// float f6 = 0;
|
|
// float f6 = 0;
|
|
// if(salesObj[5] != null){
|
|
// if(salesObj[5] != null){
|
|
// f6 = Float.parseFloat(salesObj[5].toString().replace(",",""));
|
|
// f6 = Float.parseFloat(salesObj[5].toString().replace(",",""));
|
|
// }
|
|
// }
|
|
- dataJo.put("week_money", salesObj[5]);
|
|
|
|
|
|
+ dataJo.put("week_money", salesObj[6]);
|
|
//本月数量
|
|
//本月数量
|
|
// float f7 = 0;
|
|
// float f7 = 0;
|
|
// if(salesObj[6] != null){
|
|
// if(salesObj[6] != null){
|
|
// f7 = Float.parseFloat(salesObj[6].toString().replace(",",""));
|
|
// f7 = Float.parseFloat(salesObj[6].toString().replace(",",""));
|
|
// }
|
|
// }
|
|
- dataJo.put("month_quantity", salesObj[6]);
|
|
|
|
|
|
+ dataJo.put("month_quantity", salesObj[7]);
|
|
//本月重量
|
|
//本月重量
|
|
// float f8 = 0;
|
|
// float f8 = 0;
|
|
// if(salesObj[7] != null){
|
|
// if(salesObj[7] != null){
|
|
// f8 = Float.parseFloat(salesObj[7].toString().replace(",",""));
|
|
// f8 = Float.parseFloat(salesObj[7].toString().replace(",",""));
|
|
// }
|
|
// }
|
|
- dataJo.put("month_weight", salesObj[7]);
|
|
|
|
|
|
+ dataJo.put("month_weight", salesObj[8]);
|
|
//本月金额
|
|
//本月金额
|
|
// float f9 = 0;
|
|
// float f9 = 0;
|
|
// if(salesObj[8] != null){
|
|
// if(salesObj[8] != null){
|
|
// f9 = Float.parseFloat(salesObj[8].toString().replace(",",""));
|
|
// f9 = Float.parseFloat(salesObj[8].toString().replace(",",""));
|
|
// }
|
|
// }
|
|
- dataJo.put("month_money", salesObj[8]);
|
|
|
|
|
|
+ dataJo.put("month_money", salesObj[9]);
|
|
}
|
|
}
|
|
return new Result(ResultCode.SUCCESS,produceJa);
|
|
return new Result(ResultCode.SUCCESS,produceJa);
|
|
}
|
|
}
|