| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657 |
- package platform.modules.government.web;
- import com.github.pagehelper.PageInfo;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Controller;
- import org.springframework.ui.ModelMap;
- import org.springframework.web.bind.WebDataBinder;
- import org.springframework.web.bind.annotation.*;
- import platform.common.Constant;
- import platform.common.annotation.OperationLog;
- import platform.common.base.controller.BaseController;
- import platform.common.base.model.DictionaryItem;
- import platform.common.base.service.DictionaryItemService;
- import platform.common.exception.BaseException;
- import platform.common.util.CommonUtils;
- import platform.common.util.ShiroUtils;
- import platform.modules.company.dto.LandSupplyApprovalDto;
- import platform.modules.government.dto.IndustrialLandSupplyConfigListDto;
- import platform.modules.government.dto.IndustrialLandSupplyDto;
- import platform.modules.government.dto.IndustrialLandSupplyParam;
- import platform.modules.government.entity.IndustrialLandSupplyConfig;
- import platform.modules.government.entity.IndustrialLandSupplyConsultation;
- import platform.modules.government.entity.IndustrialLandSupplyDetail;
- import platform.modules.government.entity.User;
- import platform.modules.government.service.IndustrialLandSupplyConfigService;
- import platform.modules.government.service.IndustrialLandSupplyConsultationService;
- import platform.modules.government.service.IndustrialLandSupplyDetailService;
- import platform.modules.government.service.UserService;
- import platform.modules.sys.service.ApprovalService;
- import platform.modules.sys.web.ResponseMessage;
- import javax.servlet.http.HttpServletResponse;
- import java.io.IOException;
- import java.text.ParseException;
- import java.util.List;
- import java.util.Objects;
- /**
- * 产业供地
- *
- * @Author: huZhiHao
- * @Date: 2020/3/5
- **/
- @Controller
- @RequestMapping(value = "/land_supply")
- public class IndustrialLandSupplyController extends BaseController {
- @Autowired
- private IndustrialLandSupplyDetailService industrialLandSupplyDetailService;
- @Autowired
- private IndustrialLandSupplyConsultationService industrialLandSupplyConsultationService;
- @Autowired
- private IndustrialLandSupplyConfigService industrialLandSupplyConfigService;
- @Autowired
- private DictionaryItemService dictionaryItemService;
- @Autowired
- private ApprovalService approvalService;
- @Autowired
- private UserService userService;
- /**
- * @Author: huZhiHao
- * @Description: 查看产业供地列表 1 待处理 2 已处理 3 全部
- * @Date: 2020/3/7
- * @Params: [modelMap, pageNum, param, type]
- * @Return: java.lang.String
- **/
- @OperationLog(value = "查看产业供地列表")
- @RequestMapping("/list/{type}")
- public String waitIndex(
- ModelMap modelMap, @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
- IndustrialLandSupplyParam param, @PathVariable("type") String type) throws Exception {
- PageInfo<IndustrialLandSupplyDto> pageInfo = industrialLandSupplyDetailService.findPage(pageNum, PAGESIZE, param, type);
- log.info("分页查询内容列表结果! pageInfo = {}", pageInfo);
- modelMap.put("pageInfo", pageInfo);
- modelMap.put("param", param);
- modelMap.put("approve_status", param.getApprove_status());
- modelMap.put("process_stage", param.getProcess_stage());
- modelMap.put("type", type);
- modelMap.put("userType", ShiroUtils.getUserType());
- List<DictionaryItem> statusList = dictionaryItemService.findListByTypeName(Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY_APPROVE_STATUS);
- modelMap.addAttribute("statusList", statusList);
- List<DictionaryItem> stageList = dictionaryItemService.findListByTypeName(Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY_APPROVE_STAGE);
- modelMap.addAttribute("stageList", stageList);
- modelMap.addAttribute("canAdd", industrialLandSupplyDetailService.canAdd());
- modelMap.addAttribute("userGroupType", industrialLandSupplyDetailService.userGroupType());
- return "/admin/government/industrial_land_supply/index";
- }
- @OperationLog(value = "新增产业供地")
- @RequestMapping("/add")
- public String add(ModelMap modelMap) {
- boolean canAsk = industrialLandSupplyDetailService.canAsk();
- modelMap.addAttribute("canAsk", canAsk);
- if (canAsk)
- modelMap.addAttribute("consulDepartmentList", industrialLandSupplyDetailService.consulDepartmentList());
- return "/admin/government/industrial_land_supply/add";
- }
- @OperationLog(value = "新增产业供地")
- @RequestMapping("/save")
- @ResponseBody
- public ResponseMessage save(IndustrialLandSupplyDetail industrialLandSupplyDetail, @RequestParam("state") String state) {
- try {
- if (IsTooFrequently()) {
- return ResponseMessage.error("操作过于频繁,请稍后再试!");
- }
- industrialLandSupplyDetailService.save(industrialLandSupplyDetail, state);
- } catch (Exception e) {
- e.printStackTrace();
- return ResponseMessage.error("保存失败!");
- }
- return ResponseMessage.success("保存成功!");
- }
- @OperationLog(value = "修改产业供地")
- @RequestMapping("/update")
- @ResponseBody
- public ResponseMessage update(IndustrialLandSupplyDetail industrialLandSupplyDetail, @RequestParam("state") String state) {
- try {
- if (IsTooFrequently()) {
- return ResponseMessage.error("操作过于频繁,请稍后再试!");
- }
- industrialLandSupplyDetailService.update(industrialLandSupplyDetail, state);
- } catch (Exception e) {
- e.printStackTrace();
- return ResponseMessage.error("保存失败!");
- }
- return ResponseMessage.success("保存成功!");
- }
- @OperationLog(value = "查看详情")
- @RequestMapping("/detail/{id}")
- public String detail(@PathVariable("id") String id, ModelMap modelMap) throws Exception {
- log.info("查看详情");
- IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectById(id + "");
- modelMap.put("data", entity);
- modelMap.put("fileUrl", setFileUrl());
- modelMap.put("approvalList", approvalService.getApprovalList(entity.getId(), Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY, Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY_APPROVE_STATUS));
- modelMap.put("detailType", industrialLandSupplyDetailService.detailType());
- return "/admin/government/industrial_land_supply/detail";
- }
- @OperationLog(value = "编辑跳转")
- @RequestMapping("/edit/{id}")
- public String edit(@PathVariable("id") String id, ModelMap modelMap) throws Exception {
- log.info("编辑跳转");
- boolean canAsk = industrialLandSupplyDetailService.canAsk();
- modelMap.addAttribute("canAsk", canAsk);
- IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectById(id + "");
- if (canAsk) {
- // modelMap.addAttribute("consulDepartmentList", industrialLandSupplyDetailService.consulDepartmentList());
- modelMap.addAttribute("consulDepartmentList", entity.getConsulDepartmentList());
- }
- modelMap.put("data", entity);
- modelMap.put("fileUrl", setFileUrl());
- //审批列表
- modelMap.put("approvalList", approvalService.getApprovalList(entity.getId(), Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY, Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY_APPROVE_STATUS));
- //咨询列表
- IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
- industrialLandSupplyConsultation.setIndustrial_land_supply_id(id);
- industrialLandSupplyConsultation.setDel_flag(false);
- List<IndustrialLandSupplyConsultation> industrialLandSupplyConsultationList = industrialLandSupplyConsultationService.findListByWhere(industrialLandSupplyConsultation);
- modelMap.put("industrialLandSupplyConsultationList", industrialLandSupplyConsultationList);
- return "/admin/government/industrial_land_supply/edit";
- }
- @OperationLog(value = "删除")
- @ResponseBody
- @GetMapping(value = "/delete/{id}")
- public ResponseMessage delete(@PathVariable("id") String id) {
- log.info("删除");
- try {
- IndustrialLandSupplyDetail industrialLandSupplyDetail = new IndustrialLandSupplyDetail();
- industrialLandSupplyDetail.setId(Integer.valueOf(id));
- industrialLandSupplyDetail.setDel_flag(true);
- industrialLandSupplyDetailService.updateSelective(industrialLandSupplyDetail);
- return ResponseMessage.success("删除成功!");
- } catch (Exception e) {
- e.printStackTrace();
- return ResponseMessage.error("删除失败!");
- }
- }
- @OperationLog(value = "审核")
- @PostMapping(value = "/approve")
- @ResponseBody
- public ResponseMessage approve(ModelMap modelMap, LandSupplyApprovalDto approval) {
- if (IsTooFrequently()) {
- return ResponseMessage.error("操作过于频繁,请稍后再试!");
- }
- log.info("审核!");
- try {
- industrialLandSupplyDetailService.updateAttachment(approval);
- if (approval.getStatus().equals(Constant.ApproveButtonStatus.APPROVED)) {
- //通过
- if (industrialLandSupplyDetailService.pass(approval.getApply_id(), approval.getApproval_comment()))
- return ResponseMessage.success("操作成功");
- } else if (approval.getStatus().equals(Constant.ApproveButtonStatus.REJECT)) {
- //退回
- if (industrialLandSupplyDetailService.untread(approval.getApply_id(), approval.getApproval_comment()))
- return ResponseMessage.success("操作成功");
- } else if (approval.getStatus().equals(Constant.ApproveButtonStatus.NOTAPPROVED)) {
- //不通过
- if (industrialLandSupplyDetailService.refuse(approval.getApply_id(), approval.getApproval_comment()))
- return ResponseMessage.success("操作成功");
- }
- } catch (BaseException e) {
- return ResponseMessage.error(e.getMessage());
- } catch (Exception e) {
- e.getStackTrace();
- }
- return ResponseMessage.error("操作失败!");
- }
- @OperationLog(value = "回答咨询页面")
- @RequestMapping("/feedback/{id}")
- public String feedbackPage(@PathVariable("id") String id, ModelMap modelMap) throws ParseException {
- log.info("回答咨询页面");
- IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectByIdWithDepartment(id + "");
- modelMap.put("data", entity);
- modelMap.put("fileUrl", setFileUrl());
- return "/admin/government/industrial_land_supply/feedback";
- }
- @OperationLog(value = "回答咨询附件添加页面")
- @GetMapping(value = "/addApplyFile")
- public String addApplyFile(ModelMap modelMap, String fileIdName) {
- modelMap.put("fileIdName", fileIdName);
- modelMap.put("fileUrl", setFileUrl());
- return "/admin/government/industrial_land_supply/file_add";
- }
- @OperationLog(value = "回答咨询")
- @RequestMapping("/feedback")
- @ResponseBody
- public ResponseMessage feedback(IndustrialLandSupplyDetail industrialLandSupplyDetail) {
- if (CommonUtils.isNotNull(industrialLandSupplyDetail) && CommonUtils.isNotNull(industrialLandSupplyDetail.getConsultationList())) {
- industrialLandSupplyDetailService.saveFeedback(industrialLandSupplyDetail.getConsultationList());
- }
- return ResponseMessage.success("保存成功!");
- }
- @OperationLog(value = "咨询汇总页面")
- @RequestMapping("/summary/{id}")
- public String summaryPage(@PathVariable("id") String id, ModelMap modelMap) throws Exception {
- log.info("咨询汇总页面");
- IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectById(id + "");
- modelMap.put("data", entity);
- modelMap.put("fileUrl", setFileUrl());
- return "/admin/government/industrial_land_supply/summary";
- }
- @OperationLog(value = "咨询汇总")
- @RequestMapping("/summary")
- @ResponseBody
- public ResponseMessage summary(IndustrialLandSupplyDetail industrialLandSupplyDetail) {
- industrialLandSupplyDetailService.saveSummary(industrialLandSupplyDetail);
- return ResponseMessage.success("保存成功!");
- }
- @OperationLog(value = "预审审核页面")
- @RequestMapping("/pre_approve/{id}")
- public String preApprovePage(@PathVariable("id") String id, ModelMap modelMap) throws Exception {
- log.info("预审审核页面");
- IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectById(id + "");
- modelMap.put("data", entity);
- modelMap.put("fileUrl", setFileUrl());
- modelMap.put("approvalList", approvalService.getApprovalList(entity.getId(), Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY, Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY_APPROVE_STATUS));
- return "/admin/government/industrial_land_supply/pre_approve";
- }
- @OperationLog(value = "追加咨询页面")
- @RequestMapping("/feedback_append/{id}")
- public String feedbackAppendPage(@PathVariable("id") String id, ModelMap modelMap) throws Exception {
- log.info("追加咨询页面");
- boolean canAsk = industrialLandSupplyDetailService.canAsk();
- modelMap.addAttribute("canAsk", canAsk);
- IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectById(id + "");
- if(!Objects.equals(entity.getApprove_status(),Constant.LandSupplyApproveStatus.COMMERCE_PENDING_SUMMARY)){
- entity.setApprove_status(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_FEEDBACK);
- }
- industrialLandSupplyDetailService.updateSelective(entity);
- if (canAsk) {
- // modelMap.addAttribute("consulDepartmentList", industrialLandSupplyDetailService.consulDepartmentList());
- modelMap.addAttribute("consulDepartmentList", entity.getConsulDepartmentList());
- }
- modelMap.put("data", entity);
- modelMap.put("fileUrl", setFileUrl());
- //审批列表
- modelMap.put("approvalList", approvalService.getApprovalList(entity.getId(), Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY, Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY_APPROVE_STATUS));
- //咨询列表
- IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
- industrialLandSupplyConsultation.setIndustrial_land_supply_id(id);
- industrialLandSupplyConsultation.setDel_flag(false);
- List<IndustrialLandSupplyConsultation> industrialLandSupplyConsultationList = industrialLandSupplyConsultationService.findListByWhere(industrialLandSupplyConsultation);
- modelMap.put("industrialLandSupplyConsultationList", industrialLandSupplyConsultationList);
- return "/admin/government/industrial_land_supply/feedback_append";
- }
- @OperationLog(value = "追加咨询")
- @RequestMapping("/feedback_append")
- @ResponseBody
- public ResponseMessage feedbackAppend(IndustrialLandSupplyDetail industrialLandSupplyDetail) throws Exception {
- String message = industrialLandSupplyDetailService.saveFeedbackAppend(industrialLandSupplyDetail);
- if (CommonUtils.isNotNull(message)) {
- return ResponseMessage.error(message);
- }
- return ResponseMessage.success("保存成功!");
- }
- @OperationLog(value = "撤回咨询页面")
- @RequestMapping("/feedback_withdraw/{id}")
- public String withdrawPage(@PathVariable("id") String id, ModelMap modelMap) throws Exception {
- log.info("撤回咨询页面");
- IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectById(id);
- modelMap.put("data", entity);
- modelMap.put("fileUrl", setFileUrl());
- return "/admin/government/industrial_land_supply/feedback_withdraw";
- }
- @OperationLog(value = "撤回咨询")
- @ResponseBody
- @GetMapping(value = "/withdraw_consul/{id}")
- public ResponseMessage withdraw(@PathVariable("id") String id) {
- log.info("撤回咨询");
- try {
- industrialLandSupplyDetailService.withDrawConsul(id);
- return ResponseMessage.success("撤回成功!");
- } catch (Exception e) {
- e.printStackTrace();
- return ResponseMessage.error("撤回失败!");
- }
- }
- @OperationLog(value = "撤回申请")
- @ResponseBody
- @GetMapping(value = "/withdraw_apply/{id}")
- public ResponseMessage withdrawApply(@PathVariable("id") String id) {
- log.info("撤回申请");
- try {
- industrialLandSupplyDetailService.withdrawApply(id);
- return ResponseMessage.success("删除成功!");
- } catch (Exception e) {
- e.printStackTrace();
- return ResponseMessage.error("删除失败!");
- }
- }
- @OperationLog(value = "商务业务员审核属地页面")
- @RequestMapping("/commerce_approve/{id}")
- public String commerceApprovePage(@PathVariable("id") String id, ModelMap modelMap) throws Exception {
- log.info("商务业务员审核属地页面");
- boolean canAsk = industrialLandSupplyDetailService.canAsk();
- modelMap.addAttribute("canAsk", canAsk);
- if (canAsk)
- modelMap.addAttribute("consulDepartmentList", industrialLandSupplyDetailService.consulDepartmentList());
- IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectById(id + "");
- modelMap.put("data", entity);
- modelMap.put("fileUrl", setFileUrl());
- //审批列表
- modelMap.put("approvalList", approvalService.getApprovalList(entity.getId(), Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY, Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY_APPROVE_STATUS));
- //咨询列表
- IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
- industrialLandSupplyConsultation.setIndustrial_land_supply_id(id);
- industrialLandSupplyConsultation.setDel_flag(false);
- List<IndustrialLandSupplyConsultation> industrialLandSupplyConsultationList = industrialLandSupplyConsultationService.findListByWhere(industrialLandSupplyConsultation);
- modelMap.put("industrialLandSupplyConsultationList", industrialLandSupplyConsultationList);
- Integer userId = entity.getCreate_by();
- User user = userService.getUser(userId);
- modelMap.put("createUserType", user.getUser_type() + "");
- return "/admin/government/industrial_land_supply/commerce_approve";
- }
- @OperationLog(value = "商务业务员审核属地")
- @RequestMapping("/commerce_approve")
- @ResponseBody
- public ResponseMessage commerceApprove(IndustrialLandSupplyDetail industrialLandSupplyDetail) {
- try {
- if (IsTooFrequently()) {
- return ResponseMessage.error("操作过于频繁,请稍后再试!");
- }
- industrialLandSupplyDetailService.commerceApprove(industrialLandSupplyDetail);
- } catch (Exception e) {
- e.printStackTrace();
- return ResponseMessage.error("保存失败!");
- }
- return ResponseMessage.success("保存成功!");
- }
- @OperationLog(value = "跳转分发页面")
- @RequestMapping("/distribute/{id}")
- public String distributePage(@PathVariable("id") String id, ModelMap modelMap) throws Exception {
- log.info("跳转分发页面");
- IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectById(id + "");
- modelMap.put("data", entity);
- modelMap.put("fileUrl", setFileUrl());
- modelMap.put("approvalList", approvalService.getApprovalList(entity.getId(), Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY, Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY_APPROVE_STATUS));
- modelMap.addAttribute("distDepartmentList", industrialLandSupplyDetailService.distDepartmentList());
- return "/admin/government/industrial_land_supply/distribute";
- }
- @OperationLog(value = "分发")
- @RequestMapping("/distribute")
- @ResponseBody
- public ResponseMessage distribute(IndustrialLandSupplyDetail industrialLandSupplyDetail) {
- try {
- if (IsTooFrequently()) {
- return ResponseMessage.error("操作过于频繁,请稍后再试!");
- }
- industrialLandSupplyDetailService.distribute(industrialLandSupplyDetail);
- } catch (Exception e) {
- e.printStackTrace();
- return ResponseMessage.error("保存失败!");
- }
- return ResponseMessage.success("保存成功!");
- }
- @OperationLog(value = "跳转分发反馈页面")
- @RequestMapping("/distribute_feedback/{id}")
- public String distributeFeedbackPage(@PathVariable("id") String id, ModelMap modelMap) throws ParseException {
- log.info("跳转分发反馈页面");
- IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectByIdWithDepartment(id + "");
- modelMap.put("data", entity);
- modelMap.put("fileUrl", setFileUrl());
- modelMap.put("approvalList", approvalService.getApprovalList(entity.getId(), Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY, Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY_APPROVE_STATUS));
- modelMap.addAttribute("distDepartmentList", industrialLandSupplyDetailService.distDepartmentList());
- modelMap.addAttribute("departmentFile", industrialLandSupplyDetailService.getAllDepartmentFile(id));
- return "/admin/government/industrial_land_supply/distribute_feedback";
- }
- @OperationLog(value = "分发反馈")
- @RequestMapping("/distribute_feedback")
- @ResponseBody
- public ResponseMessage distributeFeedback(IndustrialLandSupplyDetail industrialLandSupplyDetail) {
- try {
- if (IsTooFrequently()) {
- return ResponseMessage.error("操作过于频繁,请稍后再试!");
- }
- industrialLandSupplyDetailService.distributeFeedback(industrialLandSupplyDetail.getDistributionList());
- } catch (Exception e) {
- e.printStackTrace();
- return ResponseMessage.error("保存失败!");
- }
- return ResponseMessage.success("保存成功!");
- }
- @OperationLog(value = "跳转分发汇总")
- @RequestMapping("/distribute_summary/{id}")
- public String distributeSummaryPage(@PathVariable("id") String id, ModelMap modelMap) throws Exception {
- log.info("跳转分发汇总");
- IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectById(id + "");
- modelMap.put("data", entity);
- modelMap.put("fileUrl", setFileUrl());
- modelMap.put("approvalList", approvalService.getApprovalList(entity.getId(), Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY, Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY_APPROVE_STATUS));
- return "/admin/government/industrial_land_supply/distribute_summary";
- }
- @OperationLog(value = "分发汇总")
- @RequestMapping("/distribute_summary")
- @ResponseBody
- public ResponseMessage distributeSummary(IndustrialLandSupplyDetail industrialLandSupplyDetail) {
- try {
- if (IsTooFrequently()) {
- return ResponseMessage.error("操作过于频繁,请稍后再试!");
- }
- industrialLandSupplyDetailService.distributeSummary(industrialLandSupplyDetail);
- } catch (Exception e) {
- e.printStackTrace();
- return ResponseMessage.error("保存失败!");
- }
- return ResponseMessage.success("保存成功!");
- }
- @OperationLog(value = "跳转供地审核")
- @RequestMapping("/land_approve/{id}")
- public String landApprovePage(@PathVariable("id") String id, ModelMap modelMap) throws Exception {
- log.info("跳转供地审核");
- IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectById(id + "");
- modelMap.put("data", entity);
- modelMap.put("fileUrl", setFileUrl());
- modelMap.put("approvalList", approvalService.getApprovalList(entity.getId(), Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY, Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY_APPROVE_STATUS));
- return "/admin/government/industrial_land_supply/land_approve";
- }
- @OperationLog(value = "跳转行政反馈")
- @RequestMapping("/xingzheng_feedback/{id}")
- public String gsFeedbackPage(@PathVariable("id") String id, ModelMap modelMap) throws Exception {
- log.info("跳转行政反馈");
- IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectById(id + "");
- modelMap.put("data", entity);
- modelMap.put("fileUrl", setFileUrl());
- modelMap.put("approvalList", approvalService.getApprovalList(entity.getId(), Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY, Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY_APPROVE_STATUS));
- return "/admin/government/industrial_land_supply/xingzheng_feedback";
- }
- @OperationLog(value = "行政反馈")
- @RequestMapping("/xingzheng_feedback")
- @ResponseBody
- public ResponseMessage gsFeedbackPage(IndustrialLandSupplyDetail industrialLandSupplyDetail) {
- try {
- if (IsTooFrequently()) {
- return ResponseMessage.error("操作过于频繁,请稍后再试!");
- }
- industrialLandSupplyDetailService.gsFeedback(industrialLandSupplyDetail);
- } catch (Exception e) {
- e.printStackTrace();
- return ResponseMessage.error("保存失败!");
- }
- return ResponseMessage.success("保存成功!");
- }
- @OperationLog(value = "跳转行政反馈")
- @RequestMapping("/xingzheng_feedback_view/{id}")
- public String gsFeedbackViewPage(@PathVariable("id") String id, ModelMap modelMap) throws Exception {
- log.info("跳转行政反馈");
- IndustrialLandSupplyDetail entity = industrialLandSupplyDetailService.selectById(id + "");
- modelMap.put("data", entity);
- modelMap.put("fileUrl", setFileUrl());
- modelMap.put("approvalList", approvalService.getApprovalList(entity.getId(), Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY, Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY_APPROVE_STATUS));
- return "/admin/government/industrial_land_supply/xingzheng_feedback_view";
- }
- //导出会签单
- @RequestMapping("/management_committee_leader_export/{id}")
- public void managementCommitteeLeaderExport(@PathVariable("id") int id, HttpServletResponse response) throws Exception {
- industrialLandSupplyDetailService.exportCountersignWord2(id, response);
- }
- // @RequestMapping("/management_committee_leader_export/{id}")
- // public void managementCommitteeLeaderExport(@PathVariable("id") String id, HttpServletResponse response) throws IOException {
- //
- // ExportWord ew = new ExportWord();
- // XWPFDocument document = ew.createXWPFDocument(10, 6);
- // List<List<Object>> list = new ArrayList<List<Object>>();
- //
- // List<Object> tempList = new ArrayList<Object>();
- // tempList.add("姓名");
- // tempList.add("黄xx");
- // tempList.add("性别");
- // tempList.add("男");
- // tempList.add("出生日期");
- // tempList.add("2018-10-10");
- // list.add(tempList);
- // tempList = new ArrayList<Object>();
- // tempList.add("身份证号");
- // tempList.add("36073xxxxxxxxxxx");
- // list.add(tempList);
- // tempList = new ArrayList<Object>();
- // tempList.add("出生地");
- // tempList.add("江西");
- // tempList.add("名族");
- // tempList.add("汉");
- // tempList.add("婚否");
- // tempList.add("否");
- // list.add(tempList);
- // tempList = new ArrayList<Object>();
- // tempList.add("既往病史");
- // tempList.add("无");
- // list.add(tempList);
- //
- // Map<String, Object> dataList = new HashMap<String, Object>();
- // dataList.put("TITLE", "个人体检表");
- // dataList.put("TABLEDATA", list);
- //
- // response.reset();
- // response.setContentType("application/octet-stream; charset=utf-8");
- // response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode("word测试.docx", "UTF-8"));
- //
- // ew.exportCheckWord(dataList, document, response);
- // System.out.println("文档生成成功");
- // }
- @OperationLog(value = "跳转配置页面")
- @RequestMapping("/config")
- public String config(ModelMap modelMap) {
- log.info("跳转配置页面");
- List<IndustrialLandSupplyConfig> industrialLandSupplyConfigList = industrialLandSupplyConfigService.findAll();
- modelMap.put("list", industrialLandSupplyConfigList);
- return "/admin/government/industrial_land_supply/config";
- }
- @OperationLog(value = "新增产业供地")
- @RequestMapping("/config/save")
- @ResponseBody
- public ResponseMessage configSave(IndustrialLandSupplyConfigListDto industrialLandSupplyConfigListDto) {
- try {
- industrialLandSupplyConfigService.saveConfigList(industrialLandSupplyConfigListDto.getConfigList());
- } catch (Exception e) {
- e.printStackTrace();
- return ResponseMessage.error("保存失败!");
- }
- return ResponseMessage.success("保存成功!");
- }
- /**
- * 由于Spring在接受前台传入的List时,就会出现256的IndexOutOfBoundsException异常
- * 设置setAutoGrowCollectionLimit为1024
- *
- * @param binder
- * @see [类、类#方法、类#成员]
- */
- @InitBinder
- public void initListBinder(WebDataBinder binder) {
- // 设置需要包裹的元素个数,默认为256
- binder.setAutoGrowCollectionLimit(3000);
- }
- }
|