|
@@ -1,9 +1,13 @@
|
|
package com.huimv.video.dhicc.test.controller;
|
|
package com.huimv.video.dhicc.test.controller;
|
|
|
|
|
|
import com.dahuatech.icc.exception.ClientException;
|
|
import com.dahuatech.icc.exception.ClientException;
|
|
|
|
+import com.huimv.video.dhicc.result.R;
|
|
import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
|
|
import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo;
|
|
import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
|
|
import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo02;
|
|
import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo03;
|
|
import com.huimv.video.dhicc.test.config.OauthConfigBaseInfo03;
|
|
|
|
+import com.huimv.video.dhicc.test.request.DepartmentRequest.Cn.DepartmentListRequestCn;
|
|
|
|
+import com.huimv.video.dhicc.test.request.DepartmentRequest.Hn.DepartmentListRequestHn;
|
|
|
|
+import com.huimv.video.dhicc.test.request.DepartmentRequest.Sg.DepartmentListRequestSg;
|
|
import com.huimv.video.dhicc.test.request.PersonListRequestCn;
|
|
import com.huimv.video.dhicc.test.request.PersonListRequestCn;
|
|
import com.huimv.video.dhicc.test.request.PersonListRequestHn;
|
|
import com.huimv.video.dhicc.test.request.PersonListRequestHn;
|
|
import com.huimv.video.dhicc.test.request.PersonListRequestSg;
|
|
import com.huimv.video.dhicc.test.request.PersonListRequestSg;
|
|
@@ -26,7 +30,7 @@ public class ClientPersonManageControllerTest {
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/ge_person_list")
|
|
@RequestMapping("/ge_person_list")
|
|
- public String ge_person_list(@RequestBody PersonListRequestSg personListRequestSg) throws ClientException {
|
|
|
|
|
|
+ public R ge_person_list(@RequestBody PersonListRequestSg personListRequestSg) throws ClientException {
|
|
Integer farmId = personListRequestSg.getFarmId();
|
|
Integer farmId = personListRequestSg.getFarmId();
|
|
if (farmId == 1) {
|
|
if (farmId == 1) {
|
|
System.out.println("曙光");
|
|
System.out.println("曙光");
|
|
@@ -38,7 +42,7 @@ public class ClientPersonManageControllerTest {
|
|
requestSg.setSearchKey(personListRequestSg.getSearchKey());
|
|
requestSg.setSearchKey(personListRequestSg.getSearchKey());
|
|
requestSg.setStatusList(personListRequestSg.getStatusList());
|
|
requestSg.setStatusList(personListRequestSg.getStatusList());
|
|
String s = requestSg.doAction();
|
|
String s = requestSg.doAction();
|
|
- return s;
|
|
|
|
|
|
+ return R.ok("请求成功").put("data",s);
|
|
} else if (farmId == 2) {
|
|
} else if (farmId == 2) {
|
|
PersonListRequestHn requestHn = new PersonListRequestHn(oauthConfigBaseInfo02);
|
|
PersonListRequestHn requestHn = new PersonListRequestHn(oauthConfigBaseInfo02);
|
|
requestHn.setDepartmentId(personListRequestSg.getDepartmentId());
|
|
requestHn.setDepartmentId(personListRequestSg.getDepartmentId());
|
|
@@ -49,7 +53,7 @@ public class ClientPersonManageControllerTest {
|
|
requestHn.setStatusList(personListRequestSg.getStatusList());
|
|
requestHn.setStatusList(personListRequestSg.getStatusList());
|
|
String s = requestHn.doAction();
|
|
String s = requestHn.doAction();
|
|
System.out.println("海宁");
|
|
System.out.println("海宁");
|
|
- return s;
|
|
|
|
|
|
+ return R.ok("请求成功").put("data",s);
|
|
} else {
|
|
} else {
|
|
PersonListRequestCn requestCn = new PersonListRequestCn(oauthConfigBaseInfo03);
|
|
PersonListRequestCn requestCn = new PersonListRequestCn(oauthConfigBaseInfo03);
|
|
requestCn.setDepartmentId(personListRequestSg.getDepartmentId());
|
|
requestCn.setDepartmentId(personListRequestSg.getDepartmentId());
|
|
@@ -60,9 +64,27 @@ public class ClientPersonManageControllerTest {
|
|
requestCn.setStatusList(personListRequestSg.getStatusList());
|
|
requestCn.setStatusList(personListRequestSg.getStatusList());
|
|
String s = requestCn.doAction();
|
|
String s = requestCn.doAction();
|
|
System.out.println("苍南");
|
|
System.out.println("苍南");
|
|
- return s;
|
|
|
|
|
|
+ return R.ok("请求成功").put("data",s);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ @RequestMapping("departmentList")
|
|
|
|
+ public R departmentList(@RequestBody Map<String,Integer> paramsMap){
|
|
|
|
+ Integer farmId = paramsMap.get("farmId");
|
|
|
|
+ if (farmId == 1){
|
|
|
|
+ System.out.println("曙光");
|
|
|
|
+ DepartmentListRequestSg departmentList = new DepartmentListRequestSg(oauthConfigBaseInfo);
|
|
|
|
+ return R.ok("请求成功").put("data",departmentList.doAction());
|
|
|
|
+ }else if (farmId == 22){
|
|
|
|
+ System.out.println("海宁");
|
|
|
|
+ DepartmentListRequestHn departmentList = new DepartmentListRequestHn(oauthConfigBaseInfo02);
|
|
|
|
+ return R.ok("请求成功").put("data",departmentList.doAction());
|
|
|
|
+ }else if (farmId == 21){
|
|
|
|
+ System.out.println("苍南");
|
|
|
|
+ DepartmentListRequestCn departmentList = new DepartmentListRequestCn(oauthConfigBaseInfo03);
|
|
|
|
+ return R.ok("请求成功").put("data",departmentList.doAction());
|
|
|
|
+ }else {
|
|
|
|
+ return R.error();
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|