Merge remote-tracking branch 'origin/fix_bug_first_stage' into fix_bug_first_stage
This commit is contained in:
@@ -201,6 +201,25 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!--中文分词工具包-->
|
||||
<dependency>
|
||||
<groupId>com.janeluo</groupId>
|
||||
<artifactId>ikanalyzer</artifactId>
|
||||
<version>2012_u6</version>
|
||||
</dependency>
|
||||
<!--HTML解析器-->
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.11.3</version>
|
||||
</dependency>
|
||||
<!--语言处理-->
|
||||
<dependency>
|
||||
<groupId>com.hankcs</groupId>
|
||||
<artifactId>hanlp</artifactId>
|
||||
<version>portable-1.7.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
||||
+201
@@ -0,0 +1,201 @@
|
||||
package com.jero.modules.compare.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.compare.entity.SarFileCompareInfo;
|
||||
import com.jero.modules.compare.service.ISarFileCompareInfoService;
|
||||
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.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags = "文档对比信息表")
|
||||
@RestController
|
||||
@RequestMapping("/compare/sarFileCompareInfo")
|
||||
@Slf4j
|
||||
public class SarFileCompareInfoController extends JeroController<SarFileCompareInfo, ISarFileCompareInfoService> {
|
||||
@Autowired
|
||||
private ISarFileCompareInfoService sarFileCompareInfoService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param sarFileCompareInfo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息表-分页列表查询")
|
||||
@ApiOperation(value = "文档对比信息表-分页列表查询", notes = "文档对比信息表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(SarFileCompareInfo sarFileCompareInfo,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<SarFileCompareInfo> queryWrapper = QueryGenerator.initQueryWrapper(sarFileCompareInfo, req.getParameterMap());
|
||||
Page<SarFileCompareInfo> page = new Page<SarFileCompareInfo>(pageNo, pageSize);
|
||||
IPage<SarFileCompareInfo> pageList = sarFileCompareInfoService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息表-列表查询")
|
||||
@ApiOperation(value = "文档对比信息表-列表查询", notes = "文档对比信息表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<SarFileCompareInfo>> queryList() {
|
||||
List<SarFileCompareInfo> list = sarFileCompareInfoService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param sarFileCompareInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息表-添加")
|
||||
@ApiOperation(value = "文档对比信息表-添加", notes = "文档对比信息表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody SarFileCompareInfo sarFileCompareInfo) {
|
||||
sarFileCompareInfoService.add(sarFileCompareInfo);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param sarFileCompareInfo
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息表-编辑")
|
||||
@ApiOperation(value = "文档对比信息表-编辑", notes = "文档对比信息表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody SarFileCompareInfo sarFileCompareInfo) {
|
||||
sarFileCompareInfoService.editById(sarFileCompareInfo);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息表-通过id删除")
|
||||
@ApiOperation(value = "文档对比信息表-通过id删除", notes = "文档对比信息表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||
sarFileCompareInfoService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息表-批量删除")
|
||||
@ApiOperation(value = "文档对比信息表-批量删除", notes = "文档对比信息表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||
this.sarFileCompareInfoService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息表-通过id查询")
|
||||
@ApiOperation(value = "文档对比信息表-通过id查询", notes = "文档对比信息表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
SarFileCompareInfo sarFileCompareInfo = sarFileCompareInfoService.queryById(id);
|
||||
if (sarFileCompareInfo == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(sarFileCompareInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param sarFileCompareInfo
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, SarFileCompareInfo sarFileCompareInfo) {
|
||||
return super.exportXls(request, sarFileCompareInfo, SarFileCompareInfo.class, "文档对比信息表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, SarFileCompareInfo.class);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发起文档对比
|
||||
*
|
||||
* @param leftStandard
|
||||
* @param rightStandard
|
||||
* @param remark
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "发起文档对比")
|
||||
@ApiOperation(value = "发起文档对比", notes = "发起文档对比")
|
||||
@RequestMapping(value = "/fullTextComparison", method = RequestMethod.POST)
|
||||
public Result<?> fullTextComparison(@RequestBody JSONObject json) {
|
||||
try {
|
||||
String leftStandard = json.get("leftStandard").toString();
|
||||
String rightStandard = json.get("rightStandard").toString();
|
||||
String remark = "";
|
||||
if (json.get("remark") != null) {
|
||||
remark = json.get("remark").toString();
|
||||
}
|
||||
Map<String, Object> resMap = sarFileCompareInfoService.fullTextComparison(leftStandard, rightStandard, remark);
|
||||
return Result.OK(resMap);
|
||||
} catch (Exception ex) {
|
||||
log.error("发起文档对比失败:" + ex.getMessage());
|
||||
return Result.OK("发起文档对比失败!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.compare.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
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.system.query.QueryGenerator;
|
||||
import com.jero.modules.compare.entity.SarFileCompareItem;
|
||||
import com.jero.modules.compare.service.ISarFileCompareItemService;
|
||||
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.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息条款表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="文档对比信息条款表")
|
||||
@RestController
|
||||
@RequestMapping("/compare/sarFileCompareItem")
|
||||
@Slf4j
|
||||
public class SarFileCompareItemController extends JeroController<SarFileCompareItem, ISarFileCompareItemService> {
|
||||
@Autowired
|
||||
private ISarFileCompareItemService sarFileCompareItemService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param sarFileCompareItem
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款表-分页列表查询")
|
||||
@ApiOperation(value="文档对比信息条款表-分页列表查询", notes="文档对比信息条款表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(SarFileCompareItem sarFileCompareItem,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<SarFileCompareItem> queryWrapper = QueryGenerator.initQueryWrapper(sarFileCompareItem, req.getParameterMap());
|
||||
Page<SarFileCompareItem> page = new Page<SarFileCompareItem>(pageNo, pageSize);
|
||||
IPage<SarFileCompareItem> pageList = sarFileCompareItemService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款表-列表查询")
|
||||
@ApiOperation(value="文档对比信息条款表-列表查询", notes="文档对比信息条款表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<SarFileCompareItem>> queryList() {
|
||||
List<SarFileCompareItem> list = sarFileCompareItemService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param sarFileCompareItem
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款表-添加")
|
||||
@ApiOperation(value="文档对比信息条款表-添加", notes="文档对比信息条款表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody SarFileCompareItem sarFileCompareItem) {
|
||||
sarFileCompareItemService.add(sarFileCompareItem);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param sarFileCompareItem
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款表-编辑")
|
||||
@ApiOperation(value="文档对比信息条款表-编辑", notes="文档对比信息条款表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody SarFileCompareItem sarFileCompareItem) {
|
||||
sarFileCompareItemService.editById(sarFileCompareItem);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款表-通过id删除")
|
||||
@ApiOperation(value="文档对比信息条款表-通过id删除", notes="文档对比信息条款表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
sarFileCompareItemService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款表-批量删除")
|
||||
@ApiOperation(value="文档对比信息条款表-批量删除", notes="文档对比信息条款表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.sarFileCompareItemService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档对比信息条款表-通过id查询")
|
||||
@ApiOperation(value="文档对比信息条款表-通过id查询", notes="文档对比信息条款表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
SarFileCompareItem sarFileCompareItem = sarFileCompareItemService.queryById(id);
|
||||
if(sarFileCompareItem==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(sarFileCompareItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param sarFileCompareItem
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, SarFileCompareItem sarFileCompareItem) {
|
||||
return super.exportXls(request, sarFileCompareItem, SarFileCompareItem.class, "文档对比信息条款表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, SarFileCompareItem.class);
|
||||
}
|
||||
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
package com.jero.modules.compare.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("sar_file_compare_info")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="sar_file_compare_info对象", description="文档对比信息表")
|
||||
public class SarFileCompareInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.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 java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**文档1*/
|
||||
@Excel(name = "文档1", width = 15)
|
||||
@ApiModelProperty(value = "文档1")
|
||||
private String fileIdLeft;
|
||||
|
||||
/**编号1*/
|
||||
@Excel(name = "编号1", width = 15)
|
||||
@ApiModelProperty(value = "编号1")
|
||||
private String serialNumberLeft;
|
||||
|
||||
/**标题1*/
|
||||
@Excel(name = "标题1", width = 15)
|
||||
@ApiModelProperty(value = "标题1")
|
||||
private String titleLeft;
|
||||
|
||||
/**文本状态1*/
|
||||
@Excel(name = "文本状态1", width = 15)
|
||||
@ApiModelProperty(value = "文本状态1")
|
||||
private String fileTypeLeft;
|
||||
|
||||
/**文件名称1*/
|
||||
@Excel(name = "文件名称1", width = 15)
|
||||
@ApiModelProperty(value = "文件名称1")
|
||||
private String fileNameLeft;
|
||||
|
||||
/**文档2*/
|
||||
@Excel(name = "文档2", width = 15)
|
||||
@ApiModelProperty(value = "文档2")
|
||||
private String fileIdRight;
|
||||
|
||||
/**编号2*/
|
||||
@Excel(name = "编号2", width = 15)
|
||||
@ApiModelProperty(value = "编号2")
|
||||
private String serialNumberRight;
|
||||
|
||||
/**标题2*/
|
||||
@Excel(name = "标题2", width = 15)
|
||||
@ApiModelProperty(value = "标题2")
|
||||
private String titleRight;
|
||||
|
||||
/**文本状态2*/
|
||||
@Excel(name = "文本状态2", width = 15)
|
||||
@ApiModelProperty(value = "文本状态2")
|
||||
private String fileTypeRight;
|
||||
|
||||
/**文件名称2*/
|
||||
@Excel(name = "文件名称2", width = 15)
|
||||
@ApiModelProperty(value = "文件名称2")
|
||||
private String fileNameRight;
|
||||
|
||||
/**发布状态*/
|
||||
@Excel(name = "发布状态", width = 15)
|
||||
@ApiModelProperty(value = "发布状态")
|
||||
private String releaseState;
|
||||
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**评论*/
|
||||
@Excel(name = "评论", width = 15)
|
||||
@ApiModelProperty(value = "评论")
|
||||
private String comments;
|
||||
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
package com.jero.modules.compare.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息条款表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("sar_file_compare_item")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="sar_file_compare_item对象", description="文档对比信息条款表")
|
||||
public class SarFileCompareItem implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.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 java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**文档对比信息id*/
|
||||
@Excel(name = "文档对比信息id", width = 15)
|
||||
@ApiModelProperty(value = "文档对比信息id")
|
||||
private String infoId;
|
||||
|
||||
/**条款id*/
|
||||
@Excel(name = "条款id", width = 15)
|
||||
@ApiModelProperty(value = "条款id")
|
||||
private String itemsId;
|
||||
|
||||
/**条款名称*/
|
||||
@Excel(name = "条款名称", width = 15)
|
||||
@ApiModelProperty(value = "条款名称")
|
||||
private String itemsName;
|
||||
|
||||
/**条款编号*/
|
||||
@Excel(name = "条款编号", width = 15)
|
||||
@ApiModelProperty(value = "条款编号")
|
||||
private String itemsNum;
|
||||
|
||||
/**条款正文*/
|
||||
@Excel(name = "条款正文", width = 15)
|
||||
@ApiModelProperty(value = "条款正文")
|
||||
private String itemsText;
|
||||
|
||||
/**条款展示编号*/
|
||||
@Excel(name = "条款展示编号", width = 15)
|
||||
@ApiModelProperty(value = "条款展示编号")
|
||||
private Integer itemsDisplayNum;
|
||||
|
||||
/**目标位置*/
|
||||
@Excel(name = "目标位置", width = 15)
|
||||
@ApiModelProperty(value = "目标位置")
|
||||
private Integer targetStand;
|
||||
|
||||
/**条款位置*/
|
||||
@Excel(name = "条款位置", width = 15)
|
||||
@ApiModelProperty(value = "条款位置")
|
||||
private String leftOrRight;
|
||||
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.jero.modules.compare.enums;
|
||||
|
||||
public enum ValidFlagEnum {
|
||||
VALID_TRUE(0, "有效"), VALID_FALSE(1, "无效");
|
||||
|
||||
private int value;
|
||||
private String lable;
|
||||
|
||||
private ValidFlagEnum(int value, String lable) {
|
||||
this.value = value;
|
||||
this.lable = lable;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.compare.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.compare.entity.SarFileCompareInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface SarFileCompareInfoMapper extends BaseMapper<SarFileCompareInfo> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.compare.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.compare.entity.SarFileCompareItem;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息条款表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface SarFileCompareItemMapper extends BaseMapper<SarFileCompareItem> {
|
||||
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.compare.mapper.SarFileCompareInfoMapper">
|
||||
<resultMap id="SarFileCompareInfoResultMap" type="com.jero.modules.compare.entity.SarFileCompareInfo">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="file_id_left" property="fileIdLeft" />
|
||||
<result column="serial_number_left" property="serialNumberLeft" />
|
||||
<result column="title_left" property="titleLeft" />
|
||||
<result column="file_type_left" property="fileTypeLeft" />
|
||||
<result column="file_name_left" property="fileNameLeft" />
|
||||
<result column="file_id_right" property="fileIdRight" />
|
||||
<result column="serial_number_right" property="serialNumberRight" />
|
||||
<result column="title_right" property="titleRight" />
|
||||
<result column="file_type_right" property="fileTypeRight" />
|
||||
<result column="file_name_right" property="fileNameRight" />
|
||||
<result column="release_state" property="releaseState" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="comments" property="comments" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.compare.mapper.SarFileCompareItemMapper">
|
||||
<resultMap id="SarFileCompareItemResultMap" type="com.jero.modules.compare.entity.SarFileCompareItem">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="info_id" property="infoId" />
|
||||
<result column="items_id" property="itemsId" />
|
||||
<result column="items_name" property="itemsName" />
|
||||
<result column="items_num" property="itemsNum" />
|
||||
<result column="items_text" property="itemsText" />
|
||||
<result column="items_display_num" property="itemsDisplayNum" />
|
||||
<result column="target_stand" property="targetStand" />
|
||||
<result column="left_or_right" property="leftOrRight" />
|
||||
<result column="remark" property="remark" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.jero.modules.compare.service;
|
||||
|
||||
import com.jero.modules.compare.entity.SarFileCompareInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ISarFileCompareInfoService extends IService<SarFileCompareInfo> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param sarFileCompareInfo
|
||||
* @return
|
||||
*/
|
||||
void add(SarFileCompareInfo sarFileCompareInfo);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param sarFileCompareInfo
|
||||
* @return
|
||||
*/
|
||||
void editById(SarFileCompareInfo sarFileCompareInfo);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
SarFileCompareInfo queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SarFileCompareInfo> queryList();
|
||||
|
||||
/**
|
||||
* 发起全文对比
|
||||
*
|
||||
* @param leftStandard
|
||||
* @param rightStandard
|
||||
* @param remark
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> fullTextComparison(String leftStandard, String rightStandard, String remark) throws Exception;
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.compare.service;
|
||||
|
||||
import com.jero.modules.compare.entity.SarFileCompareItem;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息条款表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ISarFileCompareItemService extends IService<SarFileCompareItem> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param sarFileCompareItem
|
||||
* @return
|
||||
*/
|
||||
void add(SarFileCompareItem sarFileCompareItem);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param sarFileCompareItem
|
||||
* @return
|
||||
*/
|
||||
void editById(SarFileCompareItem sarFileCompareItem);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
SarFileCompareItem queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SarFileCompareItem> queryList();
|
||||
}
|
||||
+351
@@ -0,0 +1,351 @@
|
||||
package com.jero.modules.compare.service.impl;
|
||||
|
||||
import com.jero.modules.compare.entity.SarFileCompareInfo;
|
||||
import com.jero.modules.compare.entity.SarFileCompareItem;
|
||||
import com.jero.modules.compare.enums.ValidFlagEnum;
|
||||
import com.jero.modules.compare.mapper.SarFileCompareInfoMapper;
|
||||
import com.jero.modules.compare.service.ISarFileCompareInfoService;
|
||||
import com.jero.modules.compare.service.ISarFileCompareItemService;
|
||||
import com.jero.modules.compare.utils.CompHanLPUtils;
|
||||
import com.jero.modules.compare.utils.treeTool.Tree;
|
||||
import com.jero.modules.compare.utils.treeTool.TreeNode;
|
||||
import com.jero.modules.docTranslation.enums.ReleaseConditionEnum;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||
import com.jero.modules.split.entity.SarFileSplitItemsEO;
|
||||
import com.jero.modules.split.entity.SarFileSplitItemsValEO;
|
||||
import com.jero.modules.split.entity.SarFileSplitMenuEO;
|
||||
import com.jero.modules.split.page.SarFileSplitItemsEOPage;
|
||||
import com.jero.modules.split.page.SarFileSplitItemsValEOPage;
|
||||
import com.jero.modules.split.page.SarFileSplitMenuEOPage;
|
||||
import com.jero.modules.split.service.IFileSplitItemsEOService;
|
||||
import com.jero.modules.split.service.ISarFileSplitInfoService;
|
||||
import com.jero.modules.split.service.ISarFileSplitItemsValEOService;
|
||||
import com.jero.modules.split.service.ISarFileSplitMenuEOService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class SarFileCompareInfoServiceImpl extends ServiceImpl<SarFileCompareInfoMapper, SarFileCompareInfo> implements ISarFileCompareInfoService {
|
||||
|
||||
@Autowired
|
||||
private ISarFileSplitMenuEOService sarFileSplitMenuEOService;
|
||||
|
||||
@Autowired
|
||||
private IFileSplitItemsEOService sarFileSplitItemsEOService;
|
||||
|
||||
@Autowired
|
||||
private ISarFileSplitItemsValEOService sarFileSplitItemsValEOService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private ISarFileSplitInfoService sarFileSplitInfoEOService;
|
||||
|
||||
@Autowired
|
||||
private ISarFileCompareItemService sarFileCompareItemService;
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param sarFileCompareInfo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(SarFileCompareInfo sarFileCompareInfo) {
|
||||
Date now = new Date();
|
||||
sarFileCompareInfo.setCreateTime(now);
|
||||
sarFileCompareInfo.setUpdateTime(now);
|
||||
save(sarFileCompareInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param sarFileCompareInfo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(SarFileCompareInfo sarFileCompareInfo) {
|
||||
Date now = new Date();
|
||||
sarFileCompareInfo.setUpdateTime(now);
|
||||
saveOrUpdate(sarFileCompareInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SarFileCompareInfo queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SarFileCompareInfo> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 全文对比
|
||||
*
|
||||
* @param leftStandard
|
||||
* @param rightStandard
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Map<String, Object> fullTextComparison(String leftStandard, String rightStandard, String remark) throws Exception {
|
||||
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||
List<Map<String, Object>> leftMapList = fullTextComparePackageData(leftStandard);
|
||||
List<Map<String, Object>> rightMapList = fullTextComparePackageData(rightStandard);
|
||||
List<Map<String, Object>> resLeftMapList = null;
|
||||
List<Map<String, Object>> resRightMapList = null;
|
||||
if (leftMapList != null && !leftMapList.isEmpty() && rightMapList != null && !rightMapList.isEmpty()) {
|
||||
//双重循环找到相似度最高的条款做关联
|
||||
for (int i = 0; i < leftMapList.size(); i++) {
|
||||
String leftTxt = leftMapList.get(i).get("itemsText").toString();
|
||||
//定义初始化的相似度
|
||||
double compareSimilarity = 0.0;
|
||||
if (!leftTxt.isEmpty()) {
|
||||
for (int j = 0; j < rightMapList.size(); j++) {
|
||||
String rightTxt = rightMapList.get(j).get("itemsText").toString();
|
||||
double similarity = CompHanLPUtils.findSimilarity(leftTxt.trim(), rightTxt.trim());
|
||||
//如果相似度超过0.6 并且该相似度比之前的相似度还高,那么该条款目前相似度最高
|
||||
if (similarity >= 0.6 && compareSimilarity < similarity) {
|
||||
compareSimilarity = similarity;
|
||||
leftMapList.get(i).put("targetStand", j);
|
||||
if (rightMapList.get(j).get("targetStand") == null) {
|
||||
rightMapList.get(j).put("targetStand", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//循环对比结束,开始填充html代码
|
||||
resLeftMapList = writeResultHtml(leftMapList);
|
||||
resultMap.put("resLeftMapList", resLeftMapList);
|
||||
resRightMapList = writeResultHtml(rightMapList);
|
||||
resultMap.put("resRightMapList", resRightMapList);
|
||||
}
|
||||
//往全文比对历史表中添加数据
|
||||
addStandCompareHis(leftStandard, rightStandard, remark, resLeftMapList, resRightMapList);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 组装条款数据
|
||||
*
|
||||
* @param standardId
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Map<String, Object>> fullTextComparePackageData(String standardId) throws Exception {
|
||||
List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
|
||||
//调用查询条款接口
|
||||
SarFileSplitItemsEOPage sarFileSplitItemsEOPage = new SarFileSplitItemsEOPage();
|
||||
sarFileSplitItemsEOPage.setInfoId(standardId);
|
||||
sarFileSplitItemsEOPage.setValidFlag(String.valueOf(ValidFlagEnum.VALID_TRUE.getValue()));
|
||||
sarFileSplitItemsEOPage.setOrderBy("SAR_FILE_SPLIT_MENU.display_seq asc");
|
||||
|
||||
if (StringUtils.isNotEmpty(sarFileSplitItemsEOPage.getMenuId())) {
|
||||
List<SarFileSplitMenuEO> sarFileSplitMenuEOList = sarFileSplitMenuEOService.queryByList(new SarFileSplitMenuEOPage());
|
||||
Tree tree = new Tree<>(sarFileSplitMenuEOList);
|
||||
TreeNode treeNode = tree.getTreeNode(sarFileSplitItemsEOPage.getMenuId());
|
||||
|
||||
List<String> menuIds = new ArrayList<>();
|
||||
menuIds.add(treeNode.getNodeId());
|
||||
for (TreeNode node : treeNode.getAllChildren()) {
|
||||
menuIds.add(node.getNodeId());
|
||||
}
|
||||
sarFileSplitItemsEOPage.setMenuIdList(menuIds);
|
||||
}
|
||||
|
||||
|
||||
List<SarFileSplitItemsEO> itemList = sarFileSplitItemsEOService.queryByList(sarFileSplitItemsEOPage);
|
||||
if (itemList != null && !itemList.isEmpty()) {
|
||||
for (SarFileSplitItemsEO sarFileSplitItemsEO : itemList) {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("itemsNum", sarFileSplitItemsEO.getItemsNum());
|
||||
map.put("itemsName", sarFileSplitItemsEO.getItemsName());
|
||||
map.put("itemsId", sarFileSplitItemsEO.getId());
|
||||
//(内容1\n内容2\n格式)
|
||||
String txt = "";
|
||||
//调用条款内容详情表查询条款内容
|
||||
SarFileSplitItemsValEOPage sarFileSplitItemsValEOPage = new SarFileSplitItemsValEOPage();
|
||||
sarFileSplitItemsValEOPage.setItemId(sarFileSplitItemsEO.getId());
|
||||
sarFileSplitItemsValEOPage.setValidFlag(String.valueOf(ValidFlagEnum.VALID_TRUE.getValue()));
|
||||
sarFileSplitItemsValEOPage.setType("TEXT");
|
||||
List<SarFileSplitItemsValEO> leftValList = sarFileSplitItemsValEOService.queryByList(sarFileSplitItemsValEOPage);
|
||||
if (leftValList != null && !leftValList.isEmpty()) {
|
||||
for (SarFileSplitItemsValEO sarFileSplitItemsValEO : leftValList) {
|
||||
txt += "<p>" + sarFileSplitItemsValEO.getItemContent() + "</p>";
|
||||
}
|
||||
}
|
||||
map.put("itemsText", txt);
|
||||
map.put("targetStand", null);
|
||||
map.put("menuId", sarFileSplitItemsEO.getMenuId());
|
||||
mapList.add(map);
|
||||
}
|
||||
}
|
||||
return mapList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 填充html代码,返回结果
|
||||
*
|
||||
* @param resMapList
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> writeResultHtml(List<Map<String, Object>> resMapList) throws Exception {
|
||||
List<Map<String, Object>> resultMapList = new ArrayList<>();
|
||||
for (Map resMap : resMapList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
Object itemsNum = resMap.get("itemsNum");
|
||||
if (null != itemsNum) {
|
||||
stringBuilder.append(itemsNum.toString());
|
||||
} else {
|
||||
stringBuilder.append("undefined");
|
||||
}
|
||||
stringBuilder.append(" ");
|
||||
Object itemsName = resMap.get("itemsName");
|
||||
if (null != itemsName) {
|
||||
stringBuilder.append(itemsName.toString());
|
||||
} else {
|
||||
stringBuilder.append("undefined");
|
||||
}
|
||||
stringBuilder.append("<div>");
|
||||
|
||||
Object itemsTxt = resMap.get("itemsTxt");
|
||||
if (null != itemsTxt) {
|
||||
stringBuilder.append(itemsTxt.toString());
|
||||
}
|
||||
stringBuilder.append("</div>");
|
||||
map.put("resultHtml", stringBuilder.toString());
|
||||
Object targetStand = resMap.get("targetStand");
|
||||
int targetStandInt = 0;
|
||||
if (null != targetStand) {
|
||||
targetStand = (Integer) targetStand;
|
||||
}
|
||||
map.put("targetStand", targetStand);
|
||||
Object itemsId = resMap.get("itemsId");
|
||||
String itemsIdStr = "undefined";
|
||||
if (null != itemsId) {
|
||||
itemsIdStr = itemsId.toString();
|
||||
}
|
||||
map.put("itemsId", itemsIdStr);
|
||||
resultMapList.add(map);
|
||||
}
|
||||
return resMapList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存比对历史
|
||||
*
|
||||
* @param leftStandId
|
||||
* @param rightStandId
|
||||
* @param remark
|
||||
* @param resLeftMapList
|
||||
* @param resRightMapList
|
||||
* @throws Exception
|
||||
*/
|
||||
public void addStandCompareHis(String leftStandId, String rightStandId, String remark, List<Map<String, Object>> resLeftMapList, List<Map<String, Object>> resRightMapList) throws Exception {
|
||||
SarFileSplitInfoEO leftInfo = sarFileSplitInfoEOService.queryById(leftStandId);
|
||||
SarFileSplitInfoEO rightInfo = sarFileSplitInfoEOService.queryById(rightStandId);
|
||||
//保存标准比对历史表数据
|
||||
SarFileCompareInfo sarFileCompareInfo = new SarFileCompareInfo();
|
||||
sarFileCompareInfo.setId(UUID.randomUUID().toString());
|
||||
sarFileCompareInfo.setFileIdLeft(leftInfo.getFileId());
|
||||
sarFileCompareInfo.setFileNameLeft(leftInfo.getFileName());
|
||||
sarFileCompareInfo.setFileTypeLeft(leftInfo.getFileType());
|
||||
sarFileCompareInfo.setSerialNumberLeft(leftInfo.getSerialNumber());
|
||||
|
||||
sarFileCompareInfo.setFileIdRight(rightInfo.getFileId());
|
||||
sarFileCompareInfo.setFileNameRight(rightInfo.getFileName());
|
||||
sarFileCompareInfo.setFileTypeRight(rightInfo.getFileType());
|
||||
sarFileCompareInfo.setSerialNumberRight(rightInfo.getSerialNumber());
|
||||
|
||||
sarFileCompareInfo.setReleaseState(ReleaseConditionEnum.DRAFT.getValue());
|
||||
sarFileCompareInfo.setRemark(remark);
|
||||
this.add(sarFileCompareInfo);
|
||||
//保存标准的所有条款比对的历史数据
|
||||
if (resLeftMapList != null && !resLeftMapList.isEmpty()) {
|
||||
setStandCompareHisEO(resLeftMapList, sarFileCompareInfo.getId(), "LEFT");
|
||||
}
|
||||
if (resRightMapList != null && !resRightMapList.isEmpty()) {
|
||||
setStandCompareHisEO(resRightMapList, sarFileCompareInfo.getId(), "RIGHT");
|
||||
}
|
||||
}
|
||||
|
||||
public void setStandCompareHisEO(List<Map<String, Object>> mapList, String id, String leftOrRight) throws Exception {
|
||||
for (int i = 0; i < mapList.size(); i++) {
|
||||
SarFileCompareItem sarFileCompareItem = new SarFileCompareItem();
|
||||
sarFileCompareItem.setItemsId(id);
|
||||
sarFileCompareItem.setItemsDisplayNum(i);
|
||||
sarFileCompareItem.setLeftOrRight(leftOrRight);
|
||||
Object itemsId = mapList.get(i).get("itemsId");
|
||||
if (null != itemsId) {
|
||||
sarFileCompareItem.setItemsId(itemsId.toString());
|
||||
}
|
||||
Object itemsName = mapList.get(i).get("itemsName");
|
||||
if (null != itemsName) {
|
||||
sarFileCompareItem.setItemsName(itemsName.toString());
|
||||
}
|
||||
Object itemsNum = mapList.get(i).get("itemsNum");
|
||||
if (null != itemsNum) {
|
||||
sarFileCompareItem.setItemsNum(itemsNum.toString());
|
||||
}
|
||||
Object itemsText = mapList.get(i).get("itemsText");
|
||||
if (null != itemsText) {
|
||||
sarFileCompareItem.setItemsText(itemsText.toString());
|
||||
}
|
||||
Object targetStand = mapList.get(i).get("targetStand");
|
||||
if (targetStand != null) {
|
||||
sarFileCompareItem.setTargetStand((int) targetStand);
|
||||
}
|
||||
sarFileCompareItemService.add(sarFileCompareItem);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.compare.service.impl;
|
||||
|
||||
import com.jero.modules.compare.entity.SarFileCompareItem;
|
||||
import com.jero.modules.compare.mapper.SarFileCompareItemMapper;
|
||||
import com.jero.modules.compare.service.ISarFileCompareItemService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 文档对比信息条款表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class SarFileCompareItemServiceImpl extends ServiceImpl<SarFileCompareItemMapper, SarFileCompareItem> implements ISarFileCompareItemService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param sarFileCompareItem
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(SarFileCompareItem sarFileCompareItem) {
|
||||
Date now = new Date();
|
||||
sarFileCompareItem.setCreateTime(now);
|
||||
sarFileCompareItem.setUpdateTime(now);
|
||||
save(sarFileCompareItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param sarFileCompareItem
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(SarFileCompareItem sarFileCompareItem) {
|
||||
Date now = new Date();
|
||||
sarFileCompareItem.setUpdateTime(now);
|
||||
saveOrUpdate(sarFileCompareItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SarFileCompareItem queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SarFileCompareItem> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
+266
@@ -0,0 +1,266 @@
|
||||
package com.jero.modules.compare.utils;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.extra.tokenizer.Result;
|
||||
import cn.hutool.extra.tokenizer.TokenizerEngine;
|
||||
import cn.hutool.extra.tokenizer.TokenizerUtil;
|
||||
import cn.hutool.extra.tokenizer.Word;
|
||||
import cn.hutool.extra.tokenizer.engine.hanlp.HanLPEngine;
|
||||
import cn.hutool.extra.tokenizer.engine.jieba.JiebaEngine;
|
||||
import com.hankcs.hanlp.HanLP;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jsoup.Jsoup;
|
||||
import org.wltea.analyzer.core.IKSegmenter;
|
||||
import org.wltea.analyzer.core.Lexeme;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
public class CompHanLPUtils {
|
||||
|
||||
|
||||
/**
|
||||
* 通过Ik 进行将句子分词
|
||||
*
|
||||
* @param text
|
||||
* @return
|
||||
*/
|
||||
public static Vector<String> participleIk(String text) {
|
||||
//对输入进行分词
|
||||
Vector<String> str = new Vector<>();
|
||||
try {
|
||||
StringReader reader = new StringReader(text);
|
||||
//当为true时,分词器进行最大词长切分
|
||||
IKSegmenter ik = new IKSegmenter(reader, true);
|
||||
Lexeme lexeme = null;
|
||||
while ((lexeme = ik.next()) != null) {
|
||||
str.add(lexeme.getLexemeText());
|
||||
}
|
||||
if (str.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
//分词后
|
||||
log.info("str分词后:" + str);
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 结巴分词
|
||||
*
|
||||
* @param text
|
||||
* @return
|
||||
*/
|
||||
public static Vector<String> participleJieBa(String text) {
|
||||
JiebaEngine engine = new JiebaEngine();
|
||||
Result results = engine.parse(text);
|
||||
//输出:这 两个 方法 的 区别 在于 返回 值
|
||||
String result = CollUtil.join((Iterator<Word>) results, ",");
|
||||
return new Vector<>(Arrays.asList(result.split(",")));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 中文分词
|
||||
*
|
||||
* @param text
|
||||
* @return
|
||||
*/
|
||||
public static Vector<String> participleChinese(String text) {
|
||||
//自动根据用户引入的分词库的jar来自动选择使用的引擎
|
||||
TokenizerEngine engine = TokenizerUtil.createEngine();
|
||||
//解析文本
|
||||
//String text = "这两个方法的区别在于返回值";
|
||||
Result results = engine.parse(text);
|
||||
//输出:这 两个 方法 的 区别 在于 返回 值
|
||||
String result = CollUtil.join((Iterator<Word>) results, ",");
|
||||
return new Vector<>(Arrays.asList(result.split(",")));
|
||||
}
|
||||
|
||||
/**
|
||||
* 采用 HanLP 进行自定义分词
|
||||
*/
|
||||
public static Vector<String> participleHanLP(String text) {
|
||||
TokenizerEngine engine = new HanLPEngine();
|
||||
//解析文本
|
||||
//String text = "这两个方法的区别在于返回值";
|
||||
Result results = engine.parse(text);
|
||||
//输出:这 两个 方法 的 区别 在于 返回 值
|
||||
String result = CollUtil.join((Iterator<Word>) results, ",");
|
||||
return new Vector<>(Arrays.asList(result.split(",")));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Java利用hanlp完成语句相似度分析
|
||||
*
|
||||
* @param sentenceOne
|
||||
* @param sentenceTwo
|
||||
* @return
|
||||
*/
|
||||
public static double findSimilarity(String sentenceOne, String sentenceTwo) {
|
||||
List<String> sentOneWords = getSplitWords(sentenceOne);
|
||||
List<String> sentTwoWords = getSplitWords(sentenceTwo);
|
||||
List<String> allWords = mergeList(sentOneWords, sentTwoWords);
|
||||
int[] statisticOne = statistic(allWords, sentOneWords);
|
||||
int[] statisticTwo = statistic(allWords, sentTwoWords);
|
||||
double dividend = 0;
|
||||
double divisor1 = 0;
|
||||
double divisor2 = 0;
|
||||
int length = statisticOne.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
dividend += statisticOne[i] * statisticTwo[i];
|
||||
divisor1 += Math.pow(statisticOne[i], 2);
|
||||
divisor2 += Math.pow(statisticTwo[i], 2);
|
||||
}
|
||||
return dividend / (Math.sqrt(divisor1) * Math.sqrt(divisor2));
|
||||
}
|
||||
|
||||
|
||||
private static int[] statistic(List<String> allWords, List<String> sentWords) {
|
||||
int[] result = new int[allWords.size()];
|
||||
int size = allWords.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
result[i] = Collections.frequency(sentWords, allWords.get(i));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 去重
|
||||
*
|
||||
* @param listOne
|
||||
* @param listTwo
|
||||
* @return
|
||||
*/
|
||||
private static List<String> mergeList(List<String> listOne, List<String> listTwo) {
|
||||
List<String> result = new ArrayList<>();
|
||||
result.addAll(listOne);
|
||||
result.addAll(listTwo);
|
||||
return result.stream().distinct().collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 过滤标签
|
||||
*
|
||||
* @param sentence
|
||||
* @return
|
||||
*/
|
||||
private static List<String> getSplitWords(String sentence) {
|
||||
// 去除掉html标签
|
||||
sentence = Jsoup.parse(sentence.replace(" ", "")).body().text();
|
||||
// 标点符号会被单独分为一个Term,去除之
|
||||
return HanLP.segment(sentence).stream().map(a -> a.word).filter(s -> !"`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、? ".contains(s)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
String str1 = "6转向系\n" +
|
||||
"6.1汽车(三轮汽车除外)的方向盘应设置于左侧,其他机动车的方向盘不得设置于右侧;专项作业车、教练车按需要可设置左右两个方向盘。有驾驶室的正三轮摩托车如使用方向盘转向,则方向盘中心立柱距车辆纵向中心平面的水平距离应小于等于200 mm;其他摩托车不得使用方向盘转向。\n" +
|
||||
"6.2机动车的方向盘(或方向把)应转动灵活,操纵方便,无卡滞现象。机动车应设置转向限位装置。转向系统在任何操作位置上,不得与其他部件有干涉现象。\n" +
|
||||
"6.3机动车(摩托车、三轮汽车、手扶拖拉机运输机组除外)正常行驶时,转向轮转向后应有一定的回正能力(允许有残余角),以使机动车具有稳定的直线行驶能力。\n" +
|
||||
"6.4机动车方向盘的最大自由转动量应小于或等于:\n" +
|
||||
"a) 最大设计车速大于或等于100 km/h 的机动车:15°\n" +
|
||||
"b) 三轮汽车:35°;\n" +
|
||||
"c) 其他机动车:25° 。\n" +
|
||||
"6.5汽车(三轮汽车除外)应具有适度的不足转向特性。\n" +
|
||||
"6.6三轮汽车、摩托车的转向轮向左或向右转角应小于等于:\n" +
|
||||
"a)\t三轮汽车、三轮摩托车、正三轮轻便摩托车:45°;\n" +
|
||||
"6)\t\t两轮普通摩托车、两轮轻便摩托车:48°。\n" +
|
||||
"6.6机动车在平坦、硬实、干燥和清洁的道路上行驶不应跑偏,其方向盘(或方向把)不应有摆振、路感不灵或其他异常现象。\n" +
|
||||
"6.8机动车在平坦、硬实、干燥和清洁的水泥或沥青道路上行驶,以10 km/h的速度在5 s之内沿螺旋线从直线行驶过渡到外圆直径为25 m的车辆通道圆行驶,施加于方向盘外缘的最大切向力应小于等于245 N。\n" +
|
||||
"6.9专用校车应采用转向助力装置;其他机动车转向轴最大设计轴荷大于4 000 kg时,也应采用转向助力装置。装有转向助力装置的机动车,转向时其转向助力功能不得出现时有时无的现象,且转向助力装置失效时仍应具有用方向盘控制机动车的能力。装有电动转向助力装置的汽车,在产品使用说明书规定的正常使用状态下,应保证转向助力装置的电能供应。\n" +
|
||||
"6.10汽车和汽车列车(不计具有作业功能的专用装置的突出部分)、轮式拖拉机运输机组应能在同一个车辆通道圆内通过,车辆通道圆的外圆直径认为25.00 m,车辆通道圆的内圆直径D2为10.60 m。 汽车和汽车列车、轮式拖拉机运输机组由直线行驶过渡到上述圆周运动时,任何部分超出直线行驶时的 车辆外侧面垂直面的值(外摆值)应小于等于0.80 m(对铰接客车和铰接式无轨电车外摆值应小于等于 1.20 m),其试验方法见GB 1589。\n" +
|
||||
"6.11汽车(三轮汽车除外)的车轮定位应与该车型的技术要求一致。对前轴采用非独立悬架的汽车(前轴采用双转向轴时除外),其转向轮的横向侧滑量,用侧滑台检验时侧滑量值应在±5 m/km之间。\n" +
|
||||
"6.12转向节及臂,转向横、直拉杆及球销不得有裂纹和损伤,并且转向球销不应松旷。对机动车进行改装或修理时横、直拉杆不得拼焊。\n" +
|
||||
"6.13三轮汽车、摩托车的前减振器、上下联板和方向把不应有变形和裂损。\n";
|
||||
String str2 = "6转向系\n" +
|
||||
"6.1汽车(三轮汽车除外)的方向盘应设置于左侧,其他机动车的方向盘不应设置于右侧;专项作业车、教练车按需要可设置左右两个方向盘。装有两个后轮、有驾驶室的正三轮摩托车如使用方向盘转向,则方向盘中心立柱距车辆纵向中心平面的水平距离应小于或等于200 mm ;其他摩托车不应使用方向盘转向。\n" +
|
||||
"6.2机动车的方向盘(或方向把)应转动灵活,无卡滞现象。机动车应设置转向限位装置。转向系统在任何操作位置上,不应与其他部件有干涉现象。\n" +
|
||||
"6.3机动车(摩托车、三轮汽车、手扶拖拉机运输机组除外〉正常行驶时,转向轮转向后应有一定的回正能力(允许有残余角),以使机动车具有稳定的直线行驶能力0\n" +
|
||||
"6.4机动车方向盘的最大自由转动量应小于或等于:\n" +
|
||||
"a) 最大设计车速大于或等于100 km/h 的机动车:15°\n" +
|
||||
"b) 三轮汽车:35°;\n" +
|
||||
"c) 其他机动车:25° 。\n" +
|
||||
"6.5汽车(三轮汽车除外)应具有适度的不足转向特性。\n" +
|
||||
"6.6三轮汽车、摩托车的转向轮向左或向右转角应小于或等于:\n" +
|
||||
"a) 三轮汽车、三轮摩托车、正三轮轻便摩托车:45°;\n" +
|
||||
"b)两轮普通摩托车、两轮轻便摩托车:48°0\n" +
|
||||
"6.7机动车在平坦、硬实、干燥和清洁的道路上行驶不应跑偏,其方向盘(或方向把)不应有摆振等异常现象。\n" +
|
||||
"6.8机动车在平坦、硬实、干燥和清洁的水泥或沥青道路上行驶,以10 km/h 的速度在5 s 之内沿螺旋线从直线行驶过渡到外圆直径为25m 的车辆通道圆行驶,施加于方向盘外缘的最大切向力应小于或等于245 N。\n" +
|
||||
"6.9汽车(三轮汽车除外)的车轮定位应与该车型的技术要求一致。对前轴采用非独立悬架的汽车(前轴采用双转向轴时除外),其转向轮的横向侧滑量,用侧滑台检验时侧滑量值应小于或等于5 m/km。\n" +
|
||||
"6.10 专用校车应采用转向助力装置;其他机动车转向轴最大设计轴荷大于4 000 kg 时,也应采用转向助力装置。装有转向助力装置的机动车,转向时其转向助力功能不应出现时有时无的现象,且转向助力装置失效时仍应具有用方向盘控制机动车的能力。\n" +
|
||||
"6.11转向节及臂,转向横、直拉杆及球销应连接可靠,且不应有裂纹和损伤,并且转向球销不应松旷。对机动车进行改装或修理时横、直拉杆不应拼焊。\n" +
|
||||
"6.12三轮汽车、摩托车的前减振器、上下联板和方向把不应有变形和裂损。";
|
||||
String str3 = "\n" +
|
||||
"5车辆识别代号的标示位置\n" +
|
||||
"5.1每辆车辆都应具有唯一的车辆识别代号,并永久保持地标示在车辆上,同一车辆上标示的所有的 车辆识别代号的字码构成与排列顺序应相同。除第9章规定的情况外,不得对已标示的车辆识别代号 进行变更。\n" +
|
||||
"5.2车辆应在产品标牌上标示车辆识别代号(L1、L3类车辆可除外),产品标牌的型式、标示位置、标示要求应符合GB/T 18411的规定。\n" +
|
||||
"5.3车辆应至少有一个车辆识别代号直接打刻在车架(无车架的车辆为车身主要承载且不能拆卸的部件)能防止锈烛、磨损的部位上。其中:\n" +
|
||||
"a)\tM1类车辆的车辆识别代号应打刻在发动机舱内能防止替换的车辆结构件上,或打刻在车门 立柱上,如受结构限制没有打刻空间时也可打刻在右侧除行李舱外的车辆其他结构件上;\n" +
|
||||
"b)\t最大设计总质量大于或等于12000 kg的货车及所有牵引杆挂车,车辆识别代号应打刻在右前轮纵向中心线前端纵梁外侧,如受结构限制也可打刻在右前轮纵向中心线附近纵梁外侧;\n" +
|
||||
"c)\t半挂车和中置轴挂车的车辆识别代号应打刻在右前支腿前端纵梁外侧(无纵梁车辆除外);\n" +
|
||||
"d)\t其他汽车和无纵梁挂车的车辆识别代号应打刻在车辆右侧前部的车辆结构件上,如受结构限 制也可打刻在右侧其他车辆结构件上。\n" +
|
||||
"打刻车辆识别代号的部件不应采用打磨、挖补、垫片、凿改、重新涂漆(设计和制造上为保护打刻的 车辆识别代号而采取涂漆工艺的情形除外)等方式处理,从上(前)方观察时,打刻区域周边足够大面积 的表面不应有任何覆盖物,如有覆盖物,该覆盖物的表面应明确标示“车辆识别代号”或“VIN”字样,且覆盖物在不使用任何专用工具的情况下能直接取下(或揭开)及复原,以方便地观察到足够大的包括打刻区域的表面。\n" +
|
||||
"注1:打刻区域周边足够大面积的表面(足够大的包括打刻区域的表面)是指打刻车辆识别代号的部件的全部表面,但所暴露表面能满足查看打刻车辆识别代号的部件有无挖补、重新焊接、粘贴等痕迹的需要时,也应视为满足要求。\n" +
|
||||
"注2:对摩托车,打刻的车辆识别代号在不举升车辆的情形下可观察、拓印的,视为满足要求。\n" +
|
||||
"打刻的车辆识别代号从上(前)方应易于观察、拓印,对于汽车和挂车还应能拍照。\n" +
|
||||
"5.4具有电子控制单元的汽车,其至少有一个电子控制单元应不可篡改地存储车辆识别代号。\n" +
|
||||
"5.5 M1、N1类车辆应在靠近风窗立柱的位置标示车辆识别代号,该车辆识别代号在白天不需移动任何部件从车外即能清晰识读。\n" +
|
||||
"5.6除按照5.2、5.3、5.4、5.5规定标示车辆识别代号之外,类车辆还应在行李舱的易见部位标示车辆识别代号;且若车辆制造厂选取车辆识别代号作为车辆及部件识别标记的标识信息,还应按照GB 30509的规定,标示车辆识别代号。\n" +
|
||||
"5.7除按照5.2、5.3、5.4规定标示车辆识别代号之外,最大设计总质量大于或等于12000 kg的栏板式、仓栅式、自卸式、罐式货车及最大设计总质量大于或等于10000 kg的栏板式、仓栅式、自卸式、罐式挂车还应在其货箱或常压罐体(或设计和制造上固定在货箱或常压罐体上且用于与车架连接的结构件)上打刻至少两个车辆识别代号。打刻的车辆识别代号应位于货箱(常压罐体)左、右两侧或前端面且易于拍照;且若打刻在货箱(常压罐体)左、右两侧时,打刻的车辆识别代号距货箱(常压罐体)前端面的距离应小于或等于1 000 mm,若打刻在左、右两侧连接结构件时应尽量靠近货箱(常压罐体)前端面。\n" +
|
||||
"5.8车辆制造厂应至少在一种随车文件中标示车辆识别代号。";
|
||||
|
||||
String str4 = "\n" +
|
||||
"5.3车辆的驱动\n" +
|
||||
"5.3.1车辆不应靠自身动力驱动。\n" +
|
||||
"5.3.2在碰撞瞬间,车辆应不冉承受任何附加转向或驱动装置的作用。\n" +
|
||||
"5.3.3车辆到达壁障的路线在横向任一方向偏离理论轨迹均不应超过150 mm。\n" +
|
||||
"5.4 试验速度\n" +
|
||||
"在碰撞瞬间,车辆速度应为504 km/h。如果试验在更高的碰撞速度下进行并且车辆符合要求,也认为试验合格。\n" +
|
||||
"5.5对前排座椅假人的测量\n" +
|
||||
"5.5.1为确定性能指标必需的所有测量,均应采用符合附录D要求的测量系统。\n" +
|
||||
"5.5.2不同的参数应通过具备下列CFC(通道的频率等级)的独立数据通道来记录。\n" +
|
||||
"5.5.2.1对假人头部的测量\n" +
|
||||
"重心处的加速度(a)由加速度的二维分量计算得出。加速度分量测量时,CFC为1000。\n" +
|
||||
"5.5.2.2对假人颈部的测量\n" +
|
||||
"5.5.2.2.1在头颈连接处测量的轴向张力和前后剪切力,CFC为1000。\n" +
|
||||
"5.5.2.2.2在头颈连接处测量的对Y轴的弯矩,CFC为600。\n" +
|
||||
"5.5.2.3对假人胸部的测量\n" +
|
||||
"胸部变形测量时,CFC为180。\n" +
|
||||
"5.5.2.4对假人大腿的测量\n" +
|
||||
"轴向压缩力测量时,CFC为600。";
|
||||
|
||||
|
||||
double similarity = CompHanLPUtils.findSimilarity(str1, str2);
|
||||
NumberFormat nf = NumberFormat.getPercentInstance();
|
||||
nf.setMaximumIntegerDigits(2);//小数点前保留几位
|
||||
nf.setMinimumFractionDigits(2);// 小数点后保留几位
|
||||
String similarityDegree = nf.format(similarity);
|
||||
System.out.println(similarityDegree);
|
||||
System.out.println("======================================================");
|
||||
double similarity1 = CompHanLPUtils.findSimilarity(str1, str3);
|
||||
System.out.println(similarity1);
|
||||
|
||||
System.out.println("======================================================");
|
||||
double similarity2 = CompHanLPUtils.findSimilarity(str1, str4);
|
||||
System.out.println(similarity2);
|
||||
|
||||
|
||||
System.out.println("======================================================");
|
||||
double similarity3 = CompHanLPUtils.findSimilarity(str3, str4);
|
||||
System.out.println(similarity3);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.jero.modules.compare.utils.treeTool;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
/**
|
||||
* List 排序 Comparator
|
||||
* @author david
|
||||
*/
|
||||
public class OrdNamComparator implements Comparator<TreeNode> {
|
||||
|
||||
@Override
|
||||
public int compare(TreeNode t1, TreeNode t2) {
|
||||
if (t1.getOrderNum() > t2.getOrderNum()) {
|
||||
return 1;
|
||||
}
|
||||
if (t1.getOrderNum() < t2.getOrderNum()) {
|
||||
return -1;
|
||||
}
|
||||
return t1.getNodeName().compareTo(t2.getNodeName());
|
||||
}
|
||||
}
|
||||
+174
@@ -0,0 +1,174 @@
|
||||
package com.jero.modules.compare.utils.treeTool;
|
||||
|
||||
import com.jero.modules.compare.utils.treeTool.annotation.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 构建树形建构
|
||||
*
|
||||
* @author David
|
||||
*/
|
||||
public class Tree<T> {
|
||||
/**
|
||||
* 用于存放treeNode的Map
|
||||
*/
|
||||
private LinkedHashMap<String, TreeNode> treeNodesMap = new LinkedHashMap<>();
|
||||
/**
|
||||
* 用于存放treeNode的list
|
||||
*/
|
||||
private List<TreeNode> treeNodesList = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 构造方法
|
||||
*
|
||||
* @param list
|
||||
*/
|
||||
public Tree(List<T> list) {
|
||||
initTreeNodeMap(list);
|
||||
initTreeNodeList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 将List对象数据转为TreeNodeMap
|
||||
*
|
||||
* @param list
|
||||
*/
|
||||
private void initTreeNodeMap(List<T> list) {
|
||||
TreeNode treeNode;
|
||||
for (Object item : list) {
|
||||
treeNode = new TreeNode();
|
||||
treeNode.setNodeId(getFieldValue(item, "TreeNodeId"));
|
||||
treeNode.setNodeName(getFieldValue(item, "TreeNodeName"));
|
||||
treeNode.setParentNodeId(getFieldValue(item, "TreeNodeParentId"));
|
||||
if(StringUtils.isEmpty(getFieldValue(item, "TreeNodeLevel"))) {
|
||||
treeNode.setLevel(0);
|
||||
} else {
|
||||
treeNode.setLevel(Integer.parseInt(getFieldValue(item, "TreeNodeLevel")));
|
||||
}
|
||||
if(StringUtils.isEmpty(getFieldValue(item, "TreeNodeOrder"))) {
|
||||
treeNode.setOrderNum(0);
|
||||
} else {
|
||||
treeNode.setOrderNum(Integer.parseInt(getFieldValue(item, "TreeNodeOrder")));
|
||||
}
|
||||
treeNode.setLastNodeNum(1);
|
||||
treeNode.setData(item);
|
||||
treeNodesMap.put(treeNode.getNodeId(), treeNode);
|
||||
}
|
||||
Iterator<TreeNode> iterator = treeNodesMap.values().iterator();
|
||||
TreeNode parentTreeNode;
|
||||
while (iterator.hasNext()) {
|
||||
treeNode = iterator.next();
|
||||
if (StringUtils.isEmpty(treeNode.getParentNodeId())) {
|
||||
continue;
|
||||
}
|
||||
parentTreeNode = treeNodesMap.get(treeNode.getParentNodeId());
|
||||
if (parentTreeNode != null) {
|
||||
treeNode.setParent(parentTreeNode);
|
||||
parentTreeNode.addChild(treeNode);
|
||||
// 按照orderNum排序
|
||||
Collections.sort(parentTreeNode.getChildren(), new OrdNamComparator());
|
||||
// 判断这个节点是否是最子节点
|
||||
if (treeNode.getChildren().size() == 0) {
|
||||
treeNode.setLastNode(true);
|
||||
}
|
||||
// 计算每一个节点的最子节点的数量
|
||||
List<TreeNode> children = parentTreeNode.getChildren();
|
||||
if (children.size() > 0) {
|
||||
int sum = 0;
|
||||
for (TreeNode treeNode2 : children) {
|
||||
sum += treeNode2.getLastNodeNum();
|
||||
}
|
||||
parentTreeNode.setLastNodeNum(sum);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getFieldValue(Object obj, String type) {
|
||||
Class clz = obj.getClass();
|
||||
Field[] fields = clz.getDeclaredFields();
|
||||
String value = null;
|
||||
try {
|
||||
for(Field field : fields){
|
||||
field.setAccessible(true);
|
||||
switch (type){
|
||||
case "TreeNodeId":
|
||||
if(field.isAnnotationPresent(TreeNodeId.class)) {
|
||||
value = String.valueOf(field.get(obj));
|
||||
}
|
||||
break;
|
||||
case "TreeNodeParentId":
|
||||
if(field.isAnnotationPresent(TreeNodeParentId.class)) {
|
||||
value = String.valueOf(field.get(obj));
|
||||
}
|
||||
break;
|
||||
case "TreeNodeName":
|
||||
if(field.isAnnotationPresent(TreeNodeName.class)) {
|
||||
value = String.valueOf(field.get(obj));
|
||||
}
|
||||
break;
|
||||
case "TreeNodeOrder":
|
||||
if(field.isAnnotationPresent(TreeNodeOrder.class)) {
|
||||
value = String.valueOf(field.get(obj));
|
||||
}
|
||||
break;
|
||||
case "TreeNodeLevel":
|
||||
if(field.isAnnotationPresent(TreeNodeLevel.class)) {
|
||||
value = String.valueOf(field.get(obj));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据treeNodesMap转为treeNodesList
|
||||
*/
|
||||
private void initTreeNodeList() {
|
||||
if (treeNodesList.size() > 0) {
|
||||
return;
|
||||
}
|
||||
if (treeNodesMap.size() == 0) {
|
||||
return;
|
||||
}
|
||||
Iterator<TreeNode> iterator = treeNodesMap.values().iterator();
|
||||
TreeNode treeNode;
|
||||
while (iterator.hasNext()) {
|
||||
treeNode = iterator.next();
|
||||
if (treeNode.getParent() == null) {
|
||||
this.treeNodesList.add(treeNode);
|
||||
this.treeNodesList.addAll(treeNode.getAllChildren());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<TreeNode> getTree() {
|
||||
return this.treeNodesList;
|
||||
}
|
||||
|
||||
public List<TreeNode> getRoot() {
|
||||
List<TreeNode> rootList = new ArrayList<>();
|
||||
if (this.treeNodesList.size() > 0) {
|
||||
for (TreeNode node : treeNodesList) {
|
||||
if (node.getParent() == null) {
|
||||
rootList.add(node);
|
||||
Collections.sort(rootList, new OrdNamComparator());
|
||||
}
|
||||
}
|
||||
}
|
||||
return rootList;
|
||||
}
|
||||
|
||||
public TreeNode getTreeNode(String nodeId) {
|
||||
return this.treeNodesMap.get(nodeId);
|
||||
}
|
||||
}
|
||||
+202
@@ -0,0 +1,202 @@
|
||||
package com.jero.modules.compare.utils.treeTool;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author David
|
||||
*/
|
||||
public class TreeNode {
|
||||
|
||||
/**
|
||||
* 树节点ID
|
||||
*/
|
||||
@JSONField(ordinal = 1)
|
||||
private String nodeId;
|
||||
/**
|
||||
* 树节点名称
|
||||
*/
|
||||
@JSONField(ordinal = 2)
|
||||
private String nodeName;
|
||||
/**
|
||||
* 父节点ID
|
||||
*/
|
||||
@JSONField(ordinal = 3)
|
||||
private String parentNodeId;
|
||||
/**
|
||||
* 节点在树中的排序号
|
||||
*/
|
||||
@JSONField(ordinal = 4)
|
||||
private int orderNum;
|
||||
/**
|
||||
* 节点所在的层级
|
||||
*/
|
||||
@JSONField(ordinal = 5)
|
||||
private int level;
|
||||
/**
|
||||
* 最子节点的数量
|
||||
*/
|
||||
@JSONField(ordinal = 6)
|
||||
private int lastNodeNum;
|
||||
|
||||
/**
|
||||
* 是否是最子节点
|
||||
*/
|
||||
@JSONField(ordinal = 7)
|
||||
private boolean lastNode;
|
||||
|
||||
private Object data;
|
||||
|
||||
/**
|
||||
* 当前节点的儿子节点
|
||||
*/
|
||||
@JSONField(ordinal = 8)
|
||||
private List<TreeNode> children = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 当前节点的完整路径
|
||||
*/
|
||||
@JSONField(ordinal = 9)
|
||||
private String completeName;
|
||||
|
||||
/**
|
||||
* 当前节点的父级节点
|
||||
* 转json的时候忽略此属性,因为此属性到前端无作用
|
||||
*/
|
||||
@JSONField(serialize = false)
|
||||
private TreeNode parent;
|
||||
|
||||
/**
|
||||
* 当前节点的子孙节点
|
||||
* 转json的时候忽略此属性,因为此属性到前端无作用
|
||||
*/
|
||||
@JSONField(serialize = false)
|
||||
private List<TreeNode> allChildren = new ArrayList<>();
|
||||
|
||||
private int standFlag;
|
||||
|
||||
public TreeNode(TreeNode obj) {
|
||||
this.orderNum = obj.getOrderNum();
|
||||
this.level = obj.getLevel();
|
||||
this.lastNodeNum = obj.getLastNodeNum();
|
||||
}
|
||||
|
||||
public TreeNode() {
|
||||
}
|
||||
|
||||
public void addChild(TreeNode treeNode) {
|
||||
this.children.add(treeNode);
|
||||
}
|
||||
|
||||
public void removeChild(TreeNode treeNode) {
|
||||
this.children.remove(treeNode);
|
||||
}
|
||||
|
||||
public String getNodeId() {
|
||||
return nodeId;
|
||||
}
|
||||
|
||||
public void setNodeId(String nodeId) {
|
||||
this.nodeId = nodeId;
|
||||
}
|
||||
|
||||
public String getNodeName() {
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
public void setNodeName(String nodeName) {
|
||||
this.nodeName = nodeName;
|
||||
}
|
||||
|
||||
public String getParentNodeId() {
|
||||
return parentNodeId;
|
||||
}
|
||||
|
||||
public void setParentNodeId(String parentNodeId) {
|
||||
this.parentNodeId = parentNodeId;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public TreeNode getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public void setParent(TreeNode parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public List<TreeNode> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<TreeNode> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public int getOrderNum() {
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum(int orderNum) {
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public int getLastNodeNum() {
|
||||
return lastNodeNum;
|
||||
}
|
||||
|
||||
public void setLastNodeNum(int lastNodeNum) {
|
||||
this.lastNodeNum = lastNodeNum;
|
||||
}
|
||||
|
||||
public boolean isLastNode() {
|
||||
return lastNode;
|
||||
}
|
||||
|
||||
public void setLastNode(boolean lastNode) {
|
||||
this.lastNode = lastNode;
|
||||
}
|
||||
|
||||
public List<TreeNode> getAllChildren() {
|
||||
if (this.allChildren.isEmpty()) {
|
||||
for (TreeNode treeNode : this.children) {
|
||||
this.allChildren.add(treeNode);
|
||||
this.allChildren.addAll(treeNode.getAllChildren());
|
||||
}
|
||||
}
|
||||
return this.allChildren;
|
||||
}
|
||||
|
||||
public String getCompleteName() {
|
||||
return completeName;
|
||||
}
|
||||
|
||||
public void setCompleteName(String completeName) {
|
||||
this.completeName = completeName;
|
||||
}
|
||||
|
||||
public Object getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(Object data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public int getStandFlag() {
|
||||
return standFlag;
|
||||
}
|
||||
|
||||
public void setStandFlag(int standFlag) {
|
||||
this.standFlag = standFlag;
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.jero.modules.compare.utils.treeTool.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author david
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD})
|
||||
@Documented
|
||||
public @interface TreeNodeId {
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.jero.modules.compare.utils.treeTool.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author david
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD})
|
||||
@Documented
|
||||
public @interface TreeNodeLevel {
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.jero.modules.compare.utils.treeTool.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author david
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD})
|
||||
@Documented
|
||||
public @interface TreeNodeName {
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.jero.modules.compare.utils.treeTool.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author david
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD})
|
||||
@Documented
|
||||
public @interface TreeNodeOrder {
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.jero.modules.compare.utils.treeTool.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author david
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.FIELD})
|
||||
@Documented
|
||||
public @interface TreeNodeParentId {
|
||||
}
|
||||
+26
-7
@@ -4,13 +4,12 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.docTranslation.entity.DocTranslationEO;
|
||||
import com.jero.modules.docTranslation.service.IDocTranslationEOService;
|
||||
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;
|
||||
@@ -21,7 +20,6 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档翻译表
|
||||
* @Author: jero-boot
|
||||
@@ -53,9 +51,7 @@ public class DocTranslationEOController extends JeroController<DocTranslationEO,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@RequestParam(name="cut", defaultValue="cn") String cut,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<DocTranslationEO> queryWrapper = QueryGenerator.initQueryWrapper(docTranslationEO, req.getParameterMap());
|
||||
Page<DocTranslationEO> page = new Page<DocTranslationEO>(pageNo, pageSize);
|
||||
IPage<DocTranslationEO> pageList = docTranslationEOService.page(page, queryWrapper);
|
||||
IPage<DocTranslationEO> pageList = docTranslationEOService.queryPageList(docTranslationEO,pageNo,pageSize,cut,req);
|
||||
return Result.OK(cut,pageList);
|
||||
}
|
||||
|
||||
@@ -168,4 +164,27 @@ public class DocTranslationEOController extends JeroController<DocTranslationEO,
|
||||
return super.importExcel(request, response, DocTranslationEO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新文档翻译表发布情况
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档翻译表-批量更新发布情况")
|
||||
@ApiOperation(value="文档翻译表-批量更新发布情况", notes="文档翻译表-批量更新发布情况")
|
||||
@PostMapping(value = "/updateRleaseConditionBatch")
|
||||
public Result<?> updateRleaseConditionBatch(@RequestBody JSONObject json) {
|
||||
return this.docTranslationEOService.updateRleaseConditionBatch(json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新文档翻译表状态
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档翻译表-查询文本状态下拉选项")
|
||||
@ApiOperation(value="文档翻译表-查询文本状态下拉选项", notes="文档翻译表-查询文本状态下拉选项")
|
||||
@GetMapping(value = "/queryTextStatusVal")
|
||||
public Result<?> queryTextStatusVal() {
|
||||
return this.docTranslationEOService.queryTextStatusVal();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
-1
@@ -2,6 +2,7 @@ package com.jero.modules.docTranslation.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
@@ -73,10 +74,12 @@ public class DocTranslationEO implements Serializable {
|
||||
private String title;
|
||||
|
||||
/**文本状态*/
|
||||
@Dict(dicCode = "state")
|
||||
//@Dict(dicCode = "state")
|
||||
@Excel(name = "文本状态", width = 15)
|
||||
@ApiModelProperty(value = "文本状态")
|
||||
private java.lang.String textStatus;
|
||||
@TableField(exist = false)
|
||||
private String textStatus_dictText;
|
||||
|
||||
/**文件名称*/
|
||||
@Excel(name = "文件名称", width = 15)
|
||||
|
||||
+29
@@ -1,7 +1,12 @@
|
||||
package com.jero.modules.docTranslation.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.docTranslation.entity.DocTranslationEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -58,4 +63,28 @@ public interface IDocTranslationEOService extends IService<DocTranslationEO> {
|
||||
* @return
|
||||
*/
|
||||
List<DocTranslationEO> queryList();
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param docTranslationEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param cut
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
IPage<DocTranslationEO> queryPageList(DocTranslationEO docTranslationEO, Integer pageNo, Integer pageSize, String cut, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 批量更新发布情况
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
Result<?> updateRleaseConditionBatch(JSONObject json);
|
||||
|
||||
/**
|
||||
* 查询文本状态下拉选项(文档库中,文件类型字段)
|
||||
* @return
|
||||
*/
|
||||
Result<?> queryTextStatusVal();
|
||||
}
|
||||
|
||||
+99
@@ -1,20 +1,40 @@
|
||||
package com.jero.modules.docTranslation.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.ModuleEnum;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
import com.jero.modules.docTranslation.entity.DocTranslationEO;
|
||||
import com.jero.modules.docTranslation.enums.ReleaseConditionEnum;
|
||||
import com.jero.modules.docTranslation.enums.TranslationResultEnum;
|
||||
import com.jero.modules.docTranslation.mapper.DocTranslationEOMapper;
|
||||
import com.jero.modules.docTranslation.service.IDocTranslationEOService;
|
||||
import com.jero.modules.docTranslation.utils.TranslationDocumentUtils;
|
||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import me.zhyd.oauth.utils.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description: 文档翻译表
|
||||
* @Author: jero-boot
|
||||
@@ -25,6 +45,8 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMapper, DocTranslationEO> implements IDocTranslationEOService {
|
||||
|
||||
@Autowired
|
||||
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -103,4 +125,81 @@ public class DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMap
|
||||
public List<DocTranslationEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<DocTranslationEO> queryPageList(DocTranslationEO docTranslationEO, Integer pageNo, Integer pageSize, String cut, HttpServletRequest req) {
|
||||
Page<DocTranslationEO> page = new Page<DocTranslationEO>(pageNo, pageSize);
|
||||
|
||||
QueryWrapper<DocTranslationEO> queryWrapper = QueryGenerator.initQueryWrapper(docTranslationEO, req.getParameterMap());
|
||||
// 获取当前登录人
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
/**
|
||||
* 数据权限:自己创建的、或发布情况为“已发布”的数据
|
||||
*/
|
||||
queryWrapper.lambda().and(query -> {
|
||||
query.eq(DocTranslationEO::getCreateBy,currentUser.getUsername());
|
||||
query.or(o -> {
|
||||
o.eq(DocTranslationEO::getReleaseCondition,ReleaseConditionEnum.PUBLISHED.getValue());
|
||||
});
|
||||
});
|
||||
queryWrapper.lambda().orderByDesc(DocTranslationEO::getCreateTime);
|
||||
IPage<DocTranslationEO> result = this.page(page, queryWrapper);
|
||||
disposeData(result.getRecords(),cut);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param datas
|
||||
* @param cut
|
||||
*/
|
||||
public void disposeData(List<DocTranslationEO> datas,String cut){
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
for (DocTranslationEO data : datas) {
|
||||
String textStatus_dictText = "";
|
||||
OnlCgformField fileTypeField = this.onlCgformFieldService.queryById(data.getTextStatus());
|
||||
if (ObjectUtil.isNotEmpty(fileTypeField)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
textStatus_dictText = fileTypeField.getDbFieldTxt();
|
||||
} else {
|
||||
textStatus_dictText = fileTypeField.getDbFieldEnName();
|
||||
}
|
||||
}
|
||||
data.setTextStatus_dictText(textStatus_dictText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> updateRleaseConditionBatch(JSONObject json) {
|
||||
String ids = json.getString("ids");
|
||||
// 值对应枚举类 ReleaseConditionEnum 发布published 或撤回draft
|
||||
String releaseCondition = json.getString("releaseCondition");
|
||||
if (StringUtils.isNotEmpty(ids)) {
|
||||
List<DocTranslationEO> docTranslationEOList = new ArrayList<>();
|
||||
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
idList.forEach(id -> {
|
||||
DocTranslationEO docTranslationEO = new DocTranslationEO();
|
||||
docTranslationEO.setId(id);
|
||||
docTranslationEO.setReleaseCondition(releaseCondition);
|
||||
docTranslationEOList.add(docTranslationEO);
|
||||
});
|
||||
this.updateBatchById(docTranslationEOList);
|
||||
}
|
||||
return new Result<>().success("操作成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> queryTextStatusVal() {
|
||||
List<OnlCgformField> fieldList = this.onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue());
|
||||
List<OnlCgformField> result = fieldList.stream().filter(field -> {
|
||||
boolean flag = false;
|
||||
if(org.apache.commons.lang3.StringUtils.equals(field.getFieldShowType(), FieldTypeEnum.FILE.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
return Result.OK(result);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -140,11 +140,11 @@ public class TranslationDocumentUtils {
|
||||
}
|
||||
try {
|
||||
FileOutputStream out = new FileOutputStream(newFile);
|
||||
out.write(translateAfter.getBytes("UTF-8"));
|
||||
out.close();
|
||||
|
||||
MultipartFile multipartFile = createMfileByPath(translateAfterFilePath);
|
||||
ossFile = iossFileService.uploadLocalOfCos(multipartFile, "", null, null);
|
||||
out.write(translateAfter.getBytes("UTF-8"));
|
||||
out.close();
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
|
||||
+2
-2
@@ -3189,7 +3189,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//您订阅的XXX已被修改
|
||||
content = "In the "+category + " " + serialNumber+" you subscribed to, has been modified,Please pay attention to check.";
|
||||
String contentInfo = "In the "+category + " " + href+" you subscribed to, "+sysUser.getUsername()+" changed the "+ href + " " + sbStr.toString();
|
||||
String msgTitle = serialNumber + " you subsribed to has been updated";
|
||||
String msgTitle = serialNumber + " you subscribed to has been updated";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdListUpdate, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
@@ -3411,7 +3411,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
String fieldStr = fieldSb.substring(0, fieldSb.length() - 1);
|
||||
|
||||
String field = " osf.id,bdl.serial_number,bdl.title,bdl.title_en,bdl.state,osf.file_name,osf.connect_id," + fieldStr
|
||||
String field = " osf.id,bdl.id as \"buss_document_library_id\",bdl.serial_number,bdl.title,bdl.title_en,bdl.state,osf.file_name,osf.connect_id," + fieldStr
|
||||
+ " from oss_file osf join buss_document_library bdl" + join.toString();
|
||||
|
||||
//查询条件
|
||||
|
||||
+294
@@ -0,0 +1,294 @@
|
||||
package com.jero.modules.extRepo.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.oss.CosBootUtil;
|
||||
import com.jero.generater.modules.online.auth.entity.OnlAuthData;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoData;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoDataPage;
|
||||
import com.jero.modules.extRepo.service.IExtRepoDataService;
|
||||
import com.jero.modules.extRepo.service.IExtRepoFolderService;
|
||||
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
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 javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 对外报告数据表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags = "对外报告数据表")
|
||||
@RestController
|
||||
@RequestMapping("/com.jero.modules.extRepo/extRepoData")
|
||||
@Slf4j
|
||||
public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoDataService> {
|
||||
@Autowired
|
||||
private IExtRepoDataService extRepoDataService;
|
||||
|
||||
@Autowired
|
||||
private IExtRepoFolderService extRepoFolderService;
|
||||
|
||||
|
||||
private final SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd HH:mm:ss");
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param extRepoData
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-分页列表查询")
|
||||
@ApiOperation(value = "对外报告数据表-分页列表查询", notes = "对外报告数据表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ExtRepoData extRepoData,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
LambdaQueryWrapper<ExtRepoData> queryWrapper = new LambdaQueryWrapper<>();
|
||||
Page<ExtRepoData> page = new Page<>(pageNo, pageSize);
|
||||
// 文件名称模糊查询
|
||||
String fileName = req.getParameter("fileName");
|
||||
if (StringUtils.isNotBlank(fileName)) {
|
||||
queryWrapper.like(ExtRepoData::getFileName, fileName);
|
||||
}
|
||||
// 上传人模糊查询
|
||||
String createBy = req.getParameter("createBy");
|
||||
if (StringUtils.isNotBlank(createBy)) {
|
||||
queryWrapper.like(ExtRepoData::getCreateBy, createBy);
|
||||
}
|
||||
// 更新时间查询
|
||||
String createTime = req.getParameter("time");
|
||||
if (StringUtils.isNotBlank(createTime)) {
|
||||
String[] createTimeArr = createTime.split(",");
|
||||
if (createTimeArr.length >= 2) {
|
||||
queryWrapper.between(ExtRepoData::getCreateTime, createTimeArr[0], createTimeArr[1]);
|
||||
}
|
||||
}
|
||||
queryWrapper.eq(ExtRepoData::getSupFolder, extRepoData.getSupFolder());
|
||||
queryWrapper.orderBy(true, false, ExtRepoData::getCreateTime);
|
||||
IPage<ExtRepoData> pageList = extRepoDataService.page(page, queryWrapper);
|
||||
ExtRepoDataPage res = new ExtRepoDataPage(extRepoFolderService.haveManageAuth(extRepoData.getSupFolder()), pageList);
|
||||
return Result.OK(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-列表查询")
|
||||
@ApiOperation(value = "对外报告数据表-列表查询", notes = "对外报告数据表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ExtRepoData>> queryList() {
|
||||
List<ExtRepoData> list = extRepoDataService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param extRepoData
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-添加")
|
||||
@ApiOperation(value = "对外报告数据表-添加", notes = "对外报告数据表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ExtRepoData extRepoData) {
|
||||
Result<ExtRepoData> result = new Result();
|
||||
if (extRepoFolderService.haveManageAuth(extRepoData.getSupFolder())) {
|
||||
log.info("对外报告数据表收到文件添加请求,开始处理文件:【" + sdf.format(new Date()) + "】");
|
||||
int res = extRepoDataService.add(extRepoData);
|
||||
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||
result.success("添加成功:" + res + "条数据!");
|
||||
} else {
|
||||
result.success(res + " pieces of data are added successfully!");
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||
result.error500("没有权限!");
|
||||
} else {
|
||||
result.error500("You do not have permission !");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param extRepoData
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-编辑")
|
||||
@ApiOperation(value = "对外报告数据表-编辑", notes = "对外报告数据表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ExtRepoData extRepoData) {
|
||||
Result<ExtRepoData> result = new Result();
|
||||
ExtRepoData erd = extRepoDataService.queryById(extRepoData.getId());
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if (extRepoFolderService.isManager() || sysUser.getUsername().equals(erd.getCreateBy())) {
|
||||
extRepoData.setSupFolder(erd.getSupFolder());
|
||||
extRepoDataService.editById(extRepoData);
|
||||
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||
result.success("编辑成功!");
|
||||
} else {
|
||||
result.success("Data update successfully!");
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||
result.error500("没有权限!");
|
||||
} else {
|
||||
result.error500("You do not have permission !");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-通过id删除")
|
||||
@ApiOperation(value = "对外报告数据表-通过id删除", notes = "对外报告数据表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam("id") String id,
|
||||
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||
Result<ExtRepoData> result = new Result();
|
||||
ExtRepoData erd = extRepoDataService.queryById(id);
|
||||
if (null != erd) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if (extRepoFolderService.isManager() || sysUser.getUsername().equals(erd.getCreateBy())) {
|
||||
extRepoDataService.deleteById(id);
|
||||
CosBootUtil.delete(erd.getFileKey());
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.success("删除成功!");
|
||||
} else {
|
||||
result.success("Data deletion successfully!");
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.error500("没有权限!");
|
||||
} else {
|
||||
result.error500("You do not have permission!");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.error500("删除失败!");
|
||||
} else {
|
||||
result.error500("Delete failed!");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-批量删除")
|
||||
@ApiOperation(value = "对外报告数据表-批量删除", notes = "对外报告数据表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam("ids") String ids,
|
||||
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||
Result<ExtRepoData> result = new Result();
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<String> idsList = Arrays.asList(ids.split(","));
|
||||
for (String id : idsList) {
|
||||
ExtRepoData erd = extRepoDataService.queryById(id);
|
||||
if (null != erd && !extRepoFolderService.isManager() && !sysUser.getUsername().equals(erd.getCreateBy())) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.error500("没有权限!");
|
||||
} else {
|
||||
result.error500("You do not have permission!");
|
||||
}
|
||||
}
|
||||
}
|
||||
for (String id : idsList) {
|
||||
ExtRepoData erd = extRepoDataService.queryById(id);
|
||||
if (null != erd) {
|
||||
CosBootUtil.delete(erd.getFileKey());
|
||||
this.extRepoDataService.deleteById(id);
|
||||
}
|
||||
}
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.success("删除成功!");
|
||||
} else {
|
||||
result.success("Data deletion successfully!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-通过id查询")
|
||||
@ApiOperation(value = "对外报告数据表-通过id查询", notes = "对外报告数据表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<ExtRepoData> result = new Result();
|
||||
ExtRepoData extRepoData = extRepoDataService.queryById(id);
|
||||
if (extRepoData == null) {
|
||||
result.success("未找到对应数据!");
|
||||
return result;
|
||||
}
|
||||
return result.OK(extRepoData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param extRepoData
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ExtRepoData extRepoData) {
|
||||
return super.exportXls(request, extRepoData, ExtRepoData.class, "对外报告数据表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ExtRepoData.class);
|
||||
}
|
||||
|
||||
}
|
||||
+172
@@ -0,0 +1,172 @@
|
||||
package com.jero.modules.extRepo.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.extRepo.entity.ERFTreeData;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoData;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoFolder;
|
||||
import com.jero.modules.extRepo.service.IExtRepoDataService;
|
||||
import com.jero.modules.extRepo.service.IExtRepoFolderService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 对外报告文件夹表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags = "对外报告文件夹表")
|
||||
@RestController
|
||||
@RequestMapping("/extRepo/extRepoFolder")
|
||||
@Slf4j
|
||||
public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtRepoFolderService> {
|
||||
@Autowired
|
||||
private IExtRepoFolderService extRepoFolderService;
|
||||
|
||||
@Autowired
|
||||
private IExtRepoDataService extRepoDataService;
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告文件夹表-列表查询")
|
||||
@ApiOperation(value = "对外报告文件夹表-列表查询", notes = "对外报告文件夹表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ERFTreeData>> queryList() {
|
||||
List<ERFTreeData> list = extRepoFolderService.queryTreeList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param extRepoFolder
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告文件夹表-添加")
|
||||
@ApiOperation(value = "对外报告文件夹表-添加", notes = "对外报告文件夹表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ExtRepoFolder extRepoFolder) {
|
||||
Result<ExtRepoFolder> result = new Result();
|
||||
if (extRepoFolderService.haveManageAuth(extRepoFolder.getSupFolder())) {
|
||||
extRepoFolderService.add(extRepoFolder);
|
||||
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||
result.success("添加成功!");
|
||||
} else {
|
||||
result.success("Data added successfully!");
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||
result.error500("没有权限!");
|
||||
} else {
|
||||
result.error500("You do not have permission !");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param extRepoFolder
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告文件夹表-编辑")
|
||||
@ApiOperation(value = "对外报告文件夹表-编辑", notes = "对外报告文件夹表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ExtRepoFolder extRepoFolder) {
|
||||
Result<ExtRepoFolder> result = new Result();
|
||||
if (extRepoFolderService.haveManageAuth(extRepoFolder.getId())) {
|
||||
extRepoFolderService.editById(extRepoFolder);
|
||||
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||
result.success("编辑成功!");
|
||||
} else {
|
||||
result.success("Data update successfully!");
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) {
|
||||
result.error500("没有权限!");
|
||||
} else {
|
||||
result.error500("You do not have permission !");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告文件夹表-通过id删除")
|
||||
@ApiOperation(value = "对外报告文件夹表-通过id删除", notes = "对外报告文件夹表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id,
|
||||
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||
Result<ExtRepoFolder> result = new Result();
|
||||
if (extRepoFolderService.haveManageAuth(id)) {
|
||||
List<ExtRepoFolder> resList = extRepoFolderService.getListBySupFolder(id);
|
||||
if (resList.isEmpty()) {
|
||||
List<ExtRepoData> erdList = extRepoDataService.queryByFolder(id);
|
||||
for (ExtRepoData erd : erdList) {
|
||||
extRepoDataService.deleteById(erd.getId());
|
||||
}
|
||||
extRepoFolderService.deleteById(id);
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.success("删除成功!");
|
||||
} else {
|
||||
result.success("Data deletion successfully!");
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.error500("请先删除子文件夹!");
|
||||
} else {
|
||||
result.error500("Please delete the subfolder first!");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.error500("没有权限!");
|
||||
} else {
|
||||
result.error500("You do not have permission!");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告文件夹表-通过id查询")
|
||||
@ApiOperation(value = "对外报告文件夹表-通过id查询", notes = "对外报告文件夹表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id,
|
||||
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||
Result<ExtRepoFolder> result = new Result();
|
||||
ExtRepoFolder extRepoFolder = extRepoFolderService.queryById(id);
|
||||
if (extRepoFolder == null) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
result.error500("未找到对应数据!");
|
||||
} else {
|
||||
result.error500("No Data!");
|
||||
}
|
||||
}
|
||||
return result.OK(extRepoFolder);
|
||||
}
|
||||
}
|
||||
+178
@@ -0,0 +1,178 @@
|
||||
package com.jero.modules.extRepo.entity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 对外报告文件夹 树结构实体类
|
||||
*/
|
||||
public class ERFTreeData implements Comparable<ERFTreeData> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 页面显示的名称 对应 folder_name
|
||||
*/
|
||||
private String title;
|
||||
|
||||
private String folderName;
|
||||
|
||||
/**
|
||||
* 文件夹ID 对应 id
|
||||
*/
|
||||
private String key;
|
||||
|
||||
/**
|
||||
* 层级,设定最多4级
|
||||
*/
|
||||
private int level;
|
||||
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private int orderId;
|
||||
|
||||
|
||||
/**
|
||||
* 是否显示
|
||||
*/
|
||||
private boolean display = false;
|
||||
|
||||
|
||||
/**
|
||||
* 查看权限人员
|
||||
*/
|
||||
private String authViewIdsName = "";
|
||||
|
||||
/**
|
||||
* 管理权限人员
|
||||
*/
|
||||
private String authManageIdsName = "";
|
||||
|
||||
/**
|
||||
* 查看权限人员id
|
||||
*/
|
||||
private String authViewIds = "";
|
||||
|
||||
/**
|
||||
* 管理权限人员id
|
||||
*/
|
||||
private String authManageIds = "";
|
||||
|
||||
/**
|
||||
* 子文件夹
|
||||
*/
|
||||
private List<ERFTreeData> children = new ArrayList<ERFTreeData>();
|
||||
|
||||
public ERFTreeData() {
|
||||
}
|
||||
|
||||
public ERFTreeData(String title, String key, int level, int orderId) {
|
||||
this.title = title;
|
||||
this.folderName = title;
|
||||
this.key = key;
|
||||
this.level = level;
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public List<ERFTreeData> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<ERFTreeData> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public int getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(int orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public boolean isDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(boolean display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public String getFolderName() {
|
||||
return folderName;
|
||||
}
|
||||
|
||||
public void setFolderName(String folderName) {
|
||||
this.folderName = folderName;
|
||||
}
|
||||
|
||||
public String getAuthViewIdsName() {
|
||||
return authViewIdsName;
|
||||
}
|
||||
|
||||
public void setAuthViewIdsName(String authViewIdsName) {
|
||||
this.authViewIdsName = authViewIdsName;
|
||||
}
|
||||
|
||||
public String getAuthManageIdsName() {
|
||||
return authManageIdsName;
|
||||
}
|
||||
|
||||
public void setAuthManageIdsName(String authManageIdsName) {
|
||||
this.authManageIdsName = authManageIdsName;
|
||||
}
|
||||
|
||||
public String getAuthViewIds() {
|
||||
return authViewIds;
|
||||
}
|
||||
|
||||
public void setAuthViewIds(String authViewIds) {
|
||||
this.authViewIds = authViewIds;
|
||||
}
|
||||
|
||||
public String getAuthManageIds() {
|
||||
return authManageIds;
|
||||
}
|
||||
|
||||
public void setAuthManageIds(String authManageIds) {
|
||||
this.authManageIds = authManageIds;
|
||||
}
|
||||
|
||||
public void sortChildren() {
|
||||
Collections.sort(children);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull ERFTreeData o) {
|
||||
return this.orderId - o.orderId;
|
||||
}
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
package com.jero.modules.extRepo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 对外报告数据表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("ext_repo_data")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ext_repo_data对象", description="对外报告数据表")
|
||||
public class ExtRepoData implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**文件标识*/
|
||||
@Excel(name = "文件标识", width = 15)
|
||||
@ApiModelProperty(value = "文件标识")
|
||||
private java.lang.String fileKey;
|
||||
|
||||
/**文件名称*/
|
||||
@Excel(name = "文件名称", width = 15)
|
||||
@ApiModelProperty(value = "文件名称")
|
||||
private java.lang.String fileName;
|
||||
|
||||
/**文件说明*/
|
||||
@Excel(name = "文件说明", width = 15)
|
||||
@ApiModelProperty(value = "文件说明")
|
||||
private java.lang.String fileDescription;
|
||||
|
||||
/**所属文件夹*/
|
||||
@Excel(name = "所属文件夹", width = 15)
|
||||
@ApiModelProperty(value = "所属文件夹")
|
||||
private java.lang.String supFolder;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.jero.modules.extRepo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
public class ExtRepoDataPage {
|
||||
|
||||
/**
|
||||
* 此页面是否有管理权限
|
||||
*/
|
||||
private boolean auth_manage;
|
||||
|
||||
/**
|
||||
* 数据列表
|
||||
*/
|
||||
private IPage<ExtRepoData> pageList;
|
||||
|
||||
public ExtRepoDataPage() {
|
||||
}
|
||||
|
||||
public ExtRepoDataPage(boolean auth_manage, IPage<ExtRepoData> pageList) {
|
||||
this.auth_manage = auth_manage;
|
||||
this.pageList = pageList;
|
||||
}
|
||||
|
||||
public boolean isAuth_manage() {
|
||||
return auth_manage;
|
||||
}
|
||||
|
||||
public void setAuth_manage(boolean auth_manage) {
|
||||
this.auth_manage = auth_manage;
|
||||
}
|
||||
|
||||
public IPage<ExtRepoData> getPageList() {
|
||||
return pageList;
|
||||
}
|
||||
|
||||
public void setPageList(IPage<ExtRepoData> pageList) {
|
||||
this.pageList = pageList;
|
||||
}
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package com.jero.modules.extRepo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 对外报告文件夹表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-27
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("ext_repo_folder")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ext_repo_folder对象", description="对外报告文件夹表")
|
||||
public class ExtRepoFolder implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.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 java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**文件夹名称*/
|
||||
@Excel(name = "文件夹名称", width = 15)
|
||||
@ApiModelProperty(value = "文件夹名称")
|
||||
private String folderName;
|
||||
|
||||
/**文件夹排序*/
|
||||
@Excel(name = "文件夹排序", width = 15)
|
||||
@ApiModelProperty(value = "文件夹排序")
|
||||
private Integer orderId;
|
||||
|
||||
/**所属文件夹*/
|
||||
@Excel(name = "所属文件夹", width = 15)
|
||||
@ApiModelProperty(value = "所属文件夹")
|
||||
private String supFolder;
|
||||
|
||||
/**查看权限人员*/
|
||||
@Excel(name = "查看权限人员", width = 15)
|
||||
@ApiModelProperty(value = "查看权限人员")
|
||||
private String authViewIdsName;
|
||||
|
||||
/**管理权限人员*/
|
||||
@Excel(name = "管理权限人员", width = 15)
|
||||
@ApiModelProperty(value = "管理权限人员")
|
||||
private String authManageIdsName;
|
||||
|
||||
/**查看权限人员id*/
|
||||
@Excel(name = "查看权限人员id", width = 15)
|
||||
@ApiModelProperty(value = "查看权限人员id")
|
||||
private String authViewIds;
|
||||
|
||||
/**管理权限人员id*/
|
||||
@Excel(name = "管理权限人员id", width = 15)
|
||||
@ApiModelProperty(value = "管理权限人员id")
|
||||
private String authManageIds;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.jero.modules.extRepo.enums;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public enum ExtRepoMamagerRoleIdEnum {
|
||||
MANAGER_ID("系统管理员", "Administrator", "admin", "f6817f48af4fb3af11b9e8bf182f618b", 1),
|
||||
ERMANAGER_ID("对外报告管理员", "ExternalReportsManager", "ExternalReportsManager", "1552536424587862017", 2);
|
||||
|
||||
String name;
|
||||
String enName;
|
||||
String value;
|
||||
String id;
|
||||
Integer order;
|
||||
|
||||
ExtRepoMamagerRoleIdEnum(String name, String enName, String value, String id, Integer order) {
|
||||
this.name = name;
|
||||
this.enName = enName;
|
||||
this.value = value;
|
||||
this.id = id;
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public void setOrder(Integer order) {
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public static List<String> getIdList() {
|
||||
List<String> idList = new ArrayList<>();
|
||||
ExtRepoMamagerRoleIdEnum[] values = values();
|
||||
for (ExtRepoMamagerRoleIdEnum ermriEnum : values) {
|
||||
idList.add(ermriEnum.getId());
|
||||
}
|
||||
return idList;
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.jero.modules.extRepo.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoData;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告数据表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ExtRepoDataMapper extends BaseMapper<ExtRepoData> {
|
||||
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.jero.modules.extRepo.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoFolder;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告文件夹表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ExtRepoFolderMapper extends BaseMapper<ExtRepoFolder> {
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.extRepo.mapper.ExtRepoDataMapper">
|
||||
<resultMap id="ExtRepoDataResultMap" type="com.jero.modules.extRepo.entity.ExtRepoData">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="file_key" property="fileKey" />
|
||||
<result column="file_name" property="fileName" />
|
||||
<result column="file_description" property="fileDescription" />
|
||||
<result column="sup_folder" property="supFolder" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.extRepo.mapper.ExtRepoFolderMapper">
|
||||
<resultMap id="ExtRepoFolderResultMap" type="com.jero.modules.extRepo.entity.ExtRepoFolder">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="folder_name" property="folderName" />
|
||||
<result column="order_id" property="orderId" />
|
||||
<result column="sup_folder" property="supFolder" />
|
||||
<result column="auth_view_ids_name" property="authViewIdsName" />
|
||||
<result column="auth_manage_ids_name" property="authManageIdsName" />
|
||||
<result column="auth_view_ids" property="authViewIdsName" />
|
||||
<result column="auth_manage_ids" property="authManageIdsName" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
package com.jero.modules.extRepo.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告数据表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IExtRepoDataService extends IService<ExtRepoData> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param extRepoData
|
||||
* @return
|
||||
*/
|
||||
int add(ExtRepoData extRepoData);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param extRepoData
|
||||
* @return
|
||||
*/
|
||||
void editById(ExtRepoData extRepoData);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ExtRepoData queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ExtRepoData> queryList();
|
||||
|
||||
/**
|
||||
* 根据文件夹查询
|
||||
*
|
||||
* @param folserId
|
||||
* @return
|
||||
*/
|
||||
List<ExtRepoData> queryByFolder(String folserId);
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
package com.jero.modules.extRepo.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.extRepo.entity.ERFTreeData;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoFolder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告文件夹表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IExtRepoFolderService extends IService<ExtRepoFolder> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param extRepoFolder
|
||||
* @return
|
||||
*/
|
||||
void add(ExtRepoFolder extRepoFolder);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param extRepoFolder
|
||||
* @return
|
||||
*/
|
||||
void editById(ExtRepoFolder extRepoFolder);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ExtRepoFolder queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ExtRepoFolder> queryList();
|
||||
|
||||
/**
|
||||
* 查询返回树结构
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ERFTreeData> queryTreeList();
|
||||
|
||||
|
||||
/**
|
||||
* 是否有管理权限
|
||||
*
|
||||
* @param folderId
|
||||
* @return
|
||||
*/
|
||||
boolean haveManageAuth(String folderId);
|
||||
|
||||
/**
|
||||
* 是否有查看权限
|
||||
*
|
||||
* @param folderId
|
||||
* @return
|
||||
*/
|
||||
boolean haveViewAuth(String folderId);
|
||||
|
||||
/**
|
||||
* 是否管理员
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isManager();
|
||||
|
||||
/**
|
||||
* 查找子文件夹
|
||||
*
|
||||
* @param supFolder
|
||||
* @return
|
||||
*/
|
||||
List<ExtRepoFolder> getListBySupFolder(String supFolder);
|
||||
}
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
package com.jero.modules.extRepo.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoData;
|
||||
import com.jero.modules.extRepo.mapper.ExtRepoDataMapper;
|
||||
import com.jero.modules.extRepo.service.IExtRepoDataService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告数据表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ExtRepoDataServiceImpl extends ServiceImpl<ExtRepoDataMapper, ExtRepoData> implements IExtRepoDataService {
|
||||
|
||||
@Autowired
|
||||
private IOSSFileService ossFileService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param extRepoData
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int add(ExtRepoData extRepoData) {
|
||||
//返回成功数量
|
||||
int res = 0;
|
||||
Date now = new Date();
|
||||
// 根据fileKey查找文件
|
||||
String fileIds = extRepoData.getFileKey();
|
||||
if (StringUtils.isNotBlank(fileIds)) {
|
||||
String[] fileIdsArr = fileIds.split(",");
|
||||
for (String fid : fileIdsArr) {
|
||||
OSSFile ossFile = ossFileService.getById(fid);
|
||||
if (ObjectUtil.isNotEmpty(ossFile)) {
|
||||
String fileName = ossFile.getFileName();
|
||||
extRepoData.setFileName(fileName);
|
||||
ExtRepoData erd = extRepoDataCopy(extRepoData, fid, now);
|
||||
save(erd);
|
||||
res++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private ExtRepoData extRepoDataCopy(ExtRepoData extRepoData, String key, Date now) {
|
||||
ExtRepoData res = new ExtRepoData();
|
||||
res.setId(extRepoData.getId());
|
||||
res.setCreateBy(extRepoData.getCreateBy());
|
||||
res.setCreateTime(now);
|
||||
res.setUpdateBy(extRepoData.getUpdateBy());
|
||||
res.setUpdateTime(now);
|
||||
res.setSysOrgCode(extRepoData.getSysOrgCode());
|
||||
res.setFileKey(key);
|
||||
res.setFileName(extRepoData.getFileName());
|
||||
res.setFileDescription(extRepoData.getFileDescription());
|
||||
res.setSupFolder(extRepoData.getSupFolder());
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param extRepoData
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ExtRepoData extRepoData) {
|
||||
Date now = new Date();
|
||||
extRepoData.setUpdateTime(now);
|
||||
saveOrUpdate(extRepoData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ExtRepoData queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ExtRepoData> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param folserId
|
||||
* @return
|
||||
*/
|
||||
public List<ExtRepoData> queryByFolder(String folserId) {
|
||||
LambdaQueryWrapper<ExtRepoData> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ExtRepoData::getSupFolder, folserId);
|
||||
List<ExtRepoData> list = this.list(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
+367
@@ -0,0 +1,367 @@
|
||||
package com.jero.modules.extRepo.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.extRepo.entity.ERFTreeData;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoFolder;
|
||||
import com.jero.modules.extRepo.enums.ExtRepoMamagerRoleIdEnum;
|
||||
import com.jero.modules.extRepo.mapper.ExtRepoFolderMapper;
|
||||
import com.jero.modules.extRepo.service.IExtRepoFolderService;
|
||||
import com.jero.modules.system.entity.SysUserRole;
|
||||
import com.jero.modules.system.service.ISysUserRoleService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告文件夹表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ExtRepoFolderServiceImpl extends ServiceImpl<ExtRepoFolderMapper, ExtRepoFolder> implements IExtRepoFolderService {
|
||||
@Autowired
|
||||
private ISysUserRoleService sysUserRoleService;
|
||||
/**
|
||||
* 一级文件夹的supFolder统一存root
|
||||
*/
|
||||
private static final String superFolder = "root";
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param extRepoFolder
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(ExtRepoFolder extRepoFolder) {
|
||||
try {
|
||||
if (StringUtils.isEmpty(extRepoFolder.getSupFolder())) {
|
||||
//一级文件夹的supFolder统一存root,方便以后查找
|
||||
extRepoFolder.setSupFolder(superFolder);
|
||||
}
|
||||
Date now = new Date();
|
||||
extRepoFolder.setCreateTime(now);
|
||||
extRepoFolder.setUpdateTime(now);
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// extRepoFolder.setAuthManageName(extRepoFolder.getAuthManageName() + "," + sysUser.getUsername());
|
||||
// extRepoFolder.setAuthManageIds(extRepoFolder.getAuthManageIds() + "," + sysUser.getId());
|
||||
extRepoFolder.setAuthManageIdsName(extRepoFolder.getAuthManageIdsName());
|
||||
extRepoFolder.setAuthManageIds(extRepoFolder.getAuthManageIds());
|
||||
save(extRepoFolder);
|
||||
editOrderId(extRepoFolder);
|
||||
} catch (Exception ex) {
|
||||
log.error("添加对外报告文件夹失败:" + ex.getMessage());
|
||||
throw new JeroBootException("添加文件夹失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 同级文件夹,修改顺序号
|
||||
*
|
||||
* @param extRepoFolder
|
||||
*/
|
||||
private void editOrderId(ExtRepoFolder extRepoFolder) throws Exception {
|
||||
List<ExtRepoFolder> list = getListBySupFolder(extRepoFolder.getSupFolder());
|
||||
for (ExtRepoFolder erf : list) {
|
||||
if (erf.getOrderId() >= extRepoFolder.getOrderId() && !erf.getId().equals(extRepoFolder.getId())) {
|
||||
erf.setOrderId(erf.getOrderId() + 1);
|
||||
updateById(erf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExtRepoFolder> getListBySupFolder(String supFolder) {
|
||||
ExtRepoFolder erf = new ExtRepoFolder();
|
||||
erf.setSupFolder(supFolder);
|
||||
QueryWrapper<ExtRepoFolder> queryWrapper = QueryGenerator.initQueryWrapper(erf, new HashMap<>());
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param extRepoFolder
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ExtRepoFolder extRepoFolder) {
|
||||
try {
|
||||
//原有的记录
|
||||
ExtRepoFolder erf_orig = queryById(extRepoFolder.getId());
|
||||
Date now = new Date();
|
||||
extRepoFolder.setUpdateTime(now);
|
||||
saveOrUpdate(extRepoFolder);
|
||||
editOrderId(extRepoFolder);
|
||||
editAuth(erf_orig, extRepoFolder);
|
||||
} catch (Exception ex) {
|
||||
log.error("修改对外报告文件夹失败:" + ex.getMessage());
|
||||
throw new JeroBootException("修改文件夹失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改所有关联文件夹的权限
|
||||
*/
|
||||
private void editAuth(ExtRepoFolder erf_orig, ExtRepoFolder erf_new) throws Exception {
|
||||
//管理权限
|
||||
Map<String, String> authManage_orig = getAuthMap(erf_orig.getAuthManageIdsName(), erf_orig.getAuthManageIds());
|
||||
Map<String, String> authManage_new = getAuthMap(erf_new.getAuthManageIdsName(), erf_new.getAuthManageIds());
|
||||
//增加管理权限的人
|
||||
Map<String, String> addManageRole = getDefMap(authManage_new, authManage_orig);
|
||||
//删除管理权限的人
|
||||
Map<String, String> delManageRole = getDefMap(authManage_orig, authManage_new);
|
||||
|
||||
//查看权限
|
||||
Map<String, String> authView_orig = getAuthMap(erf_orig.getAuthViewIdsName(), erf_orig.getAuthViewIds());
|
||||
Map<String, String> authView_new = getAuthMap(erf_new.getAuthViewIdsName(), erf_new.getAuthViewIds());
|
||||
//增加查看权限的人
|
||||
Map<String, String> addViewRole = getDefMap(authView_new, authView_orig);
|
||||
//删除查看权限的人
|
||||
Map<String, String> delViewRole = getDefMap(authView_orig, authView_new);
|
||||
|
||||
List<ExtRepoFolder> allSubFolder = getAllSubFolder(erf_orig.getId());
|
||||
//存储变化的对象
|
||||
List<ExtRepoFolder> updateFolder = new ArrayList<ExtRepoFolder>();
|
||||
for (ExtRepoFolder erf : allSubFolder) {
|
||||
boolean isChange = false;
|
||||
Map<String, String> authManage_erf = getAuthMap(erf.getAuthManageIdsName(), erf.getAuthManageIds());
|
||||
Map<String, String> authView_erf = getAuthMap(erf.getAuthViewIdsName(), erf.getAuthViewIds());
|
||||
for (String add : addManageRole.keySet()) {
|
||||
if (!authManage_erf.keySet().contains(add)) {
|
||||
authManage_erf.put(add, addManageRole.get(add));
|
||||
isChange = true;
|
||||
}
|
||||
}
|
||||
for (String del : delManageRole.keySet()) {
|
||||
//如果是创建人 不能删除管理权限
|
||||
if (authManage_erf.keySet().contains(del)) {
|
||||
if (!del.equals(erf_orig.getCreateBy())) {
|
||||
authManage_erf.remove(del);
|
||||
isChange = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (String add : addViewRole.keySet()) {
|
||||
if (!authView_erf.keySet().contains(add)) {
|
||||
authView_erf.put(add, addViewRole.get(add));
|
||||
isChange = true;
|
||||
}
|
||||
}
|
||||
for (String del : delViewRole.keySet()) {
|
||||
if (authView_erf.keySet().contains(del)) {
|
||||
authView_erf.remove(del);
|
||||
isChange = true;
|
||||
}
|
||||
}
|
||||
erf.setAuthManageIdsName(StringUtils.join(authManage_erf.keySet(), ","));
|
||||
erf.setAuthManageIds(StringUtils.join(authManage_erf.values(), ","));
|
||||
erf.setAuthViewIdsName(StringUtils.join(authView_erf.keySet(), ","));
|
||||
erf.setAuthViewIds(StringUtils.join(authView_erf.values(), ","));
|
||||
if (isChange) {
|
||||
updateFolder.add(erf);
|
||||
}
|
||||
}
|
||||
if (updateFolder.size() > 0) {
|
||||
updateBatchById(updateFolder);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到列表新增元素集合
|
||||
*
|
||||
* @param mapA
|
||||
* @param mapB
|
||||
* @return
|
||||
*/
|
||||
private Map<String, String> getDefMap(Map<String, String> mapA, Map<String, String> mapB) {
|
||||
Map<String, String> res = new HashMap<String, String>();
|
||||
for (String s : mapA.keySet()) {
|
||||
if (StringUtils.isNotBlank(s) && !mapB.keySet().contains(s)) {
|
||||
res.put(s, mapA.get(s));
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private List<ExtRepoFolder> getAllSubFolder(String folderId) {
|
||||
List<ExtRepoFolder> resList = getListBySupFolder(folderId);
|
||||
List<ExtRepoFolder> subList = new ArrayList<ExtRepoFolder>();
|
||||
for (ExtRepoFolder erf : resList) {
|
||||
subList.addAll(getAllSubFolder(erf.getId()));
|
||||
}
|
||||
resList.addAll(subList);
|
||||
return resList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
try {
|
||||
removeById(id);
|
||||
} catch (Exception ex) {
|
||||
log.error("删除对外报告文件夹失败:" + ex.getMessage());
|
||||
throw new JeroBootException("删除文件夹失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ExtRepoFolder queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ExtRepoFolder> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ERFTreeData> queryTreeList() {
|
||||
try {
|
||||
List<ExtRepoFolder> list = queryList();
|
||||
List<ERFTreeData> res = getSubFolder(superFolder, list, 1);
|
||||
Collections.sort(res);
|
||||
return res;
|
||||
} catch (Exception ex) {
|
||||
log.error("查询对外报告文件夹失败:" + ex.getMessage());
|
||||
throw new JeroBootException("查询文件夹失败!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查找子文件夹,生成树结构
|
||||
*
|
||||
* @param supId
|
||||
* @param list
|
||||
* @param level 前端需要知道当前文件夹在哪一层
|
||||
* @return
|
||||
*/
|
||||
private List<ERFTreeData> getSubFolder(String supId, List<ExtRepoFolder> list, int level) throws Exception {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<ERFTreeData> resList = new ArrayList<ERFTreeData>();
|
||||
for (ExtRepoFolder erf : list) {
|
||||
if (supId.equals(erf.getSupFolder())) {
|
||||
ERFTreeData date = new ERFTreeData(erf.getFolderName(), erf.getId(), level, erf.getOrderId());
|
||||
//检查有没有权限查看
|
||||
date.setDisplay(haveViewAuth(erf.getSupFolder()));
|
||||
int childLevel = date.getLevel() + 1;
|
||||
date.setAuthManageIdsName(erf.getAuthManageIdsName());
|
||||
date.setAuthManageIds(erf.getAuthManageIds());
|
||||
date.setAuthViewIdsName(erf.getAuthViewIdsName());
|
||||
date.setAuthViewIds(erf.getAuthViewIds());
|
||||
date.setChildren(getSubFolder(erf.getId(), list, childLevel));
|
||||
date.sortChildren();
|
||||
resList.add(date);
|
||||
}
|
||||
}
|
||||
return resList;
|
||||
}
|
||||
|
||||
private List<String> getStringList(String listStr) {
|
||||
List<String> res = new ArrayList<String>();
|
||||
if (null != listStr) {
|
||||
res = Arrays.asList(listStr.split(","));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private Map<String, String> getAuthMap(String strKey, String strValue) {
|
||||
Map<String, String> resMap = new HashMap<String, String>();
|
||||
List<String> keyList = getStringList(strKey);
|
||||
List<String> valueList = getStringList(strValue);
|
||||
for (int i = 0; i < keyList.size(); i++) {
|
||||
resMap.put(keyList.get(i), valueList.get(i));
|
||||
}
|
||||
return resMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否是文件夹管理员角色
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean isManager() {
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录用户
|
||||
// 查询当前登录用户角色
|
||||
List<SysUserRole> userRoles = sysUserRoleService.list(new QueryWrapper<SysUserRole>().lambda().eq(SysUserRole::getUserId, loginUser.getId())); // 查询用户所有角色
|
||||
List<String> userRoleIds = new ArrayList<>(); // 用户管理员/对外报告管理员
|
||||
if (CollectionUtil.isNotEmpty(userRoles)) {
|
||||
List<String> roleIdList = ExtRepoMamagerRoleIdEnum.getIdList();
|
||||
List<String> userRoleIdList = userRoles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
||||
userRoleIds = roleIdList.stream().filter(e -> userRoleIdList.contains(e)).collect(Collectors.toList());
|
||||
return !CollectionUtil.isEmpty(userRoleIds);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有管理权限
|
||||
*
|
||||
* @param folderId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean haveManageAuth(String folderId) {
|
||||
boolean res = false;
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
res = isManager();
|
||||
ExtRepoFolder erf = queryById(folderId);
|
||||
if (null != erf) {
|
||||
res = res || getStringList(erf.getAuthManageIds()).contains(sysUser.getId());
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有查看权限
|
||||
*
|
||||
* @param folderId
|
||||
* @return
|
||||
*/
|
||||
public boolean haveViewAuth(String folderId) {
|
||||
boolean res = false;
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
res = isManager();
|
||||
ExtRepoFolder erf = queryById(folderId);
|
||||
if (null != erf) {
|
||||
res = res || getStringList(erf.getAuthManageIds()).contains(sysUser.getId())
|
||||
|| getStringList(erf.getAuthViewIds()).contains(sysUser.getId());
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
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.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempEOService;
|
||||
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.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="Country Card模板维护表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/countryCardTempEO")
|
||||
@Slf4j
|
||||
public class CountryCardTempEOController extends JeroController<CountryCardTempEO, ICountryCardTempEOService> {
|
||||
@Autowired
|
||||
private ICountryCardTempEOService countryCardTempEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param countryCardTempEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护表-分页列表查询")
|
||||
@ApiOperation(value="Country Card模板维护表-分页列表查询", notes="Country Card模板维护表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(CountryCardTempEO countryCardTempEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<CountryCardTempEO> queryWrapper = QueryGenerator.initQueryWrapper(countryCardTempEO, req.getParameterMap());
|
||||
Page<CountryCardTempEO> page = new Page<CountryCardTempEO>(pageNo, pageSize);
|
||||
IPage<CountryCardTempEO> pageList = countryCardTempEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护表-列表查询")
|
||||
@ApiOperation(value="Country Card模板维护表-列表查询", notes="Country Card模板维护表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<CountryCardTempEO>> queryList() {
|
||||
List<CountryCardTempEO> list = countryCardTempEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param countryCardTempEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护表-添加")
|
||||
@ApiOperation(value="Country Card模板维护表-添加", notes="Country Card模板维护表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody CountryCardTempEO countryCardTempEO) {
|
||||
countryCardTempEOService.add(countryCardTempEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param countryCardTempEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护表-编辑")
|
||||
@ApiOperation(value="Country Card模板维护表-编辑", notes="Country Card模板维护表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody CountryCardTempEO countryCardTempEO) {
|
||||
countryCardTempEOService.editById(countryCardTempEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护表-通过id删除")
|
||||
@ApiOperation(value="Country Card模板维护表-通过id删除", notes="Country Card模板维护表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
countryCardTempEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护表-批量删除")
|
||||
@ApiOperation(value="Country Card模板维护表-批量删除", notes="Country Card模板维护表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.countryCardTempEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护表-通过id查询")
|
||||
@ApiOperation(value="Country Card模板维护表-通过id查询", notes="Country Card模板维护表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
CountryCardTempEO countryCardTempEO = countryCardTempEOService.queryById(id);
|
||||
if(countryCardTempEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(countryCardTempEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param countryCardTempEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, CountryCardTempEO countryCardTempEO) {
|
||||
return super.exportXls(request, countryCardTempEO, CountryCardTempEO.class, "Country Card模板维护表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, CountryCardTempEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
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.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempItemEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempItemEOService;
|
||||
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.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护-字典项表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="Country Card模板维护-字典项表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/countryCardTempItemEO")
|
||||
@Slf4j
|
||||
public class CountryCardTempItemEOController extends JeroController<CountryCardTempItemEO, ICountryCardTempItemEOService> {
|
||||
@Autowired
|
||||
private ICountryCardTempItemEOService countryCardTempItemEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param countryCardTempItemEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护-字典项表-分页列表查询")
|
||||
@ApiOperation(value="Country Card模板维护-字典项表-分页列表查询", notes="Country Card模板维护-字典项表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(CountryCardTempItemEO countryCardTempItemEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<CountryCardTempItemEO> queryWrapper = QueryGenerator.initQueryWrapper(countryCardTempItemEO, req.getParameterMap());
|
||||
Page<CountryCardTempItemEO> page = new Page<CountryCardTempItemEO>(pageNo, pageSize);
|
||||
IPage<CountryCardTempItemEO> pageList = countryCardTempItemEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护-字典项表-列表查询")
|
||||
@ApiOperation(value="Country Card模板维护-字典项表-列表查询", notes="Country Card模板维护-字典项表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<CountryCardTempItemEO>> queryList() {
|
||||
List<CountryCardTempItemEO> list = countryCardTempItemEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param countryCardTempItemEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护-字典项表-添加")
|
||||
@ApiOperation(value="Country Card模板维护-字典项表-添加", notes="Country Card模板维护-字典项表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody CountryCardTempItemEO countryCardTempItemEO) {
|
||||
countryCardTempItemEOService.add(countryCardTempItemEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param countryCardTempItemEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护-字典项表-编辑")
|
||||
@ApiOperation(value="Country Card模板维护-字典项表-编辑", notes="Country Card模板维护-字典项表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody CountryCardTempItemEO countryCardTempItemEO) {
|
||||
countryCardTempItemEOService.editById(countryCardTempItemEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护-字典项表-通过id删除")
|
||||
@ApiOperation(value="Country Card模板维护-字典项表-通过id删除", notes="Country Card模板维护-字典项表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
countryCardTempItemEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护-字典项表-批量删除")
|
||||
@ApiOperation(value="Country Card模板维护-字典项表-批量删除", notes="Country Card模板维护-字典项表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.countryCardTempItemEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "Country Card模板维护-字典项表-通过id查询")
|
||||
@ApiOperation(value="Country Card模板维护-字典项表-通过id查询", notes="Country Card模板维护-字典项表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
CountryCardTempItemEO countryCardTempItemEO = countryCardTempItemEOService.queryById(id);
|
||||
if(countryCardTempItemEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(countryCardTempItemEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param countryCardTempItemEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, CountryCardTempItemEO countryCardTempItemEO) {
|
||||
return super.exportXls(request, countryCardTempItemEO, CountryCardTempItemEO.class, "Country Card模板维护-字典项表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, CountryCardTempItemEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
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.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseBrowsingHistoryEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseBrowsingHistoryEOService;
|
||||
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.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库浏览历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库浏览历史表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/problemKnowledgeBaseBrowsingHistoryEO")
|
||||
@Slf4j
|
||||
public class ProblemKnowledgeBaseBrowsingHistoryEOController extends JeroController<ProblemKnowledgeBaseBrowsingHistoryEO, IProblemKnowledgeBaseBrowsingHistoryEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseBrowsingHistoryEOService problemKnowledgeBaseBrowsingHistoryEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库浏览历史表-分页列表查询", notes="问题知识库浏览历史表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseBrowsingHistoryEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseBrowsingHistoryEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseBrowsingHistoryEO> page = new Page<ProblemKnowledgeBaseBrowsingHistoryEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseBrowsingHistoryEO> pageList = problemKnowledgeBaseBrowsingHistoryEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-列表查询")
|
||||
@ApiOperation(value="问题知识库浏览历史表-列表查询", notes="问题知识库浏览历史表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseBrowsingHistoryEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseBrowsingHistoryEO> list = problemKnowledgeBaseBrowsingHistoryEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-添加")
|
||||
@ApiOperation(value="问题知识库浏览历史表-添加", notes="问题知识库浏览历史表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO) {
|
||||
problemKnowledgeBaseBrowsingHistoryEOService.add(problemKnowledgeBaseBrowsingHistoryEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-编辑")
|
||||
@ApiOperation(value="问题知识库浏览历史表-编辑", notes="问题知识库浏览历史表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO) {
|
||||
problemKnowledgeBaseBrowsingHistoryEOService.editById(problemKnowledgeBaseBrowsingHistoryEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-通过id删除")
|
||||
@ApiOperation(value="问题知识库浏览历史表-通过id删除", notes="问题知识库浏览历史表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseBrowsingHistoryEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-批量删除")
|
||||
@ApiOperation(value="问题知识库浏览历史表-批量删除", notes="问题知识库浏览历史表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseBrowsingHistoryEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-通过id查询")
|
||||
@ApiOperation(value="问题知识库浏览历史表-通过id查询", notes="问题知识库浏览历史表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO = problemKnowledgeBaseBrowsingHistoryEOService.queryById(id);
|
||||
if(problemKnowledgeBaseBrowsingHistoryEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseBrowsingHistoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseBrowsingHistoryEO, ProblemKnowledgeBaseBrowsingHistoryEO.class, "问题知识库浏览历史表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseBrowsingHistoryEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
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.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseClassifyEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseClassifyEOService;
|
||||
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.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库-分类表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库-分类表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/problemKnowledgeBaseClassifyEO")
|
||||
@Slf4j
|
||||
public class ProblemKnowledgeBaseClassifyEOController extends JeroController<ProblemKnowledgeBaseClassifyEO, IProblemKnowledgeBaseClassifyEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseClassifyEOService problemKnowledgeBaseClassifyEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseClassifyEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-分类表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库-分类表-分页列表查询", notes="问题知识库-分类表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseClassifyEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseClassifyEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseClassifyEO> page = new Page<ProblemKnowledgeBaseClassifyEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseClassifyEO> pageList = problemKnowledgeBaseClassifyEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-分类表-列表查询")
|
||||
@ApiOperation(value="问题知识库-分类表-列表查询", notes="问题知识库-分类表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseClassifyEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseClassifyEO> list = problemKnowledgeBaseClassifyEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseClassifyEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-分类表-添加")
|
||||
@ApiOperation(value="问题知识库-分类表-添加", notes="问题知识库-分类表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO) {
|
||||
problemKnowledgeBaseClassifyEOService.add(problemKnowledgeBaseClassifyEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseClassifyEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-分类表-编辑")
|
||||
@ApiOperation(value="问题知识库-分类表-编辑", notes="问题知识库-分类表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO) {
|
||||
problemKnowledgeBaseClassifyEOService.editById(problemKnowledgeBaseClassifyEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-分类表-通过id删除")
|
||||
@ApiOperation(value="问题知识库-分类表-通过id删除", notes="问题知识库-分类表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseClassifyEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-分类表-批量删除")
|
||||
@ApiOperation(value="问题知识库-分类表-批量删除", notes="问题知识库-分类表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseClassifyEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库-分类表-通过id查询")
|
||||
@ApiOperation(value="问题知识库-分类表-通过id查询", notes="问题知识库-分类表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO = problemKnowledgeBaseClassifyEOService.queryById(id);
|
||||
if(problemKnowledgeBaseClassifyEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseClassifyEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseClassifyEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseClassifyEO, ProblemKnowledgeBaseClassifyEO.class, "问题知识库-分类表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseClassifyEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
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.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCollectEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseCollectEOService;
|
||||
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.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库收藏表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库收藏表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/problemKnowledgeBaseCollectEO")
|
||||
@Slf4j
|
||||
public class ProblemKnowledgeBaseCollectEOController extends JeroController<ProblemKnowledgeBaseCollectEO, IProblemKnowledgeBaseCollectEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseCollectEOService problemKnowledgeBaseCollectEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库收藏表-分页列表查询", notes="问题知识库收藏表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseCollectEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseCollectEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseCollectEO> page = new Page<ProblemKnowledgeBaseCollectEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseCollectEO> pageList = problemKnowledgeBaseCollectEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-列表查询")
|
||||
@ApiOperation(value="问题知识库收藏表-列表查询", notes="问题知识库收藏表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseCollectEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseCollectEO> list = problemKnowledgeBaseCollectEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-添加")
|
||||
@ApiOperation(value="问题知识库收藏表-添加", notes="问题知识库收藏表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO) {
|
||||
problemKnowledgeBaseCollectEOService.add(problemKnowledgeBaseCollectEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-编辑")
|
||||
@ApiOperation(value="问题知识库收藏表-编辑", notes="问题知识库收藏表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO) {
|
||||
problemKnowledgeBaseCollectEOService.editById(problemKnowledgeBaseCollectEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-通过id删除")
|
||||
@ApiOperation(value="问题知识库收藏表-通过id删除", notes="问题知识库收藏表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseCollectEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-批量删除")
|
||||
@ApiOperation(value="问题知识库收藏表-批量删除", notes="问题知识库收藏表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseCollectEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-通过id查询")
|
||||
@ApiOperation(value="问题知识库收藏表-通过id查询", notes="问题知识库收藏表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO = problemKnowledgeBaseCollectEOService.queryById(id);
|
||||
if(problemKnowledgeBaseCollectEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseCollectEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseCollectEO, ProblemKnowledgeBaseCollectEO.class, "问题知识库收藏表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseCollectEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
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.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCommentEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseCommentEOService;
|
||||
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.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库评论表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库评论表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/problemKnowledgeBaseCommentEO")
|
||||
@Slf4j
|
||||
public class ProblemKnowledgeBaseCommentEOController extends JeroController<ProblemKnowledgeBaseCommentEO, IProblemKnowledgeBaseCommentEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseCommentEOService problemKnowledgeBaseCommentEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库评论表-分页列表查询", notes="问题知识库评论表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseCommentEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseCommentEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseCommentEO> page = new Page<ProblemKnowledgeBaseCommentEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseCommentEO> pageList = problemKnowledgeBaseCommentEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-列表查询")
|
||||
@ApiOperation(value="问题知识库评论表-列表查询", notes="问题知识库评论表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseCommentEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseCommentEO> list = problemKnowledgeBaseCommentEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-添加")
|
||||
@ApiOperation(value="问题知识库评论表-添加", notes="问题知识库评论表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO) {
|
||||
problemKnowledgeBaseCommentEOService.add(problemKnowledgeBaseCommentEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-编辑")
|
||||
@ApiOperation(value="问题知识库评论表-编辑", notes="问题知识库评论表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO) {
|
||||
problemKnowledgeBaseCommentEOService.editById(problemKnowledgeBaseCommentEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-通过id删除")
|
||||
@ApiOperation(value="问题知识库评论表-通过id删除", notes="问题知识库评论表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseCommentEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-批量删除")
|
||||
@ApiOperation(value="问题知识库评论表-批量删除", notes="问题知识库评论表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseCommentEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-通过id查询")
|
||||
@ApiOperation(value="问题知识库评论表-通过id查询", notes="问题知识库评论表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO = problemKnowledgeBaseCommentEOService.queryById(id);
|
||||
if(problemKnowledgeBaseCommentEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseCommentEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseCommentEO, ProblemKnowledgeBaseCommentEO.class, "问题知识库评论表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseCommentEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
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.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseEOService;
|
||||
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.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/problemKnowledgeBaseEO")
|
||||
@Slf4j
|
||||
public class ProblemKnowledgeBaseEOController extends JeroController<ProblemKnowledgeBaseEO, IProblemKnowledgeBaseEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseEOService problemKnowledgeBaseEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库表-分页列表查询", notes="问题知识库表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseEO> page = new Page<ProblemKnowledgeBaseEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseEO> pageList = problemKnowledgeBaseEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-列表查询")
|
||||
@ApiOperation(value="问题知识库表-列表查询", notes="问题知识库表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseEO> list = problemKnowledgeBaseEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-添加")
|
||||
@ApiOperation(value="问题知识库表-添加", notes="问题知识库表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
problemKnowledgeBaseEOService.add(problemKnowledgeBaseEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-编辑")
|
||||
@ApiOperation(value="问题知识库表-编辑", notes="问题知识库表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
problemKnowledgeBaseEOService.editById(problemKnowledgeBaseEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-通过id删除")
|
||||
@ApiOperation(value="问题知识库表-通过id删除", notes="问题知识库表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-批量删除")
|
||||
@ApiOperation(value="问题知识库表-批量删除", notes="问题知识库表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-通过id查询")
|
||||
@ApiOperation(value="问题知识库表-通过id查询", notes="问题知识库表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseEO problemKnowledgeBaseEO = problemKnowledgeBaseEOService.queryById(id);
|
||||
if(problemKnowledgeBaseEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseEO, ProblemKnowledgeBaseEO.class, "问题知识库表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
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.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBasePraiseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBasePraiseEOService;
|
||||
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.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库点赞表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库点赞表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/problemKnowledgeBasePraiseEO")
|
||||
@Slf4j
|
||||
public class ProblemKnowledgeBasePraiseEOController extends JeroController<ProblemKnowledgeBasePraiseEO, IProblemKnowledgeBasePraiseEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBasePraiseEOService problemKnowledgeBasePraiseEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库点赞表-分页列表查询", notes="问题知识库点赞表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBasePraiseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBasePraiseEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBasePraiseEO> page = new Page<ProblemKnowledgeBasePraiseEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBasePraiseEO> pageList = problemKnowledgeBasePraiseEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-列表查询")
|
||||
@ApiOperation(value="问题知识库点赞表-列表查询", notes="问题知识库点赞表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBasePraiseEO>> queryList() {
|
||||
List<ProblemKnowledgeBasePraiseEO> list = problemKnowledgeBasePraiseEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-添加")
|
||||
@ApiOperation(value="问题知识库点赞表-添加", notes="问题知识库点赞表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO) {
|
||||
problemKnowledgeBasePraiseEOService.add(problemKnowledgeBasePraiseEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-编辑")
|
||||
@ApiOperation(value="问题知识库点赞表-编辑", notes="问题知识库点赞表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO) {
|
||||
problemKnowledgeBasePraiseEOService.editById(problemKnowledgeBasePraiseEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-通过id删除")
|
||||
@ApiOperation(value="问题知识库点赞表-通过id删除", notes="问题知识库点赞表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBasePraiseEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-批量删除")
|
||||
@ApiOperation(value="问题知识库点赞表-批量删除", notes="问题知识库点赞表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBasePraiseEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-通过id查询")
|
||||
@ApiOperation(value="问题知识库点赞表-通过id查询", notes="问题知识库点赞表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO = problemKnowledgeBasePraiseEOService.queryById(id);
|
||||
if(problemKnowledgeBasePraiseEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBasePraiseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO) {
|
||||
return super.exportXls(request, problemKnowledgeBasePraiseEO, ProblemKnowledgeBasePraiseEO.class, "问题知识库点赞表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBasePraiseEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
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.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseUserEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseUserEOService;
|
||||
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.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库展示权限表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库展示权限表")
|
||||
@RestController
|
||||
@RequestMapping("/problemKnowledgeBase/problemKnowledgeBaseUserEO")
|
||||
@Slf4j
|
||||
public class ProblemKnowledgeBaseUserEOController extends JeroController<ProblemKnowledgeBaseUserEO, IProblemKnowledgeBaseUserEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseUserEOService problemKnowledgeBaseUserEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseUserEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库展示权限表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库展示权限表-分页列表查询", notes="问题知识库展示权限表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseUserEO problemKnowledgeBaseUserEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseUserEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseUserEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseUserEO> page = new Page<ProblemKnowledgeBaseUserEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseUserEO> pageList = problemKnowledgeBaseUserEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库展示权限表-列表查询")
|
||||
@ApiOperation(value="问题知识库展示权限表-列表查询", notes="问题知识库展示权限表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseUserEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseUserEO> list = problemKnowledgeBaseUserEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseUserEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库展示权限表-添加")
|
||||
@ApiOperation(value="问题知识库展示权限表-添加", notes="问题知识库展示权限表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseUserEO problemKnowledgeBaseUserEO) {
|
||||
problemKnowledgeBaseUserEOService.add(problemKnowledgeBaseUserEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseUserEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库展示权限表-编辑")
|
||||
@ApiOperation(value="问题知识库展示权限表-编辑", notes="问题知识库展示权限表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseUserEO problemKnowledgeBaseUserEO) {
|
||||
problemKnowledgeBaseUserEOService.editById(problemKnowledgeBaseUserEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库展示权限表-通过id删除")
|
||||
@ApiOperation(value="问题知识库展示权限表-通过id删除", notes="问题知识库展示权限表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseUserEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库展示权限表-批量删除")
|
||||
@ApiOperation(value="问题知识库展示权限表-批量删除", notes="问题知识库展示权限表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseUserEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库展示权限表-通过id查询")
|
||||
@ApiOperation(value="问题知识库展示权限表-通过id查询", notes="问题知识库展示权限表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseUserEO problemKnowledgeBaseUserEO = problemKnowledgeBaseUserEOService.queryById(id);
|
||||
if(problemKnowledgeBaseUserEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseUserEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseUserEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseUserEO problemKnowledgeBaseUserEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseUserEO, ProblemKnowledgeBaseUserEO.class, "问题知识库展示权限表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseUserEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("country_card_temp")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="country_card_temp对象", description="Country Card模板维护表")
|
||||
public class CountryCardTempEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**标签名称*/
|
||||
@Excel(name = "标签名称", width = 15)
|
||||
@ApiModelProperty(value = "标签名称")
|
||||
private java.lang.String lableName;
|
||||
|
||||
/**标签类型*/
|
||||
@Excel(name = "标签类型", width = 15)
|
||||
@ApiModelProperty(value = "标签类型")
|
||||
private java.lang.String lableType;
|
||||
|
||||
/**展示顺序*/
|
||||
@Excel(name = "展示顺序", width = 15)
|
||||
@ApiModelProperty(value = "展示顺序")
|
||||
private java.lang.Integer orderNum;
|
||||
|
||||
/**关联网址*/
|
||||
@Excel(name = "关联网址", width = 15)
|
||||
@ApiModelProperty(value = "关联网址")
|
||||
private java.lang.String relevantUrl;
|
||||
|
||||
/**描述*/
|
||||
@Excel(name = "描述", width = 15)
|
||||
@ApiModelProperty(value = "描述")
|
||||
private java.lang.String description;
|
||||
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护-字典项表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("country_card_temp_item")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="country_card_temp_item对象", description="Country Card模板维护-字典项表")
|
||||
public class CountryCardTempItemEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**模板维护表id*/
|
||||
@Excel(name = "模板维护表id", width = 15)
|
||||
@ApiModelProperty(value = "模板维护表id")
|
||||
private java.lang.String countryCardTempId;
|
||||
|
||||
/**字典项值*/
|
||||
@Excel(name = "字典项值", width = 15)
|
||||
@ApiModelProperty(value = "字典项值")
|
||||
private java.lang.String itemValue;
|
||||
|
||||
/**字典项中文名称*/
|
||||
@Excel(name = "字典项中文名称", width = 15)
|
||||
@ApiModelProperty(value = "字典项中文名称")
|
||||
private java.lang.String itemText;
|
||||
|
||||
/**字典项英文名称*/
|
||||
@Excel(name = "字典项英文名称", width = 15)
|
||||
@ApiModelProperty(value = "字典项英文名称")
|
||||
private java.lang.String enName;
|
||||
|
||||
/**逻辑删除标识*/
|
||||
@Excel(name = "逻辑删除标识", width = 15)
|
||||
@ApiModelProperty(value = "逻辑删除标识")
|
||||
private java.lang.String delFlag;
|
||||
|
||||
/**状态(1启用 0不启用)*/
|
||||
@Excel(name = "状态(1启用 0不启用)", width = 15)
|
||||
@ApiModelProperty(value = "状态(1启用 0不启用)")
|
||||
private java.lang.String status;
|
||||
|
||||
/**描述*/
|
||||
@Excel(name = "描述", width = 15)
|
||||
@ApiModelProperty(value = "描述")
|
||||
private java.lang.String description;
|
||||
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库浏览历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("problem_knowledge_base_browsing_history")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="problem_knowledge_base_browsing_history对象", description="问题知识库浏览历史表")
|
||||
public class ProblemKnowledgeBaseBrowsingHistoryEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**问题知识库id*/
|
||||
@Excel(name = "问题知识库id", width = 15)
|
||||
@ApiModelProperty(value = "问题知识库id")
|
||||
private java.lang.String problemKnowledgeBaseId;
|
||||
|
||||
/**浏览人员id*/
|
||||
@Excel(name = "浏览人员id", width = 15)
|
||||
@ApiModelProperty(value = "浏览人员id")
|
||||
private java.lang.String browsingUserId;
|
||||
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库-分类表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("problem_knowledge_base_classify")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="problem_knowledge_base_classify对象", description="问题知识库-分类表")
|
||||
public class ProblemKnowledgeBaseClassifyEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**问题标签*/
|
||||
@Excel(name = "问题标签", width = 15)
|
||||
@ApiModelProperty(value = "问题标签")
|
||||
private java.lang.String problemLabel;
|
||||
|
||||
/**负责人id*/
|
||||
@Excel(name = "负责人id", width = 15)
|
||||
@ApiModelProperty(value = "负责人id")
|
||||
private java.lang.String chargePersonId;
|
||||
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库收藏表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("problem_knowledge_base_collect")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="problem_knowledge_base_collect对象", description="问题知识库收藏表")
|
||||
public class ProblemKnowledgeBaseCollectEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**问题知识库id*/
|
||||
@Excel(name = "问题知识库id", width = 15)
|
||||
@ApiModelProperty(value = "问题知识库id")
|
||||
private java.lang.String problemKnowledgeBaseId;
|
||||
|
||||
/**收藏用户id*/
|
||||
@Excel(name = "收藏用户id", width = 15)
|
||||
@ApiModelProperty(value = "收藏用户id")
|
||||
private java.lang.String collectUserId;
|
||||
|
||||
/**收藏状态*/
|
||||
@Excel(name = "收藏状态", width = 15)
|
||||
@ApiModelProperty(value = "收藏状态")
|
||||
private java.lang.String collectStatus;
|
||||
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库评论表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("problem_knowledge_base_comment")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="problem_knowledge_base_comment对象", description="问题知识库评论表")
|
||||
public class ProblemKnowledgeBaseCommentEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**问题知识库id*/
|
||||
@Excel(name = "问题知识库id", width = 15)
|
||||
@ApiModelProperty(value = "问题知识库id")
|
||||
private java.lang.String problemKnowledgeBaseId;
|
||||
|
||||
/**评论内容*/
|
||||
@Excel(name = "评论内容", width = 15)
|
||||
@ApiModelProperty(value = "评论内容")
|
||||
private java.lang.String commentContent;
|
||||
|
||||
/**评论用户id*/
|
||||
@Excel(name = "评论用户id", width = 15)
|
||||
@ApiModelProperty(value = "评论用户id")
|
||||
private java.lang.String commentUserId;
|
||||
|
||||
}
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("problem_knowledge_base")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="problem_knowledge_base对象", description="问题知识库表")
|
||||
public class ProblemKnowledgeBaseEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**标题*/
|
||||
@Excel(name = "标题", width = 15)
|
||||
@ApiModelProperty(value = "标题")
|
||||
private java.lang.String title;
|
||||
|
||||
/**问题分类*/
|
||||
@Excel(name = "问题分类", width = 15)
|
||||
@ApiModelProperty(value = "问题分类")
|
||||
private java.lang.String problemType;
|
||||
|
||||
/**市场*/
|
||||
@Excel(name = "市场", width = 15)
|
||||
@ApiModelProperty(value = "市场")
|
||||
private java.lang.String targetMarket;
|
||||
|
||||
/**文档库id*/
|
||||
@Excel(name = "文档库id", width = 15)
|
||||
@ApiModelProperty(value = "文档库id")
|
||||
private java.lang.String bussDocumentLibraryId;
|
||||
|
||||
/**标准编号*/
|
||||
@Excel(name = "标准编号", width = 15)
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
private java.lang.String standNumber;
|
||||
|
||||
/**标准标题*/
|
||||
@Excel(name = "标准标题", width = 15)
|
||||
@ApiModelProperty(value = "标准标题")
|
||||
private java.lang.String standTitle;
|
||||
|
||||
/**内容(正文)*/
|
||||
@Excel(name = "内容(正文)", width = 15)
|
||||
private transient java.lang.String contentString;
|
||||
|
||||
private byte[] content;
|
||||
|
||||
public byte[] getContent(){
|
||||
if(contentString==null){
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return contentString.getBytes("UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getContentString(){
|
||||
if(content==null || content.length==0){
|
||||
return "";
|
||||
}
|
||||
try {
|
||||
return new String(content,"UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
/**附件*/
|
||||
@Excel(name = "附件", width = 15)
|
||||
@ApiModelProperty(value = "附件")
|
||||
private java.lang.String accessoryFile;
|
||||
|
||||
/**展示权限*/
|
||||
@Excel(name = "展示权限", width = 15)
|
||||
@ApiModelProperty(value = "展示权限")
|
||||
private java.lang.String showPermissions;
|
||||
|
||||
/**发布人id*/
|
||||
@Excel(name = "展示权限", width = 15)
|
||||
@ApiModelProperty(value = "发布人id")
|
||||
private java.lang.String releaseUserId;
|
||||
|
||||
/**发布日期*/
|
||||
@Excel(name = "发布日期", width = 15)
|
||||
@ApiModelProperty(value = "发布日期")
|
||||
private java.lang.String releaseTime;
|
||||
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库点赞表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("problem_knowledge_base_praise")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="problem_knowledge_base_praise对象", description="问题知识库点赞表")
|
||||
public class ProblemKnowledgeBasePraiseEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**问题知识库id*/
|
||||
@Excel(name = "问题知识库id", width = 15)
|
||||
@ApiModelProperty(value = "问题知识库id")
|
||||
private java.lang.String problemKnowledgeBaseId;
|
||||
|
||||
/**点赞人员id*/
|
||||
@Excel(name = "点赞人员id", width = 15)
|
||||
@ApiModelProperty(value = "点赞人员id")
|
||||
private java.lang.String praiseUserId;
|
||||
|
||||
/**点赞状态*/
|
||||
@Excel(name = "点赞状态", width = 15)
|
||||
@ApiModelProperty(value = "点赞状态")
|
||||
private java.lang.String praiseStatus;
|
||||
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package com.jero.modules.problemKnowledgeBase.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库展示权限表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("problem_knowledge_base_user")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="problem_knowledge_base_user对象", description="问题知识库展示权限表")
|
||||
public class ProblemKnowledgeBaseUserEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**问题知识库id*/
|
||||
@Excel(name = "问题知识库id", width = 15)
|
||||
@ApiModelProperty(value = "问题知识库id")
|
||||
private java.lang.String problemKnowledgeBaseId;
|
||||
|
||||
/**用户id*/
|
||||
@Excel(name = "用户id", width = 15)
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private java.lang.String userId;
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface CountryCardTempEOMapper extends BaseMapper<CountryCardTempEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempItemEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护-字典项表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface CountryCardTempItemEOMapper extends BaseMapper<CountryCardTempItemEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseBrowsingHistoryEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库浏览历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProblemKnowledgeBaseBrowsingHistoryEOMapper extends BaseMapper<ProblemKnowledgeBaseBrowsingHistoryEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseClassifyEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库-分类表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProblemKnowledgeBaseClassifyEOMapper extends BaseMapper<ProblemKnowledgeBaseClassifyEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCollectEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库收藏表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProblemKnowledgeBaseCollectEOMapper extends BaseMapper<ProblemKnowledgeBaseCollectEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCommentEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库评论表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProblemKnowledgeBaseCommentEOMapper extends BaseMapper<ProblemKnowledgeBaseCommentEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProblemKnowledgeBaseEOMapper extends BaseMapper<ProblemKnowledgeBaseEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBasePraiseEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库点赞表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProblemKnowledgeBasePraiseEOMapper extends BaseMapper<ProblemKnowledgeBasePraiseEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.problemKnowledgeBase.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseUserEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库展示权限表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProblemKnowledgeBaseUserEOMapper extends BaseMapper<ProblemKnowledgeBaseUserEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.problemKnowledgeBase.mapper.CountryCardTempEOMapper">
|
||||
<resultMap id="CountryCardTempEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.CountryCardTempEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="lable_name" property="lableName" />
|
||||
<result column="lable_type" property="lableType" />
|
||||
<result column="order_num" property="orderNum" />
|
||||
<result column="relevant_url" property="relevantUrl" />
|
||||
<result column="description" property="description" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.problemKnowledgeBase.mapper.CountryCardTempItemEOMapper">
|
||||
<resultMap id="CountryCardTempItemEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.CountryCardTempItemEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="country_card_temp_id" property="countryCardTempId" />
|
||||
<result column="item_value" property="itemValue" />
|
||||
<result column="item_text" property="itemText" />
|
||||
<result column="en_name" property="enName" />
|
||||
<result column="del_flag" property="delFlag" />
|
||||
<result column="status" property="status" />
|
||||
<result column="description" property="description" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseBrowsingHistoryEOMapper">
|
||||
<resultMap id="ProblemKnowledgeBaseBrowsingHistoryEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseBrowsingHistoryEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="problem_knowledge_base_id" property="problemKnowledgeBaseId" />
|
||||
<result column="browsing_user_id" property="browsingUserId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseClassifyEOMapper">
|
||||
<resultMap id="ProblemKnowledgeBaseClassifyEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseClassifyEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="problem_label" property="problemLabel" />
|
||||
<result column="charge_person_id" property="chargePersonId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseCollectEOMapper">
|
||||
<resultMap id="ProblemKnowledgeBaseCollectEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCollectEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="problem_knowledge_base_id" property="problemKnowledgeBaseId" />
|
||||
<result column="collect_user_id" property="collectUserId" />
|
||||
<result column="collect_status" property="collectStatus" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseCommentEOMapper">
|
||||
<resultMap id="ProblemKnowledgeBaseCommentEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCommentEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="problem_knowledge_base_id" property="problemKnowledgeBaseId" />
|
||||
<result column="comment_content" property="commentContent" />
|
||||
<result column="comment_user_id" property="commentUserId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseEOMapper">
|
||||
<resultMap id="ProblemKnowledgeBaseEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="title" property="title" />
|
||||
<result column="problem_type" property="problemType" />
|
||||
<result column="target_market" property="targetMarket" />
|
||||
<result column="buss_document_library_id" property="bussDocumentLibraryId" />
|
||||
<result column="stand_number" property="standNumber" />
|
||||
<result column="stand_title" property="standTitle" />
|
||||
<result column="content" property="content" />
|
||||
<result column="accessory_file" property="accessoryFile" />
|
||||
<result column="show_permissions" property="showPermissions" />
|
||||
<result column="release_user_id" property="releaseUserId" />
|
||||
<result column="release_time" property="releaseTime" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBasePraiseEOMapper">
|
||||
<resultMap id="ProblemKnowledgeBasePraiseEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBasePraiseEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="problem_knowledge_base_id" property="problemKnowledgeBaseId" />
|
||||
<result column="praise_user_id" property="praiseUserId" />
|
||||
<result column="praise_status" property="praiseStatus" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseUserEOMapper">
|
||||
<resultMap id="ProblemKnowledgeBaseUserEOResultMap" type="com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseUserEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="problem_knowledge_base_id" property="problemKnowledgeBaseId" />
|
||||
<result column="user_id" property="userId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ICountryCardTempEOService extends IService<CountryCardTempEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param countryCardTempEO
|
||||
* @return
|
||||
*/
|
||||
void add(CountryCardTempEO countryCardTempEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param countryCardTempEO
|
||||
* @return
|
||||
*/
|
||||
void editById(CountryCardTempEO countryCardTempEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
CountryCardTempEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<CountryCardTempEO> queryList();
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempItemEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护-字典项表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ICountryCardTempItemEOService extends IService<CountryCardTempItemEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param countryCardTempItemEO
|
||||
* @return
|
||||
*/
|
||||
void add(CountryCardTempItemEO countryCardTempItemEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param countryCardTempItemEO
|
||||
* @return
|
||||
*/
|
||||
void editById(CountryCardTempItemEO countryCardTempItemEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
CountryCardTempItemEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<CountryCardTempItemEO> queryList();
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseBrowsingHistoryEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库浏览历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IProblemKnowledgeBaseBrowsingHistoryEOService extends IService<ProblemKnowledgeBaseBrowsingHistoryEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @return
|
||||
*/
|
||||
void add(ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @return
|
||||
*/
|
||||
void editById(ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProblemKnowledgeBaseBrowsingHistoryEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ProblemKnowledgeBaseBrowsingHistoryEO> queryList();
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseClassifyEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库-分类表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IProblemKnowledgeBaseClassifyEOService extends IService<ProblemKnowledgeBaseClassifyEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemKnowledgeBaseClassifyEO
|
||||
* @return
|
||||
*/
|
||||
void add(ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemKnowledgeBaseClassifyEO
|
||||
* @return
|
||||
*/
|
||||
void editById(ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProblemKnowledgeBaseClassifyEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ProblemKnowledgeBaseClassifyEO> queryList();
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCollectEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库收藏表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IProblemKnowledgeBaseCollectEOService extends IService<ProblemKnowledgeBaseCollectEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @return
|
||||
*/
|
||||
void add(ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @return
|
||||
*/
|
||||
void editById(ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProblemKnowledgeBaseCollectEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ProblemKnowledgeBaseCollectEO> queryList();
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCommentEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库评论表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IProblemKnowledgeBaseCommentEOService extends IService<ProblemKnowledgeBaseCommentEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @return
|
||||
*/
|
||||
void add(ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @return
|
||||
*/
|
||||
void editById(ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProblemKnowledgeBaseCommentEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ProblemKnowledgeBaseCommentEO> queryList();
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IProblemKnowledgeBaseEOService extends IService<ProblemKnowledgeBaseEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @return
|
||||
*/
|
||||
void add(ProblemKnowledgeBaseEO problemKnowledgeBaseEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @return
|
||||
*/
|
||||
void editById(ProblemKnowledgeBaseEO problemKnowledgeBaseEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProblemKnowledgeBaseEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ProblemKnowledgeBaseEO> queryList();
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBasePraiseEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库点赞表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IProblemKnowledgeBasePraiseEOService extends IService<ProblemKnowledgeBasePraiseEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @return
|
||||
*/
|
||||
void add(ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @return
|
||||
*/
|
||||
void editById(ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProblemKnowledgeBasePraiseEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ProblemKnowledgeBasePraiseEO> queryList();
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseUserEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库展示权限表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IProblemKnowledgeBaseUserEOService extends IService<ProblemKnowledgeBaseUserEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemKnowledgeBaseUserEO
|
||||
* @return
|
||||
*/
|
||||
void add(ProblemKnowledgeBaseUserEO problemKnowledgeBaseUserEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemKnowledgeBaseUserEO
|
||||
* @return
|
||||
*/
|
||||
void editById(ProblemKnowledgeBaseUserEO problemKnowledgeBaseUserEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProblemKnowledgeBaseUserEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ProblemKnowledgeBaseUserEO> queryList();
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempEO;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.CountryCardTempEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class CountryCardTempEOServiceImpl extends ServiceImpl<CountryCardTempEOMapper, CountryCardTempEO> implements ICountryCardTempEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param countryCardTempEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(CountryCardTempEO countryCardTempEO) {
|
||||
Date now = new Date();
|
||||
countryCardTempEO.setCreateTime(now);
|
||||
countryCardTempEO.setUpdateTime(now);
|
||||
save(countryCardTempEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param countryCardTempEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(CountryCardTempEO countryCardTempEO) {
|
||||
Date now = new Date();
|
||||
countryCardTempEO.setUpdateTime(now);
|
||||
saveOrUpdate(countryCardTempEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public CountryCardTempEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CountryCardTempEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardTempItemEO;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.CountryCardTempItemEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardTempItemEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: Country Card模板维护-字典项表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class CountryCardTempItemEOServiceImpl extends ServiceImpl<CountryCardTempItemEOMapper, CountryCardTempItemEO> implements ICountryCardTempItemEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param countryCardTempItemEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(CountryCardTempItemEO countryCardTempItemEO) {
|
||||
Date now = new Date();
|
||||
countryCardTempItemEO.setCreateTime(now);
|
||||
countryCardTempItemEO.setUpdateTime(now);
|
||||
save(countryCardTempItemEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param countryCardTempItemEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(CountryCardTempItemEO countryCardTempItemEO) {
|
||||
Date now = new Date();
|
||||
countryCardTempItemEO.setUpdateTime(now);
|
||||
saveOrUpdate(countryCardTempItemEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public CountryCardTempItemEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CountryCardTempItemEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseBrowsingHistoryEO;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseBrowsingHistoryEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseBrowsingHistoryEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库浏览历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ProblemKnowledgeBaseBrowsingHistoryEOServiceImpl extends ServiceImpl<ProblemKnowledgeBaseBrowsingHistoryEOMapper, ProblemKnowledgeBaseBrowsingHistoryEO> implements IProblemKnowledgeBaseBrowsingHistoryEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO) {
|
||||
Date now = new Date();
|
||||
problemKnowledgeBaseBrowsingHistoryEO.setCreateTime(now);
|
||||
problemKnowledgeBaseBrowsingHistoryEO.setUpdateTime(now);
|
||||
save(problemKnowledgeBaseBrowsingHistoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO) {
|
||||
Date now = new Date();
|
||||
problemKnowledgeBaseBrowsingHistoryEO.setUpdateTime(now);
|
||||
saveOrUpdate(problemKnowledgeBaseBrowsingHistoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProblemKnowledgeBaseBrowsingHistoryEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProblemKnowledgeBaseBrowsingHistoryEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseClassifyEO;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseClassifyEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseClassifyEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库-分类表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ProblemKnowledgeBaseClassifyEOServiceImpl extends ServiceImpl<ProblemKnowledgeBaseClassifyEOMapper, ProblemKnowledgeBaseClassifyEO> implements IProblemKnowledgeBaseClassifyEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemKnowledgeBaseClassifyEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO) {
|
||||
Date now = new Date();
|
||||
problemKnowledgeBaseClassifyEO.setCreateTime(now);
|
||||
problemKnowledgeBaseClassifyEO.setUpdateTime(now);
|
||||
save(problemKnowledgeBaseClassifyEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemKnowledgeBaseClassifyEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ProblemKnowledgeBaseClassifyEO problemKnowledgeBaseClassifyEO) {
|
||||
Date now = new Date();
|
||||
problemKnowledgeBaseClassifyEO.setUpdateTime(now);
|
||||
saveOrUpdate(problemKnowledgeBaseClassifyEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProblemKnowledgeBaseClassifyEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProblemKnowledgeBaseClassifyEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCollectEO;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseCollectEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseCollectEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库收藏表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ProblemKnowledgeBaseCollectEOServiceImpl extends ServiceImpl<ProblemKnowledgeBaseCollectEOMapper, ProblemKnowledgeBaseCollectEO> implements IProblemKnowledgeBaseCollectEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO) {
|
||||
Date now = new Date();
|
||||
problemKnowledgeBaseCollectEO.setCreateTime(now);
|
||||
problemKnowledgeBaseCollectEO.setUpdateTime(now);
|
||||
save(problemKnowledgeBaseCollectEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO) {
|
||||
Date now = new Date();
|
||||
problemKnowledgeBaseCollectEO.setUpdateTime(now);
|
||||
saveOrUpdate(problemKnowledgeBaseCollectEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProblemKnowledgeBaseCollectEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProblemKnowledgeBaseCollectEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCommentEO;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseCommentEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseCommentEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库评论表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ProblemKnowledgeBaseCommentEOServiceImpl extends ServiceImpl<ProblemKnowledgeBaseCommentEOMapper, ProblemKnowledgeBaseCommentEO> implements IProblemKnowledgeBaseCommentEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO) {
|
||||
Date now = new Date();
|
||||
problemKnowledgeBaseCommentEO.setCreateTime(now);
|
||||
problemKnowledgeBaseCommentEO.setUpdateTime(now);
|
||||
save(problemKnowledgeBaseCommentEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO) {
|
||||
Date now = new Date();
|
||||
problemKnowledgeBaseCommentEO.setUpdateTime(now);
|
||||
saveOrUpdate(problemKnowledgeBaseCommentEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProblemKnowledgeBaseCommentEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProblemKnowledgeBaseCommentEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowledgeBaseEOMapper, ProblemKnowledgeBaseEO> implements IProblemKnowledgeBaseEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
Date now = new Date();
|
||||
problemKnowledgeBaseEO.setCreateTime(now);
|
||||
problemKnowledgeBaseEO.setUpdateTime(now);
|
||||
save(problemKnowledgeBaseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
Date now = new Date();
|
||||
problemKnowledgeBaseEO.setUpdateTime(now);
|
||||
saveOrUpdate(problemKnowledgeBaseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProblemKnowledgeBaseEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProblemKnowledgeBaseEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBasePraiseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBasePraiseEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBasePraiseEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库点赞表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ProblemKnowledgeBasePraiseEOServiceImpl extends ServiceImpl<ProblemKnowledgeBasePraiseEOMapper, ProblemKnowledgeBasePraiseEO> implements IProblemKnowledgeBasePraiseEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO) {
|
||||
Date now = new Date();
|
||||
problemKnowledgeBasePraiseEO.setCreateTime(now);
|
||||
problemKnowledgeBasePraiseEO.setUpdateTime(now);
|
||||
save(problemKnowledgeBasePraiseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO) {
|
||||
Date now = new Date();
|
||||
problemKnowledgeBasePraiseEO.setUpdateTime(now);
|
||||
saveOrUpdate(problemKnowledgeBasePraiseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProblemKnowledgeBasePraiseEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProblemKnowledgeBasePraiseEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseUserEO;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseUserEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseUserEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库展示权限表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ProblemKnowledgeBaseUserEOServiceImpl extends ServiceImpl<ProblemKnowledgeBaseUserEOMapper, ProblemKnowledgeBaseUserEO> implements IProblemKnowledgeBaseUserEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param problemKnowledgeBaseUserEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(ProblemKnowledgeBaseUserEO problemKnowledgeBaseUserEO) {
|
||||
Date now = new Date();
|
||||
problemKnowledgeBaseUserEO.setCreateTime(now);
|
||||
problemKnowledgeBaseUserEO.setUpdateTime(now);
|
||||
save(problemKnowledgeBaseUserEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param problemKnowledgeBaseUserEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ProblemKnowledgeBaseUserEO problemKnowledgeBaseUserEO) {
|
||||
Date now = new Date();
|
||||
problemKnowledgeBaseUserEO.setUpdateTime(now);
|
||||
saveOrUpdate(problemKnowledgeBaseUserEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProblemKnowledgeBaseUserEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProblemKnowledgeBaseUserEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* Copyright 2013 Haulmont
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
* use this file except in compliance with the License. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
package com.jero.modules.project.util;
|
||||
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.xlsx4j.sml.Cell;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class CellReference implements Comparable {
|
||||
public static final Pattern CELL_COORDINATES_PATTERN = Pattern.compile("([A-z]+)([0-9]+)");
|
||||
private int column;
|
||||
private int row;
|
||||
private String sheet;
|
||||
|
||||
public CellReference(String sheet, int row, int column) {
|
||||
this.column = column;
|
||||
this.row = row;
|
||||
this.sheet = sheet;
|
||||
}
|
||||
|
||||
public CellReference(String sheet, String cellRef) {
|
||||
Matcher matcher = CELL_COORDINATES_PATTERN.matcher(cellRef);
|
||||
if (matcher.find()) {
|
||||
column = XlsxUtils.getNumberFromColumnReference(matcher.group(1));
|
||||
row = Integer.valueOf(matcher.group(2));
|
||||
this.sheet = sheet;
|
||||
} else {
|
||||
throw new RuntimeException(String.format("Wrong cell %s", cellRef));
|
||||
}
|
||||
}
|
||||
|
||||
public CellReference(String sheet, Cell cell) {
|
||||
this(sheet, cell.getR());
|
||||
}
|
||||
|
||||
public CellReference shift(int downShift, int rightShift) {
|
||||
row += downShift;
|
||||
column += rightShift;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CellReference move(int row, int col) {
|
||||
this.row = row;
|
||||
this.column = col;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String toReference() {
|
||||
return XlsxUtils.getColumnReferenceFromNumber(getColumn()) + getRow();
|
||||
}
|
||||
|
||||
public int getColumn() {
|
||||
return column;
|
||||
}
|
||||
|
||||
public int getRow() {
|
||||
return row;
|
||||
}
|
||||
|
||||
public String getSheet() {
|
||||
return sheet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
CellReference that = (CellReference) o;
|
||||
|
||||
if (column != that.column) return false;
|
||||
if (row != that.row) return false;
|
||||
if (sheet != null ? !sheet.equals(that.sheet) : that.sheet != null) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = column;
|
||||
result = 31 * result + row;
|
||||
result = 31 * result + (sheet != null ? sheet.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Object o) {
|
||||
if (o instanceof CellReference) {
|
||||
int rows = ObjectUtils.compare(row, ((CellReference) o).row);
|
||||
int columns = ObjectUtils.compare(column, ((CellReference) o).column);
|
||||
return rows != 0 ? rows : columns;
|
||||
|
||||
} else {
|
||||
throw new IllegalArgumentException("Could not compare with " + o);
|
||||
}
|
||||
}
|
||||
}
|
||||
+402
-44
@@ -1,50 +1,415 @@
|
||||
package com.jero.modules.project.util;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.docx4j.XmlUtils;
|
||||
import org.docx4j.dml.*;
|
||||
import org.docx4j.dml.spreadsheetdrawing.*;
|
||||
import org.docx4j.openpackaging.io.SaveToZipFile;
|
||||
import org.docx4j.openpackaging.io3.stores.PartStore;
|
||||
import org.docx4j.openpackaging.packages.SpreadsheetMLPackage;
|
||||
import org.docx4j.openpackaging.parts.DrawingML.Drawing;
|
||||
import org.docx4j.openpackaging.parts.Part;
|
||||
import org.docx4j.openpackaging.parts.PartName;
|
||||
import org.docx4j.openpackaging.parts.Parts;
|
||||
import org.docx4j.openpackaging.parts.SpreadsheetML.JaxbSmlPart;
|
||||
import org.docx4j.openpackaging.parts.SpreadsheetML.WorkbookPart;
|
||||
import org.docx4j.openpackaging.parts.SpreadsheetML.WorksheetPart;
|
||||
import org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage;
|
||||
import org.docx4j.openpackaging.parts.relationships.Namespaces;
|
||||
import org.docx4j.openpackaging.parts.relationships.RelationshipsPart;
|
||||
import org.docx4j.relationships.Relationship;
|
||||
import org.xlsx4j.sml.Cell;
|
||||
import org.xlsx4j.sml.SheetData;
|
||||
import org.xlsx4j.sml.Worksheet;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.util.JAXBResult;
|
||||
import javax.xml.transform.Source;
|
||||
import javax.xml.transform.Templates;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@Slf4j
|
||||
public class ExcelUtil {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String inputfilepath = "D:\\text\\072001自定义模板.xlsx";
|
||||
SpreadsheetMLPackage pkg = SpreadsheetMLPackage.load(new File(inputfilepath));
|
||||
WorksheetPart worksheet = pkg.getWorkbookPart().getWorksheet(0);
|
||||
JAXBResult result = XmlUtils.prepareJAXBResult(worksheet.getJAXBContext());
|
||||
// .createWorksheetPart(new PartName("/xl/worksheets/sheet1.xml"), "Sheet1", 1);
|
||||
JaxbSmlPart smlPart = (JaxbSmlPart)pkg.getParts().get(new PartName("/xl/sharedStrings.xml")); // 获取所有sheet中的文本
|
||||
Parts parts = pkg.getParts();
|
||||
System.out.println("mmmmmmm");
|
||||
|
||||
/*JAXBResult result = XmlUtils.prepareJAXBResult(worksheet.getJAXBContext());
|
||||
Map<String, Object> transformParameters = new HashMap<>();
|
||||
transformParameters.put("NIO 07200103", "dfasdfas");
|
||||
|
||||
// InputStream smlPart = pkg.getParts().get(new PartName("/xl/sharedStrings.xml")); // 获取所有sheet
|
||||
|
||||
Source xsltSource = new StreamSource(new File("D:\\text\\sharedStrings.xml"));
|
||||
TransformerFactory transFact = TransformerFactory.newInstance();
|
||||
Templates cachedXSLT = transFact.newTemplates(xsltSource);
|
||||
|
||||
pkg.getWorkbookPart().transform(cachedXSLT,transformParameters,result);
|
||||
pkg.getWorkbookPart().transform(cachedXSLT,transformParameters,result);*/
|
||||
|
||||
// variableReplace();
|
||||
// xlsx4JAddImage();
|
||||
|
||||
WorkbookPart workbookPart = pkg.getWorkbookPart();
|
||||
WorksheetPart sheet = workbookPart.getWorksheet(0);
|
||||
Worksheet ws = sheet.getContents();
|
||||
SheetData data = ws.getSheetData();
|
||||
System.out.println("mmmmmmm");
|
||||
}
|
||||
|
||||
public static void setRowHeight(WorksheetPart worksheetPart, int rIndex, double height, int cIndex, String text) {
|
||||
SheetData sheetData = worksheetPart.getJaxbElement().getSheetData();
|
||||
|
||||
org.xlsx4j.sml.Row r = sheetData.getRow().get(rIndex);
|
||||
if (r.getHt() == null || (r.getHt() != null && r.getHt() < height)) {
|
||||
r.setHt(height);
|
||||
r.setCustomHeight(true);
|
||||
}
|
||||
|
||||
Cell c = r.getC().get(cIndex);
|
||||
if (text == null) {
|
||||
c.setV(null);
|
||||
}
|
||||
}
|
||||
|
||||
public static void replacePictureBatchPOI(Workbook workbook, SpreadsheetMLPackage pkg, List<Map<String, Object>> imgListAll, HashMap<String, String> params) throws Exception {
|
||||
//获取全部sheet页中表格
|
||||
Sheet sheet=null;
|
||||
int partNameNum = 0;
|
||||
for (int i = 0; i < workbook.getNumberOfSheets(); i++) {//获取每个Sheet表
|
||||
sheet = workbook.getSheetAt(i);
|
||||
WorksheetPart worksheetPart = (WorksheetPart) pkg.getParts().get(new PartName("/xl/worksheets/" + sheet.getSheetName().toLowerCase() + ".xml"));
|
||||
partNameNum++;
|
||||
|
||||
//获得数据的总行数
|
||||
int totalRowNum = sheet.getLastRowNum();
|
||||
|
||||
//获得所有数据
|
||||
int k = 0;
|
||||
for (int x = 0; x < totalRowNum; x++) {
|
||||
//获得第x行对象
|
||||
Row row = sheet.getRow(x);
|
||||
if (!(row == null)) {
|
||||
//获得总列数
|
||||
int cellLength = row.getLastCellNum();
|
||||
//如果x行里的所有单元格
|
||||
int j = 0;
|
||||
for (int y = 0; y < cellLength; y++) {
|
||||
|
||||
org.apache.poi.ss.usermodel.Cell cell = row.getCell(y);
|
||||
if(ObjectUtil.isNull(cell)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
String cellValue = cell.getStringCellValue();
|
||||
|
||||
for (Map<String, Object> imgMap : imgListAll) {
|
||||
String key = (String) imgMap.get("key");
|
||||
String text = (String) imgMap.get("text");
|
||||
byte[] bytes = (byte[]) imgMap.get("bytes");
|
||||
if (("${" + key + "}").equals(cellValue)) {
|
||||
|
||||
// 根据图片大小调整行高
|
||||
ByteArrayInputStream in = new ByteArrayInputStream(bytes);
|
||||
BufferedImage bufferedImage = ImageIO.read(in);
|
||||
setRowHeight(worksheetPart, k, bufferedImage.getHeight(), j, text);
|
||||
|
||||
if (text != null) {
|
||||
params.put(key, text);
|
||||
}
|
||||
|
||||
// 插入图片到表格
|
||||
putImagePOI(worksheetPart, pkg, cell, bytes, sheet.getSheetName().toLowerCase(), String.valueOf(partNameNum));
|
||||
}
|
||||
}
|
||||
j++; // 单元格非空才++
|
||||
}
|
||||
k++; // 行非空才++
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void replacePictureBatch(SpreadsheetMLPackage pkg,List<Map<String, Object>> imgListAll) throws Exception {
|
||||
Parts parts = pkg.getParts();
|
||||
Map<PartName, Part> map = parts.getParts();
|
||||
|
||||
for (Map.Entry<PartName, Part> partMap : map.entrySet()) {
|
||||
int partNameNum = 0;
|
||||
if (partMap.getValue() instanceof WorksheetPart) {
|
||||
String partName = String.valueOf(partMap.getKey());
|
||||
WorksheetPart worksheetPart = (WorksheetPart) partMap.getValue();
|
||||
SheetData sheetData = worksheetPart.getJaxbElement().getSheetData();
|
||||
partNameNum++;
|
||||
|
||||
for (org.xlsx4j.sml.Row r : sheetData.getRow() ) { // 循环表格行
|
||||
for (Cell c : r.getC()) { // 循环表格单元格
|
||||
Object cellValue = c.getV(); // 获取单元格数内容
|
||||
|
||||
if (cellValue instanceof String) {
|
||||
for (Map<String, Object> imgMap : imgListAll) {
|
||||
String key = (String) imgMap.get("key");
|
||||
String text = (String) imgMap.get("text");
|
||||
byte[] bytes = (byte[]) imgMap.get("bytes");
|
||||
|
||||
if (("${" + key + "}").equals(cellValue)) {
|
||||
c.setV(text);
|
||||
putImage(worksheetPart, pkg, c, bytes, partName, String.valueOf(partNameNum));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void putImagePOI(WorksheetPart worksheetPart, SpreadsheetMLPackage pkg, org.apache.poi.ss.usermodel.Cell newCell, byte[] bytes, String sheetName, String partName) throws Exception {
|
||||
ByteArrayInputStream in = new ByteArrayInputStream(bytes);
|
||||
BufferedImage bufferedImage = ImageIO.read(in);
|
||||
BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(pkg, worksheetPart, bytes);
|
||||
String imagePartName = imagePart.getPartName().getName();
|
||||
|
||||
PartName drawingPart = new PartName(worksheetPart.getPartName().getName().replace("worksheets/" + sheetName, "drawings/drawing" + partName));
|
||||
Drawing drawing = (Drawing) pkg.getParts().get(drawingPart);
|
||||
int currentId = 0;
|
||||
if (drawing == null) {
|
||||
drawing = new Drawing(drawingPart);
|
||||
drawing.setContents(new org.docx4j.dml.spreadsheetdrawing.CTDrawing());
|
||||
Relationship relationship = worksheetPart.addTargetPart(drawing);
|
||||
org.xlsx4j.sml.CTDrawing smlDrawing = new org.xlsx4j.sml.CTDrawing();
|
||||
smlDrawing.setId(relationship.getId());
|
||||
smlDrawing.setParent(worksheetPart.getContents());
|
||||
worksheetPart.getContents().setDrawing(smlDrawing);
|
||||
} else {
|
||||
currentId = drawing.getContents().getEGAnchor().size();
|
||||
}
|
||||
|
||||
CTTwoCellAnchor anchor = new CTTwoCellAnchor();
|
||||
anchor.setFrom(new CTMarker());
|
||||
anchor.getFrom().setCol(newCell.getColumnIndex());
|
||||
anchor.getFrom().setRow(newCell.getRowIndex());
|
||||
anchor.setTo(new CTMarker());
|
||||
anchor.getTo().setCol(newCell.getColumnIndex() + 1); // TODO
|
||||
anchor.getTo().setRow(newCell.getRowIndex() + 1);
|
||||
|
||||
CTPicture picture = new CTPicture();
|
||||
|
||||
CTBlipFillProperties blipFillProperties = new CTBlipFillProperties();
|
||||
blipFillProperties.setStretch(new CTStretchInfoProperties());
|
||||
blipFillProperties.getStretch().setFillRect(new CTRelativeRect());
|
||||
blipFillProperties.setBlip(new CTBlip());
|
||||
blipFillProperties.getBlip().setEmbed("rId" + (currentId + 1));
|
||||
blipFillProperties.getBlip().setCstate(STBlipCompression.NONE);
|
||||
|
||||
picture.setBlipFill(blipFillProperties);
|
||||
|
||||
CTNonVisualDrawingProps nonVisualDrawingProps = new CTNonVisualDrawingProps();
|
||||
nonVisualDrawingProps.setId(currentId + 2);
|
||||
nonVisualDrawingProps.setName(imagePartName.substring(imagePartName.lastIndexOf("/") + 1));
|
||||
nonVisualDrawingProps.setDescr(nonVisualDrawingProps.getName());
|
||||
|
||||
CTNonVisualPictureProperties nonVisualPictureProperties = new CTNonVisualPictureProperties();
|
||||
nonVisualPictureProperties.setPicLocks(new CTPictureLocking());
|
||||
nonVisualPictureProperties.getPicLocks().setNoChangeAspect(true);
|
||||
CTPictureNonVisual nonVisualPicture = new CTPictureNonVisual();
|
||||
|
||||
nonVisualPicture.setCNvPr(nonVisualDrawingProps);
|
||||
nonVisualPicture.setCNvPicPr(nonVisualPictureProperties);
|
||||
|
||||
picture.setNvPicPr(nonVisualPicture);
|
||||
|
||||
CTShapeProperties shapeProperties = new CTShapeProperties();
|
||||
CTTransform2D transform2D = new CTTransform2D();
|
||||
transform2D.setOff(new CTPoint2D());
|
||||
transform2D.setExt(new CTPositiveSize2D());
|
||||
shapeProperties.setXfrm(transform2D);
|
||||
shapeProperties.setPrstGeom(new CTPresetGeometry2D());
|
||||
shapeProperties.getPrstGeom().setPrst(STShapeType.RECT);
|
||||
shapeProperties.getPrstGeom().setAvLst(new CTGeomGuideList());
|
||||
CTPositiveSize2D positivesize2D = new CTPositiveSize2D();
|
||||
transform2D.setExt(positivesize2D);
|
||||
positivesize2D.setCx( XlsxUtils.convertPxToEmu(bufferedImage.getWidth()) );
|
||||
positivesize2D.setCy( XlsxUtils.convertPxToEmu(bufferedImage.getHeight()) );
|
||||
|
||||
picture.setSpPr(shapeProperties);
|
||||
|
||||
anchor.setPic(picture);
|
||||
anchor.setClientData(new CTAnchorClientData());
|
||||
anchor.setEditAs(STEditAs.ONE_CELL);
|
||||
drawing.getContents().getEGAnchor().add(anchor);
|
||||
|
||||
Relationship rel = new Relationship();
|
||||
rel.setId("rId" + (currentId + 1));
|
||||
rel.setType(Namespaces.IMAGE);
|
||||
rel.setTarget(imagePartName);
|
||||
|
||||
drawing.getRelationshipsPart().addRelationship(rel);
|
||||
RelationshipsPart relPart = drawing.getRelationshipsPart();
|
||||
pkg.getParts().remove(relPart.getPartName());
|
||||
pkg.getParts().put(relPart);
|
||||
pkg.getParts().remove(drawing.getPartName());
|
||||
pkg.getParts().put(drawing);
|
||||
}
|
||||
|
||||
private static void putImage(WorksheetPart worksheetPart, SpreadsheetMLPackage pkg, Cell newCell, byte[] bytes, String sheetName, String partName) throws Exception {
|
||||
ByteArrayInputStream in = new ByteArrayInputStream(bytes);
|
||||
BufferedImage bufferedImage = ImageIO.read(in);
|
||||
|
||||
BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(pkg, worksheetPart, bytes);
|
||||
CTTwoCellAnchor anchor = new CTTwoCellAnchor();
|
||||
anchor.setFrom(new CTMarker());
|
||||
CellReference cellReference = new CellReference("", newCell.getR());
|
||||
anchor.getFrom().setCol(cellReference.getColumn() - 1);
|
||||
anchor.getFrom().setRow(cellReference.getRow() - 1);
|
||||
anchor.setTo(new CTMarker());
|
||||
anchor.getTo().setCol(cellReference.getColumn());
|
||||
anchor.getTo().setRow(cellReference.getRow());
|
||||
|
||||
PartName drawingPart = new PartName(worksheetPart.getPartName().getName().replace("worksheets/" + sheetName, "drawings/drawing" + partName));
|
||||
String imagePartName = imagePart.getPartName().getName();
|
||||
Drawing drawing = (Drawing) pkg.getParts().get(drawingPart);
|
||||
int currentId = 0;
|
||||
if (drawing == null) {
|
||||
drawing = new Drawing(drawingPart);
|
||||
drawing.setContents(new org.docx4j.dml.spreadsheetdrawing.CTDrawing());
|
||||
Relationship relationship = worksheetPart.addTargetPart(drawing);
|
||||
org.xlsx4j.sml.CTDrawing smlDrawing = new org.xlsx4j.sml.CTDrawing();
|
||||
smlDrawing.setId(relationship.getId());
|
||||
smlDrawing.setParent(worksheetPart.getContents());
|
||||
worksheetPart.getContents().setDrawing(smlDrawing);
|
||||
} else {
|
||||
currentId = drawing.getContents().getEGAnchor().size();
|
||||
}
|
||||
|
||||
CTPicture picture = new CTPicture();
|
||||
|
||||
CTBlipFillProperties blipFillProperties = new CTBlipFillProperties();
|
||||
blipFillProperties.setStretch(new CTStretchInfoProperties());
|
||||
blipFillProperties.getStretch().setFillRect(new CTRelativeRect());
|
||||
blipFillProperties.setBlip(new CTBlip());
|
||||
blipFillProperties.getBlip().setEmbed("rId" + (currentId + 1));
|
||||
blipFillProperties.getBlip().setCstate(STBlipCompression.PRINT);
|
||||
|
||||
picture.setBlipFill(blipFillProperties);
|
||||
|
||||
CTNonVisualDrawingProps nonVisualDrawingProps = new CTNonVisualDrawingProps();
|
||||
nonVisualDrawingProps.setId(currentId + 2);
|
||||
nonVisualDrawingProps.setName(imagePartName.substring(imagePartName.lastIndexOf("/") + 1));
|
||||
nonVisualDrawingProps.setDescr(nonVisualDrawingProps.getName());
|
||||
|
||||
CTNonVisualPictureProperties nonVisualPictureProperties = new CTNonVisualPictureProperties();
|
||||
nonVisualPictureProperties.setPicLocks(new CTPictureLocking());
|
||||
nonVisualPictureProperties.getPicLocks().setNoChangeAspect(true);
|
||||
CTPictureNonVisual nonVisualPicture = new CTPictureNonVisual();
|
||||
|
||||
nonVisualPicture.setCNvPr(nonVisualDrawingProps);
|
||||
nonVisualPicture.setCNvPicPr(nonVisualPictureProperties);
|
||||
|
||||
picture.setNvPicPr(nonVisualPicture);
|
||||
|
||||
CTShapeProperties shapeProperties = new CTShapeProperties();
|
||||
CTTransform2D transform2D = new CTTransform2D();
|
||||
transform2D.setOff(new CTPoint2D());
|
||||
transform2D.setExt(new CTPositiveSize2D());
|
||||
shapeProperties.setXfrm(transform2D);
|
||||
shapeProperties.setPrstGeom(new CTPresetGeometry2D());
|
||||
shapeProperties.getPrstGeom().setPrst(STShapeType.RECT);
|
||||
shapeProperties.getPrstGeom().setAvLst(new CTGeomGuideList());
|
||||
CTPositiveSize2D positivesize2D = new CTPositiveSize2D();
|
||||
transform2D.setExt(positivesize2D);
|
||||
positivesize2D.setCx( XlsxUtils.convertPxToEmu(bufferedImage.getWidth()) );
|
||||
positivesize2D.setCy( XlsxUtils.convertPxToEmu(bufferedImage.getHeight()) );
|
||||
|
||||
picture.setSpPr(shapeProperties);
|
||||
|
||||
anchor.setPic(picture);
|
||||
anchor.setClientData(new CTAnchorClientData());
|
||||
|
||||
drawing.getContents().getEGAnchor().add(anchor);
|
||||
|
||||
Relationship rel = new Relationship();
|
||||
rel.setId("rId" + (currentId + 1));
|
||||
rel.setType(Namespaces.IMAGE);
|
||||
rel.setTarget(imagePartName);
|
||||
|
||||
drawing.getRelationshipsPart().addRelationship(rel);
|
||||
RelationshipsPart relPart = drawing.getRelationshipsPart();
|
||||
pkg.getParts().remove(relPart.getPartName());
|
||||
pkg.getParts().put(relPart);
|
||||
pkg.getParts().remove(drawing.getPartName());
|
||||
pkg.getParts().put(drawing);
|
||||
}
|
||||
|
||||
private static String getWmlTemplateString(JaxbSmlPart smlPart) {
|
||||
String wmlTemplateString = null;
|
||||
PartStore partStore = smlPart.getPackage().getSourcePartStore();
|
||||
String name = smlPart.getPartName().getName();
|
||||
try {
|
||||
InputStream is = partStore.loadPart(
|
||||
name.substring(1));
|
||||
if (is == null) {
|
||||
log.warn(name + " missing from part store");
|
||||
} else {
|
||||
log.info("Lazily unmarshalling " + name);
|
||||
// wmlTemplateString = convertStreamToString(is);
|
||||
|
||||
// This seems to be about 5% faster than the Scanner approach
|
||||
wmlTemplateString = IOUtils.toString(is, "UTF-8");
|
||||
List<String> placeholderList = new ArrayList<>();
|
||||
getAllPlaceholderElementFromObject(wmlTemplateString, 0, placeholderList);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
|
||||
} finally {
|
||||
return wmlTemplateString;
|
||||
}
|
||||
}
|
||||
|
||||
private static List<String> getAllPlaceholderElementFromObject(String wmlTemplateString, int offset, List<String> placeholderList) {
|
||||
|
||||
int startKey = wmlTemplateString.indexOf("${", offset);
|
||||
if (startKey == -1)
|
||||
return null;
|
||||
else {
|
||||
int keyEnd = wmlTemplateString.indexOf('}', startKey);
|
||||
String placeHolder = wmlTemplateString.substring(startKey, keyEnd + 1);
|
||||
if (isPlaceholder(placeHolder)) {
|
||||
placeholderList.add(placeHolder);
|
||||
}
|
||||
return getAllPlaceholderElementFromObject(wmlTemplateString, keyEnd + 1, placeholderList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断字符串是否有${}占位符
|
||||
*
|
||||
* @param str 需要判断的字符串
|
||||
* @return 是否字符串是否有${}占位符
|
||||
* @author liyawei
|
||||
*/
|
||||
private static boolean isPlaceholder(String str) {
|
||||
if (str != null && !str.isEmpty()) {
|
||||
Pattern pattern = Pattern.compile("([$]\\{[A-Za-z0-9./ -]+\\})"); // 识别范围 认证模块专用
|
||||
Matcher m = pattern.matcher(str);
|
||||
return m.find();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void xlsx4JAddImage() throws Exception {
|
||||
@@ -88,17 +453,11 @@ public class ExcelUtil {
|
||||
System.out.println("\n\n done .. " + outputfilepath);
|
||||
}
|
||||
|
||||
public static void variableReplace(InputStream is, OutputStream os, HashMap<String, String> mappings) throws Exception {
|
||||
|
||||
SpreadsheetMLPackage opcPackagepkg = SpreadsheetMLPackage.load(is);
|
||||
|
||||
public static void variableReplace(SpreadsheetMLPackage pkg, HashMap<String, String> mappings) throws Exception {
|
||||
// Be sure to get the part which actually contains your variables!
|
||||
JaxbSmlPart smlPart = (JaxbSmlPart)opcPackagepkg.getParts().get(new PartName("/xl/sharedStrings.xml")); // 获取所有sheet
|
||||
JaxbSmlPart smlPart = (JaxbSmlPart)pkg.getParts().get(new PartName("/xl/sharedStrings.xml")); // 获取所有sheet
|
||||
//JaxbSmlPart smlPart = (JaxbSmlPart)opcPackagepkg.getParts().get(new PartName("/xl/worksheets/sheet1.xml"));
|
||||
smlPart.variableReplace(mappings);
|
||||
|
||||
// Save it
|
||||
opcPackagepkg.save(os);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -128,14 +487,14 @@ public class ExcelUtil {
|
||||
CTBlip blip = dmlObjectFactory.createCTBlip();
|
||||
blipfillproperties.setBlip(blip);
|
||||
blip.setCstate(org.docx4j.dml.STBlipCompression.NONE);
|
||||
blip.setEmbed( imageRelID );
|
||||
blip.setEmbed( imageRelID ); //-------
|
||||
// Create object for extLst
|
||||
CTOfficeArtExtensionList officeartextensionlist = dmlObjectFactory.createCTOfficeArtExtensionList();
|
||||
blip.setExtLst(officeartextensionlist);
|
||||
// Create object for ext
|
||||
CTOfficeArtExtension officeartextension = dmlObjectFactory.createCTOfficeArtExtension();
|
||||
officeartextensionlist.getExt().add( officeartextension);
|
||||
officeartextension.setUri( "{28A0092B-C50C-407E-A947-70E740481C1C}");
|
||||
officeartextension.setUri( "{28A0092B-C50C-407E-A947-70E740481C1C}"); //------
|
||||
blip.setLink( "");
|
||||
// Create object for stretch
|
||||
CTStretchInfoProperties stretchinfoproperties = dmlObjectFactory.createCTStretchInfoProperties();
|
||||
@@ -143,10 +502,10 @@ public class ExcelUtil {
|
||||
// Create object for fillRect
|
||||
CTRelativeRect relativerect = dmlObjectFactory.createCTRelativeRect();
|
||||
stretchinfoproperties.setFillRect(relativerect);
|
||||
relativerect.setR( new Integer(0) );
|
||||
relativerect.setT( new Integer(0) );
|
||||
relativerect.setL( new Integer(0) );
|
||||
relativerect.setB( new Integer(0) );
|
||||
relativerect.setR( new Integer(0) ); //------
|
||||
relativerect.setT( new Integer(0) ); //------
|
||||
relativerect.setL( new Integer(0) ); //------
|
||||
relativerect.setB( new Integer(0) ); //------
|
||||
// Create object for spPr
|
||||
CTShapeProperties shapeproperties = dmlObjectFactory.createCTShapeProperties();
|
||||
picture.setSpPr(shapeproperties);
|
||||
@@ -157,13 +516,13 @@ public class ExcelUtil {
|
||||
// Create object for off
|
||||
CTPoint2D point2d = dmlObjectFactory.createCTPoint2D();
|
||||
transform2d.setOff(point2d);
|
||||
point2d.setY( 0 );
|
||||
point2d.setX( 0 );
|
||||
point2d.setY( 0 ); //------
|
||||
point2d.setX( 0 ); //------
|
||||
// Create object for ext
|
||||
CTPositiveSize2D positivesize2d = dmlObjectFactory.createCTPositiveSize2D();
|
||||
transform2d.setExt(positivesize2d);
|
||||
positivesize2d.setCx( 714375 );
|
||||
positivesize2d.setCy( 714375 );
|
||||
positivesize2d.setCx( 714375 ); //------
|
||||
positivesize2d.setCy( 714375 ); //------
|
||||
// Create object for prstGeom
|
||||
CTPresetGeometry2D presetgeometry2d = dmlObjectFactory.createCTPresetGeometry2D();
|
||||
shapeproperties.setPrstGeom(presetgeometry2d);
|
||||
@@ -177,9 +536,9 @@ public class ExcelUtil {
|
||||
// Create object for cNvPr
|
||||
CTNonVisualDrawingProps nonvisualdrawingprops = dmlObjectFactory.createCTNonVisualDrawingProps();
|
||||
picturenonvisual.setCNvPr(nonvisualdrawingprops);
|
||||
nonvisualdrawingprops.setDescr( "");
|
||||
nonvisualdrawingprops.setName( "Picture 1");
|
||||
nonvisualdrawingprops.setId( 2 );
|
||||
nonvisualdrawingprops.setDescr( ""); //------
|
||||
nonvisualdrawingprops.setName( "Picture 1"); //------
|
||||
nonvisualdrawingprops.setId( 2 ); //------
|
||||
// Create object for cNvPicPr
|
||||
CTNonVisualPictureProperties nonvisualpictureproperties = dmlObjectFactory.createCTNonVisualPictureProperties();
|
||||
picturenonvisual.setCNvPicPr(nonvisualpictureproperties);
|
||||
@@ -190,18 +549,18 @@ public class ExcelUtil {
|
||||
// Create object for to
|
||||
CTMarker marker = dmlspreadsheetdrawingObjectFactory.createCTMarker();
|
||||
twocellanchor.setTo(marker);
|
||||
marker.setCol(1);
|
||||
marker.setColOff( 104775 );
|
||||
marker.setRow(3);
|
||||
marker.setRowOff( 142875 );
|
||||
marker.setCol(1); //------
|
||||
marker.setColOff( 104775 ); //------
|
||||
marker.setRow(3); //------
|
||||
marker.setRowOff( 142875 ); //------
|
||||
// Create object for from
|
||||
CTMarker marker2 = dmlspreadsheetdrawingObjectFactory.createCTMarker();
|
||||
twocellanchor.setFrom(marker2);
|
||||
marker2.setCol(0);
|
||||
marker2.setColOff( 0 );
|
||||
marker2.setRow(0);
|
||||
marker2.setRowOff( 0 );
|
||||
twocellanchor.setEditAs(STEditAs.fromValue("name"));
|
||||
marker2.setCol(0); //------
|
||||
marker2.setColOff( 0 ); //------
|
||||
marker2.setRow(0); //------
|
||||
marker2.setRowOff( 0 ); //------
|
||||
twocellanchor.setEditAs(STEditAs.ONE_CELL);
|
||||
|
||||
// return drawingWrapped;
|
||||
return drawing;
|
||||
@@ -264,5 +623,4 @@ public class ExcelUtil {
|
||||
XmlUtils.unmarshalString(openXML));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user