月报填写
This commit is contained in:
+26
-21
@@ -1,25 +1,30 @@
|
|||||||
package com.jero.modules.report.controller;
|
package com.jero.modules.report.controller;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import java.util.List;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
import com.jero.modules.report.entity.LawsMonthlyReportWriteEO;
|
import com.jero.modules.report.entity.LawsMonthlyReportWriteEO;
|
||||||
import com.jero.modules.report.service.ILawsMonthlyReportWriteEOService;
|
import com.jero.modules.report.service.ILawsMonthlyReportWriteEOService;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -52,9 +57,7 @@ public class LawsMonthlyReportWriteEOController extends JeroController<LawsMonth
|
|||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
QueryWrapper<LawsMonthlyReportWriteEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsMonthlyReportWriteEO, req.getParameterMap());
|
IPage<LawsMonthlyReportWriteEO> pageList = lawsMonthlyReportWriteEOService.getPageInfo(lawsMonthlyReportWriteEO, pageNo,pageSize,req);
|
||||||
Page<LawsMonthlyReportWriteEO> page = new Page<LawsMonthlyReportWriteEO>(pageNo, pageSize);
|
|
||||||
IPage<LawsMonthlyReportWriteEO> pageList = lawsMonthlyReportWriteEOService.getPageInfo(page, queryWrapper);
|
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,12 +139,14 @@ public class LawsMonthlyReportWriteEOController extends JeroController<LawsMonth
|
|||||||
@AutoLog(value = "月报填写-通过id查询")
|
@AutoLog(value = "月报填写-通过id查询")
|
||||||
@ApiOperation(value="月报填写-通过id查询", notes="月报填写-通过id查询")
|
@ApiOperation(value="月报填写-通过id查询", notes="月报填写-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
public Result<?> queryById(@RequestParam(name="id",required=true) String id,String cut) {
|
||||||
LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO = lawsMonthlyReportWriteEOService.queryById(id);
|
LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO = lawsMonthlyReportWriteEOService.queryById(id,cut);
|
||||||
if(lawsMonthlyReportWriteEO==null) {
|
if(lawsMonthlyReportWriteEO==null) {
|
||||||
return Result.error("未找到对应数据");
|
return Result.error("未找到对应数据");
|
||||||
}
|
}
|
||||||
return Result.OK(lawsMonthlyReportWriteEO);
|
List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOList = new ArrayList<>();
|
||||||
|
lawsMonthlyReportWriteEOList.add(lawsMonthlyReportWriteEO);
|
||||||
|
return Result.OK(lawsMonthlyReportWriteEOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+16
-10
@@ -1,25 +1,21 @@
|
|||||||
package com.jero.modules.report.entity;
|
package com.jero.modules.report.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
|
||||||
import com.jero.common.aspect.annotation.Dict;
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -99,24 +95,31 @@ public class LawsMonthlyReportWriteEO implements Serializable {
|
|||||||
@ApiModelProperty(value = "相关领域")
|
@ApiModelProperty(value = "相关领域")
|
||||||
private java.lang.String technologyTerritory;
|
private java.lang.String technologyTerritory;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String technologyTerritoryName;
|
||||||
|
|
||||||
/**适用车型*/
|
/**适用车型*/
|
||||||
@Excel(name = "适用车型", width = 15)
|
@Excel(name = "适用车型", width = 15)
|
||||||
@ApiModelProperty(value = "适用车型")
|
@ApiModelProperty(value = "适用车型")
|
||||||
|
@Dict(dicCode ="car_type")
|
||||||
private java.lang.String applyCar;
|
private java.lang.String applyCar;
|
||||||
|
|
||||||
/**适用范围*/
|
/**适用范围*/
|
||||||
@Excel(name = "适用范围", width = 15)
|
@Excel(name = "适用范围", width = 15)
|
||||||
@ApiModelProperty(value = "适用范围")
|
@ApiModelProperty(value = "适用范围")
|
||||||
|
@Dict(dicCode ="apply_scope")
|
||||||
private java.lang.String applyScope;
|
private java.lang.String applyScope;
|
||||||
|
|
||||||
/**状态*/
|
/**状态*/
|
||||||
@Excel(name = "状态", width = 15)
|
@Excel(name = "状态", width = 15)
|
||||||
@ApiModelProperty(value = "状态")
|
@ApiModelProperty(value = "状态")
|
||||||
|
@Dict(dicCode = "state")
|
||||||
private java.lang.String state;
|
private java.lang.String state;
|
||||||
|
|
||||||
/**用法*/
|
/**用法*/
|
||||||
@Excel(name = "用法", width = 15)
|
@Excel(name = "用法", width = 15)
|
||||||
@ApiModelProperty(value = "用法")
|
@ApiModelProperty(value = "用法")
|
||||||
|
@Dict(dicCode ="yong4_fa3")
|
||||||
private java.lang.String useMethod;
|
private java.lang.String useMethod;
|
||||||
|
|
||||||
/**实施车型*/
|
/**实施车型*/
|
||||||
@@ -179,6 +182,9 @@ public class LawsMonthlyReportWriteEO implements Serializable {
|
|||||||
@ApiModelProperty(value = "导出状态")
|
@ApiModelProperty(value = "导出状态")
|
||||||
private java.lang.String exportState;
|
private java.lang.String exportState;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.String exportStateName;
|
||||||
|
|
||||||
//新征求意见清单模板
|
//新征求意见清单模板
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<NewOpinionTemplateEO> newOpinionTemplateEOList;
|
private List<NewOpinionTemplateEO> newOpinionTemplateEOList;
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ package com.jero.modules.report.enums;
|
|||||||
* @auth zhn
|
* @auth zhn
|
||||||
*/
|
*/
|
||||||
public enum ContentTemplateEnum {
|
public enum ContentTemplateEnum {
|
||||||
DEFAULT_TEMPLATE("Content template","1"),
|
DEFAULT_TEMPLATE("默认模板","1"),
|
||||||
NEW_REQUEST_LIST_TEMPLATE("新征求意见清单模板","2"),
|
NEW_REQUEST_LIST_TEMPLATE("新征求意见清单模板","2"),
|
||||||
NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE("新发布标准清单模板","3");
|
NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE("新发布标准清单模板","3");
|
||||||
|
|
||||||
|
|||||||
+48
@@ -0,0 +1,48 @@
|
|||||||
|
package com.jero.modules.report.enums;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description
|
||||||
|
* @date 2022/1/21 15:22
|
||||||
|
* @auth zhn
|
||||||
|
*/
|
||||||
|
public enum ExportStateEnum {
|
||||||
|
NOT_EXPORT("未导出","Not export","1"),
|
||||||
|
HAS_BEEN_EXPORT("已导出","Has been export","2");
|
||||||
|
|
||||||
|
|
||||||
|
String name;
|
||||||
|
String nameEn;
|
||||||
|
String value;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private ExportStateEnum(String name, String nameEn, String value) {
|
||||||
|
this.name = name;
|
||||||
|
this.nameEn = nameEn;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
public String getNameEn() {
|
||||||
|
return nameEn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNameEn(String nameEn) {
|
||||||
|
this.nameEn = nameEn;
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
-7
@@ -1,10 +1,10 @@
|
|||||||
package com.jero.modules.report.service;
|
package com.jero.modules.report.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.jero.modules.report.entity.LawsMonthlyReportWriteEO;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.jero.modules.report.entity.LawsMonthlyReportWriteEO;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -53,7 +53,7 @@ public interface ILawsMonthlyReportWriteEOService extends IService<LawsMonthlyRe
|
|||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
LawsMonthlyReportWriteEO queryById(String id);
|
LawsMonthlyReportWriteEO queryById(String id,String cut);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
@@ -64,9 +64,14 @@ public interface ILawsMonthlyReportWriteEOService extends IService<LawsMonthlyRe
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页
|
* 分页
|
||||||
* @param page
|
* @param lawsMonthlyReportWriteEO
|
||||||
* @param queryWrapper
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
IPage<LawsMonthlyReportWriteEO> getPageInfo(Page<LawsMonthlyReportWriteEO> page, QueryWrapper<LawsMonthlyReportWriteEO> queryWrapper);
|
IPage<LawsMonthlyReportWriteEO> getPageInfo(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO,
|
||||||
|
Integer pageNo,
|
||||||
|
Integer pageSize,
|
||||||
|
HttpServletRequest req);
|
||||||
}
|
}
|
||||||
|
|||||||
+90
-10
@@ -4,27 +4,31 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.constant.enums.CutEnum;
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
import com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO;
|
import com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO;
|
||||||
import com.jero.modules.report.entity.LawsMonthlyReportWriteEO;
|
import com.jero.modules.report.entity.LawsMonthlyReportWriteEO;
|
||||||
import com.jero.modules.report.entity.NewOpinionTemplateEO;
|
import com.jero.modules.report.entity.NewOpinionTemplateEO;
|
||||||
import com.jero.modules.report.entity.NewStandardTemplateEO;
|
import com.jero.modules.report.entity.NewStandardTemplateEO;
|
||||||
import com.jero.modules.report.enums.ContentTemplateEnum;
|
import com.jero.modules.report.enums.ContentTemplateEnum;
|
||||||
|
import com.jero.modules.report.enums.ExportStateEnum;
|
||||||
import com.jero.modules.report.mapper.LawsMonthlyReportWriteEOMapper;
|
import com.jero.modules.report.mapper.LawsMonthlyReportWriteEOMapper;
|
||||||
import com.jero.modules.report.service.ILawsMonthlyReportTitleTemplateEOService;
|
import com.jero.modules.report.service.ILawsMonthlyReportTitleTemplateEOService;
|
||||||
import com.jero.modules.report.service.ILawsMonthlyReportWriteEOService;
|
import com.jero.modules.report.service.ILawsMonthlyReportWriteEOService;
|
||||||
import com.jero.modules.report.service.INewOpinionTemplateEOService;
|
import com.jero.modules.report.service.INewOpinionTemplateEOService;
|
||||||
import com.jero.modules.report.service.INewStandardTemplateEOService;
|
import com.jero.modules.report.service.INewStandardTemplateEOService;
|
||||||
|
import com.jero.modules.system.entity.SysCategory;
|
||||||
|
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||||
import com.jero.modules.system.util.StringUtils;
|
import com.jero.modules.system.util.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 月报填写
|
* @Description: 月报填写
|
||||||
@@ -41,6 +45,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
|||||||
private INewStandardTemplateEOService iNewStandardTemplateEOService;
|
private INewStandardTemplateEOService iNewStandardTemplateEOService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ILawsMonthlyReportTitleTemplateEOService lawsMonthlyReportTitleTemplateEOService;
|
private ILawsMonthlyReportTitleTemplateEOService lawsMonthlyReportTitleTemplateEOService;
|
||||||
|
@Autowired
|
||||||
|
private SysCategoryServiceImpl sysCategoryService;
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*
|
*
|
||||||
@@ -135,7 +141,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public LawsMonthlyReportWriteEO queryById(String id) {
|
public LawsMonthlyReportWriteEO queryById(String id,String cut) {
|
||||||
LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO = getById(id);
|
LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO = getById(id);
|
||||||
if(ContentTemplateEnum.NEW_REQUEST_LIST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
|
if(ContentTemplateEnum.NEW_REQUEST_LIST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){
|
||||||
//新征求意见清单模板
|
//新征求意见清单模板
|
||||||
@@ -151,10 +157,61 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
|||||||
List<NewStandardTemplateEO> newStandardTemplateEOList = iNewStandardTemplateEOService.list(queryWrapper);
|
List<NewStandardTemplateEO> newStandardTemplateEOList = iNewStandardTemplateEOService.list(queryWrapper);
|
||||||
lawsMonthlyReportWriteEO.setNewStandardTemplateEOList(newStandardTemplateEOList);
|
lawsMonthlyReportWriteEO.setNewStandardTemplateEOList(newStandardTemplateEOList);
|
||||||
}
|
}
|
||||||
return lawsMonthlyReportWriteEO;
|
//数据转换(章节目录,相关领域,导出状态)
|
||||||
|
dataTransition(cut, lawsMonthlyReportWriteEO);
|
||||||
|
return lawsMonthlyReportWriteEO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
private void dataTransition(String cut, LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO) {
|
||||||
|
//处理章节目录
|
||||||
|
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOList = lawsMonthlyReportTitleTemplateEOService.list();
|
||||||
|
if(StringUtils.isNotBlank(lawsMonthlyReportWriteEO.getMemoriesChapter())){
|
||||||
|
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS = lawsMonthlyReportTitleTemplateEOList.stream()
|
||||||
|
.filter(e -> lawsMonthlyReportWriteEO.getMemoriesChapter().equals(e.getId())).collect(Collectors.toList());
|
||||||
|
if(CutEnum.CN.getValue().equals(cut) && lawsMonthlyReportTitleTemplateEOS.size() != 0){
|
||||||
|
lawsMonthlyReportWriteEO.setMemoriesChapterName(lawsMonthlyReportTitleTemplateEOS.get(0).getTitleCn());
|
||||||
|
}else if(CutEnum.EN.getValue().equals(cut) && lawsMonthlyReportTitleTemplateEOS.size() != 0){
|
||||||
|
lawsMonthlyReportWriteEO.setMemoriesChapterName(lawsMonthlyReportTitleTemplateEOS.get(0).getTitleEn());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//处理相关领域
|
||||||
|
//树形结构数据字典(技术领域)
|
||||||
|
List<SysCategory> categoryList = sysCategoryService.queryByTreeDicCode("technology_territory");
|
||||||
|
String technologyTerritory = lawsMonthlyReportWriteEO.getTechnologyTerritory();
|
||||||
|
if (StringUtils.isNotBlank(technologyTerritory)) {
|
||||||
|
List<String> technologyTerritoryList = Arrays.asList(technologyTerritory.split(","));
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (String technologyTerritoryTemp : technologyTerritoryList) {
|
||||||
|
List<SysCategory> collect = categoryList.stream().filter(e -> technologyTerritoryTemp.equals(e.getId())).collect(Collectors.toList());
|
||||||
|
if (collect.size() != 0) {
|
||||||
|
sb.append(collect.get(0).getEnName() + ",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(sb)) {
|
||||||
|
String technologyTerritoryName = sb.substring(0, sb.length() - 1);
|
||||||
|
lawsMonthlyReportWriteEO.setTechnologyTerritoryName(technologyTerritoryName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//处理导出状态
|
||||||
|
String exportState = lawsMonthlyReportWriteEO.getExportState();
|
||||||
|
if(StringUtils.isNotBlank(exportState)){
|
||||||
|
if(ExportStateEnum.NOT_EXPORT.getValue().equals(exportState)){
|
||||||
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
|
lawsMonthlyReportWriteEO.setExportStateName(ExportStateEnum.NOT_EXPORT.getName());
|
||||||
|
}else{
|
||||||
|
lawsMonthlyReportWriteEO.setExportStateName(ExportStateEnum.NOT_EXPORT.getNameEn());
|
||||||
|
}
|
||||||
|
}else if(ExportStateEnum.HAS_BEEN_EXPORT.getValue().equals(exportState)){
|
||||||
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
|
lawsMonthlyReportWriteEO.setExportStateName(ExportStateEnum.HAS_BEEN_EXPORT.getName());
|
||||||
|
}else{
|
||||||
|
lawsMonthlyReportWriteEO.setExportStateName(ExportStateEnum.HAS_BEEN_EXPORT.getNameEn());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
* 列表查询
|
* 列表查询
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
@@ -165,7 +222,12 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<LawsMonthlyReportWriteEO> getPageInfo(Page<LawsMonthlyReportWriteEO> page, QueryWrapper<LawsMonthlyReportWriteEO> queryWrapper) {
|
public IPage<LawsMonthlyReportWriteEO> getPageInfo(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEOTemp,
|
||||||
|
Integer pageNo,
|
||||||
|
Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<LawsMonthlyReportWriteEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsMonthlyReportWriteEOTemp, req.getParameterMap());
|
||||||
|
Page<LawsMonthlyReportWriteEO> page = new Page<LawsMonthlyReportWriteEO>(pageNo, pageSize);
|
||||||
Page<LawsMonthlyReportWriteEO> pageInfo = this.page(page, queryWrapper);
|
Page<LawsMonthlyReportWriteEO> pageInfo = this.page(page, queryWrapper);
|
||||||
//法规月报id
|
//法规月报id
|
||||||
List<String> lawsMonthlyReportIdList = pageInfo.getRecords().stream().map(LawsMonthlyReportWriteEO::getId).collect(Collectors.toList());
|
List<String> lawsMonthlyReportIdList = pageInfo.getRecords().stream().map(LawsMonthlyReportWriteEO::getId).collect(Collectors.toList());
|
||||||
@@ -206,6 +268,24 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
|||||||
.filter(e -> lawsMonthlyReportWriteEO.getId().equals(e.getLawsMonthlyReportWriteId())).collect(Collectors.toList());
|
.filter(e -> lawsMonthlyReportWriteEO.getId().equals(e.getLawsMonthlyReportWriteId())).collect(Collectors.toList());
|
||||||
lawsMonthlyReportWriteEO.setNewStandardTemplateEOList(collect);
|
lawsMonthlyReportWriteEO.setNewStandardTemplateEOList(collect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//处理导出状态
|
||||||
|
String exportState = lawsMonthlyReportWriteEO.getExportState();
|
||||||
|
if(StringUtils.isNotBlank(exportState)){
|
||||||
|
if(ExportStateEnum.NOT_EXPORT.getValue().equals(exportState)){
|
||||||
|
if(CutEnum.CN.getValue().equals(lawsMonthlyReportWriteEOTemp.getCut())){
|
||||||
|
lawsMonthlyReportWriteEO.setExportStateName(ExportStateEnum.NOT_EXPORT.getName());
|
||||||
|
}else{
|
||||||
|
lawsMonthlyReportWriteEO.setExportStateName(ExportStateEnum.NOT_EXPORT.getNameEn());
|
||||||
|
}
|
||||||
|
}else if(ExportStateEnum.HAS_BEEN_EXPORT.getValue().equals(exportState)){
|
||||||
|
if(CutEnum.CN.getValue().equals(lawsMonthlyReportWriteEOTemp.getCut())){
|
||||||
|
lawsMonthlyReportWriteEO.setExportStateName(ExportStateEnum.HAS_BEEN_EXPORT.getName());
|
||||||
|
}else{
|
||||||
|
lawsMonthlyReportWriteEO.setExportStateName(ExportStateEnum.HAS_BEEN_EXPORT.getNameEn());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return pageInfo;
|
return pageInfo;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user