Merge remote-tracking branch 'origin/SecondStage' into SecondStage
This commit is contained in:
+5
-1
@@ -234,4 +234,8 @@ create table process_standard_solicit_opinions_user
|
||||
|
||||
alter table process_standard_solicit_opinions_user
|
||||
comment '标准征求意见流程关联用户';
|
||||
|
||||
-- 企标计划-计划状态
|
||||
INSERT INTO sys_dict (id, dict_name, dict_code, description, del_flag, create_by, create_time, is_tag_dict, is_read_only) VALUES ('1836301517254893569', '企标计划-计划状态', 'esp_plan_status', '新增:新增计划入库 延期:初稿完成日期和计划归档日期延期 取消:计划取消 如走到初稿、征求意见流程了,计划不允许取消', 0, 'cheryrsm', '2024-09-18 15:09:33', 0, 0);
|
||||
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, `status`, create_by, create_time, is_tag_dict, is_read_only, del_flag) VALUES ('1836301610292944898', '1836301517254893569', '新增', '1', '', 1, 1, 'cheryrsm', '2024-09-18 15:09:55', 0, 0, 0);
|
||||
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, `status`, create_by, create_time, is_tag_dict, is_read_only, del_flag) VALUES ('1836301637493006338', '1836301517254893569', '延期', '2', '', 2, 1, 'cheryrsm', '2024-09-18 15:10:01', 0, 0, 0);
|
||||
INSERT INTO sys_dict_item (id, dict_id, item_text, item_value, description, sort_order, `status`, create_by, create_time, is_tag_dict, is_read_only, del_flag) VALUES ('1836301659982864385', '1836301517254893569', '取消', '3', '', 3, 1, 'cheryrsm', '2024-09-18 15:10:07', 0, 0, 0);
|
||||
+2
-2
@@ -2,6 +2,7 @@ package com.jero.modules.laws.club.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.aspect.annotation.Translation;
|
||||
import com.jero.modules.laws.club.service.ILawsClubJoinTeamService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -34,7 +35,6 @@ public class LawsClubJoinTeamController {
|
||||
@AutoLog(value = "社团管理-入团信息表-模板下载")
|
||||
@ApiOperation(value="社团管理-入团信息表-模板下载", notes="社团管理-入团信息表-模板下载")
|
||||
@GetMapping(value = "/exportTemplate")
|
||||
// @RequiresPermissions("clubManagement:clubManagement:templateDownload")
|
||||
public void exportTemplate(HttpServletRequest request, HttpServletResponse response) {
|
||||
lawsClubJoinTeamService.exportTemplate(request,response);
|
||||
}
|
||||
@@ -45,7 +45,7 @@ public class LawsClubJoinTeamController {
|
||||
@AutoLog(value = "社团管理-入团信息表-导入")
|
||||
@ApiOperation(value="社团管理-入团信息表-导入", notes="社团管理-入团信息表-导入")
|
||||
@PostMapping(value = "/importExcel")
|
||||
// @RequiresPermissions("clubManagement:clubManagement:import")
|
||||
@Translation
|
||||
public Result<?> excelimport(HttpServletRequest request) {
|
||||
return lawsClubJoinTeamService.importExcel(request);
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,6 +2,7 @@ package com.jero.modules.laws.club.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.aspect.annotation.Translation;
|
||||
import com.jero.modules.laws.club.service.ILawsClubMeetingService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -37,7 +38,6 @@ public class LawsClubMeetingController {
|
||||
@AutoLog(value = "社团管理-参会信息表-模板下载")
|
||||
@ApiOperation(value="社团管理-参会信息表-模板下载", notes="社团管理-参会信息表-模板下载")
|
||||
@GetMapping(value = "/exportTemplate")
|
||||
// @RequiresPermissions("clubManagement:clubManagement:templateDownload")
|
||||
public void exportTemplate(HttpServletRequest request, HttpServletResponse response) {
|
||||
lawsClubMeetingService.exportTemplate(request,response);
|
||||
}
|
||||
@@ -48,7 +48,7 @@ public class LawsClubMeetingController {
|
||||
@AutoLog(value = "社团管理-参会信息表-导入")
|
||||
@ApiOperation(value="社团管理-参会信息表-导入", notes="社团管理-参会信息表-导入")
|
||||
@PostMapping(value = "/importExcel")
|
||||
// @RequiresPermissions("clubManagement:clubManagement:import")
|
||||
@Translation
|
||||
public Result<?> excelimport(HttpServletRequest request) {
|
||||
return lawsClubMeetingService.importExcel(request);
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,6 +2,7 @@ package com.jero.modules.laws.club.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.aspect.annotation.Translation;
|
||||
import com.jero.modules.laws.club.service.ILawsClubResearchInformationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -37,7 +38,6 @@ public class LawsClubResearchInformationController {
|
||||
@AutoLog(value = "社团管理-征集调研信息表-模板下载")
|
||||
@ApiOperation(value="社团管理-征集调研信息表-模板下载", notes="社团管理-征集调研信息表-模板下载")
|
||||
@GetMapping(value = "/exportTemplate")
|
||||
// @RequiresPermissions("clubManagement:clubManagement:templateDownload")
|
||||
public void exportTemplate(HttpServletRequest request, HttpServletResponse response) {
|
||||
lawsClubResearchInformationService.exportTemplate(request,response);
|
||||
}
|
||||
@@ -48,7 +48,7 @@ public class LawsClubResearchInformationController {
|
||||
@AutoLog(value = "社团管理-征集调研信息表-导入")
|
||||
@ApiOperation(value="社团管理-征集调研信息表-导入", notes="社团管理-征集调研信息表-导入")
|
||||
@PostMapping(value = "/importExcel")
|
||||
// @RequiresPermissions("clubManagement:clubManagement:import")
|
||||
@Translation
|
||||
public Result<?> excelimport(HttpServletRequest request) {
|
||||
return lawsClubResearchInformationService.importExcel(request);
|
||||
}
|
||||
|
||||
+22
-4
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.laws.club.entity.LawsClubJoinTeam;
|
||||
import com.jero.modules.laws.club.mapper.LawsClubJoinTeamMapper;
|
||||
import com.jero.modules.laws.club.service.ILawsClubJoinTeamService;
|
||||
@@ -19,6 +20,7 @@ import com.jero.modules.tag.entity.LawsTag;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -33,11 +35,10 @@ import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -87,6 +88,8 @@ public class LawsClubJoinTeamServiceImpl extends ServiceImpl<LawsClubJoinTeamMap
|
||||
|
||||
@Override
|
||||
public Result<?> importExcel(HttpServletRequest request) {
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
System.out.println(loginUser);
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
List<LawsClubJoinTeam> lawsClubJoinTeamList = new ArrayList<>();
|
||||
@@ -108,6 +111,7 @@ public class LawsClubJoinTeamServiceImpl extends ServiceImpl<LawsClubJoinTeamMap
|
||||
for (LawsClubJoinTeamExcel lawsClubJoinTeamExcel : excelList) {
|
||||
LawsClubJoinTeam lawsClubJoinTeam = new LawsClubJoinTeam();
|
||||
BeanUtils.copyProperties(lawsClubJoinTeamExcel, lawsClubJoinTeam);
|
||||
lawsClubJoinTeam.setJoinDate(convertStringToDate(lawsClubJoinTeamExcel.getJoinDate()));
|
||||
lawsClubJoinTeamList.add(lawsClubJoinTeam);
|
||||
}
|
||||
}catch (Exception e) {
|
||||
@@ -184,6 +188,20 @@ public class LawsClubJoinTeamServiceImpl extends ServiceImpl<LawsClubJoinTeamMap
|
||||
return msg;
|
||||
}
|
||||
|
||||
private Date convertStringToDate(String dateStr) {
|
||||
if (StringUtils.isBlank(dateStr)) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date date = simpleDateFormat.parse(dateStr);
|
||||
return date;
|
||||
}catch (Exception e) {
|
||||
log.error("日期转换异常");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// 错误消息格式化
|
||||
private String getErrorMsg(int rowIndex, String errorMsg) {
|
||||
return "第" + (rowIndex + 4) + "行" + errorMsg;
|
||||
|
||||
+18
-4
@@ -36,11 +36,9 @@ import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -121,6 +119,8 @@ public class LawsClubMeetingServiceImpl extends ServiceImpl<LawsClubMeetingMappe
|
||||
for (LawsClubMeetingExcel lawsClubMeetingExcel : meetingExcels) {
|
||||
LawsClubMeeting lawsClubMeeting = new LawsClubMeeting();
|
||||
BeanUtils.copyProperties(lawsClubMeetingExcel, lawsClubMeeting);
|
||||
lawsClubMeeting.setMeetingDate(convertStringToDate(lawsClubMeetingExcel.getMeetingDate()));
|
||||
lawsClubMeeting.setPlanCompletionDate(convertStringToDate(lawsClubMeetingExcel.getPlanCompletionDate()));
|
||||
lawsClubMeetingList.add(lawsClubMeeting);
|
||||
}
|
||||
}catch (Exception e) {
|
||||
@@ -368,4 +368,18 @@ public class LawsClubMeetingServiceImpl extends ServiceImpl<LawsClubMeetingMappe
|
||||
).anyMatch(value -> value != null && !value.isEmpty());
|
||||
}
|
||||
|
||||
private Date convertStringToDate(String dateStr) {
|
||||
if (StringUtils.isBlank(dateStr)) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date date = simpleDateFormat.parse(dateStr);
|
||||
return date;
|
||||
}catch (Exception e) {
|
||||
log.error("日期转换异常");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+19
-4
@@ -14,6 +14,7 @@ import com.jero.modules.system.entity.SysDepart;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysDepartService;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.service.ISysRolePermissionService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.tag.entity.LawsTag;
|
||||
import lombok.SneakyThrows;
|
||||
@@ -33,11 +34,9 @@ import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -110,6 +109,8 @@ public class LawsClubResearchInformationServiceImpl extends ServiceImpl<LawsClub
|
||||
for (LawsClubResearchInformationExcel lawsClubResearchInformationExcel : excelList) {
|
||||
LawsClubResearchInformation lawsClubResearchInformation = new LawsClubResearchInformation();
|
||||
BeanUtils.copyProperties(lawsClubResearchInformationExcel, lawsClubResearchInformation);
|
||||
lawsClubResearchInformation.setReceiveDate(convertStringToDate(lawsClubResearchInformationExcel.getReceiveDate()));
|
||||
lawsClubResearchInformation.setDeadlineDate(convertStringToDate(lawsClubResearchInformationExcel.getDeadlineDate()));
|
||||
lawsClubResearchInformationList.add(lawsClubResearchInformation);
|
||||
}
|
||||
}catch (Exception e) {
|
||||
@@ -240,4 +241,18 @@ public class LawsClubResearchInformationServiceImpl extends ServiceImpl<LawsClub
|
||||
}
|
||||
return notifierId; // 如果没有括号,则返回整个字符串
|
||||
}
|
||||
|
||||
private Date convertStringToDate(String dateStr) {
|
||||
if (StringUtils.isBlank(dateStr)) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date date = simpleDateFormat.parse(dateStr);
|
||||
return date;
|
||||
}catch (Exception e) {
|
||||
log.error("日期转换异常");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+61
-80
@@ -1,17 +1,15 @@
|
||||
package com.jero.modules.laws.enterprise.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.api.vo.ResultCommon;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.aspect.annotation.Translation;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.util.MessageUtils;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardPlan;
|
||||
import com.jero.modules.laws.enterprise.entity.dto.ESPlanQueryDTO;
|
||||
import com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardPlanVo;
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardPlanService;
|
||||
import com.jero.modules.system.vo.IdMapBody;
|
||||
@@ -22,101 +20,84 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 企标计划
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-12
|
||||
* @Date: 2022-02-12
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@ApiSupport(order = 505)
|
||||
@Api(tags="企标计划")
|
||||
@Api(tags = "企标计划")
|
||||
@RestController
|
||||
@RequestMapping("/enterprise/plan")
|
||||
@Slf4j
|
||||
public class EnterpriseStandardPlanController extends JeroController<EnterpriseStandardPlan, EnterpriseStandardPlanService> {
|
||||
|
||||
@Resource
|
||||
private EnterpriseStandardPlanService esPlanService;
|
||||
@Resource
|
||||
private EnterpriseStandardPlanService esPlanService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("enterpriseStandardLibrary:plan:search")
|
||||
@AutoLog(value = "企标计划-分页列表查询")
|
||||
@ApiOperation(value="企标计划-分页列表查询", notes="企标计划-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
@ApiOperationSupport(order = 1)
|
||||
public Result<?> queryPageList(ESPlanQueryDTO esPlanQueryDTO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") @ApiParam("页码") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") @ApiParam("页面显示数量") Integer pageSize) {
|
||||
IPage<EnterpriseStandardPlanVo> pageList= esPlanService.queryPageList(esPlanQueryDTO, pageNo, pageSize);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("enterpriseStandardLibrary:plan:search")
|
||||
@AutoLog(value = "企标计划-分页列表查询")
|
||||
@ApiOperation(value = "企标计划-分页列表查询", notes = "企标计划-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(EnterpriseStandardPlan enterpriseStandardPlan,
|
||||
HttpServletRequest req,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") @ApiParam("页码") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") @ApiParam("页面显示数量") Integer pageSize) {
|
||||
IPage<EnterpriseStandardPlan> page = new Page<>(pageNo, pageSize);
|
||||
IPage<EnterpriseStandardPlanVo> pageList = esPlanService.queryPageList(enterpriseStandardPlan, req, page);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企标详情
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("enterpriseStandardLibrary:plan:detail")
|
||||
@AutoLog(value = "企标计划-企标详情")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@ApiOperation(value="企标计划-企标详情", notes="企标计划-企标详情")
|
||||
@GetMapping(value = "/detail")
|
||||
@Translation
|
||||
public Result<?> getDetailById(@RequestParam("id") @ApiParam("企标计划ID") String planId) {
|
||||
EnterpriseStandardPlan detail = esPlanService.getDetailById(planId);
|
||||
return Result.OK(detail);
|
||||
}
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("enterpriseStandardLibrary:plan:delete")
|
||||
@AutoLog(value = "企标计划-通过id删除")
|
||||
@ApiOperation(value = "企标计划-通过id删除", notes = "企标计划-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<T> deleteEN(@RequestBody IdMapBody map) {
|
||||
if (map.getId() == null || org.apache.commons.lang.StringUtils.isEmpty(map.getId())) {
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.PARAMETERS_CANNOT_BE_NULL));
|
||||
}
|
||||
String id = map.getId();
|
||||
EnterpriseStandardPlan esPlan = esPlanService.getById(id);
|
||||
if (esPlan == null) {
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.NO_CORRESPONDING_RECORD_FOUND));
|
||||
} else {
|
||||
esPlanService.deleteById(id);
|
||||
}
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("enterpriseStandardLibrary:plan:delete")
|
||||
@AutoLog(value = "企标计划-通过id删除")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@ApiOperation(value = "企标计划-通过id删除", notes = "企标计划-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<T> deleteEN(@RequestBody IdMapBody map) {
|
||||
if(map.getId() == null || org.apache.commons.lang.StringUtils.isEmpty(map.getId())){
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.PARAMETERS_CANNOT_BE_NULL));
|
||||
}
|
||||
String id = map.getId();
|
||||
EnterpriseStandardPlan esPlan = esPlanService.getById(id);
|
||||
if (esPlan == null) {
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.NO_CORRESPONDING_RECORD_FOUND));
|
||||
} else {
|
||||
esPlanService.deleteById(id);
|
||||
}
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
}
|
||||
@RequiresPermissions("enterpriseStandardLibrary:plan:export")
|
||||
@AutoLog(value = "企标计划-导出")
|
||||
@ApiOperation(value = "企标计划-导出", notes = "企标计划-导出")
|
||||
@GetMapping("/exportData")
|
||||
public ModelAndView exportData(HttpServletResponse response,
|
||||
HttpServletRequest req,
|
||||
EnterpriseStandardPlan enterpriseStandardPlan) {
|
||||
IPage<EnterpriseStandardPlan> page = new Page<>(-1, -1);
|
||||
IPage<EnterpriseStandardPlanVo> pageList = esPlanService.queryPageList(enterpriseStandardPlan, req, page);
|
||||
// 获取数据
|
||||
List<EnterpriseStandardPlanVo> records = pageList.getRecords();
|
||||
|
||||
@RequiresPermissions("enterpriseStandardLibrary:plan:export")
|
||||
@AutoLog(value = "企标计划-导出")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@ApiOperation(value="企标计划-导出", notes="企标计划-导出")
|
||||
@GetMapping("/exportData")
|
||||
public void exportData(HttpServletResponse response, ESPlanQueryDTO esPlanQueryDTO) {
|
||||
esPlanService.export(response, esPlanQueryDTO, "企标计划", "企标计划");
|
||||
}
|
||||
|
||||
@AutoLog(value = "企标计划-年度制修订计划导入")
|
||||
@ApiOperation(value="企标计划-年度制修订计划导入", notes="企标计划-年度制修订计划导入")
|
||||
@PostMapping("importAnnualRevisionPlan")
|
||||
public void importAnnualRevisionPlan(@RequestParam("file") @ApiParam("文件") MultipartFile file,
|
||||
HttpServletResponse response) throws IOException {
|
||||
esPlanService.importAnnualRevisionPlan(file, response);
|
||||
}
|
||||
return super.exportListXls(records, EnterpriseStandardPlanVo.class, "企标计划");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+123
-189
@@ -8,209 +8,143 @@ import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 企业标准计划
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-09-06
|
||||
* @Version: V1.0
|
||||
* 企标计划
|
||||
*
|
||||
* @author liJiaRao
|
||||
* @date 2024-09-18 14:02
|
||||
*/
|
||||
@ApiModel(description = "企标计划")
|
||||
@Data
|
||||
@TableName("laws_enterprise_standard_plan")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="laws_enterprise_standard_plan对象", description="企业标准计划")
|
||||
public class EnterpriseStandardPlan implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3481395197951946830L;
|
||||
|
||||
@TableName(value = "laws_enterprise_standard_plan")
|
||||
public class EnterpriseStandardPlan {
|
||||
private static final long serialVersionUID = 725599337348109386L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String orgCode;
|
||||
|
||||
@ApiModelProperty(value = "0表示未删除,1表示删除")
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 制修订类别
|
||||
*/
|
||||
@Dict(dicCode = "esp_revision_type")
|
||||
@ApiModelProperty(value = "申请类别")
|
||||
private String applicationCategory;
|
||||
|
||||
@ApiModelProperty(value = "制修订类别")
|
||||
private String revisionType;
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
@Dict(dicCode = "esp_project_type")
|
||||
@ApiModelProperty(value = "项目类型")
|
||||
private String projectType;
|
||||
|
||||
@ApiModelProperty(value = "原企标编号")
|
||||
private String originEnStandardNo;
|
||||
|
||||
@ApiModelProperty(value = "新企标编号")
|
||||
private String newEnStandardNo;
|
||||
|
||||
@ApiModelProperty(value = "原企标名称")
|
||||
private String originEnStandardName;
|
||||
|
||||
@ApiModelProperty(value = "新企标名称")
|
||||
private String newEnStandardName;
|
||||
|
||||
@ApiModelProperty(value = "企标英文名称")
|
||||
private String enStandardEnglishName;
|
||||
|
||||
@Dict(dictTable = "laws_tree_node", dicCode = "id", dicText = "node_name")
|
||||
@ApiModelProperty(value = "企标体系")
|
||||
private String enStandardSystem;
|
||||
|
||||
@ApiModelProperty(value = "企业标准代号")
|
||||
private String enStandardCode;
|
||||
|
||||
@ApiModelProperty(value = "企业名称代号")
|
||||
private String enNameCode;
|
||||
|
||||
@ApiModelProperty(value = "标准类别代号")
|
||||
private String standardCategoryCode;
|
||||
|
||||
@ApiModelProperty(value = "年代号")
|
||||
private String decadeCode;
|
||||
|
||||
@Dict(dicCode = "esp_standard_type")
|
||||
@ApiModelProperty(value = "标准类型")
|
||||
private String standardType;
|
||||
|
||||
@ApiModelProperty(value = "企标等级分类")
|
||||
private String enStandardClassification;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "草稿计划完成日期")
|
||||
private Date draftPlannedCompleteDate;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "征求意见稿计划完成日期")
|
||||
private Date solicitationDraftPlanCompleteDate;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "计划报批日期")
|
||||
private Date planApprovalDate;
|
||||
|
||||
/**
|
||||
* 标准id
|
||||
*/
|
||||
@ApiModelProperty(value = "标准id")
|
||||
private String standardId;
|
||||
/**
|
||||
* 标准编号
|
||||
*/
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
private String standardNumber;
|
||||
/**
|
||||
* 标准名称
|
||||
*/
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
private String standardName;
|
||||
/**
|
||||
* 起草人
|
||||
*/
|
||||
@ApiModelProperty(value = "起草人")
|
||||
private String mainDraftingUser;
|
||||
/**
|
||||
* 专业模块
|
||||
*/
|
||||
@Dict(dicCode = "professional_module")
|
||||
@ApiModelProperty(value = "专业模块")
|
||||
private String professionalModule;
|
||||
/**
|
||||
* 初稿完成日期
|
||||
*/
|
||||
@ApiModelProperty(value = "初稿完成日期")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date draftCompleteDate;
|
||||
/**
|
||||
* 计划归档日期
|
||||
*/
|
||||
@ApiModelProperty(value = "计划归档日期")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date planArchivingDate;
|
||||
/**
|
||||
* 是否有英文版
|
||||
*/
|
||||
@Dict(dicCode = "yn")
|
||||
@ApiModelProperty(value = "是否有英文版")
|
||||
private String haveEnglishVersion;
|
||||
/**
|
||||
* 所属技术委员会
|
||||
*/
|
||||
@ApiModelProperty(value = "所属技术委员会")
|
||||
private String committee;
|
||||
/**
|
||||
* 实际归档日期
|
||||
*/
|
||||
@ApiModelProperty(value = "实际归档日期")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date actualArchivingDate;
|
||||
/**
|
||||
* 项目状态
|
||||
*/
|
||||
@Dict(dicCode = "esp_project_status")
|
||||
|
||||
@ApiModelProperty(value = "项目状态")
|
||||
private String projectStatus;
|
||||
/**
|
||||
* 计划状态
|
||||
*/
|
||||
@Dict(dicCode = "esp_plan_status")
|
||||
@ApiModelProperty(value = "计划状态")
|
||||
private String planStatus;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String orgCode;
|
||||
/**
|
||||
* 删除状态(0-正常,1-删除)
|
||||
*/
|
||||
@ApiModelProperty(value = "删除状态(0-正常,1-删除)")
|
||||
private Integer delFlag;
|
||||
|
||||
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
||||
@ApiModelProperty(value = "编制说明")
|
||||
private String compilationDescription;
|
||||
|
||||
@ApiModelProperty(value = "零部件名称")
|
||||
private String componentName;
|
||||
|
||||
@ApiModelProperty(value = "授权部门")
|
||||
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
private String authDept;
|
||||
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname")
|
||||
@ApiModelProperty(value = "主起草人")
|
||||
private String mainDraftingUser;
|
||||
|
||||
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
@ApiModelProperty(value = "主起草单位")
|
||||
private String mainDraftingUnit;
|
||||
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname")
|
||||
@ApiModelProperty(value = "主起草单位责任人")
|
||||
private String mainDraftingUnitResponsiblePerson;
|
||||
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname")
|
||||
@ApiModelProperty(value = "标准推进人")
|
||||
private String standardPromoter;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "草稿完成日期")
|
||||
private Date draftCompletionDate;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "提交草稿日期")
|
||||
private Date draftSubmissionDate;
|
||||
|
||||
@Dict(dicCode = "yn")
|
||||
@ApiModelProperty(value = "是否征求意见")
|
||||
private String solicitationOpinionEnabled;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "征求意见稿完成日期")
|
||||
private Date solicitationDraftCompletionDate;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "评审日期")
|
||||
private Date reviewDate;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "报批日期")
|
||||
private Date approvalDate;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "发布日期")
|
||||
private Date releaseDate;
|
||||
|
||||
@Dict(dicCode = "esp_change_status")
|
||||
@ApiModelProperty(value = "变更状态")
|
||||
private String changeStatus;
|
||||
|
||||
@ApiModelProperty(value = "立项背景、立项依据")
|
||||
private String projectBackground;
|
||||
|
||||
@ApiModelProperty(value = "国际、国家及行业同类标准分析")
|
||||
private String similarNaStandardsAnalysis;
|
||||
|
||||
@ApiModelProperty(value = "企业同类标准对比分析")
|
||||
private String similarEnStandardsAnalysis;
|
||||
|
||||
@ApiModelProperty(value = "立项标准的领先性与必要性")
|
||||
private String standardLeadingNecessity;
|
||||
|
||||
@ApiModelProperty(value = "立项目的及预期效果等")
|
||||
private String projectExpectedEffects;
|
||||
|
||||
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
||||
@ApiModelProperty(value = "上传附件")
|
||||
private String uploadAttachment;
|
||||
|
||||
@Dict(dicCode = "yn")
|
||||
@ApiModelProperty(value = "是否为优质标准")
|
||||
private String qualityFlag;
|
||||
|
||||
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
@ApiModelProperty(value = "配合单位")
|
||||
private String cooperationUnit;
|
||||
|
||||
}
|
||||
}
|
||||
+65
-113
@@ -25,135 +25,87 @@ public class EnterpriseStandardPlanVo {
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private String id;
|
||||
|
||||
@Excel(name = "制修订类型", width = 15, orderNum = "1", dicCode = "esp_revision_type")
|
||||
@Excel(name = "制修订类别", width = 15, dicCode = "esp_revision_type")
|
||||
@Dict(dicCode = "esp_revision_type")
|
||||
@ApiModelProperty(value = "申请类别(制订/修订,立项/变更)")
|
||||
@ApiModelProperty(value = "制修订类别")
|
||||
private String applicationCategory;
|
||||
|
||||
@Excel(name = "原企标编号", width = 15, orderNum = "1")
|
||||
@ApiModelProperty(value = "原企标编号")
|
||||
private String originEnStandardNo;
|
||||
@Excel(name = "标准编号", width = 15)
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
private String standardNumber;
|
||||
|
||||
@Excel(name = "新企标编号", width = 15, orderNum = "1")
|
||||
@ApiModelProperty(value = "新企标编号")
|
||||
private String newEnStandardNo;
|
||||
@Excel(name = "标准名称", width = 15)
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
private String standardName;
|
||||
|
||||
@Excel(name = "原企标名称", width = 15, orderNum = "1")
|
||||
@ApiModelProperty(value = "原企标名称")
|
||||
private String originEnStandardName;
|
||||
|
||||
@Excel(name = "新企标名称", width = 15, orderNum = "1")
|
||||
@ApiModelProperty(value = "新企标名称")
|
||||
private String newEnStandardName;
|
||||
|
||||
@Dict(dicCode = "standard_grade_classify")
|
||||
@ApiModelProperty(value = "企标等级分类")
|
||||
private String enStandardClassification;
|
||||
|
||||
@Excel(name = "授权部门", width = 15, orderNum = "1", dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
@ApiModelProperty(value = "授权部门")
|
||||
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
private String authDept;
|
||||
|
||||
@Excel(name = "企业标准代号", width = 15, orderNum = "1", dicCode = "enterprise_standard_code")
|
||||
@Dict(dicCode = "enterprise_standard_code")
|
||||
@ApiModelProperty(value = "企业标准代号")
|
||||
private String enStandardCode;
|
||||
|
||||
@Excel(name = "配合单位", width = 15, orderNum = "1", dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
@ApiModelProperty(value = "配合单位")
|
||||
private String cooperationUnit;
|
||||
|
||||
@Excel(name = "主起草人", width = 15, orderNum = "1", dictTable = "sys_user", dicCode = "id", dicText = "CONCAT(realname, '(', username, ')')")
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname")
|
||||
@ApiModelProperty(value = "主起草人")
|
||||
@Excel(name = "起草人", width = 15)
|
||||
@ApiModelProperty(value = "起草人")
|
||||
private String mainDraftingUser;
|
||||
|
||||
@Excel(name = "主起草单位", width = 15, orderNum = "1", dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
@ApiModelProperty(value = "主起草单位")
|
||||
private String mainDraftingUnit;
|
||||
@Excel(name = "邮箱", width = 15)
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String mail;
|
||||
|
||||
@Excel(name = "所在部门", width = 15)
|
||||
@ApiModelProperty(value = "所在部门")
|
||||
private String depart;
|
||||
|
||||
@Excel(name = "主起草单位责任人", width = 15, orderNum = "1", dictTable = "sys_user", dicCode = "id", dicText = "CONCAT(realname, '(', username, ')')")
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname")
|
||||
@ApiModelProperty(value = "主起草单位责任人")
|
||||
private String mainDraftingUnitResponsiblePerson;
|
||||
|
||||
@Excel(name = "标准推进人", width = 15, orderNum = "1", dictTable = "sys_user", dicCode = "id", dicText = "CONCAT(realname, '(', username, ')')")
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname")
|
||||
@ApiModelProperty(value = "标准推进人")
|
||||
private String standardPromoter;
|
||||
|
||||
@Excel(name = "草稿计划完成日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||
/**
|
||||
* 专业模块
|
||||
*/
|
||||
@Dict(dicCode = "professional_module")
|
||||
@Excel(name = "专业模块", dicCode = "professional_module")
|
||||
@ApiModelProperty(value = "专业模块")
|
||||
private String professionalModule;
|
||||
/**
|
||||
* 初稿完成日期
|
||||
*/
|
||||
@Excel(name = "初稿完成日期", format = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "初稿完成日期")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "草稿计划完成日期")
|
||||
private Date draftPlannedCompleteDate;
|
||||
|
||||
@Excel(name = "征求意见稿计划完成日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||
private Date draftCompleteDate;
|
||||
/**
|
||||
* 计划归档日期
|
||||
*/
|
||||
@Excel(name = "计划归档日期", format = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "计划归档日期")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "征求意见稿计划完成日期")
|
||||
private Date solicitationDraftPlanCompleteDate;
|
||||
|
||||
@Excel(name = "计划报批日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "计划报批日期")
|
||||
private Date planApprovalDate;
|
||||
|
||||
@Excel(name = "草稿完成日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "草稿完成日期")
|
||||
private Date draftCompletionDate;
|
||||
|
||||
@Excel(name = "提交草稿日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "提交草稿日期")
|
||||
private Date draftSubmissionDate;
|
||||
|
||||
@Excel(name = "是否征求意见", width = 15, orderNum = "1", dicCode = "yn")
|
||||
private Date planArchivingDate;
|
||||
/**
|
||||
* 是否有英文版
|
||||
*/
|
||||
@Dict(dicCode = "yn")
|
||||
@ApiModelProperty(value = "是否征求意见")
|
||||
private String solicitationOpinionEnabled;
|
||||
|
||||
@Excel(name = "征求意见稿完成日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||
@Excel(name = "是否有英文版", dicCode = "yn")
|
||||
@ApiModelProperty(value = "是否有英文版")
|
||||
private String haveEnglishVersion;
|
||||
/**
|
||||
* 所属技术委员会
|
||||
*/
|
||||
@Excel(name = "所属技术委员会")
|
||||
@ApiModelProperty(value = "所属技术委员会")
|
||||
private String committee;
|
||||
/**
|
||||
* 实际归档日期
|
||||
*/
|
||||
@Excel(name = "实际归档日期", format = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "实际归档日期")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "征求意见稿完成日期")
|
||||
private Date solicitationDraftCompletionDate;
|
||||
|
||||
@Excel(name = "评审日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "评审日期")
|
||||
private Date reviewDate;
|
||||
|
||||
@Excel(name = "报批日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "报批日期")
|
||||
private Date approvalDate;
|
||||
|
||||
@Excel(name = "发布日期", width = 15, orderNum = "1", format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "发布日期")
|
||||
private Date releaseDate;
|
||||
|
||||
@Excel(name = "项目状态", width = 15, orderNum = "1", dicCode = "esp_project_status")
|
||||
private Date actualArchivingDate;
|
||||
/**
|
||||
* 项目状态
|
||||
*/
|
||||
@Dict(dicCode = "esp_project_status")
|
||||
@Excel(name = "项目状态", dicCode = "esp_project_status")
|
||||
@ApiModelProperty(value = "项目状态")
|
||||
private String projectStatus;
|
||||
|
||||
@Excel(name = "变更状态", width = 15, orderNum = "1", dicCode = "esp_change_status")
|
||||
@Dict(dicCode = "esp_change_status")
|
||||
@ApiModelProperty(value = "变更状态")
|
||||
private String changeStatus;
|
||||
|
||||
@ApiModelProperty(value = "是否可以删除")
|
||||
private boolean allowDel;
|
||||
/**
|
||||
* 计划状态
|
||||
*/
|
||||
@Dict(dicCode = "esp_plan_status")
|
||||
@Excel(name = "计划状态", dicCode = "esp_plan_status")
|
||||
@ApiModelProperty(value = "计划状态")
|
||||
private String planStatus;
|
||||
}
|
||||
|
||||
+2
-38
@@ -5,10 +5,9 @@ import com.jero.modules.laws.enterprise.entity.dto.ESPlanQueryDTO;
|
||||
import com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardPlanVo;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardPlan;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author ThinkBook
|
||||
@@ -19,12 +18,8 @@ public interface EnterpriseStandardPlanService extends IService<EnterpriseStanda
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param esPlan
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
IPage<EnterpriseStandardPlanVo> queryPageList(ESPlanQueryDTO esPlan, Integer pageNo, Integer pageSize);
|
||||
IPage<EnterpriseStandardPlanVo> queryPageList(EnterpriseStandardPlan enterpriseStandardPlan, HttpServletRequest req, IPage<EnterpriseStandardPlan> page);
|
||||
|
||||
/**
|
||||
* 根据Id删除
|
||||
@@ -32,35 +27,4 @@ public interface EnterpriseStandardPlanService extends IService<EnterpriseStanda
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
* @param planId
|
||||
* @return
|
||||
*/
|
||||
EnterpriseStandardPlan getDetailById(String planId);
|
||||
|
||||
/**
|
||||
* 导出
|
||||
* @param response
|
||||
* @param esPlanQueryDTO
|
||||
* @param fileName
|
||||
* @param sheetName
|
||||
*/
|
||||
void export(HttpServletResponse response, ESPlanQueryDTO esPlanQueryDTO, String fileName, String sheetName);
|
||||
|
||||
/**
|
||||
* 立项变更流程中-选择企标计划的列表接口
|
||||
*
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param esPlanQueryDTO
|
||||
* @param projectType
|
||||
* @return
|
||||
*/
|
||||
IPage<EnterpriseStandardPlanVo> getESPList(Integer pageNo, Integer pageSize, ESPlanQueryDTO esPlanQueryDTO, String projectType);
|
||||
|
||||
/**
|
||||
* 年度制修订计划导入
|
||||
*/
|
||||
void importAnnualRevisionPlan(MultipartFile file, HttpServletResponse response) throws IOException;
|
||||
}
|
||||
|
||||
+18
-172
@@ -1,33 +1,28 @@
|
||||
package com.jero.modules.laws.enterprise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.api.CommonAPI;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.activiti.util.ExcelUtils;
|
||||
import com.jero.modules.laws.common.service.ILawsCommonService;
|
||||
import com.jero.modules.laws.common.util.ImportUtil;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardPlan;
|
||||
import com.jero.modules.laws.enterprise.entity.dto.ESPlanQueryDTO;
|
||||
import com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardPlanVo;
|
||||
import com.jero.modules.laws.enterprise.mapper.EnterpriseStandardPlanMapper;
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardPlanService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -58,10 +53,20 @@ public class EnterpriseStandardPlanServiceImpl extends ServiceImpl<EnterpriseSta
|
||||
private EnterpriseStandardPlanMapper esPlanMapper;
|
||||
|
||||
@Override
|
||||
public IPage<EnterpriseStandardPlanVo> queryPageList(ESPlanQueryDTO esPlanQueryDTO, Integer pageNo, Integer pageSize) {
|
||||
IPage<EnterpriseStandardPlanVo> page = new Page<>(pageNo, pageSize);
|
||||
esPlanMapper.page(page, esPlanQueryDTO);
|
||||
return page;
|
||||
public IPage<EnterpriseStandardPlanVo> queryPageList(EnterpriseStandardPlan enterpriseStandardPlan, HttpServletRequest req, IPage<EnterpriseStandardPlan> page) {
|
||||
QueryWrapper<EnterpriseStandardPlan> wrapper = QueryGenerator.initQueryWrapper(enterpriseStandardPlan, req.getParameterMap());
|
||||
IPage<EnterpriseStandardPlan> pageList = this.page(page, wrapper);
|
||||
IPage<EnterpriseStandardPlanVo> pageList1 = new Page<>();
|
||||
BeanUtils.copyProperties(pageList,pageList1);
|
||||
List<EnterpriseStandardPlan> records = pageList.getRecords();
|
||||
List<EnterpriseStandardPlanVo> list = new ArrayList<>();
|
||||
for (EnterpriseStandardPlan record : records) {
|
||||
EnterpriseStandardPlanVo vo = new EnterpriseStandardPlanVo();
|
||||
BeanUtils.copyProperties(record,vo);
|
||||
list.add(vo);
|
||||
}
|
||||
pageList1.setRecords(list);
|
||||
return pageList1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -72,165 +77,6 @@ public class EnterpriseStandardPlanServiceImpl extends ServiceImpl<EnterpriseSta
|
||||
update(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnterpriseStandardPlan getDetailById(String planId) {
|
||||
return esPlanMapper.getDetailById(planId);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<EnterpriseStandardPlanVo> getESPList(Integer pageNo, Integer pageSize, ESPlanQueryDTO esPlanQueryDTO, String projectType) {
|
||||
List<String> projectStatusList = new ArrayList<>();
|
||||
IPage<EnterpriseStandardPlanVo> page = new Page<>(pageNo, pageSize);
|
||||
esPlanMapper.page(page, esPlanQueryDTO);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void export(HttpServletResponse response, ESPlanQueryDTO esPlanQueryDTO, String fileName, String sheetName) {
|
||||
try {
|
||||
// 获取数据
|
||||
IPage<EnterpriseStandardPlanVo> enterpriseStandardPlanVoIPage = this.queryPageList(esPlanQueryDTO, 1, Integer.MAX_VALUE);
|
||||
List<EnterpriseStandardPlanVo> records = enterpriseStandardPlanVoIPage.getRecords();
|
||||
|
||||
// 设置导出参数
|
||||
ExportParams exportParams = new ExportParams(null, sheetName); // 可以为标题添加更多的配置
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, EnterpriseStandardPlanVo.class, records);
|
||||
|
||||
// 设置响应头和内容类型
|
||||
response.setContentType("application/vnd.ms-excel;charset=UTF-8"); // 显式设置字符编码
|
||||
response.setCharacterEncoding("UTF-8"); // 这行确保响应流使用UTF-8编码
|
||||
|
||||
// 处理文件名乱码问题
|
||||
String encodedFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8.name()).replace("+", "%20");
|
||||
response.setHeader("Content-Disposition", "attachment; filename*=UTF-8''" + encodedFileName + ".xls");
|
||||
|
||||
// 写出到响应流
|
||||
workbook.write(response.getOutputStream());
|
||||
workbook.close();
|
||||
} catch (Exception e) {
|
||||
log.error("导出excel异常", e);
|
||||
throw new JeroBootException("导出excel异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<String> getSequenceNumbers(String esCodeDictValue, String esNameCodeDictValue, String categoryCodeDictValue) {
|
||||
// // 已经存在的标准
|
||||
// LambdaQueryWrapper<EnterpriseStandardPlan> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
// lambdaQueryWrapper.eq(EnterpriseStandardPlan::getEnStandardCode, esCodeDictValue);
|
||||
// lambdaQueryWrapper.eq(EnterpriseStandardPlan::getEnNameCode, esNameCodeDictValue);
|
||||
// lambdaQueryWrapper.eq(EnterpriseStandardPlan::getStandardCategoryCode, categoryCodeDictValue);
|
||||
// lambdaQueryWrapper.isNotNull(EnterpriseStandardPlan::getNewEnStandardNo);
|
||||
// List<EnterpriseStandardPlan> espList = this.list(lambdaQueryWrapper);
|
||||
//
|
||||
// return espList.stream().map(EnterpriseStandardPlan::getNewEnStandardNo)
|
||||
// .map(EnterpriseStandardUtil::getSequenceNoFromStandardNo).collect(Collectors.toList());
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void importAnnualRevisionPlan(MultipartFile file, HttpServletResponse response) throws IOException {
|
||||
// log.info("importAnnualRevisionPlan");
|
||||
// log.info("开始导入年度制修订计划表");
|
||||
// List<EnterpriseStandardPlanImport> importErrorList = new ArrayList<>();
|
||||
// @Cleanup
|
||||
// InputStream inputStream = file.getInputStream();
|
||||
// ImportParams params = new ImportParams();
|
||||
// params.setTitleRows(0);
|
||||
// params.setNeedSave(true);
|
||||
// List<EnterpriseStandardPlanImport> importList = new ArrayList<>();
|
||||
// try {
|
||||
// importList = ExcelImportUtil.importExcel(inputStream, EnterpriseStandardPlanImport.class, params);
|
||||
// } catch (Exception e) {
|
||||
// log.error("导入失败: " + e.getMessage());
|
||||
// }
|
||||
// log.info("获取数据成功,总数据条数:{}", importList.size());
|
||||
// String errorInfo = "";
|
||||
// List<SysDictItemCore> listDict = commonAPI.getDictItemAll();
|
||||
// for (EnterpriseStandardPlanImport item : importList) {
|
||||
// if (item.isBlankRow()) {
|
||||
// continue;
|
||||
// }
|
||||
// if (item.isUselessRow()) {
|
||||
// errorInfo = "当前行数据制修订类型既不是制定也不是修订,该行不予导入,不作处理";
|
||||
// log.info(errorInfo);
|
||||
// log.info(item.toString());
|
||||
// item.setErrorInfo(errorInfo);
|
||||
// importErrorList.add(item);
|
||||
// continue;
|
||||
// }
|
||||
// EnterpriseStandardPlan esp = new EnterpriseStandardPlan();
|
||||
// try {
|
||||
//// esp.setApplicationCategory(ESPProjectType.getValueByName(item.getApplicationCategory()));
|
||||
// esp.setOriginEnStandardNo(item.getOriginEnStandardNo());
|
||||
// esp.setNewEnStandardNo(item.getNewEnStandardNo());
|
||||
//// esp.setProjectStatus(ESPProjectStatus.getValueByName(item.getProjectStatus()));
|
||||
//// esp.setChangeStatus(ESPChangeType.getValueByName(item.getChangeStatus()));
|
||||
// esp.setNewEnStandardName(item.getNewEnStandardName());
|
||||
// esp.setEnStandardCode(item.getEnStandardCode());
|
||||
// esp.setEnNameCode(item.getEnNameCode());
|
||||
// esp.setStandardCategoryCode(item.getStandardCategoryCode());
|
||||
// esp.setDecadeCode(item.getNewEnStandardNo().substring(item.getNewEnStandardNo().length() - 4));
|
||||
// esp.setEnStandardSystem(importUtil.convertStandardSystem(item.getEnStandardSystem(), "3"));
|
||||
// esp.setStandardType(excelUtils.translateDictValue("esp_standard_type", item.getStandardType(), listDict));
|
||||
// esp.setEnStandardClassification(item.getEnStandardClassification());
|
||||
// esp.setDraftPlannedCompleteDate(importUtil.convertDate(item.getDraftPlannedCompleteDate()));
|
||||
// esp.setSolicitationDraftPlanCompleteDate(importUtil.convertDate(item.getSolicitationDraftPlanCompleteDate()));
|
||||
// esp.setPlanApprovalDate(importUtil.convertDate(item.getPlanApprovalDate()));
|
||||
// esp.setComponentName(excelUtils.translateDictValue("name", "code", "laws_part_name", item.getComponentName(), listDict));
|
||||
// esp.setAuthDept(excelUtils.translateDictValue("depart_name", "id", "sys_depart", item.getAuthDept(), listDict));
|
||||
// esp.setMainDraftingUser(excelUtils.translateDictValue("CONCAT(realname, '(', username, ')')", "id", "sys_user", item.getMainDraftingUser(), listDict));
|
||||
// esp.setMainDraftingUnit(excelUtils.translateDictValue("depart_name", "id", "sys_depart", item.getMainDraftingUnit(), listDict));
|
||||
// esp.setMainDraftingUnitResponsiblePerson(excelUtils.translateDictValue("CONCAT(realname, '(', username, ')')", "id", "sys_user", item.getMainDraftingUnitResponsiblePerson(), listDict));
|
||||
// esp.setStandardPromoter(excelUtils.translateDictValue("CONCAT(realname, '(', username, ')')", "id", "sys_user", item.getStandardPromoter(), listDict));
|
||||
// esp.setCooperationUnit(excelUtils.translateDictValue("depart_name", "id", "sys_depart", item.getCooperationUnit(), listDict));
|
||||
// } catch (Exception e) {
|
||||
// errorInfo = "数据转换异常:" + e.getMessage();
|
||||
// log.info(errorInfo);
|
||||
// log.info(item.toString());
|
||||
// log.error(e.getMessage(), e);
|
||||
// item.setErrorInfo("数据转换异常:" + e.getMessage());
|
||||
// importErrorList.add(item);
|
||||
// continue;
|
||||
// }
|
||||
// // 制定的,拿新企标编号在企标表里查,查到的话要报错,不予导入,统计并反馈;查不到的,数据正常录入plan表
|
||||
// if ("制定".equals(item.getApplicationCategory())) {
|
||||
// ManyStandardSelectionBox singleStandard = lawsCommonService.getSingleStandard(esp.getNewEnStandardNo(), null);
|
||||
// if (ObjectUtils.isNotEmpty(singleStandard)) {
|
||||
// // 查到的话要报错,不予导入,统计并反馈
|
||||
// errorInfo = "该制定类型数据的新企标编号已经在系统中存在,不予导入";
|
||||
// log.info(errorInfo);
|
||||
// log.info(item.toString());
|
||||
// item.setErrorInfo(errorInfo);
|
||||
// importErrorList.add(item);
|
||||
// continue;
|
||||
// } else { // 查不到正常,直接保存
|
||||
// this.save(esp);
|
||||
// }
|
||||
// }
|
||||
// // 修订的,拿旧企标编号在企标表里查,查不到的要报错,不予导入,统计并反馈;查得到的,数据正常录入plan表
|
||||
// if ("修订".equals(item.getApplicationCategory())) {
|
||||
// ManyStandardSelectionBox singleStandard = lawsCommonService.getSingleStandard(esp.getOriginEnStandardNo(), null);
|
||||
// if (ObjectUtils.isEmpty(singleStandard)) {
|
||||
// //查不到的要报错,不予导入
|
||||
// errorInfo = "该修订类型数据的原企标编号在系统中不存在,不予导入";
|
||||
// log.info(errorInfo);
|
||||
// log.info(item.toString());
|
||||
// item.setErrorInfo(errorInfo);
|
||||
// importErrorList.add(item);
|
||||
// continue;
|
||||
// } else { // 查得到正常,直接保存
|
||||
// this.save(esp);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// if (!importErrorList.isEmpty()) {
|
||||
// log.info("问题数据条数:{}", importErrorList.size());
|
||||
// excelUtils.exportWithExcel(response, importErrorList, "importAnnualRevisionPlan-ImportErrorData.xls");
|
||||
// }
|
||||
// log.info("年度制修订计划表数据导入结束");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
-35
@@ -315,41 +315,6 @@ public class EnterpriseStandardUtil {
|
||||
return duplicateStandardNumbers;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验企标编号是否不重复
|
||||
*
|
||||
* @param plans 需要校验的企标计划
|
||||
* @return 有问题的计划的原企标编号(去重过的)
|
||||
*/
|
||||
public List<String> verifyEsNumberByPlans(List<EnterpriseStandardPlan> plans) {
|
||||
List<String> standardNumbers = plans.stream()
|
||||
.map(EnterpriseStandardPlan::getNewEnStandardNo).collect(Collectors.toList());
|
||||
// 判断是否和企标库中重复
|
||||
LambdaQueryWrapper<LawsEnterpriseStandard> esWrapper = new LambdaQueryWrapper<>();
|
||||
esWrapper.in(LawsEnterpriseStandard::getStandardNumber, standardNumbers);
|
||||
esWrapper.eq(LawsEnterpriseStandard::getDelFlag, YesOrNoEnum.NO.getInteger());
|
||||
List<String> numList = esService.list(esWrapper)
|
||||
.stream().map(LawsEnterpriseStandard::getStandardNumber).collect(Collectors.toList());
|
||||
// 判断是否和立项流程中重复
|
||||
// 已经撤回的立项流程不需要判断重复
|
||||
LambdaQueryWrapper<ProcessAll> processAllLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
// processAllLambdaQueryWrapper.eq(ProcessAll::getPrcType, ProcessTypeEnum.ES_INIT_CHANGE.getValue());
|
||||
processAllLambdaQueryWrapper.ne(ProcessAll::getPrcStatus, ProcessStatusEnum.WITHDRAWN.getValue());
|
||||
List<ProcessAll> paList = processAllService.list(processAllLambdaQueryWrapper);
|
||||
List<String> processInstanceIdList = new ArrayList<>();
|
||||
if (paList != null && !paList.isEmpty()) {
|
||||
processInstanceIdList = paList.stream().map(ProcessAll::getProcessInstanceId).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
List<String> duplicateStandardNumbers = new ArrayList<>();
|
||||
for (EnterpriseStandardPlan esp : plans) {
|
||||
if (numList.contains(esp.getNewEnStandardNo())) {
|
||||
duplicateStandardNumbers.add(esp.getOriginEnStandardNo());
|
||||
}
|
||||
}
|
||||
duplicateStandardNumbers = duplicateStandardNumbers.stream().distinct().collect(Collectors.toList());
|
||||
return duplicateStandardNumbers;
|
||||
}
|
||||
|
||||
// 判断是否是空Excel
|
||||
public void isEmptyExcel(Sheet sheet) {
|
||||
|
||||
Reference in New Issue
Block a user