|
|
@@ -325,26 +325,53 @@ public class salestargetstatistics extends Controller {
|
|
|
return getSucReturnObject().setData(arearows).toString();
|
|
|
}
|
|
|
|
|
|
- @API(title = "人员目标统计看板", apiversion = R.ID2025122915143202.v1.class)
|
|
|
- public String peopleTargetPanel() throws YosException {
|
|
|
+ @API(title = "统计看板", apiversion = R.ID2025122915143202.v1.class)
|
|
|
+ public String peoplePanel() throws YosException {
|
|
|
int year = content.getIntValue("year");
|
|
|
int befyear = year - 1;
|
|
|
Long userid = content.getLongValue("userid");
|
|
|
+ Long sa_customersid = content.getLongValue("sa_customersid");
|
|
|
+ Long sa_agentsid = content.getLongValue("sa_agentsid");
|
|
|
+ int type = content.getIntValue("type", 1);
|
|
|
|
|
|
Rows itemclassrows = dbConnect.runSqlQuery("SELECT DISTINCT itemclassname from plm_itemclass WHERE siteid='" + siteid + "' ");
|
|
|
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "看板人员统计订单");
|
|
|
+ if (type == 1) {
|
|
|
+ sqlFactory = new SQLFactory(this, "看板人员统计订单");
|
|
|
+ sqlFactory.addParameter("userid", userid);
|
|
|
+ }
|
|
|
+ if (type == 2) {
|
|
|
+ sqlFactory = new SQLFactory(this, "看板医院统计订单");
|
|
|
+ sqlFactory.addParameter("sa_customersid", sa_customersid);
|
|
|
+ }
|
|
|
+ if (type == 3) {
|
|
|
+ sqlFactory = new SQLFactory(this, "看板经销商统计订单");
|
|
|
+ sqlFactory.addParameter("sa_agentsid", sa_agentsid);
|
|
|
+ }
|
|
|
sqlFactory.addParameter("siteid", siteid);
|
|
|
sqlFactory.addParameter("year", year);
|
|
|
sqlFactory.addParameter("befyear", befyear);
|
|
|
- sqlFactory.addParameter("userid", userid);
|
|
|
+
|
|
|
Rows rows = dbConnect.runSqlQuery(sqlFactory);
|
|
|
RowsMap salesRowsMap = rows.toRowsMap("itemclassname");
|
|
|
|
|
|
sqlFactory = new SQLFactory(this, "看板人员统计目标");
|
|
|
+ if (type == 1) {
|
|
|
+ sqlFactory = new SQLFactory(this, "看板人员统计目标");
|
|
|
+ sqlFactory.addParameter("userid", userid);
|
|
|
+ }
|
|
|
+ if (type == 2) {
|
|
|
+ sqlFactory = new SQLFactory(this, "看板医院统计目标");
|
|
|
+ sqlFactory.addParameter("sa_customersid", sa_customersid);
|
|
|
+ }
|
|
|
+ if (type == 3) {
|
|
|
+ sqlFactory = new SQLFactory(this, "看板经销商统计目标");
|
|
|
+ sqlFactory.addParameter("sa_agentsid", sa_agentsid);
|
|
|
+ }
|
|
|
sqlFactory.addParameter("siteid", siteid);
|
|
|
sqlFactory.addParameter("year", year);
|
|
|
- sqlFactory.addParameter("userid", userid);
|
|
|
+
|
|
|
Rows targetrows = dbConnect.runSqlQuery(sqlFactory);
|
|
|
RowsMap targetRowsMap = targetrows.toRowsMap("itemclassname");
|
|
|
|
|
|
@@ -390,6 +417,20 @@ public class salestargetstatistics extends Controller {
|
|
|
return getSucReturnObject().setData(itemclassrows).toString();
|
|
|
}
|
|
|
|
|
|
+ @API(title = "医院统计看板", apiversion = R.ID2025123014532102.v1.class)
|
|
|
+ public String doctorPanel() throws YosException {
|
|
|
+
|
|
|
+
|
|
|
+ return getSucReturnObject().setData("").toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ @API(title = "经销商统计看板", apiversion = R.ID2025123014533002.v1.class)
|
|
|
+ public String agentPanel() throws YosException {
|
|
|
+
|
|
|
+
|
|
|
+ return getSucReturnObject().setData("").toString();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
public void calculate(String key, Row arearow, Rows dataRows, ArrayList<String> dates) {
|
|
|
BigDecimal saleamount = BigDecimal.ZERO;
|