2023-11-07 09:32:12 +08:00
|
|
|
package com.zcloud.controller.xgf;
|
|
|
|
|
|
|
|
import com.zcloud.controller.base.BaseController;
|
|
|
|
import com.zcloud.entity.Page;
|
|
|
|
import com.zcloud.entity.PageData;
|
2023-12-19 20:03:25 +08:00
|
|
|
import com.zcloud.service.xgf.TrainingBatchService;
|
|
|
|
import com.zcloud.util.*;
|
2023-11-07 09:32:12 +08:00
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
2023-12-19 20:03:25 +08:00
|
|
|
import javax.annotation.Resource;
|
2023-11-07 09:32:12 +08:00
|
|
|
import java.util.HashMap;
|
2023-12-19 20:03:25 +08:00
|
|
|
import java.util.List;
|
2023-11-07 09:32:12 +08:00
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author fangjiakai
|
|
|
|
* @date 2023/05/15 11:09
|
|
|
|
*/
|
|
|
|
@Controller
|
|
|
|
@RequestMapping("/flowTrain")
|
|
|
|
public class FlowTrainController extends BaseController {
|
|
|
|
|
|
|
|
@Value("${preventionxgf.api.url}")
|
|
|
|
private String xgfUrl;
|
|
|
|
|
2023-12-19 20:03:25 +08:00
|
|
|
@Resource
|
|
|
|
private TrainingBatchService trainingbatchService;
|
|
|
|
|
2023-11-07 09:32:12 +08:00
|
|
|
@RequestMapping(value="/batchList")
|
|
|
|
@ResponseBody
|
|
|
|
public Object batchList(Page page) throws Exception{
|
2023-12-19 20:03:25 +08:00
|
|
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
|
|
PageData pd = this.getPageData();
|
|
|
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
|
|
|
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
|
|
|
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
|
|
|
page.setPd(pd);
|
|
|
|
List<PageData> varList = trainingbatchService.list(page); //列出TrainingBatch列表
|
|
|
|
map.put("varList", varList);
|
|
|
|
map.put("page", page);
|
|
|
|
map.put("result", "success");
|
|
|
|
return map;
|
2023-11-07 09:32:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value="/batchUserList")
|
|
|
|
@ResponseBody
|
|
|
|
public Object batchUserList(Page page) throws Exception{
|
|
|
|
PageData pd = new PageData();
|
|
|
|
pd = this.getPageData();
|
|
|
|
Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainingbatch/batchUserList" +getPageUrl(page), pd);
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value="/batchAudit")
|
|
|
|
@ResponseBody
|
|
|
|
public Object batchAudit(Page page) throws Exception{
|
|
|
|
PageData pd = new PageData();
|
|
|
|
pd = this.getPageData();
|
|
|
|
Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainingbatch/audit" , pd);
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
private String getPageUrl(Page page){
|
|
|
|
return "?showCount=" +page.getShowCount() + "¤tPage=" + page.getUrlCurrentPage();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 分公司端-相关方流动人员培训审核-查看用户信息
|
|
|
|
* @return
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
@RequestMapping(value="/getUserDetailById")
|
|
|
|
@ResponseBody
|
|
|
|
public Object getCorpUserList() throws Exception{
|
|
|
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
|
|
String errInfo = "success";
|
|
|
|
PageData pd = new PageData();
|
|
|
|
pd = this.getPageData();
|
|
|
|
Map result = HttpClientService.doPost(xgfUrl + "/api/user/getFloatPersonDetailById/", pd);
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value="/approveUser")
|
|
|
|
@ResponseBody
|
|
|
|
public Object approveUser() throws Exception{
|
|
|
|
PageData pd = new PageData();
|
|
|
|
pd = this.getPageData();
|
|
|
|
pd.put("loginUserId",Jurisdiction.getUSER_ID());
|
|
|
|
Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainusers/approveUser", pd);
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
@RequestMapping(value="/getDetailsById")
|
|
|
|
@ResponseBody
|
|
|
|
public Object getDetailsById() throws Exception{
|
|
|
|
PageData pd = new PageData();
|
|
|
|
pd = this.getPageData();
|
|
|
|
if(!Jurisdiction.getUsername().equals("admin")){
|
|
|
|
pd.put("AUDIT_USER_ID", Jurisdiction.getUSER_ID());
|
|
|
|
}
|
|
|
|
Map result = HttpClientService.doPost(xgfUrl+ "/openApi/trainingbatch/getDetailsById", pd);
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|