85 lines
2.9 KiB
Java
85 lines
2.9 KiB
Java
|
package com.zcloud.controller.xgf;
|
||
|
|
||
|
import com.zcloud.controller.base.BaseController;
|
||
|
import com.zcloud.entity.Page;
|
||
|
import com.zcloud.entity.PageData;
|
||
|
import com.zcloud.util.Const;
|
||
|
import com.zcloud.util.DateUtil;
|
||
|
import com.zcloud.util.HttpClientService;
|
||
|
import com.zcloud.util.Jurisdiction;
|
||
|
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;
|
||
|
|
||
|
import java.util.Date;
|
||
|
import java.util.HashMap;
|
||
|
import java.util.Map;
|
||
|
|
||
|
/**
|
||
|
* @author fangjiakai
|
||
|
* @date 2023/05/15 11:09
|
||
|
*/
|
||
|
@Controller
|
||
|
@RequestMapping("/unflowTrain")
|
||
|
public class UnFlowTrainController extends BaseController {
|
||
|
|
||
|
@Value("${preventionxgf.api.url}")
|
||
|
private String xgfUrl;
|
||
|
|
||
|
@RequestMapping(value="/save")
|
||
|
@ResponseBody
|
||
|
public Object save(Page page) throws Exception{
|
||
|
PageData pd = new PageData();
|
||
|
pd = this.getPageData();
|
||
|
pd.put("OPERATE_TIME", DateUtil.date2Str(new Date()));
|
||
|
pd.put("OPERATOR_ID", Jurisdiction.getUSER_ID());
|
||
|
pd.put("OPERATOR_NAME", Jurisdiction.getUsername());
|
||
|
pd.put("TRAIN_CORP_DEPT", Jurisdiction.getDEPARTMENT_ID());
|
||
|
pd.put("TRAIN_CORP_LEADER", Jurisdiction.getUSER_ID());
|
||
|
pd.put("TRAIN_CORP_LEADER_NAME", Jurisdiction.getUsername());
|
||
|
Map result = HttpClientService.doPost(xgfUrl + "/openApi//unflowTrain/save", pd);
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
@RequestMapping(value="/batchList")
|
||
|
@ResponseBody
|
||
|
public Object batchList(Page page) throws Exception{
|
||
|
PageData pd = new PageData();
|
||
|
pd = this.getPageData();
|
||
|
pd.put("TRAIN_CORP_LEADER", Jurisdiction.getUSER_ID());
|
||
|
pd.put("TYPE",1);
|
||
|
Map result = HttpClientService.doPost(xgfUrl + "/openApi/trainingbatch/list" +getPageUrl(page), pd);
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
@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;
|
||
|
}
|
||
|
|
||
|
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;
|
||
|
}
|
||
|
}
|