相关方企业审核移动到企业端
parent
c2b835ebfa
commit
38bdba0109
|
@ -0,0 +1,239 @@
|
||||||
|
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.DateUtil;
|
||||||
|
import com.zcloud.util.HttpClientService;
|
||||||
|
import com.zcloud.util.Jurisdiction;
|
||||||
|
import com.zcloud.util.ObjectExcelView;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
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 org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 说明:相关方管理
|
||||||
|
* 作者:luoxiaobao
|
||||||
|
* 时间:2022-06-07
|
||||||
|
* 官网:www.zcloudchina.com
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/relevantunits")
|
||||||
|
public class RelevantUnitsController extends BaseController {
|
||||||
|
@Value("${preventionxgf.api.url}")
|
||||||
|
private String xgfUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相关方单位信息审核模块的列表
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/list")
|
||||||
|
@ResponseBody
|
||||||
|
public Object list() throws Exception {
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/list", pd);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/examine")
|
||||||
|
@ResponseBody
|
||||||
|
public Object examine() throws Exception {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
|
||||||
|
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||||
|
pd.put("OPERATOR", Jurisdiction.getUSER_ID());
|
||||||
|
String type = pd.getString("STATE"); //2 通过 3.未通过
|
||||||
|
if ("2".equals(type)) {
|
||||||
|
pd.put("STATE", "2"); // 审核状态改为通过
|
||||||
|
} else if ("3".equals(type)) {
|
||||||
|
pd.put("STATE", "3"); // 审核状态改为打回
|
||||||
|
}
|
||||||
|
// Map result2 = HttpClientService.doPost(XGF_EDITROLEBTG, pd);
|
||||||
|
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/corpInfoAudit", pd);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相关方单位人员-人员基础信息管理-list
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/getCorpInfoDetail")
|
||||||
|
@ResponseBody
|
||||||
|
public Object getCorpInfoDetail() throws Exception {
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/getDataForEditByCorpInfoIdForApi", pd);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相关方单位账号管理-列表
|
||||||
|
*
|
||||||
|
* @param page
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/getCorpInfoList")
|
||||||
|
@ResponseBody
|
||||||
|
public Object getCorpInfoList(Page page) throws Exception {
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/list", pd);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出到excel
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/excelAll")
|
||||||
|
@RequiresPermissions("toExcel")
|
||||||
|
public ModelAndView exportExcel() throws Exception {
|
||||||
|
ModelAndView mv = new ModelAndView();
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
Map<String, Object> dataMap = new HashMap<String, Object>();
|
||||||
|
List<String> titles = new ArrayList<String>();
|
||||||
|
titles.add("序号"); //1
|
||||||
|
titles.add("企业状态"); //2
|
||||||
|
titles.add("股份主管部门"); //3
|
||||||
|
titles.add("基层单位主管公司"); //4
|
||||||
|
titles.add("基层单位主管部门"); //5
|
||||||
|
titles.add("相关方单位名称"); //6
|
||||||
|
titles.add("统一社会信用代码"); //7
|
||||||
|
titles.add("经营地址"); //8
|
||||||
|
titles.add("法人"); //9
|
||||||
|
titles.add("联系人"); //10
|
||||||
|
titles.add("联系电话"); //11
|
||||||
|
titles.add("用工形式"); //12
|
||||||
|
titles.add("选取形式"); //13
|
||||||
|
titles.add("流动人员比例%"); //14
|
||||||
|
titles.add("添加人"); //15
|
||||||
|
titles.add("添加时间"); //16
|
||||||
|
dataMap.put("titles", titles);
|
||||||
|
|
||||||
|
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/unitCorpInfo", pd);
|
||||||
|
List<HashMap<String, Object>> varOList = (List<HashMap<String, Object>>) result.get("unitCorp");
|
||||||
|
|
||||||
|
List<PageData> varList = new ArrayList<PageData>();
|
||||||
|
for (int i = 0; i < varOList.size(); i++) {
|
||||||
|
PageData vpd = new PageData();
|
||||||
|
vpd.put("var1", i + 1);
|
||||||
|
if (varOList.get(i).get("STATE").equals("0")) {
|
||||||
|
vpd.put("var2", "未填报");
|
||||||
|
} else if (varOList.get(i).get("STATE").equals("1")) {
|
||||||
|
vpd.put("var2", "待审核");
|
||||||
|
} else if (varOList.get(i).get("STATE").equals("2")) {
|
||||||
|
vpd.put("var2", "已审核");
|
||||||
|
} else if (varOList.get(i).get("STATE").equals("3")) {
|
||||||
|
vpd.put("var2", "已打回");
|
||||||
|
} else if (varOList.get(i).get("STATE").equals("4")) {
|
||||||
|
vpd.put("var2", "已填报");
|
||||||
|
}
|
||||||
|
|
||||||
|
vpd.put("var3", varOList.get(i).get("MAIN_DEPARTMENT_NAME"));
|
||||||
|
vpd.put("var4", varOList.get(i).get("SUPERVISE_CORPINFO_NAME"));
|
||||||
|
vpd.put("var5", varOList.get(i).get("SUPERVISE_DEPARTMENT_NAME"));
|
||||||
|
vpd.put("var6", varOList.get(i).get("RELEVANT_UNIT_NAME"));
|
||||||
|
vpd.put("var7", varOList.get(i).get("SOCIAL_CODE"));
|
||||||
|
vpd.put("var8", varOList.get(i).get("BUSINESS_ADDRESS"));
|
||||||
|
vpd.put("var9", varOList.get(i).get("LEGAL_PERSON"));
|
||||||
|
vpd.put("var10", varOList.get(i).get("CONTACT_PERSON"));
|
||||||
|
vpd.put("var11", varOList.get(i).get("CONTACT_TEL"));
|
||||||
|
vpd.put("var12", varOList.get(i).get("EMPLOYMENT_FORM_NAME"));
|
||||||
|
if (varOList.get(i).get("SELECT_FORM").equals("competitive_negotiation")) {
|
||||||
|
vpd.put("var13", "竞争性谈判");
|
||||||
|
}
|
||||||
|
if (varOList.get(i).get("SELECT_FORM").equals("invite_tenders")) {
|
||||||
|
vpd.put("var13", "招标");
|
||||||
|
}
|
||||||
|
vpd.put("var14", varOList.get(i).get("FLOATING_PERCENT"));
|
||||||
|
vpd.put("var15", varOList.get(i).get("CREATOR_NAME"));
|
||||||
|
vpd.put("var16", varOList.get(i).get("CREATTIME").toString().replace("T", " ").replace(".000+0000", ""));
|
||||||
|
varList.add(vpd);
|
||||||
|
}
|
||||||
|
dataMap.put("varList", varList);
|
||||||
|
ObjectExcelView erv = new ObjectExcelView();
|
||||||
|
mv = new ModelAndView(erv, dataMap);
|
||||||
|
return mv;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存数据
|
||||||
|
*
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/saveCorpInfo")
|
||||||
|
@ResponseBody
|
||||||
|
public Object saveCorpInfo() throws Exception {
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/saveDataForApi", pd);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询相关方名称是否唯一
|
||||||
|
*
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/hasName")
|
||||||
|
@ResponseBody
|
||||||
|
public Object hasName() throws Exception {
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/hasName", pd);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询相关方统一社会信用代码是否唯一
|
||||||
|
*
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/hasSocialCode")
|
||||||
|
@ResponseBody
|
||||||
|
public Object hasSocialCode() throws Exception {
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/hasSocialCode", pd);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询相关方统一社会信用代码是否唯一
|
||||||
|
*
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/resetPassword")
|
||||||
|
@ResponseBody
|
||||||
|
public Object resetPassword() throws Exception {
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/resetPasswordByCorpInfoId", pd);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -236,7 +236,6 @@ public class XgfCorpController extends BaseController {
|
||||||
} else if ("3".equals(type)) {
|
} else if ("3".equals(type)) {
|
||||||
pd.put("STATE", "3"); // 审核状态改为打回
|
pd.put("STATE", "3"); // 审核状态改为打回
|
||||||
}
|
}
|
||||||
// Map result2 = HttpClientService.doPost(XGF_EDITROLEBTG, pd);
|
|
||||||
Map result = HttpClientService.doPost(url + "/api/corpinfo/corpInfoAudit", pd);
|
Map result = HttpClientService.doPost(url + "/api/corpinfo/corpInfoAudit", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
|
|
|
@ -54,4 +54,20 @@ public class XgfDictionariesController extends BaseController {
|
||||||
Map result = HttpClientService.doPost(url + "/api/dictionaries/getAreaLevels", pd);
|
Map result = HttpClientService.doPost(url + "/api/dictionaries/getAreaLevels", pd);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value="/listSelectTree")
|
||||||
|
@ResponseBody
|
||||||
|
public Object listSelectTree() throws Exception{
|
||||||
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
Map result = HttpClientService.doPost(url + "/api/dictionaries/listSelectTree", pd);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue