瀏覽代碼

考试管理

eganwu 2 年之前
父節點
當前提交
78c41fc641

+ 11 - 0
src/custom/restcontroller/R.java

@@ -5805,6 +5805,17 @@ public class R {
         }
     }
 
+    public static class ID20240325134302 {
+        public static class v1 {
+        }
+    }
+
+
+    public static class ID20240325135402 {
+        public static class v1 {
+        }
+    }
+
 }
 
 

+ 0 - 1
src/custom/restcontroller/webmanage/saletool/courseware/SQL/员工列表查询.sql

@@ -8,6 +8,5 @@ select t1.hrid,
        t2.depfullname
 from sys_hr t1
          inner join sys_department t2 on t1.siteid = t2.siteid and t1.departmentid = t2.departmentid
-         inner join sys_users t3 on t1.userid = t3.userid
 where t1.siteid = $siteid$
   and t1.departmentid in $departmentid$ and $where$

+ 46 - 2
src/custom/restcontroller/webmanage/saletool/courseware/coursewaretesthead.java

@@ -359,7 +359,7 @@ public class coursewaretesthead extends Controller {
         return getSucReturnObject().toString();
     }
 
-    @API(title = "员工列表查询", apiversion = R.ID20240325110702.v1.class)
+    @API(title = "选择员工列表", apiversion = R.ID20240325110702.v1.class)
     public String query_hrList() throws YosException {
         /*
         过滤条件设置
@@ -400,7 +400,7 @@ public class coursewaretesthead extends Controller {
     }
 
 
-    @API(title = "营销区域查询经销商", apiversion = R.ID20240325130602.v1.class)
+    @API(title = "选择营销区域查询经销商成员", apiversion = R.ID20240325130602.v1.class)
     public String query_agent() throws YosException, IOException {
         /*
           过滤条件设置
@@ -461,5 +461,49 @@ public class coursewaretesthead extends Controller {
         return getSucReturnObject().setData(rows).toString();
     }
 
+    @API(title = "(部门)人员列表", apiversion = R.ID20240325134302.v1.class)
+    public String queryhrList() throws YosException {
+
+        Long sat_courseware_testheadid = content.getLongValue("sat_courseware_testheadid");
+        QuerySQL querySQL=SQLFactory.createQuerySQL(this,"sys_hr",
+                        "hrid","hrcode","name","phonenumber","position","userid")
+                .setTableAlias("t1");
+        querySQL.addJoinTable(JOINTYPE.left,"sys_department","t2","t1.siteid = t2.siteid and t1.departmentid = t2.departmentid",
+                "depname","depfullname");
+        querySQL.setWhere(" exists(select 1 from  sat_courseware_test where userid = t1.userid and sat_courseware_testheadid=" + sat_courseware_testheadid + " and siteid='" + siteid + "' )");
+        Rows rows = querySQL.query();
+
+
+
+        return getSucReturnObject().setData(rows).toString();
+    }
+
+    @API(title = "(区域)人员列表", apiversion = R.ID20240325135402.v1.class)
+    public String queryagent() throws YosException, IOException {
+
+        Long sat_courseware_testheadid = content.getLongValue("sat_courseware_testheadid");
+
+
+        QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_enterprise_hr",
+                        "userid","name","position")
+                .setTableAlias("t1");
+        querySQL.addJoinTable(JOINTYPE.inner, "sys_enterprise", "t2", "t1.siteid = t2.siteid and t1.sys_enterpriseid = t2.sys_enterpriseid",
+                "enterprisename");
+        querySQL.addJoinTable(JOINTYPE.left, "sa_agents", "t3", "t3.sys_enterpriseid=t1.sys_enterpriseid and t3.siteid=t1.siteid",
+                "agentnum");
+        querySQL.addJoinTable(JOINTYPE.left, "sys_enterprise_tradefield", "t4", "t4.sys_enterpriseid=t1.sys_enterpriseid and t3.siteid=t1.siteid");
+        querySQL.addJoinTable(JOINTYPE.left, "sa_salearea", "t5", "t5.sa_saleareaid=t4.sa_saleareaid and t5.siteid=t4.siteid",
+                "areaname");
+        querySQL.setWhere("t1.siteid", siteid);
+        querySQL.setWhere(" exists(select 1 from  sat_courseware_test where userid = t1.userid and sat_courseware_testheadid=" + sat_courseware_testheadid + " and siteid='" + siteid + "' )");
+        querySQL.setOrderBy(pageSorting);
+        querySQL.setPage(pageSize, pageNumber);
+        Rows rows = querySQL.query();
+
+
+
+
+        return getSucReturnObject().setData(rows).toString();
+    }
 
 }