|
@@ -93,6 +93,18 @@ public class ordercluecampaign extends Controller {
|
|
|
String enddate = row.getString("enddate");
|
|
String enddate = row.getString("enddate");
|
|
|
row.put("begdate", begdate.length() > 10 ? begdate.substring(0, 10) : "");
|
|
row.put("begdate", begdate.length() > 10 ? begdate.substring(0, 10) : "");
|
|
|
row.put("enddate", enddate.length() > 10 ? enddate.substring(0, 10) : "");
|
|
row.put("enddate", enddate.length() > 10 ? enddate.substring(0, 10) : "");
|
|
|
|
|
+
|
|
|
|
|
+ QuerySQL doctorQuerySQL = SQLFactory.createQuerySQL(this, "sat_campaign_doctor", "*").setTableAlias("t1");
|
|
|
|
|
+ doctorQuerySQL.setSiteid(siteid);
|
|
|
|
|
+ doctorQuerySQL.setWhere("t1.sat_campaignid=" + row.getString("sat_campaignid"));
|
|
|
|
|
+ Rows doctorRows = doctorQuerySQL.query();
|
|
|
|
|
+ row.put("doctors", doctorRows);
|
|
|
|
|
+
|
|
|
|
|
+ BigDecimal doctorAmount = doctorRows.sum("amount");
|
|
|
|
|
+ BigDecimal actualAmount = doctorAmount.add(row.getBigDecimal("otheramount"));
|
|
|
|
|
+ row.put("doctorAmount", doctorAmount);
|
|
|
|
|
+ row.put("actualAmount", actualAmount);
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
return getSucReturnObject().setData(rows).toString();
|
|
return getSucReturnObject().setData(rows).toString();
|
|
|
}
|
|
}
|