Merge remote-tracking branch 'origin/liujun-2023-12-05-相关方需求变更' into 相关方关联分公司功能

cmt1.0
zhaoyu 2023-12-11 17:59:02 +08:00
commit dfcc0cb817
12 changed files with 302 additions and 1 deletions

View File

@ -82,6 +82,28 @@ public class OpenApiController extends BaseController {
return map;
}
@RequestMapping(value="/user/getUserInfo")
@ResponseBody
public Object getUserInfo() throws Exception{
PageData map = new PageData();
PageData pd = this.getPageData();
PageData userInfo = usersService.getUserInfo(pd); //列出Post列表
map.putAll(userInfo);
map.put("result", "success");
return map;
}
@RequestMapping(value="/department/getDepartmentInfo")
@ResponseBody
public Object getDepartmentInfo() throws Exception{
PageData map = new PageData();
PageData pd = this.getPageData();
PageData departmentInfo = departmentService.getDepartmentInfo(pd); //列出Post列表
map.putAll(departmentInfo);
map.put("result", "success");
return map;
}
/**
* @throws Exception
*/

View File

@ -0,0 +1,240 @@
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();
pd.put("SUPERVISE_CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
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;
}
}

View File

@ -236,7 +236,6 @@ public class XgfCorpController extends BaseController {
} else if ("3".equals(type)) {
pd.put("STATE", "3"); // 审核状态改为打回
}
// Map result2 = HttpClientService.doPost(XGF_EDITROLEBTG, pd);
Map result = HttpClientService.doPost(url + "/api/corpinfo/corpInfoAudit", pd);
map.put("result", errInfo);
return map;

View File

@ -54,4 +54,20 @@ public class XgfDictionariesController extends BaseController {
Map result = HttpClientService.doPost(url + "/api/dictionaries/getAreaLevels", pd);
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;
}
}

View File

@ -173,5 +173,7 @@ public interface DepartmentMapper{
* @return
*/
List<PageData> listTreeManageAndCorpForPcPunishThePerson(PageData pd);
PageData getInfo(PageData pd) throws Exception;
}

View File

@ -299,4 +299,6 @@ public interface UsersMapper {
List<PageData> selectUserListByUserIds(PageData pd);
void resetCardNo(PageData pd);
PageData getUserInfo(PageData pd);
}

View File

@ -223,5 +223,7 @@ public interface DepartmentService{
List<PageData> listTreeManageAndCorp1(PageData pd)throws Exception;
List<PageData> listTreeManageAndCorpForPcPunishThePerson(PageData pd) throws Exception;
PageData getDepartmentInfo(PageData pd) throws Exception;
}

View File

@ -350,4 +350,6 @@ public interface UsersService {
List<PageData> selectUserListByUserIds(PageData selectPageData);
void resetCardNo(PageData pd);
PageData getUserInfo(PageData pd);
}

View File

@ -409,5 +409,10 @@ public class DepartmentServiceImpl implements DepartmentService{
public List<PageData> listTreeManageAndCorpForPcPunishThePerson(PageData pd) throws Exception {
return departmentMapper.listTreeManageAndCorpForPcPunishThePerson(pd);
}
@Override
public PageData getDepartmentInfo(PageData pd) throws Exception {
return departmentMapper.getInfo(pd);
}
}

View File

@ -468,4 +468,9 @@ public class UsersServiceImpl implements UsersService {
public void resetCardNo(PageData pd) {
usersMapper.resetCardNo(pd);
}
@Override
public PageData getUserInfo(PageData pd) {
return usersMapper.getUserInfo(pd);
}
}

View File

@ -550,4 +550,7 @@
</foreach>
</if>
</select>
<select id="getInfo" resultType="com.zcloud.entity.PageData">
select * from vi_department_all where DEPARTMENT_ID = #{DEPARTMENT_ID}
</select>
</mapper>

View File

@ -1316,4 +1316,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</if>
</select>
<select id="getUserInfo" resultType="com.zcloud.entity.PageData">
select * from vi_user_all where USER_ID = #{USER_ID}
</select>
</mapper>