【删除】注释掉以前拉过来的无用代码:文档库、文档库阶段分析、旧收藏、旧搜索中心、旧的状态自动更新日志
【修改】对外报告注释整体修改为资料中心
This commit is contained in:
+171
-171
@@ -1,171 +1,171 @@
|
||||
package com.jero.modules.collection.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
import com.jero.modules.collection.service.IOnlCgformCollectionService;
|
||||
import com.jero.modules.document.controller.BussDocumentLibraryEOController;
|
||||
import com.jero.modules.phone.service.ISearchCenterService;
|
||||
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.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 我的收藏
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-15
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="我的收藏")
|
||||
@RestController
|
||||
@RequestMapping("/collection/onlCgformCollection")
|
||||
@Slf4j
|
||||
public class OnlCgformCollectionController extends JeroController<OnlCgformCollection, IOnlCgformCollectionService> {
|
||||
@Autowired
|
||||
private IOnlCgformCollectionService onlCgformCollectionService;
|
||||
@Autowired
|
||||
BussDocumentLibraryEOController bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private ISearchCenterService searchCenterService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-分页列表查询")
|
||||
@ApiOperation(value="我的收藏-分页列表查询", notes="我的收藏-分页列表查询")
|
||||
@PostMapping(value = "/page")
|
||||
public Result<?> queryPageList(@RequestBody Map<String,Object> params){
|
||||
IPage<OnlCgformCollection> pageList = onlCgformCollectionService.queryPageList(params);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-列表查询")
|
||||
@ApiOperation(value="我的收藏-列表查询", notes="我的收藏-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<OnlCgformCollection>> queryList(OnlCgformCollection onlCgformCollection) {
|
||||
List<OnlCgformCollection> list = onlCgformCollectionService.queryList(onlCgformCollection);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param onlCgformCollection
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-添加")
|
||||
@ApiOperation(value="我的收藏-添加", notes="我的收藏-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody OnlCgformCollection onlCgformCollection) {
|
||||
LambdaQueryWrapper<OnlCgformCollection> lambdaQueryWrapper= new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(OnlCgformCollection::getId,onlCgformCollection.getDocumentId())
|
||||
.eq(OnlCgformCollection::getDocumentId,onlCgformCollection.getDocumentId());
|
||||
int count=onlCgformCollectionService.count(lambdaQueryWrapper);
|
||||
if(count==0){
|
||||
onlCgformCollectionService.add(onlCgformCollection);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
else{
|
||||
return Result.error("该值不可重复添加,系统中已存在!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-通过id删除")
|
||||
@ApiOperation(value="我的收藏-通过id删除", notes="我的收藏-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
onlCgformCollectionService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-批量删除")
|
||||
@ApiOperation(value="我的收藏-批量删除", notes="我的收藏-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.onlCgformCollectionService.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) {
|
||||
OnlCgformCollection onlCgformCollection = onlCgformCollectionService.queryById(id);
|
||||
if(onlCgformCollection==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(onlCgformCollection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-表头中英文切换")
|
||||
@ApiOperation(value="我的收藏-表头中英文切换", notes="我的收藏-表头中英文切换")
|
||||
@GetMapping(value = "/getHeader")
|
||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list =onlCgformCollectionService.getHeader(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-查询条件中英文切换")
|
||||
@ApiOperation(value="我的收藏-查询条件中英文切换", notes="我的收藏-查询条件中英文切换")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = onlCgformCollectionService.queryCondition(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
@AutoLog(value = "我的收藏-搜索-根据用户获取文档库订阅和收藏信息")
|
||||
@ApiOperation(value = "我的收藏-搜索-根据用户获取文档库订阅和收藏信息", notes = "我的收藏-搜索-根据用户获取文档库订阅和收藏信息")
|
||||
@GetMapping(value = "/getWdkCollectAndSubscribeInfoByUser")
|
||||
public Result<Map<String, Object>> getWdkCollectAndSubscribeInfoByUser(@RequestParam Map<String,Object> params) {
|
||||
return this.searchCenterService.getWdkCollectAndSubscribeInfoByUser(params);
|
||||
}
|
||||
}
|
||||
//package com.jero.modules.collection.controller;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
//import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
//import com.jero.common.api.vo.Result;
|
||||
//import com.jero.common.aspect.annotation.AutoLog;
|
||||
//import com.jero.common.system.base.controller.JeroController;
|
||||
//import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
//import com.jero.modules.collection.service.IOnlCgformCollectionService;
|
||||
//import com.jero.modules.document.controller.BussDocumentLibraryEOController;
|
||||
//import com.jero.modules.phone.service.ISearchCenterService;
|
||||
//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.Arrays;
|
||||
//import java.util.List;
|
||||
//import java.util.Map;
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * @Description: 我的收藏
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2022-02-15
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//@Api(tags="我的收藏")
|
||||
//@RestController
|
||||
//@RequestMapping("/collection/onlCgformCollection")
|
||||
//@Slf4j
|
||||
//public class OnlCgformCollectionController extends JeroController<OnlCgformCollection, IOnlCgformCollectionService> {
|
||||
// @Autowired
|
||||
// private IOnlCgformCollectionService onlCgformCollectionService;
|
||||
// @Autowired
|
||||
// BussDocumentLibraryEOController bussDocumentLibraryEOService;
|
||||
// @Autowired
|
||||
// private ISearchCenterService searchCenterService;
|
||||
//
|
||||
// /**
|
||||
// * 分页列表查询
|
||||
// *
|
||||
// * @param params
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "我的收藏-分页列表查询")
|
||||
// @ApiOperation(value="我的收藏-分页列表查询", notes="我的收藏-分页列表查询")
|
||||
// @PostMapping(value = "/page")
|
||||
// public Result<?> queryPageList(@RequestBody Map<String,Object> params){
|
||||
// IPage<OnlCgformCollection> pageList = onlCgformCollectionService.queryPageList(params);
|
||||
// return Result.OK(pageList);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 列表查询
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "我的收藏-列表查询")
|
||||
// @ApiOperation(value="我的收藏-列表查询", notes="我的收藏-列表查询")
|
||||
// @GetMapping(value = "/list")
|
||||
// public Result<List<OnlCgformCollection>> queryList(OnlCgformCollection onlCgformCollection) {
|
||||
// List<OnlCgformCollection> list = onlCgformCollectionService.queryList(onlCgformCollection);
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 添加
|
||||
// *
|
||||
// * @param onlCgformCollection
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "我的收藏-添加")
|
||||
// @ApiOperation(value="我的收藏-添加", notes="我的收藏-添加")
|
||||
// @PostMapping(value = "/add")
|
||||
// public Result<?> add(@Validated @RequestBody OnlCgformCollection onlCgformCollection) {
|
||||
// LambdaQueryWrapper<OnlCgformCollection> lambdaQueryWrapper= new LambdaQueryWrapper<>();
|
||||
// lambdaQueryWrapper.eq(OnlCgformCollection::getId,onlCgformCollection.getDocumentId())
|
||||
// .eq(OnlCgformCollection::getDocumentId,onlCgformCollection.getDocumentId());
|
||||
// int count=onlCgformCollectionService.count(lambdaQueryWrapper);
|
||||
// if(count==0){
|
||||
// onlCgformCollectionService.add(onlCgformCollection);
|
||||
// return Result.OK("添加成功!");
|
||||
// }
|
||||
// else{
|
||||
// return Result.error("该值不可重复添加,系统中已存在!");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过id删除
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "我的收藏-通过id删除")
|
||||
// @ApiOperation(value="我的收藏-通过id删除", notes="我的收藏-通过id删除")
|
||||
// @PostMapping(value = "/delete")
|
||||
// public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
// onlCgformCollectionService.deleteById(id);
|
||||
// return Result.OK("删除成功!");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 批量删除
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "我的收藏-批量删除")
|
||||
// @ApiOperation(value="我的收藏-批量删除", notes="我的收藏-批量删除")
|
||||
// @PostMapping(value = "/deleteBatch")
|
||||
// public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
// this.onlCgformCollectionService.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) {
|
||||
// OnlCgformCollection onlCgformCollection = onlCgformCollectionService.queryById(id);
|
||||
// if(onlCgformCollection==null) {
|
||||
// return Result.error("未找到对应数据");
|
||||
// }
|
||||
// return Result.OK(onlCgformCollection);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 表头中英文切换
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "我的收藏-表头中英文切换")
|
||||
// @ApiOperation(value="我的收藏-表头中英文切换", notes="我的收藏-表头中英文切换")
|
||||
// @GetMapping(value = "/getHeader")
|
||||
// public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
||||
// @RequestParam(name = "cut") String cut) {
|
||||
// List<Map<String, Object>> list =onlCgformCollectionService.getHeader(flag, cut);
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 查询条件中英文切换
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "我的收藏-查询条件中英文切换")
|
||||
// @ApiOperation(value="我的收藏-查询条件中英文切换", notes="我的收藏-查询条件中英文切换")
|
||||
// @GetMapping(value = "/queryCondition")
|
||||
// public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
// @RequestParam(name = "cut") String cut) {
|
||||
// List<Map<String, Object>> list = onlCgformCollectionService.queryCondition(flag, cut);
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
//
|
||||
// @AutoLog(value = "我的收藏-搜索-根据用户获取文档库订阅和收藏信息")
|
||||
// @ApiOperation(value = "我的收藏-搜索-根据用户获取文档库订阅和收藏信息", notes = "我的收藏-搜索-根据用户获取文档库订阅和收藏信息")
|
||||
// @GetMapping(value = "/getWdkCollectAndSubscribeInfoByUser")
|
||||
// public Result<Map<String, Object>> getWdkCollectAndSubscribeInfoByUser(@RequestParam Map<String,Object> params) {
|
||||
// return this.searchCenterService.getWdkCollectAndSubscribeInfoByUser(params);
|
||||
// }
|
||||
//}
|
||||
|
||||
+161
-161
@@ -1,161 +1,161 @@
|
||||
package com.jero.modules.collection.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
import com.jero.modules.collection.service.IOnlCgformCollectionService;
|
||||
import com.jero.modules.document.controller.BussDocumentLibraryEOController;
|
||||
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.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 我的收藏
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-15
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="我的收藏")
|
||||
@RestController
|
||||
@RequestMapping("/phone/collection/onlCgformCollection")
|
||||
@Slf4j
|
||||
public class PhoneOnlCgformCollectionController extends JeroController<OnlCgformCollection, IOnlCgformCollectionService> {
|
||||
@Autowired
|
||||
private IOnlCgformCollectionService onlCgformCollectionService;
|
||||
@Autowired
|
||||
BussDocumentLibraryEOController bussDocumentLibraryEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-分页列表查询")
|
||||
@ApiOperation(value="我的收藏-分页列表查询", notes="我的收藏-分页列表查询")
|
||||
@PostMapping(value = "/page")
|
||||
public Result<?> queryPageList(@RequestBody Map<String,Object> params){
|
||||
IPage<OnlCgformCollection> pageList = onlCgformCollectionService.queryPageList(params);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-列表查询")
|
||||
@ApiOperation(value="我的收藏-列表查询", notes="我的收藏-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<OnlCgformCollection>> queryList(OnlCgformCollection onlCgformCollection) {
|
||||
List<OnlCgformCollection> list = onlCgformCollectionService.queryList(onlCgformCollection);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param onlCgformCollection
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-添加")
|
||||
@ApiOperation(value="我的收藏-添加", notes="我的收藏-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody OnlCgformCollection onlCgformCollection) {
|
||||
LambdaQueryWrapper<OnlCgformCollection> lambdaQueryWrapper= new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(OnlCgformCollection::getId,onlCgformCollection.getDocumentId())
|
||||
.eq(OnlCgformCollection::getDocumentId,onlCgformCollection.getDocumentId());
|
||||
int count=onlCgformCollectionService.count(lambdaQueryWrapper);
|
||||
if(count==0){
|
||||
onlCgformCollectionService.add(onlCgformCollection);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
else{
|
||||
return Result.error("该值不可重复添加,系统中已存在!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-通过id删除")
|
||||
@ApiOperation(value="我的收藏-通过id删除", notes="我的收藏-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
onlCgformCollectionService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-批量删除")
|
||||
@ApiOperation(value="我的收藏-批量删除", notes="我的收藏-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.onlCgformCollectionService.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) {
|
||||
OnlCgformCollection onlCgformCollection = onlCgformCollectionService.queryById(id);
|
||||
if(onlCgformCollection==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(onlCgformCollection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-表头中英文切换")
|
||||
@ApiOperation(value="我的收藏-表头中英文切换", notes="我的收藏-表头中英文切换")
|
||||
@GetMapping(value = "/getHeader")
|
||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list =onlCgformCollectionService.getHeader(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的收藏-查询条件中英文切换")
|
||||
@ApiOperation(value="我的收藏-查询条件中英文切换", notes="我的收藏-查询条件中英文切换")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = onlCgformCollectionService.queryCondition(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
}
|
||||
//package com.jero.modules.collection.controller;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
//import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
//import com.jero.common.api.vo.Result;
|
||||
//import com.jero.common.aspect.annotation.AutoLog;
|
||||
//import com.jero.common.system.base.controller.JeroController;
|
||||
//import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
//import com.jero.modules.collection.service.IOnlCgformCollectionService;
|
||||
//import com.jero.modules.document.controller.BussDocumentLibraryEOController;
|
||||
//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.Arrays;
|
||||
//import java.util.List;
|
||||
//import java.util.Map;
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * @Description: 我的收藏
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2022-02-15
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//@Api(tags="我的收藏")
|
||||
//@RestController
|
||||
//@RequestMapping("/phone/collection/onlCgformCollection")
|
||||
//@Slf4j
|
||||
//public class PhoneOnlCgformCollectionController extends JeroController<OnlCgformCollection, IOnlCgformCollectionService> {
|
||||
// @Autowired
|
||||
// private IOnlCgformCollectionService onlCgformCollectionService;
|
||||
// @Autowired
|
||||
// BussDocumentLibraryEOController bussDocumentLibraryEOService;
|
||||
//
|
||||
// /**
|
||||
// * 分页列表查询
|
||||
// *
|
||||
// * @param params
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "我的收藏-分页列表查询")
|
||||
// @ApiOperation(value="我的收藏-分页列表查询", notes="我的收藏-分页列表查询")
|
||||
// @PostMapping(value = "/page")
|
||||
// public Result<?> queryPageList(@RequestBody Map<String,Object> params){
|
||||
// IPage<OnlCgformCollection> pageList = onlCgformCollectionService.queryPageList(params);
|
||||
// return Result.OK(pageList);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 列表查询
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "我的收藏-列表查询")
|
||||
// @ApiOperation(value="我的收藏-列表查询", notes="我的收藏-列表查询")
|
||||
// @GetMapping(value = "/list")
|
||||
// public Result<List<OnlCgformCollection>> queryList(OnlCgformCollection onlCgformCollection) {
|
||||
// List<OnlCgformCollection> list = onlCgformCollectionService.queryList(onlCgformCollection);
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 添加
|
||||
// *
|
||||
// * @param onlCgformCollection
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "我的收藏-添加")
|
||||
// @ApiOperation(value="我的收藏-添加", notes="我的收藏-添加")
|
||||
// @PostMapping(value = "/add")
|
||||
// public Result<?> add(@Validated @RequestBody OnlCgformCollection onlCgformCollection) {
|
||||
// LambdaQueryWrapper<OnlCgformCollection> lambdaQueryWrapper= new LambdaQueryWrapper<>();
|
||||
// lambdaQueryWrapper.eq(OnlCgformCollection::getId,onlCgformCollection.getDocumentId())
|
||||
// .eq(OnlCgformCollection::getDocumentId,onlCgformCollection.getDocumentId());
|
||||
// int count=onlCgformCollectionService.count(lambdaQueryWrapper);
|
||||
// if(count==0){
|
||||
// onlCgformCollectionService.add(onlCgformCollection);
|
||||
// return Result.OK("添加成功!");
|
||||
// }
|
||||
// else{
|
||||
// return Result.error("该值不可重复添加,系统中已存在!");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过id删除
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "我的收藏-通过id删除")
|
||||
// @ApiOperation(value="我的收藏-通过id删除", notes="我的收藏-通过id删除")
|
||||
// @PostMapping(value = "/delete")
|
||||
// public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
// onlCgformCollectionService.deleteById(id);
|
||||
// return Result.OK("删除成功!");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 批量删除
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "我的收藏-批量删除")
|
||||
// @ApiOperation(value="我的收藏-批量删除", notes="我的收藏-批量删除")
|
||||
// @PostMapping(value = "/deleteBatch")
|
||||
// public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
// this.onlCgformCollectionService.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) {
|
||||
// OnlCgformCollection onlCgformCollection = onlCgformCollectionService.queryById(id);
|
||||
// if(onlCgformCollection==null) {
|
||||
// return Result.error("未找到对应数据");
|
||||
// }
|
||||
// return Result.OK(onlCgformCollection);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 表头中英文切换
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "我的收藏-表头中英文切换")
|
||||
// @ApiOperation(value="我的收藏-表头中英文切换", notes="我的收藏-表头中英文切换")
|
||||
// @GetMapping(value = "/getHeader")
|
||||
// public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
||||
// @RequestParam(name = "cut") String cut) {
|
||||
// List<Map<String, Object>> list =onlCgformCollectionService.getHeader(flag, cut);
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 查询条件中英文切换
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "我的收藏-查询条件中英文切换")
|
||||
// @ApiOperation(value="我的收藏-查询条件中英文切换", notes="我的收藏-查询条件中英文切换")
|
||||
// @GetMapping(value = "/queryCondition")
|
||||
// public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
// @RequestParam(name = "cut") String cut) {
|
||||
// List<Map<String, Object>> list = onlCgformCollectionService.queryCondition(flag, cut);
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
//}
|
||||
|
||||
+67
-67
@@ -1,67 +1,67 @@
|
||||
package com.jero.modules.collection.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 我的收藏
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-15
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("onl_cgform_collection")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="onl_cgform_collection对象", description="我的收藏")
|
||||
public class OnlCgformCollection 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, dictTable = "buss_document_library", dicText = "id", dicCode = "id")
|
||||
@Dict(dictTable = "buss_document_library", dicText = "id", dicCode = "id")
|
||||
@ApiModelProperty(value = "文档库id")
|
||||
private String documentId;
|
||||
}
|
||||
//package com.jero.modules.collection.entity;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.annotation.IdType;
|
||||
//import com.baomidou.mybatisplus.annotation.TableId;
|
||||
//import com.baomidou.mybatisplus.annotation.TableName;
|
||||
//import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
//import com.jero.common.aspect.annotation.Dict;
|
||||
//import io.swagger.annotations.ApiModel;
|
||||
//import io.swagger.annotations.ApiModelProperty;
|
||||
//import lombok.Data;
|
||||
//import lombok.EqualsAndHashCode;
|
||||
//import lombok.experimental.Accessors;
|
||||
//import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
//import org.springframework.format.annotation.DateTimeFormat;
|
||||
//
|
||||
//import java.io.Serializable;
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * @Description: 我的收藏
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2022-02-15
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//@Data
|
||||
//@TableName("onl_cgform_collection")
|
||||
//@Accessors(chain = true)
|
||||
//@EqualsAndHashCode(callSuper = false)
|
||||
//@ApiModel(value="onl_cgform_collection对象", description="我的收藏")
|
||||
//public class OnlCgformCollection 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, dictTable = "buss_document_library", dicText = "id", dicCode = "id")
|
||||
// @Dict(dictTable = "buss_document_library", dicText = "id", dicCode = "id")
|
||||
// @ApiModelProperty(value = "文档库id")
|
||||
// private String documentId;
|
||||
//}
|
||||
|
||||
+27
-27
@@ -1,27 +1,27 @@
|
||||
package com.jero.modules.collection.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 我的收藏
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-15
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface OnlCgformCollectionMapper extends BaseMapper<OnlCgformCollection> {
|
||||
|
||||
@Select("select * from buss_document_library as document LEFT JOIN onl_cgform_collection as collection\n" +
|
||||
" on document.id= collection.document_id;")
|
||||
List<OnlCgformCollection> queryListByDocumentId(@Param("document_id") String document_id);
|
||||
|
||||
IPage queryPageList(IPage page,@Param("params") Map<String, Object> params);
|
||||
|
||||
List<Map<String,Object>> infoList(@Param("params") Map<String, Object> params);
|
||||
}
|
||||
//package com.jero.modules.collection.mapper;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
//import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
//import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
//import org.apache.ibatis.annotations.Param;
|
||||
//import org.apache.ibatis.annotations.Select;
|
||||
//
|
||||
//import java.util.List;
|
||||
//import java.util.Map;
|
||||
//
|
||||
///**
|
||||
// * @Description: 我的收藏
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2022-02-15
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//public interface OnlCgformCollectionMapper extends BaseMapper<OnlCgformCollection> {
|
||||
//
|
||||
// @Select("select * from buss_document_library as document LEFT JOIN onl_cgform_collection as collection\n" +
|
||||
// " on document.id= collection.document_id;")
|
||||
// List<OnlCgformCollection> queryListByDocumentId(@Param("document_id") String document_id);
|
||||
//
|
||||
// IPage queryPageList(IPage page,@Param("params") Map<String, Object> params);
|
||||
//
|
||||
// List<Map<String,Object>> infoList(@Param("params") Map<String, Object> params);
|
||||
//}
|
||||
|
||||
-118
@@ -1,118 +0,0 @@
|
||||
<?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.collection.mapper.OnlCgformCollectionMapper">
|
||||
<resultMap id="OnlCgformCollectionResultMap" type="com.jero.modules.collection.entity.OnlCgformCollection">
|
||||
<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="document_id" property="documentId" />
|
||||
</resultMap>
|
||||
|
||||
<select id="queryPageList" resultType="hashmap">
|
||||
select
|
||||
occ.id,
|
||||
occ.create_time as createTime,
|
||||
occ.create_by as createBy,
|
||||
bdl.serial_number as serialNumber,
|
||||
bdl.title,
|
||||
bdl.state,
|
||||
occ.document_id as documentId
|
||||
from
|
||||
onl_cgform_collection occ
|
||||
right join buss_document_library bdl on occ.document_id = bdl.id
|
||||
where occ.create_by = #{params.createBy}
|
||||
<if test="params.serialNumber != null and params.serialNumber != ''">
|
||||
<!--搜索条件:编号;包含%,单独搜索-->
|
||||
<choose>
|
||||
<when test='params.serialNumber != null and params.serialNumber != "" and params.serialNumber.contains("%")'>
|
||||
and bdl.serial_number like '%1%%' escape '1'
|
||||
</when>
|
||||
<otherwise>
|
||||
and bdl.serial_number like concat(concat('%',#{params.serialNumber}),'%')
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
|
||||
<if test="params.title != null and params.title != ''">
|
||||
<!--搜索条件:标题;包含%,单独搜索-->
|
||||
<choose>
|
||||
<when test='params.title != null and params.title != "" and params.title.contains("%")'>
|
||||
and bdl.title like '%1%%' escape '1'
|
||||
</when>
|
||||
<otherwise>
|
||||
and bdl.title like concat(concat('%',#{params.title}),'%')
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
|
||||
<if test="params.state != null and params.state != '' ">
|
||||
and bdl.state in
|
||||
<foreach collection="params.state.split(',')" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.orderByField == 'serial_number' or params.orderByField == 'title'">
|
||||
order by CONVERT( ${params.orderByField} USING gbk) COLLATE gbk_chinese_ci
|
||||
|
||||
</if>
|
||||
<if test="params.orderByField == 'create_time'">
|
||||
order by occ.create_time
|
||||
</if>
|
||||
<if test="params.orderBy == 1">
|
||||
asc
|
||||
</if>
|
||||
<if test="params.orderBy == 2">
|
||||
desc
|
||||
</if>
|
||||
<if test="params.orderByField == null or params.orderByField == ''">
|
||||
order by occ.create_time desc
|
||||
</if>
|
||||
</select>
|
||||
<select id="infoList" parameterType="java.util.Map" resultType="hashmap">
|
||||
select
|
||||
occ.id,
|
||||
occ.create_time as createTime,
|
||||
occ.create_by as createBy,
|
||||
bdl.serial_number as serialNumber,
|
||||
bdl.title,
|
||||
bdl.state,
|
||||
occ.document_id as documentId
|
||||
from
|
||||
onl_cgform_collection occ
|
||||
right join buss_document_library bdl on occ.document_id = bdl.id
|
||||
where occ.create_by = #{params.createBy}
|
||||
<if test="params.serialNumber != null and params.serialNumber != ''">
|
||||
<!--搜索条件:编号;包含%,单独搜索-->
|
||||
<choose>
|
||||
<when test='params.serialNumber != null and params.serialNumber != "" and params.serialNumber.contains("%")'>
|
||||
and bdl.serial_number like '%1%%' escape '1'
|
||||
</when>
|
||||
<otherwise>
|
||||
and bdl.serial_number like concat(concat('%',#{params.serialNumber}),'%')
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
|
||||
<if test="params.title != null and params.title != ''">
|
||||
<!--搜索条件:标题;包含%,单独搜索-->
|
||||
<choose>
|
||||
<when test='params.title != null and params.title != "" and params.title.contains("%")'>
|
||||
and bdl.title like '%1%%' escape '1'
|
||||
</when>
|
||||
<otherwise>
|
||||
and bdl.title like concat(concat('%',#{params.title}),'%')
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
|
||||
<if test="params.state != null and params.state != '' ">
|
||||
and bdl.state in
|
||||
<foreach collection="params.state.split(',')" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
+79
-79
@@ -1,79 +1,79 @@
|
||||
package com.jero.modules.collection.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 我的收藏
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-15
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IOnlCgformCollectionService extends IService<OnlCgformCollection> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param onlCgformCollection
|
||||
* @return
|
||||
*/
|
||||
void add(OnlCgformCollection onlCgformCollection);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
OnlCgformCollection queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<OnlCgformCollection> queryList(OnlCgformCollection onlCgformCollection);
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
* @param flag
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> getHeader(String flag, String cut);
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
* @param flag
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> queryCondition(String flag, String cut);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
IPage<OnlCgformCollection> queryPageList(Map<String, Object> params);
|
||||
}
|
||||
//package com.jero.modules.collection.service;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
//import com.baomidou.mybatisplus.extension.service.IService;
|
||||
//import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
//
|
||||
//import java.util.List;
|
||||
//import java.util.Map;
|
||||
//
|
||||
///**
|
||||
// * @Description: 我的收藏
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2022-02-15
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//public interface IOnlCgformCollectionService extends IService<OnlCgformCollection> {
|
||||
//
|
||||
// /**
|
||||
// * 保存
|
||||
// *
|
||||
// * @param onlCgformCollection
|
||||
// * @return
|
||||
// */
|
||||
// void add(OnlCgformCollection onlCgformCollection);
|
||||
//
|
||||
// /**
|
||||
// * 通过id删除
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// void deleteById(String id);
|
||||
//
|
||||
// /**
|
||||
// * 批量删除
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// void deleteByIds(List<String> ids);
|
||||
//
|
||||
// /**
|
||||
// * 通过id查询
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// OnlCgformCollection queryById(String id);
|
||||
//
|
||||
// /**
|
||||
// * 列表查询
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// List<OnlCgformCollection> queryList(OnlCgformCollection onlCgformCollection);
|
||||
//
|
||||
// /**
|
||||
// * 列表表头中英文切换
|
||||
// * @param flag
|
||||
// * @param cut
|
||||
// * @return
|
||||
// */
|
||||
// public List<Map<String, Object>> getHeader(String flag, String cut);
|
||||
//
|
||||
// /**
|
||||
// * 查询条件中英文切换
|
||||
// * @param flag
|
||||
// * @param cut
|
||||
// * @return
|
||||
// */
|
||||
// public List<Map<String, Object>> queryCondition(String flag, String cut);
|
||||
//
|
||||
// /**
|
||||
// * 分页查询
|
||||
// * @param params
|
||||
// * @return
|
||||
// */
|
||||
// IPage<OnlCgformCollection> queryPageList(Map<String, Object> params);
|
||||
//}
|
||||
|
||||
+372
-372
@@ -1,372 +1,372 @@
|
||||
package com.jero.modules.collection.service.impl;
|
||||
|
||||
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.LanguageEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
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.collection.entity.OnlCgformCollection;
|
||||
import com.jero.modules.collection.mapper.OnlCgformCollectionMapper;
|
||||
import com.jero.modules.collection.service.IOnlCgformCollectionService;
|
||||
import com.jero.modules.document.enums.LawsStateEnum;
|
||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 我的收藏
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-15
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class OnlCgformCollectionServiceImpl extends ServiceImpl<OnlCgformCollectionMapper, OnlCgformCollection> implements IOnlCgformCollectionService {
|
||||
@Autowired
|
||||
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
@Autowired
|
||||
OnlCgformCollectionMapper onlCgformCollectionMapper;
|
||||
@Autowired
|
||||
private SysDictItemServiceImpl sysDictItemServiceImpl;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param onlCgformCollection
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(OnlCgformCollection onlCgformCollection) {
|
||||
Date now = new Date();
|
||||
onlCgformCollection.setCreateTime(now);
|
||||
save(onlCgformCollection);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteById(String id) {
|
||||
boolean checkData = checkData(id);
|
||||
if(!checkData){
|
||||
throw new JeroBootException("该用户没有权限!");
|
||||
}
|
||||
try {
|
||||
OnlCgformCollection onlCgformCollection = super.baseMapper.selectById(id);
|
||||
List<String> documentIdList = new ArrayList<>();
|
||||
documentIdList.add(onlCgformCollection.getDocumentId());
|
||||
|
||||
//删除订阅
|
||||
//deleteSubscribe(documentIdList);
|
||||
|
||||
removeById(id);
|
||||
}catch (Exception ex){
|
||||
log.error("取消收藏失败:" + ex.getMessage());
|
||||
throw new JeroBootException("取消收藏失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteByIds(List<String> ids) {
|
||||
for (String id : ids) {
|
||||
boolean checkData = checkData(id);
|
||||
if(!checkData){
|
||||
throw new JeroBootException("该用户没有权限!");
|
||||
}
|
||||
}
|
||||
try {
|
||||
QueryWrapper<OnlCgformCollection> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().in(OnlCgformCollection::getId,ids);
|
||||
List<OnlCgformCollection> onlCgformCollections = super.baseMapper.selectList(queryWrapper);
|
||||
List<String> documentIdList = onlCgformCollections.stream().map(OnlCgformCollection::getDocumentId).distinct().collect(Collectors.toList());
|
||||
|
||||
//删除订阅
|
||||
//deleteSubscribe(documentIdList);
|
||||
|
||||
removeByIds(ids);
|
||||
}catch (Exception ex){
|
||||
log.error("批量取消收藏失败:" + ex.getMessage());
|
||||
throw new JeroBootException("批量取消收藏失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public OnlCgformCollection queryById(String id) {
|
||||
boolean checkData = checkData(id);
|
||||
if(!checkData){
|
||||
throw new JeroBootException("该用户没有权限!");
|
||||
}
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OnlCgformCollection> queryList(OnlCgformCollection onlCgformCollection) {
|
||||
List<OnlCgformCollection> list = onlCgformCollectionMapper.queryListByDocumentId(onlCgformCollection.getDocumentId());
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getHeader(String flag, String cut) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤列表字段(is_show_list-->列表是否显示0否 1是) 过滤出需要的表头字段
|
||||
fieldList = fieldList.stream().filter(
|
||||
e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))
|
||||
&& (
|
||||
e.getDbFieldEnName().equals("serial_number")||e.getDbFieldEnName().equals("title")
|
||||
||e.getDbFieldEnName().equals("state")
|
||||
)
|
||||
).collect(Collectors.toList());
|
||||
}
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if ("file_name".equals(onlCgformField.getDbFieldName())) {
|
||||
//跳转详情的标识
|
||||
map.put("click", "true");
|
||||
}
|
||||
//单独处理发布日期和标准实施日期
|
||||
if ("update_time".equals(onlCgformField.getDbFieldName())) {
|
||||
map.put("sort", "true");//列表排序标识
|
||||
}
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
if (LanguageEnum.CN.getValue().equals(cut)) {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
} else {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryCondition(String flag, String cut) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤出需要的搜索条件()
|
||||
fieldList = fieldList.stream().filter(
|
||||
e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsQuery()))
|
||||
&& (
|
||||
e.getDbFieldEnName().equals("serial_number")||e.getDbFieldEnName().equals("title")
|
||||
||e.getDbFieldEnName().equals("state")
|
||||
)
|
||||
).collect(Collectors.toList());
|
||||
}
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("field_show_type", onlCgformField.getFieldShowType());//类型(判断是下拉还是输入框,等等)
|
||||
map.put("dict_field", onlCgformField.getDictField()); //下拉类型的数据字典编码
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
if (LanguageEnum.CN.getValue().equals(cut)) {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
} else {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<OnlCgformCollection> queryPageList(Map<String, Object> params) {
|
||||
// params.put("orderByField","serial_number");
|
||||
// params.put("orderBy","1");
|
||||
if(ObjectUtils.isEmpty(params.get("orderByField"))){
|
||||
params.put("orderBy","");
|
||||
}
|
||||
Integer pageNo = Integer.parseInt(params.get("pageNo").toString());
|
||||
Integer pageSize = Integer.parseInt(params.get("pageSize").toString());
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
params.put("createBy",sysUser.getUsername());
|
||||
IPage result = new Page();
|
||||
//表头排序(状态单独处理)
|
||||
if(ObjectUtils.isNotEmpty(params.get("orderByField")) && "state".equals((String) params.get("orderByField"))){
|
||||
List<Map<String, Object>> infoList = onlCgformCollectionMapper.infoList(params);
|
||||
result = stateSort(params,pageNo,pageSize,result,infoList);
|
||||
}else{
|
||||
result = onlCgformCollectionMapper.queryPageList(page,params);
|
||||
}
|
||||
List<Map<String,Object>> records = result.getRecords();
|
||||
dataDispose(records,params);
|
||||
return result;
|
||||
}
|
||||
public IPage stateSort(Map<String, Object> parameter, int pageNo, int pageSize, IPage infoPage,List<Map<String, Object>> infoList) {
|
||||
List<Map<String,Object>> list = new LinkedList<>();
|
||||
//状态排序,需要特殊处理 现行,即将实施,草稿,被替代,废止
|
||||
if(ObjectUtils.isNotEmpty(parameter.get("orderByField")) && "state".equals((String) parameter.get("orderByField"))){
|
||||
List<Map<String, Object>> active = infoList.stream()
|
||||
.filter(e -> LawsStateEnum.ACTIVE.getValue().equals(e.get("state"))).collect(Collectors.toList());
|
||||
List<Map<String, Object>> theUpcoming = infoList.stream()
|
||||
.filter(e -> LawsStateEnum.THE_UPCOMING.getValue().equals(e.get("state"))).collect(Collectors.toList());
|
||||
List<Map<String, Object>> draft = infoList.stream()
|
||||
.filter(e -> LawsStateEnum.DRAFT.getValue().equals(e.get("state"))).collect(Collectors.toList());
|
||||
List<Map<String, Object>> beReplaced = infoList.stream()
|
||||
.filter(e -> LawsStateEnum.BE_REPLACED.getValue().equals(e.get("state"))).collect(Collectors.toList());
|
||||
List<Map<String, Object>> abolish = infoList.stream()
|
||||
.filter(e -> LawsStateEnum.ABOLISH.getValue().equals(e.get("state"))).collect(Collectors.toList());
|
||||
if ("1".equals((String) parameter.get("orderBy"))) {
|
||||
//正序
|
||||
list.addAll(active);
|
||||
list.addAll(theUpcoming);
|
||||
list.addAll(draft);
|
||||
list.addAll(beReplaced);
|
||||
list.addAll(abolish);
|
||||
|
||||
} else if ("2".equals((String) parameter.get("orderBy"))) {
|
||||
//倒序
|
||||
list.addAll(abolish);
|
||||
list.addAll(beReplaced);
|
||||
list.addAll(draft);
|
||||
list.addAll(theUpcoming);
|
||||
list.addAll(active);
|
||||
}
|
||||
if(ObjectUtils.isNotEmpty(list)){
|
||||
infoPage = getPages(pageNo, pageSize, list);
|
||||
}
|
||||
}
|
||||
return infoPage;
|
||||
}
|
||||
public IPage getPages(Integer currentPage, Integer pageSize, List<Map<String,Object>> list){
|
||||
IPage page =new Page();
|
||||
if(list==null){
|
||||
return null;
|
||||
}
|
||||
int size = list.size();
|
||||
if(pageSize > size){
|
||||
pageSize = size;
|
||||
}
|
||||
if(pageSize!=0){
|
||||
//求出最⼤页数,防⽌currentPage越界
|
||||
int maxPage = size % pageSize ==0? size / pageSize : size / pageSize +1;
|
||||
if(currentPage > maxPage){
|
||||
currentPage = maxPage;
|
||||
}
|
||||
}
|
||||
//当前页第⼀条数据的下标
|
||||
int curIdx = currentPage >1?(currentPage -1)* pageSize :0;
|
||||
List pageList =new ArrayList();
|
||||
//将当前页的数据放进pageList
|
||||
for(int i =0; i < pageSize && curIdx + i < size; i++){
|
||||
pageList.add(list.get(curIdx + i));
|
||||
}
|
||||
page.setCurrent(currentPage).setSize(pageSize).setTotal(list.size()).setRecords(pageList);
|
||||
return page;
|
||||
}
|
||||
|
||||
public void dataDispose(List<Map<String,Object>> datas, Map<String,Object> params){
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
|
||||
//获取所有文本状态数据字典
|
||||
List<SysDictItem> stateList = sysDictItems.stream()
|
||||
.filter(e -> StringUtils.isNotBlank(e.getDictCode()) && e.getDictCode().equals("state"))
|
||||
.collect(Collectors.toList());
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd HH:mm:ss");
|
||||
|
||||
String cut = (String) params.get("cut");
|
||||
for (Map<String, Object> data : datas) {
|
||||
Date createTime = (Date) data.get("createTime");
|
||||
data.put("createTime",sdf.format(createTime));
|
||||
String state = (String) data.get("state");
|
||||
for (SysDictItem sysDictItem : stateList) {
|
||||
if(StringUtils.equals(state,sysDictItem.getItemValue())){
|
||||
if(StringUtils.equals(cut, LanguageEnum.CN.getValue())){
|
||||
data.put("state",sysDictItem.getItemText());
|
||||
}else {
|
||||
data.put("state",sysDictItem.getEnName());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
//设置为已收藏
|
||||
data.put("collectFlag","1");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证数据
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public boolean checkData(String id){
|
||||
boolean result = false;
|
||||
try {
|
||||
QueryWrapper<OnlCgformCollection> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(OnlCgformCollection::getId,id);
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
queryWrapper.lambda().eq(OnlCgformCollection::getCreateBy,sysUser.getUsername());
|
||||
Integer integer = onlCgformCollectionMapper.selectCount(queryWrapper);
|
||||
if(integer>0){
|
||||
result = true;
|
||||
}
|
||||
}catch (Exception ex){
|
||||
log.error("验证我的收藏数据异常:" + ex.getMessage());
|
||||
throw new JeroBootException("验证我的收藏数据异常!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*public void deleteSubscribe(List<String> docIdList){
|
||||
try {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<OnlCgformSubscribe> deleteWarpper = new QueryWrapper<>();
|
||||
deleteWarpper.lambda().in(OnlCgformSubscribe::getDocumentId,docIdList);
|
||||
deleteWarpper.lambda().eq(OnlCgformSubscribe::getCreateBy,sysUser.getUsername());
|
||||
onlCgformSubscribeMapper.delete(deleteWarpper);
|
||||
}catch (Exception ex){
|
||||
log.error("删除订阅信息失败:" + ex.getMessage());
|
||||
throw new JeroBootException("删除订阅信息失败!");
|
||||
}
|
||||
}*/
|
||||
}
|
||||
//package com.jero.modules.collection.service.impl;
|
||||
//
|
||||
//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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
//import com.jero.common.constant.enums.LanguageEnum;
|
||||
//import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
//import com.jero.common.exception.JeroBootException;
|
||||
//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.collection.entity.OnlCgformCollection;
|
||||
//import com.jero.modules.collection.mapper.OnlCgformCollectionMapper;
|
||||
//import com.jero.modules.collection.service.IOnlCgformCollectionService;
|
||||
//import com.jero.modules.document.enums.LawsStateEnum;
|
||||
//import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
//import com.jero.modules.system.entity.SysDictItem;
|
||||
//import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
//import org.apache.commons.collections4.CollectionUtils;
|
||||
//import org.apache.commons.lang3.ObjectUtils;
|
||||
//import org.apache.commons.lang3.StringUtils;
|
||||
//import org.apache.shiro.SecurityUtils;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//import org.springframework.transaction.annotation.Transactional;
|
||||
//
|
||||
//import java.text.SimpleDateFormat;
|
||||
//import java.util.*;
|
||||
//import java.util.stream.Collectors;
|
||||
//
|
||||
///**
|
||||
// * @Description: 我的收藏
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2022-02-15
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//@Service
|
||||
//public class OnlCgformCollectionServiceImpl extends ServiceImpl<OnlCgformCollectionMapper, OnlCgformCollection> implements IOnlCgformCollectionService {
|
||||
// @Autowired
|
||||
// private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
// @Autowired
|
||||
// OnlCgformCollectionMapper onlCgformCollectionMapper;
|
||||
// @Autowired
|
||||
// private SysDictItemServiceImpl sysDictItemServiceImpl;
|
||||
//
|
||||
// /**
|
||||
// * 保存
|
||||
// *
|
||||
// * @param onlCgformCollection
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public void add(OnlCgformCollection onlCgformCollection) {
|
||||
// Date now = new Date();
|
||||
// onlCgformCollection.setCreateTime(now);
|
||||
// save(onlCgformCollection);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 通过id删除
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public void deleteById(String id) {
|
||||
// boolean checkData = checkData(id);
|
||||
// if(!checkData){
|
||||
// throw new JeroBootException("该用户没有权限!");
|
||||
// }
|
||||
// try {
|
||||
// OnlCgformCollection onlCgformCollection = super.baseMapper.selectById(id);
|
||||
// List<String> documentIdList = new ArrayList<>();
|
||||
// documentIdList.add(onlCgformCollection.getDocumentId());
|
||||
//
|
||||
// //删除订阅
|
||||
// //deleteSubscribe(documentIdList);
|
||||
//
|
||||
// removeById(id);
|
||||
// }catch (Exception ex){
|
||||
// log.error("取消收藏失败:" + ex.getMessage());
|
||||
// throw new JeroBootException("取消收藏失败!");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 批量删除
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public void deleteByIds(List<String> ids) {
|
||||
// for (String id : ids) {
|
||||
// boolean checkData = checkData(id);
|
||||
// if(!checkData){
|
||||
// throw new JeroBootException("该用户没有权限!");
|
||||
// }
|
||||
// }
|
||||
// try {
|
||||
// QueryWrapper<OnlCgformCollection> queryWrapper = new QueryWrapper<>();
|
||||
// queryWrapper.lambda().in(OnlCgformCollection::getId,ids);
|
||||
// List<OnlCgformCollection> onlCgformCollections = super.baseMapper.selectList(queryWrapper);
|
||||
// List<String> documentIdList = onlCgformCollections.stream().map(OnlCgformCollection::getDocumentId).distinct().collect(Collectors.toList());
|
||||
//
|
||||
// //删除订阅
|
||||
// //deleteSubscribe(documentIdList);
|
||||
//
|
||||
// removeByIds(ids);
|
||||
// }catch (Exception ex){
|
||||
// log.error("批量取消收藏失败:" + ex.getMessage());
|
||||
// throw new JeroBootException("批量取消收藏失败!");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过id查询
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public OnlCgformCollection queryById(String id) {
|
||||
// boolean checkData = checkData(id);
|
||||
// if(!checkData){
|
||||
// throw new JeroBootException("该用户没有权限!");
|
||||
// }
|
||||
// return getById(id);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 列表查询
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public List<OnlCgformCollection> queryList(OnlCgformCollection onlCgformCollection) {
|
||||
// List<OnlCgformCollection> list = onlCgformCollectionMapper.queryListByDocumentId(onlCgformCollection.getDocumentId());
|
||||
// return list;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 列表表头中英文切换
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public List<Map<String, Object>> getHeader(String flag, String cut) {
|
||||
// List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
// if (fieldList.size() != 0) {
|
||||
// //过滤列表字段(is_show_list-->列表是否显示0否 1是) 过滤出需要的表头字段
|
||||
// fieldList = fieldList.stream().filter(
|
||||
// e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))
|
||||
// && (
|
||||
// e.getDbFieldEnName().equals("serial_number")||e.getDbFieldEnName().equals("title")
|
||||
// ||e.getDbFieldEnName().equals("state")
|
||||
// )
|
||||
// ).collect(Collectors.toList());
|
||||
// }
|
||||
// List<Map<String, Object>> list = new ArrayList<>();
|
||||
// for (OnlCgformField onlCgformField : fieldList) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// if ("file_name".equals(onlCgformField.getDbFieldName())) {
|
||||
// //跳转详情的标识
|
||||
// map.put("click", "true");
|
||||
// }
|
||||
// //单独处理发布日期和标准实施日期
|
||||
// if ("update_time".equals(onlCgformField.getDbFieldName())) {
|
||||
// map.put("sort", "true");//列表排序标识
|
||||
// }
|
||||
// map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
// if (LanguageEnum.CN.getValue().equals(cut)) {
|
||||
// map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
// } else {
|
||||
// map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
// }
|
||||
// list.add(map);
|
||||
// }
|
||||
// return list;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 查询条件中英文切换
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public List<Map<String, Object>> queryCondition(String flag, String cut) {
|
||||
// List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
// if (fieldList.size() != 0) {
|
||||
// //过滤出需要的搜索条件()
|
||||
// fieldList = fieldList.stream().filter(
|
||||
// e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsQuery()))
|
||||
// && (
|
||||
// e.getDbFieldEnName().equals("serial_number")||e.getDbFieldEnName().equals("title")
|
||||
// ||e.getDbFieldEnName().equals("state")
|
||||
// )
|
||||
// ).collect(Collectors.toList());
|
||||
// }
|
||||
// List<Map<String, Object>> list = new ArrayList<>();
|
||||
// for (OnlCgformField onlCgformField : fieldList) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// map.put("field_show_type", onlCgformField.getFieldShowType());//类型(判断是下拉还是输入框,等等)
|
||||
// map.put("dict_field", onlCgformField.getDictField()); //下拉类型的数据字典编码
|
||||
// map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
// if (LanguageEnum.CN.getValue().equals(cut)) {
|
||||
// map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
// } else {
|
||||
// map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
// }
|
||||
// list.add(map);
|
||||
// }
|
||||
// return list;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public IPage<OnlCgformCollection> queryPageList(Map<String, Object> params) {
|
||||
//// params.put("orderByField","serial_number");
|
||||
//// params.put("orderBy","1");
|
||||
// if(ObjectUtils.isEmpty(params.get("orderByField"))){
|
||||
// params.put("orderBy","");
|
||||
// }
|
||||
// Integer pageNo = Integer.parseInt(params.get("pageNo").toString());
|
||||
// Integer pageSize = Integer.parseInt(params.get("pageSize").toString());
|
||||
// IPage page = new Page(pageNo, pageSize);
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// params.put("createBy",sysUser.getUsername());
|
||||
// IPage result = new Page();
|
||||
// //表头排序(状态单独处理)
|
||||
// if(ObjectUtils.isNotEmpty(params.get("orderByField")) && "state".equals((String) params.get("orderByField"))){
|
||||
// List<Map<String, Object>> infoList = onlCgformCollectionMapper.infoList(params);
|
||||
// result = stateSort(params,pageNo,pageSize,result,infoList);
|
||||
// }else{
|
||||
// result = onlCgformCollectionMapper.queryPageList(page,params);
|
||||
// }
|
||||
// List<Map<String,Object>> records = result.getRecords();
|
||||
// dataDispose(records,params);
|
||||
// return result;
|
||||
// }
|
||||
// public IPage stateSort(Map<String, Object> parameter, int pageNo, int pageSize, IPage infoPage,List<Map<String, Object>> infoList) {
|
||||
// List<Map<String,Object>> list = new LinkedList<>();
|
||||
// //状态排序,需要特殊处理 现行,即将实施,草稿,被替代,废止
|
||||
// if(ObjectUtils.isNotEmpty(parameter.get("orderByField")) && "state".equals((String) parameter.get("orderByField"))){
|
||||
// List<Map<String, Object>> active = infoList.stream()
|
||||
// .filter(e -> LawsStateEnum.ACTIVE.getValue().equals(e.get("state"))).collect(Collectors.toList());
|
||||
// List<Map<String, Object>> theUpcoming = infoList.stream()
|
||||
// .filter(e -> LawsStateEnum.THE_UPCOMING.getValue().equals(e.get("state"))).collect(Collectors.toList());
|
||||
// List<Map<String, Object>> draft = infoList.stream()
|
||||
// .filter(e -> LawsStateEnum.DRAFT.getValue().equals(e.get("state"))).collect(Collectors.toList());
|
||||
// List<Map<String, Object>> beReplaced = infoList.stream()
|
||||
// .filter(e -> LawsStateEnum.BE_REPLACED.getValue().equals(e.get("state"))).collect(Collectors.toList());
|
||||
// List<Map<String, Object>> abolish = infoList.stream()
|
||||
// .filter(e -> LawsStateEnum.ABOLISH.getValue().equals(e.get("state"))).collect(Collectors.toList());
|
||||
// if ("1".equals((String) parameter.get("orderBy"))) {
|
||||
// //正序
|
||||
// list.addAll(active);
|
||||
// list.addAll(theUpcoming);
|
||||
// list.addAll(draft);
|
||||
// list.addAll(beReplaced);
|
||||
// list.addAll(abolish);
|
||||
//
|
||||
// } else if ("2".equals((String) parameter.get("orderBy"))) {
|
||||
// //倒序
|
||||
// list.addAll(abolish);
|
||||
// list.addAll(beReplaced);
|
||||
// list.addAll(draft);
|
||||
// list.addAll(theUpcoming);
|
||||
// list.addAll(active);
|
||||
// }
|
||||
// if(ObjectUtils.isNotEmpty(list)){
|
||||
// infoPage = getPages(pageNo, pageSize, list);
|
||||
// }
|
||||
// }
|
||||
// return infoPage;
|
||||
// }
|
||||
// public IPage getPages(Integer currentPage, Integer pageSize, List<Map<String,Object>> list){
|
||||
// IPage page =new Page();
|
||||
// if(list==null){
|
||||
// return null;
|
||||
// }
|
||||
// int size = list.size();
|
||||
// if(pageSize > size){
|
||||
// pageSize = size;
|
||||
// }
|
||||
// if(pageSize!=0){
|
||||
// //求出最⼤页数,防⽌currentPage越界
|
||||
// int maxPage = size % pageSize ==0? size / pageSize : size / pageSize +1;
|
||||
// if(currentPage > maxPage){
|
||||
// currentPage = maxPage;
|
||||
// }
|
||||
// }
|
||||
// //当前页第⼀条数据的下标
|
||||
// int curIdx = currentPage >1?(currentPage -1)* pageSize :0;
|
||||
// List pageList =new ArrayList();
|
||||
// //将当前页的数据放进pageList
|
||||
// for(int i =0; i < pageSize && curIdx + i < size; i++){
|
||||
// pageList.add(list.get(curIdx + i));
|
||||
// }
|
||||
// page.setCurrent(currentPage).setSize(pageSize).setTotal(list.size()).setRecords(pageList);
|
||||
// return page;
|
||||
// }
|
||||
//
|
||||
// public void dataDispose(List<Map<String,Object>> datas, Map<String,Object> params){
|
||||
// if(CollectionUtils.isNotEmpty(datas)){
|
||||
// List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
|
||||
// //获取所有文本状态数据字典
|
||||
// List<SysDictItem> stateList = sysDictItems.stream()
|
||||
// .filter(e -> StringUtils.isNotBlank(e.getDictCode()) && e.getDictCode().equals("state"))
|
||||
// .collect(Collectors.toList());
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd HH:mm:ss");
|
||||
//
|
||||
// String cut = (String) params.get("cut");
|
||||
// for (Map<String, Object> data : datas) {
|
||||
// Date createTime = (Date) data.get("createTime");
|
||||
// data.put("createTime",sdf.format(createTime));
|
||||
// String state = (String) data.get("state");
|
||||
// for (SysDictItem sysDictItem : stateList) {
|
||||
// if(StringUtils.equals(state,sysDictItem.getItemValue())){
|
||||
// if(StringUtils.equals(cut, LanguageEnum.CN.getValue())){
|
||||
// data.put("state",sysDictItem.getItemText());
|
||||
// }else {
|
||||
// data.put("state",sysDictItem.getEnName());
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// //设置为已收藏
|
||||
// data.put("collectFlag","1");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 验证数据
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// public boolean checkData(String id){
|
||||
// boolean result = false;
|
||||
// try {
|
||||
// QueryWrapper<OnlCgformCollection> queryWrapper = new QueryWrapper<>();
|
||||
// queryWrapper.lambda().eq(OnlCgformCollection::getId,id);
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// queryWrapper.lambda().eq(OnlCgformCollection::getCreateBy,sysUser.getUsername());
|
||||
// Integer integer = onlCgformCollectionMapper.selectCount(queryWrapper);
|
||||
// if(integer>0){
|
||||
// result = true;
|
||||
// }
|
||||
// }catch (Exception ex){
|
||||
// log.error("验证我的收藏数据异常:" + ex.getMessage());
|
||||
// throw new JeroBootException("验证我的收藏数据异常!");
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// /*public void deleteSubscribe(List<String> docIdList){
|
||||
// try {
|
||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// QueryWrapper<OnlCgformSubscribe> deleteWarpper = new QueryWrapper<>();
|
||||
// deleteWarpper.lambda().in(OnlCgformSubscribe::getDocumentId,docIdList);
|
||||
// deleteWarpper.lambda().eq(OnlCgformSubscribe::getCreateBy,sysUser.getUsername());
|
||||
// onlCgformSubscribeMapper.delete(deleteWarpper);
|
||||
// }catch (Exception ex){
|
||||
// log.error("删除订阅信息失败:" + ex.getMessage());
|
||||
// throw new JeroBootException("删除订阅信息失败!");
|
||||
// }
|
||||
// }*/
|
||||
//}
|
||||
|
||||
+429
-430
@@ -7,7 +7,7 @@ import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
//import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.entity.OSSFileForDocumentLibrary;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -36,134 +36,135 @@ import java.util.Map;
|
||||
@RestController
|
||||
@RequestMapping("/document/bussDocumentLibraryEO")
|
||||
@Slf4j
|
||||
public class BussDocumentLibraryEOController extends JeroController<BussDocumentLibraryEO, IBussDocumentLibraryEOService> {
|
||||
@Deprecated
|
||||
public class BussDocumentLibraryEOController extends JeroController<Object, IBussDocumentLibraryEOService> {
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
* @param parameter
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "分页查询")
|
||||
@ApiOperation(value="分页查询", notes="分页查询")
|
||||
@PostMapping(value = "/queryPageInfo")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public JSONObject queryPageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = bussDocumentLibraryEOService.getInfoPage(parameter);
|
||||
Result<IPage> ok = Result.OK(infoPage);
|
||||
JSONObject jsonResult = JSONObject.fromObject(ok);
|
||||
return jsonResult;
|
||||
}
|
||||
// /**
|
||||
// * 分页列表查询
|
||||
// * @param parameter
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "分页查询")
|
||||
// @ApiOperation(value="分页查询", notes="分页查询")
|
||||
// @PostMapping(value = "/queryPageInfo")
|
||||
// @ResponseBody
|
||||
// @RequiresPermissions("document:queryPageInfo")
|
||||
// public JSONObject queryPageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
// IPage infoPage = bussDocumentLibraryEOService.getInfoPage(parameter);
|
||||
// Result<IPage> ok = Result.OK(infoPage);
|
||||
// JSONObject jsonResult = JSONObject.fromObject(ok);
|
||||
// return jsonResult;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 代替标准分页列表查询
|
||||
* @param parameter
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "代替标准分页列表查询")
|
||||
@ApiOperation(value="代替标准分页列表查询", notes="代替标准分页列表查询")
|
||||
@PostMapping(value = "/replacePageInfo")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("document:getInfoById")
|
||||
public Result<IPage> replacePageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = bussDocumentLibraryEOService.replacePageInfo(parameter);
|
||||
return Result.OK(infoPage);
|
||||
}
|
||||
// /**
|
||||
// * 代替标准分页列表查询
|
||||
// * @param parameter
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "代替标准分页列表查询")
|
||||
// @ApiOperation(value="代替标准分页列表查询", notes="代替标准分页列表查询")
|
||||
// @PostMapping(value = "/replacePageInfo")
|
||||
// @ResponseBody
|
||||
// @RequiresPermissions("document:getInfoById")
|
||||
// public Result<IPage> replacePageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
// IPage infoPage = bussDocumentLibraryEOService.replacePageInfo(parameter);
|
||||
// return Result.OK(infoPage);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * ocr识别调取已入库文件
|
||||
// * @param parameter
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "ocr识别调取已入库文件分页")
|
||||
// @ApiOperation(value="ocr识别调取已入库文件", notes="ocr识别调取已入库文件")
|
||||
// @PostMapping(value = "/ocrPageInfo")
|
||||
// @ResponseBody
|
||||
// @RequiresPermissions("document:ocrPageInfo")
|
||||
// public Result<IPage<Map<String,Object>>> ocrPageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
// IPage<Map<String,Object>> infoPage = bussDocumentLibraryEOService.ocrPageInfo(parameter);
|
||||
// return Result.OK(infoPage);
|
||||
// }
|
||||
|
||||
/**
|
||||
* ocr识别调取已入库文件
|
||||
* @param parameter
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "ocr识别调取已入库文件分页")
|
||||
@ApiOperation(value="ocr识别调取已入库文件", notes="ocr识别调取已入库文件")
|
||||
@PostMapping(value = "/ocrPageInfo")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("document:ocrPageInfo")
|
||||
public Result<IPage<Map<String,Object>>> ocrPageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage<Map<String,Object>> infoPage = bussDocumentLibraryEOService.ocrPageInfo(parameter);
|
||||
return Result.OK(infoPage);
|
||||
}
|
||||
// /**
|
||||
// * 文档翻译调取已入库文件
|
||||
// * @param parameter
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档翻译调取已入库文件")
|
||||
// @ApiOperation(value="文档翻译调取已入库文件", notes="文档翻译调取已入库文件")
|
||||
// @PostMapping(value = "/transPageInfo")
|
||||
// @ResponseBody
|
||||
// @RequiresPermissions("documentTranslation:retrieval")
|
||||
// public Result<IPage<Map<String,Object>>> transPageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
// IPage<Map<String,Object>> infoPage = bussDocumentLibraryEOService.ocrPageInfo(parameter);
|
||||
// return Result.OK(infoPage);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 文档翻译调取已入库文件
|
||||
* @param parameter
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档翻译调取已入库文件")
|
||||
@ApiOperation(value="文档翻译调取已入库文件", notes="文档翻译调取已入库文件")
|
||||
@PostMapping(value = "/transPageInfo")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("documentTranslation:retrieval")
|
||||
public Result<IPage<Map<String,Object>>> transPageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage<Map<String,Object>> infoPage = bussDocumentLibraryEOService.ocrPageInfo(parameter);
|
||||
return Result.OK(infoPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-列表查询")
|
||||
@ApiOperation(value="文档库信息表-列表查询", notes="文档库信息表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<BussDocumentLibraryEO>> queryList() {
|
||||
List<BussDocumentLibraryEO> list = bussDocumentLibraryEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
// /**
|
||||
// * 列表查询
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库信息表-列表查询")
|
||||
// @ApiOperation(value="文档库信息表-列表查询", notes="文档库信息表-列表查询")
|
||||
// @GetMapping(value = "/list")
|
||||
// public Result<List<BussDocumentLibraryEO>> queryList() {
|
||||
// List<BussDocumentLibraryEO> list = bussDocumentLibraryEOService.queryList();
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-通过id删除")
|
||||
@ApiOperation(value="文档库信息表-通过id删除", notes="文档库信息表-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
@RequiresPermissions("document:deleteBatch")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
bussDocumentLibraryEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
// /**
|
||||
// * 通过id删除
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库信息表-通过id删除")
|
||||
// @ApiOperation(value="文档库信息表-通过id删除", notes="文档库信息表-通过id删除")
|
||||
// @GetMapping(value = "/delete")
|
||||
// @RequiresPermissions("document:deleteBatch")
|
||||
// public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
// bussDocumentLibraryEOService.deleteById(id);
|
||||
// return Result.OK("删除成功!");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-批量删除")
|
||||
@ApiOperation(value="文档库信息表-批量删除", notes="文档库信息表-批量删除")
|
||||
@GetMapping(value = "/deleteBatch")
|
||||
@RequiresPermissions("document:deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids, String cut) {
|
||||
this.bussDocumentLibraryEOService.deleteByIds(Arrays.asList(ids.split(",")),cut);
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
// /**
|
||||
// * 批量删除
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库信息表-批量删除")
|
||||
// @ApiOperation(value="文档库信息表-批量删除", notes="文档库信息表-批量删除")
|
||||
// @GetMapping(value = "/deleteBatch")
|
||||
// @RequiresPermissions("document:deleteBatch")
|
||||
// public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids, String cut) {
|
||||
// this.bussDocumentLibraryEOService.deleteByIds(Arrays.asList(ids.split(",")),cut);
|
||||
// return Result.OK("批量删除成功!");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-通过id查询")
|
||||
@ApiOperation(value="文档库信息表-通过id查询", notes="文档库信息表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
@RequiresPermissions("document:queryById")
|
||||
public Result<BussDocumentLibraryEO> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(id);
|
||||
if(bussDocumentLibraryEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(bussDocumentLibraryEO);
|
||||
}
|
||||
// /**
|
||||
// * 通过id查询
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库信息表-通过id查询")
|
||||
// @ApiOperation(value="文档库信息表-通过id查询", notes="文档库信息表-通过id查询")
|
||||
// @GetMapping(value = "/queryById")
|
||||
// @RequiresPermissions("document:queryById")
|
||||
// public Result<BussDocumentLibraryEO> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
// BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(id);
|
||||
// if(bussDocumentLibraryEO==null) {
|
||||
// return Result.error("未找到对应数据");
|
||||
// }
|
||||
// return Result.OK(bussDocumentLibraryEO);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@@ -182,343 +183,341 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表表头
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-列表表头")
|
||||
@ApiOperation(value="文档库信息表-列表表头", notes="文档库信息表-列表表头")
|
||||
@GetMapping(value = "/getHeader")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public Result<List<Map<String,Object>>> getHeader(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String,Object>> list = bussDocumentLibraryEOService.getHeader(flag,cut,null);
|
||||
return Result.OK(list);
|
||||
}
|
||||
// /**
|
||||
// * 列表表头
|
||||
// * @param flag 标识传 1-->用于查询文档库字段属性
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库信息表-列表表头")
|
||||
// @ApiOperation(value="文档库信息表-列表表头", notes="文档库信息表-列表表头")
|
||||
// @GetMapping(value = "/getHeader")
|
||||
// @RequiresPermissions("document:queryPageInfo")
|
||||
// public Result<List<Map<String,Object>>> getHeader(@RequestParam(name="flag",required=true) String flag,
|
||||
// @RequestParam(name="cut",required=true) String cut) {
|
||||
// List<Map<String,Object>> list = bussDocumentLibraryEOService.getHeader(flag,cut,null);
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 新增表单
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-新增表单")
|
||||
@ApiOperation(value="文档库信息表-新增表单", notes="文档库信息表-新增表单")
|
||||
@GetMapping(value = "/getAddForm")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public Result<List<Map<String,Object>>> getAddForm(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut,
|
||||
@RequestParam(name="type",required=true) String type) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getAddForm(flag,cut,type);
|
||||
return Result.OK(list);
|
||||
}
|
||||
// /**
|
||||
// * 新增表单
|
||||
// * @param flag 标识传 1-->用于查询文档库字段属性
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库信息表-新增表单")
|
||||
// @ApiOperation(value="文档库信息表-新增表单", notes="文档库信息表-新增表单")
|
||||
// @GetMapping(value = "/getAddForm")
|
||||
// @RequiresPermissions("document:queryPageInfo")
|
||||
// public Result<List<Map<String,Object>>> getAddForm(@RequestParam(name="flag",required=true) String flag,
|
||||
// @RequestParam(name="cut",required=true) String cut,
|
||||
// @RequestParam(name="type",required=true) String type) {
|
||||
// List<Map<String, Object>> list = bussDocumentLibraryEOService.getAddForm(flag,cut,type);
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
|
||||
/**
|
||||
* ocr识别调取已入库文件-中英文切换
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-ocr表头和查询条件")
|
||||
@ApiOperation(value="文档库信息表-ocr表头和查询条件", notes="文档库信息表-ocr表头和查询条件")
|
||||
@GetMapping(value = "/getHeaderOrConditionForOcr")
|
||||
@RequiresPermissions("document:ocrPageInfo")
|
||||
public Result<List<Map<String,Object>>> getHeaderOrConditionForOcr(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getHeaderOrConditionForOcr(flag,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
// @AutoLog(value = "文档库信息表-ocr表头和查询条件")
|
||||
// @ApiOperation(value="文档库信息表-ocr表头和查询条件", notes="文档库信息表-ocr表头和查询条件")
|
||||
// @GetMapping(value = "/getHeaderOrConditionForOcr")
|
||||
// @RequiresPermissions("document:ocrPageInfo")
|
||||
// public Result<List<Map<String,Object>>> getHeaderOrConditionForOcr(@RequestParam(name="flag",required=true) String flag,
|
||||
// @RequestParam(name="cut",required=true) String cut) {
|
||||
// List<Map<String, Object>> list = bussDocumentLibraryEOService.getHeaderOrConditionForOcr(flag,cut);
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * @param flag 标识传 1-->用于查询文档库字段属性
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库信息表-文档拆分表头和查询条件")
|
||||
// @ApiOperation(value="文档库信息表-文档拆分表头和查询条件", notes="文档库信息表-文档拆分表头和查询条件")
|
||||
// @GetMapping(value = "/getHeaderOrConditionForSplitFile")
|
||||
// @RequiresPermissions("split:sarFileSplitInfo:splitFile")
|
||||
// public Result<List<Map<String,Object>>> getHeaderOrConditionForSplitFile(@RequestParam(name="flag",required=true) String flag,
|
||||
// @RequestParam(name="cut",required=true) String cut) {
|
||||
// List<Map<String, Object>> list = bussDocumentLibraryEOService.getHeaderOrConditionForSplit(flag,cut);
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
//
|
||||
/**
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-文档拆分表头和查询条件")
|
||||
@ApiOperation(value="文档库信息表-文档拆分表头和查询条件", notes="文档库信息表-文档拆分表头和查询条件")
|
||||
@GetMapping(value = "/getHeaderOrConditionForSplitFile")
|
||||
@RequiresPermissions("split:sarFileSplitInfo:splitFile")
|
||||
public Result<List<Map<String,Object>>> getHeaderOrConditionForSplitFile(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getHeaderOrConditionForSplit(flag,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* ocr识别调取已入库文件-中英文切换
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-文档拆分表头和查询条件")
|
||||
@ApiOperation(value="文档库信息表-文档拆分表头和查询条件", notes="文档库信息表-文档拆分表头和查询条件")
|
||||
@GetMapping(value = "/getHeaderOrConditionForSplitResult")
|
||||
@RequiresPermissions("split:sarFileSplitInfo:splitResult")
|
||||
public Result<List<Map<String,Object>>> getHeaderOrConditionForSplitResult(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getHeaderOrConditionForSplit(flag,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * 编辑数据查询
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
//// @AutoLog(value = "编辑数据查询")
|
||||
//// @ApiOperation(value="编辑数据查询", notes="编辑数据查询")
|
||||
//// @GetMapping(value = "/getDocumentInfoById")
|
||||
//// @RequiresPermissions("document:updateInfo")
|
||||
//// public Result<List<Map<String,Object>>> getDocumentInfoById(@RequestParam(name="id",required=true) String id,
|
||||
//// @RequestParam(name="cut",required=true) String cut) {
|
||||
//// List<Map<String, Object>> list = bussDocumentLibraryEOService.getDocumentInfoById(id,cut);
|
||||
//// return Result.OK(list);
|
||||
//// }
|
||||
// /**
|
||||
// * 详情数据查询
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
//// @AutoLog(value = "详情数据查询")
|
||||
//// @ApiOperation(value="详情数据查询", notes="详情数据查询")
|
||||
//// @GetMapping(value = "/getInfoById")
|
||||
//// @RequiresPermissions("document:queryPageInfo")
|
||||
//// public Result<List<Map<String,Object>>> getInfoById(@RequestParam(name="id",required=true) String id,
|
||||
//// @RequestParam(name="cut",required=true) String cut) {
|
||||
//// List<Map<String, Object>> list = bussDocumentLibraryEOService.getInfoById(id,cut);
|
||||
//// return Result.OK(list);
|
||||
//// }
|
||||
//
|
||||
//// @ApiOperation(value="详情目录查询", notes="详情目录查询")
|
||||
//// @GetMapping(value = "/getMenuList")
|
||||
//// public Result<List<Map<String,Object>>> getMenuList(@RequestParam(name="id",required=true) String id,
|
||||
//// @RequestParam(name="cut",required=true) String cut) {
|
||||
//// List<Map<String, Object>> list = bussDocumentLibraryEOService.getMenuList(id,cut);
|
||||
//// return Result.OK(list);
|
||||
//// }
|
||||
//
|
||||
//// /**
|
||||
//// * 新增数据
|
||||
//// * @param map
|
||||
//// * @return
|
||||
//// */
|
||||
//// @AutoLog(value = "新增数据")
|
||||
//// @ApiOperation(value="新增数据", notes="新增数据")
|
||||
//// @PostMapping(value = "/addInfo")
|
||||
//// @RequiresPermissions("document:getInfoById")
|
||||
//// public Result<String> getInfoById(@RequestBody Map<String,Object> map) {
|
||||
//// try {
|
||||
//// bussDocumentLibraryEOService.addInfo(map);
|
||||
//// } catch (Exception e) {
|
||||
//// return Result.error(e.getMessage());
|
||||
//// }
|
||||
//// return Result.OK("新增成功");
|
||||
//// }
|
||||
//// /**
|
||||
//// * 编辑数据
|
||||
//// * @param map
|
||||
//// * @return
|
||||
//// */
|
||||
//// @AutoLog(value = "编辑数据")
|
||||
//// @ApiOperation(value="编辑数据", notes="编辑数据")
|
||||
//// @PostMapping(value = "/updateInfo")
|
||||
//// @RequiresPermissions("document:updateInfo")
|
||||
//// public Result<String> updateInfo(@RequestBody Map<String,Object> map) {
|
||||
//// try {
|
||||
//// bussDocumentLibraryEOService.updateInfo(map);
|
||||
//// } catch (Exception e) {
|
||||
//// return Result.error(e.getMessage());
|
||||
//// }
|
||||
//// return Result.OK("编辑成功");
|
||||
//// }
|
||||
//
|
||||
//
|
||||
//// /**
|
||||
//// * 添加收藏
|
||||
//// * @param id
|
||||
//// * @return
|
||||
//// */
|
||||
//// @AutoLog(value = "添加收藏")
|
||||
//// @ApiOperation(value="添加收藏", notes="添加收藏")
|
||||
//// @GetMapping(value = "/addCollect")
|
||||
//// @RequiresPermissions("document:addCollect")
|
||||
//// public Result<String> addCollect(String id) {
|
||||
//// try {
|
||||
//// bussDocumentLibraryEOService.addCollect(id);
|
||||
//// } catch (Exception e) {
|
||||
//// return Result.error("收藏失败");
|
||||
//// }
|
||||
//// return Result.OK("收藏成功");
|
||||
//// }
|
||||
//
|
||||
//// /**
|
||||
//// * 取消收藏
|
||||
//// * @param id
|
||||
//// * @return
|
||||
//// */
|
||||
//// @AutoLog(value = "取消收藏")
|
||||
//// @ApiOperation(value="取消收藏", notes="取消收藏")
|
||||
//// @GetMapping(value = "/cancelCollect")
|
||||
//// @RequiresPermissions("document:addCollect")
|
||||
//// public Result<String> cancelCollect(String id) {
|
||||
//// try {
|
||||
//// bussDocumentLibraryEOService.cancelCollect(id);
|
||||
//// } catch (Exception e) {
|
||||
//// return Result.error("取消收藏失败");
|
||||
//// }
|
||||
//// return Result.OK("取消收藏成功");
|
||||
//// }
|
||||
//
|
||||
//// /**
|
||||
//// * 添加订阅
|
||||
//// * @param id
|
||||
//// * @return
|
||||
//// */
|
||||
//// @AutoLog(value = "添加订阅")
|
||||
//// @ApiOperation(value="添加订阅", notes="添加订阅")
|
||||
//// @GetMapping(value = "/addSubscribe")
|
||||
//// @RequiresPermissions("document:addSubscribe")
|
||||
//// public Result<String> addSubscribe(String id) {
|
||||
//// try {
|
||||
//// bussDocumentLibraryEOService.addSubscribe(id);
|
||||
//// } catch (Exception e) {
|
||||
//// return Result.error("订阅失败");
|
||||
//// }
|
||||
//// return Result.OK("订阅成功");
|
||||
//// }
|
||||
////
|
||||
//// /**
|
||||
//// * 取消订阅
|
||||
//// * @param id
|
||||
//// * @return
|
||||
//// */
|
||||
//// @AutoLog(value = "取消订阅")
|
||||
//// @ApiOperation(value="取消订阅", notes="取消订阅")
|
||||
//// @GetMapping(value = "/cancelSubscribe")
|
||||
//// @RequiresPermissions("document:addSubscribe")
|
||||
//// public Result<String> cancelSubscribe(String id) {
|
||||
//// try {
|
||||
//// bussDocumentLibraryEOService.cancelSubscribe(id);
|
||||
//// } catch (Exception e) {
|
||||
//// return Result.error("取消订阅失败");
|
||||
//// }
|
||||
//// return Result.OK("取消订阅成功");
|
||||
//// }
|
||||
//
|
||||
//
|
||||
// @ApiOperation(value = "导出excel")
|
||||
// @GetMapping(value = "/exportExcel")
|
||||
// @RequiresPermissions("document:exportExcel")
|
||||
// public void exportExcel(@RequestParam Map<String,Object> map,
|
||||
// HttpServletResponse response,
|
||||
// HttpServletRequest request){
|
||||
// bussDocumentLibraryEOService.exportExcel(map,response,request);
|
||||
// }
|
||||
//
|
||||
// @ApiOperation(value = "带文件导出")
|
||||
// @GetMapping(value = "/exportZip")
|
||||
// @RequiresPermissions("document:exportZip")
|
||||
// public void exportZip(@RequestParam Map<String,Object> map,
|
||||
// HttpServletResponse response,
|
||||
// HttpServletRequest request) throws Exception {
|
||||
// bussDocumentLibraryEOService.exportZip(map,response,request);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @ApiOperation(value = "模板下载")
|
||||
// @GetMapping(value = "/exportTemplate")
|
||||
// @RequiresPermissions("document:exportTemplate")
|
||||
// public void exportTemplate(@RequestParam Map<String,Object> map, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
// bussDocumentLibraryEOService.exportTemplate(map,response,request);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @ApiOperation(value = "导入.zip")
|
||||
// @PostMapping(value = "/importZip")
|
||||
// @RequiresPermissions("document:importZip")
|
||||
// public Result<String> importZip(@RequestParam(value = "file", required = false) MultipartFile file,
|
||||
// @RequestParam(value = "cut",required = false) String cut) {
|
||||
// try {
|
||||
// bussDocumentLibraryEOService.importZip(file,cut);
|
||||
// } catch (Exception e) {
|
||||
// log.error(null,e);
|
||||
// return Result.error(e.getMessage());
|
||||
// }
|
||||
// return Result.OK("导入成功");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 编辑数据查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "编辑数据查询")
|
||||
@ApiOperation(value="编辑数据查询", notes="编辑数据查询")
|
||||
@GetMapping(value = "/getDocumentInfoById")
|
||||
@RequiresPermissions("document:updateInfo")
|
||||
public Result<List<Map<String,Object>>> getDocumentInfoById(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getDocumentInfoById(id,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
/**
|
||||
* 详情数据查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "详情数据查询")
|
||||
@ApiOperation(value="详情数据查询", notes="详情数据查询")
|
||||
@GetMapping(value = "/getInfoById")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public Result<List<Map<String,Object>>> getInfoById(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getInfoById(id,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value="详情目录查询", notes="详情目录查询")
|
||||
@GetMapping(value = "/getMenuList")
|
||||
public Result<List<Map<String,Object>>> getMenuList(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String, Object>> list = bussDocumentLibraryEOService.getMenuList(id,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "新增数据")
|
||||
@ApiOperation(value="新增数据", notes="新增数据")
|
||||
@PostMapping(value = "/addInfo")
|
||||
@RequiresPermissions("document:getInfoById")
|
||||
public Result<String> getInfoById(@RequestBody Map<String,Object> map) {
|
||||
try {
|
||||
bussDocumentLibraryEOService.addInfo(map);
|
||||
} catch (Exception e) {
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK("新增成功");
|
||||
}
|
||||
/**
|
||||
* 编辑数据
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "编辑数据")
|
||||
@ApiOperation(value="编辑数据", notes="编辑数据")
|
||||
@PostMapping(value = "/updateInfo")
|
||||
@RequiresPermissions("document:updateInfo")
|
||||
public Result<String> updateInfo(@RequestBody Map<String,Object> map) {
|
||||
try {
|
||||
bussDocumentLibraryEOService.updateInfo(map);
|
||||
} catch (Exception e) {
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK("编辑成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加收藏
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "添加收藏")
|
||||
@ApiOperation(value="添加收藏", notes="添加收藏")
|
||||
@GetMapping(value = "/addCollect")
|
||||
@RequiresPermissions("document:addCollect")
|
||||
public Result<String> addCollect(String id) {
|
||||
try {
|
||||
bussDocumentLibraryEOService.addCollect(id);
|
||||
} catch (Exception e) {
|
||||
return Result.error("收藏失败");
|
||||
}
|
||||
return Result.OK("收藏成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消收藏
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "取消收藏")
|
||||
@ApiOperation(value="取消收藏", notes="取消收藏")
|
||||
@GetMapping(value = "/cancelCollect")
|
||||
@RequiresPermissions("document:addCollect")
|
||||
public Result<String> cancelCollect(String id) {
|
||||
try {
|
||||
bussDocumentLibraryEOService.cancelCollect(id);
|
||||
} catch (Exception e) {
|
||||
return Result.error("取消收藏失败");
|
||||
}
|
||||
return Result.OK("取消收藏成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加订阅
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "添加订阅")
|
||||
@ApiOperation(value="添加订阅", notes="添加订阅")
|
||||
@GetMapping(value = "/addSubscribe")
|
||||
@RequiresPermissions("document:addSubscribe")
|
||||
public Result<String> addSubscribe(String id) {
|
||||
try {
|
||||
bussDocumentLibraryEOService.addSubscribe(id);
|
||||
} catch (Exception e) {
|
||||
return Result.error("订阅失败");
|
||||
}
|
||||
return Result.OK("订阅成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消订阅
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "取消订阅")
|
||||
@ApiOperation(value="取消订阅", notes="取消订阅")
|
||||
@GetMapping(value = "/cancelSubscribe")
|
||||
@RequiresPermissions("document:addSubscribe")
|
||||
public Result<String> cancelSubscribe(String id) {
|
||||
try {
|
||||
bussDocumentLibraryEOService.cancelSubscribe(id);
|
||||
} catch (Exception e) {
|
||||
return Result.error("取消订阅失败");
|
||||
}
|
||||
return Result.OK("取消订阅成功");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "导出excel")
|
||||
@GetMapping(value = "/exportExcel")
|
||||
@RequiresPermissions("document:exportExcel")
|
||||
public void exportExcel(@RequestParam Map<String,Object> map,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request){
|
||||
bussDocumentLibraryEOService.exportExcel(map,response,request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "带文件导出")
|
||||
@GetMapping(value = "/exportZip")
|
||||
@RequiresPermissions("document:exportZip")
|
||||
public void exportZip(@RequestParam Map<String,Object> map,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) throws Exception {
|
||||
bussDocumentLibraryEOService.exportZip(map,response,request);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "模板下载")
|
||||
@GetMapping(value = "/exportTemplate")
|
||||
@RequiresPermissions("document:exportTemplate")
|
||||
public void exportTemplate(@RequestParam Map<String,Object> map, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
bussDocumentLibraryEOService.exportTemplate(map,response,request);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "导入.zip")
|
||||
@PostMapping(value = "/importZip")
|
||||
@RequiresPermissions("document:importZip")
|
||||
public Result<String> importZip(@RequestParam(value = "file", required = false) MultipartFile file,
|
||||
@RequestParam(value = "cut",required = false) String cut) {
|
||||
try {
|
||||
bussDocumentLibraryEOService.importZip(file,cut);
|
||||
} catch (Exception e) {
|
||||
log.error(null,e);
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK("导入成功");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "推送")
|
||||
@GetMapping(value = "/pullMessage")
|
||||
@RequiresPermissions("document:pullMessage")
|
||||
public Result<String> pullMessage(String departIds, String userIds, String documentIds) {
|
||||
|
||||
bussDocumentLibraryEOService.pullMessage(departIds,userIds,documentIds);
|
||||
|
||||
return Result.OK("推送成功");
|
||||
}
|
||||
// @ApiOperation(value = "推送")
|
||||
// @GetMapping(value = "/pullMessage")
|
||||
// @RequiresPermissions("document:pullMessage")
|
||||
// public Result<String> pullMessage(String departIds, String userIds, String documentIds) {
|
||||
//
|
||||
// bussDocumentLibraryEOService.pullMessage(departIds,userIds,documentIds);
|
||||
//
|
||||
// return Result.OK("推送成功");
|
||||
// }
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 验证文档是否被其他的文档绑定
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "验证文档是否被其他的文档绑定")
|
||||
@ApiOperation(value="验证文档是否被其他的文档绑定", notes="验证文档是否被其他的文档绑定")
|
||||
@GetMapping(value = "/verifyBind")
|
||||
public Result<String> verifyBind(@RequestParam(name="ids",required=true) String ids) {
|
||||
String msg = bussDocumentLibraryEOService.verifyBind(Arrays.asList(ids.split(",")));
|
||||
return Result.OK(msg);
|
||||
}
|
||||
// /**
|
||||
// * 验证文档是否被其他的文档绑定
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "验证文档是否被其他的文档绑定")
|
||||
// @ApiOperation(value="验证文档是否被其他的文档绑定", notes="验证文档是否被其他的文档绑定")
|
||||
// @GetMapping(value = "/verifyBind")
|
||||
// public Result<String> verifyBind(@RequestParam(name="ids",required=true) String ids) {
|
||||
// String msg = bussDocumentLibraryEOService.verifyBind(Arrays.asList(ids.split(",")));
|
||||
// return Result.OK(msg);
|
||||
// }
|
||||
|
||||
@AutoLog(value = "虚拟中心添加调用文档库数据--分页")
|
||||
@ApiOperation(value="虚拟中心添加调用文档库数据--分页", notes="虚拟中心添加调用文档库数据--分页")
|
||||
@PostMapping(value = "/queryPageInfoDummy")
|
||||
public Result<IPage<BussDocumentLibraryEO>> queryPageInfoDummy(@RequestBody BussDocumentLibraryEO bussDocumentLibraryEO,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<BussDocumentLibraryEO> queryWrapper = QueryGenerator.initQueryWrapper(bussDocumentLibraryEO, req.getParameterMap());
|
||||
Page<BussDocumentLibraryEO> page = new Page<BussDocumentLibraryEO>(bussDocumentLibraryEO.getPageNo(), bussDocumentLibraryEO.getPageSize());
|
||||
IPage<BussDocumentLibraryEO> pageList = bussDocumentLibraryEOService.queryPageInfoDummy(page, queryWrapper,bussDocumentLibraryEO);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
// @AutoLog(value = "虚拟中心添加调用文档库数据--分页")
|
||||
// @ApiOperation(value="虚拟中心添加调用文档库数据--分页", notes="虚拟中心添加调用文档库数据--分页")
|
||||
// @PostMapping(value = "/queryPageInfoDummy")
|
||||
// public Result<IPage<BussDocumentLibraryEO>> queryPageInfoDummy(@RequestBody BussDocumentLibraryEO bussDocumentLibraryEO,
|
||||
// HttpServletRequest req) {
|
||||
// QueryWrapper<BussDocumentLibraryEO> queryWrapper = QueryGenerator.initQueryWrapper(bussDocumentLibraryEO, req.getParameterMap());
|
||||
// Page<BussDocumentLibraryEO> page = new Page<BussDocumentLibraryEO>(bussDocumentLibraryEO.getPageNo(), bussDocumentLibraryEO.getPageSize());
|
||||
// IPage<BussDocumentLibraryEO> pageList = bussDocumentLibraryEOService.queryPageInfoDummy(page, queryWrapper,bussDocumentLibraryEO);
|
||||
// return Result.OK(pageList);
|
||||
// }
|
||||
|
||||
|
||||
@ApiOperation(value="虚拟中心添加调用文档库数据--分页", notes="虚拟中心添加调用文档库数据--分页")
|
||||
@PostMapping(value = "/queryPageDummy")
|
||||
@ResponseBody
|
||||
public JSONObject queryPageDummy(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = bussDocumentLibraryEOService.getPageDummy(parameter);
|
||||
Result<IPage> ok = Result.OK(infoPage);
|
||||
JSONObject jsonResult = JSONObject.fromObject(ok);
|
||||
return jsonResult;
|
||||
}
|
||||
// @ApiOperation(value="虚拟中心添加调用文档库数据--分页", notes="虚拟中心添加调用文档库数据--分页")
|
||||
// @PostMapping(value = "/queryPageDummy")
|
||||
// @ResponseBody
|
||||
// public JSONObject queryPageDummy(@RequestBody Map<String,Object> parameter) {
|
||||
// IPage infoPage = bussDocumentLibraryEOService.getPageDummy(parameter);
|
||||
// Result<IPage> ok = Result.OK(infoPage);
|
||||
// JSONObject jsonResult = JSONObject.fromObject(ok);
|
||||
// return jsonResult;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 查看已上传的文件
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="查看已上传的文件", notes="查看已上传的文件")
|
||||
@GetMapping(value = "/getFileInfos")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public Result<List<OSSFileForDocumentLibrary>> getFileInfos(String id) {
|
||||
List<OSSFileForDocumentLibrary> fileInfos = bussDocumentLibraryEOService.getFileInfos(id);
|
||||
return Result.OK(fileInfos);
|
||||
}
|
||||
/**
|
||||
* 根据id查询编号和标题
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="查看已上传的文件", notes="查看已上传的文件")
|
||||
@GetMapping(value = "/getTitle")
|
||||
public Result<String> getTitle(String id, String cut) {
|
||||
String title = bussDocumentLibraryEOService.getTitle(id, cut);
|
||||
return Result.OK(title);
|
||||
}
|
||||
@ApiOperation(value="编辑ES数据(添加module_type_flag)", notes="编辑ES数据(添加module_type_flag)")
|
||||
@GetMapping(value = "/updateES")
|
||||
public Result<Integer> getTitle() {
|
||||
int count = bussDocumentLibraryEOService.updateES();
|
||||
return Result.OK(count);
|
||||
}
|
||||
// /**
|
||||
// * 查看已上传的文件
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @ApiOperation(value="查看已上传的文件", notes="查看已上传的文件")
|
||||
// @GetMapping(value = "/getFileInfos")
|
||||
// @RequiresPermissions("document:queryPageInfo")
|
||||
// public Result<List<OSSFileForDocumentLibrary>> getFileInfos(String id) {
|
||||
// List<OSSFileForDocumentLibrary> fileInfos = bussDocumentLibraryEOService.getFileInfos(id);
|
||||
// return Result.OK(fileInfos);
|
||||
// }
|
||||
// /**
|
||||
// * 根据id查询编号和标题
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @ApiOperation(value="查看已上传的文件", notes="查看已上传的文件")
|
||||
// @GetMapping(value = "/getTitle")
|
||||
// public Result<String> getTitle(String id, String cut) {
|
||||
// String title = bussDocumentLibraryEOService.getTitle(id, cut);
|
||||
// return Result.OK(title);
|
||||
// }
|
||||
// @ApiOperation(value="编辑ES数据(添加module_type_flag)", notes="编辑ES数据(添加module_type_flag)")
|
||||
// @GetMapping(value = "/updateES")
|
||||
// public Result<Integer> getTitle() {
|
||||
// int count = bussDocumentLibraryEOService.updateES();
|
||||
// return Result.OK(count);
|
||||
// }
|
||||
}
|
||||
|
||||
+173
-173
@@ -1,173 +1,173 @@
|
||||
package com.jero.modules.document.controller;
|
||||
|
||||
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.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.document.entity.PhasedImplementationDetailsEO;
|
||||
import com.jero.modules.document.service.IPhasedImplementationDetailsEOService;
|
||||
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 org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档库-分阶段实施详情表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-02-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="文档库-分阶段实施详情表")
|
||||
@RestController
|
||||
@RequestMapping("/document/phasedImplementationDetailsEO")
|
||||
@Slf4j
|
||||
public class PhasedImplementationDetailsEOController extends JeroController<PhasedImplementationDetailsEO, IPhasedImplementationDetailsEOService> {
|
||||
@Autowired
|
||||
private IPhasedImplementationDetailsEOService phasedImplementationDetailsEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param phasedImplementationDetailsEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-分页列表查询")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-分页列表查询", notes="文档库-分阶段实施详情表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(PhasedImplementationDetailsEO phasedImplementationDetailsEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@RequestParam(name="cut", defaultValue="cn") String cut,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PhasedImplementationDetailsEO> queryWrapper = QueryGenerator.initQueryWrapper(phasedImplementationDetailsEO, req.getParameterMap());
|
||||
Page<PhasedImplementationDetailsEO> page = new Page<PhasedImplementationDetailsEO>(pageNo, pageSize);
|
||||
IPage<PhasedImplementationDetailsEO> pageList = phasedImplementationDetailsEOService.page(page, queryWrapper);
|
||||
this.phasedImplementationDetailsEOService.disposeData(pageList.getRecords(),cut);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-列表查询")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-列表查询", notes="文档库-分阶段实施详情表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PhasedImplementationDetailsEO>> queryList() {
|
||||
List<PhasedImplementationDetailsEO> list = phasedImplementationDetailsEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param phasedImplementationDetailsEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-添加")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-添加", notes="文档库-分阶段实施详情表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
phasedImplementationDetailsEOService.add(phasedImplementationDetailsEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param phasedImplementationDetailsEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-编辑")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-编辑", notes="文档库-分阶段实施详情表-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
phasedImplementationDetailsEOService.editById(phasedImplementationDetailsEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-通过id删除")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-通过id删除", notes="文档库-分阶段实施详情表-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
phasedImplementationDetailsEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-批量删除")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-批量删除", notes="文档库-分阶段实施详情表-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.phasedImplementationDetailsEOService.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) {
|
||||
PhasedImplementationDetailsEO phasedImplementationDetailsEO = phasedImplementationDetailsEOService.queryById(id);
|
||||
if(phasedImplementationDetailsEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(phasedImplementationDetailsEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param phasedImplementationDetailsEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
return super.exportXls(request, phasedImplementationDetailsEO, PhasedImplementationDetailsEO.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, PhasedImplementationDetailsEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
//package com.jero.modules.document.controller;
|
||||
//
|
||||
//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.aspect.annotation.AutoLog;
|
||||
//import com.jero.common.system.base.controller.JeroController;
|
||||
//import com.jero.common.system.query.QueryGenerator;
|
||||
//import com.jero.modules.document.entity.PhasedImplementationDetailsEO;
|
||||
//import com.jero.modules.document.service.IPhasedImplementationDetailsEOService;
|
||||
//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 org.springframework.web.servlet.ModelAndView;
|
||||
//
|
||||
//import javax.servlet.http.HttpServletRequest;
|
||||
//import javax.servlet.http.HttpServletResponse;
|
||||
//import java.util.Arrays;
|
||||
//import java.util.List;
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * @Description: 文档库-分阶段实施详情表
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2023-02-22
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//@Api(tags="文档库-分阶段实施详情表")
|
||||
//@RestController
|
||||
//@RequestMapping("/document/phasedImplementationDetailsEO")
|
||||
//@Slf4j
|
||||
//public class PhasedImplementationDetailsEOController extends JeroController<PhasedImplementationDetailsEO, IPhasedImplementationDetailsEOService> {
|
||||
// @Autowired
|
||||
// private IPhasedImplementationDetailsEOService phasedImplementationDetailsEOService;
|
||||
//
|
||||
// /**
|
||||
// * 分页列表查询
|
||||
// *
|
||||
// * @param phasedImplementationDetailsEO
|
||||
// * @param pageNo
|
||||
// * @param pageSize
|
||||
// * @param req
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库-分阶段实施详情表-分页列表查询")
|
||||
// @ApiOperation(value="文档库-分阶段实施详情表-分页列表查询", notes="文档库-分阶段实施详情表-分页列表查询")
|
||||
// @GetMapping(value = "/page")
|
||||
// public Result<?> queryPageList(PhasedImplementationDetailsEO phasedImplementationDetailsEO,
|
||||
// @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
// @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
// @RequestParam(name="cut", defaultValue="cn") String cut,
|
||||
// HttpServletRequest req) {
|
||||
// QueryWrapper<PhasedImplementationDetailsEO> queryWrapper = QueryGenerator.initQueryWrapper(phasedImplementationDetailsEO, req.getParameterMap());
|
||||
// Page<PhasedImplementationDetailsEO> page = new Page<PhasedImplementationDetailsEO>(pageNo, pageSize);
|
||||
// IPage<PhasedImplementationDetailsEO> pageList = phasedImplementationDetailsEOService.page(page, queryWrapper);
|
||||
// this.phasedImplementationDetailsEOService.disposeData(pageList.getRecords(),cut);
|
||||
// return Result.OK(pageList);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 列表查询
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库-分阶段实施详情表-列表查询")
|
||||
// @ApiOperation(value="文档库-分阶段实施详情表-列表查询", notes="文档库-分阶段实施详情表-列表查询")
|
||||
// @GetMapping(value = "/list")
|
||||
// public Result<List<PhasedImplementationDetailsEO>> queryList() {
|
||||
// List<PhasedImplementationDetailsEO> list = phasedImplementationDetailsEOService.queryList();
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 添加
|
||||
// *
|
||||
// * @param phasedImplementationDetailsEO
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库-分阶段实施详情表-添加")
|
||||
// @ApiOperation(value="文档库-分阶段实施详情表-添加", notes="文档库-分阶段实施详情表-添加")
|
||||
// @PostMapping(value = "/add")
|
||||
// public Result<?> add(@Validated @RequestBody PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
// phasedImplementationDetailsEOService.add(phasedImplementationDetailsEO);
|
||||
// return Result.OK("添加成功!");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 编辑
|
||||
// *
|
||||
// * @param phasedImplementationDetailsEO
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库-分阶段实施详情表-编辑")
|
||||
// @ApiOperation(value="文档库-分阶段实施详情表-编辑", notes="文档库-分阶段实施详情表-编辑")
|
||||
// @PostMapping(value = "/edit")
|
||||
// public Result<?> edit(@Validated @RequestBody PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
// phasedImplementationDetailsEOService.editById(phasedImplementationDetailsEO);
|
||||
// return Result.OK("编辑成功!");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过id删除
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库-分阶段实施详情表-通过id删除")
|
||||
// @ApiOperation(value="文档库-分阶段实施详情表-通过id删除", notes="文档库-分阶段实施详情表-通过id删除")
|
||||
// @PostMapping(value = "/delete")
|
||||
// public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
// phasedImplementationDetailsEOService.deleteById(id);
|
||||
// return Result.OK("删除成功!");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 批量删除
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库-分阶段实施详情表-批量删除")
|
||||
// @ApiOperation(value="文档库-分阶段实施详情表-批量删除", notes="文档库-分阶段实施详情表-批量删除")
|
||||
// @PostMapping(value = "/deleteBatch")
|
||||
// public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
// this.phasedImplementationDetailsEOService.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) {
|
||||
// PhasedImplementationDetailsEO phasedImplementationDetailsEO = phasedImplementationDetailsEOService.queryById(id);
|
||||
// if(phasedImplementationDetailsEO==null) {
|
||||
// return Result.error("未找到对应数据");
|
||||
// }
|
||||
// return Result.OK(phasedImplementationDetailsEO);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 导出excel
|
||||
// *
|
||||
// * @param request
|
||||
// * @param phasedImplementationDetailsEO
|
||||
// */
|
||||
// @RequestMapping(value = "/exportXls")
|
||||
// public ModelAndView exportXls(HttpServletRequest request, PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
// return super.exportXls(request, phasedImplementationDetailsEO, PhasedImplementationDetailsEO.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, PhasedImplementationDetailsEO.class);
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
+524
-524
File diff suppressed because it is too large
Load Diff
+173
-173
@@ -1,173 +1,173 @@
|
||||
package com.jero.modules.document.controller;
|
||||
|
||||
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.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.document.entity.PhasedImplementationDetailsEO;
|
||||
import com.jero.modules.document.service.IPhasedImplementationDetailsEOService;
|
||||
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 org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档库-分阶段实施详情表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-02-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="文档库-分阶段实施详情表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/document/phasedImplementationDetailsEO")
|
||||
@Slf4j
|
||||
public class PhonePhasedImplementationDetailsEOController extends JeroController<PhasedImplementationDetailsEO, IPhasedImplementationDetailsEOService> {
|
||||
@Autowired
|
||||
private IPhasedImplementationDetailsEOService phasedImplementationDetailsEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param phasedImplementationDetailsEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-分页列表查询")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-分页列表查询", notes="文档库-分阶段实施详情表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(PhasedImplementationDetailsEO phasedImplementationDetailsEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@RequestParam(name="cut", defaultValue="cn") String cut,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PhasedImplementationDetailsEO> queryWrapper = QueryGenerator.initQueryWrapper(phasedImplementationDetailsEO, req.getParameterMap());
|
||||
Page<PhasedImplementationDetailsEO> page = new Page<PhasedImplementationDetailsEO>(pageNo, pageSize);
|
||||
IPage<PhasedImplementationDetailsEO> pageList = phasedImplementationDetailsEOService.page(page, queryWrapper);
|
||||
this.phasedImplementationDetailsEOService.disposeData(pageList.getRecords(),cut);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-列表查询")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-列表查询", notes="文档库-分阶段实施详情表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PhasedImplementationDetailsEO>> queryList() {
|
||||
List<PhasedImplementationDetailsEO> list = phasedImplementationDetailsEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param phasedImplementationDetailsEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-添加")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-添加", notes="文档库-分阶段实施详情表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
phasedImplementationDetailsEOService.add(phasedImplementationDetailsEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param phasedImplementationDetailsEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-编辑")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-编辑", notes="文档库-分阶段实施详情表-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
phasedImplementationDetailsEOService.editById(phasedImplementationDetailsEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-通过id删除")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-通过id删除", notes="文档库-分阶段实施详情表-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
phasedImplementationDetailsEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库-分阶段实施详情表-批量删除")
|
||||
@ApiOperation(value="文档库-分阶段实施详情表-批量删除", notes="文档库-分阶段实施详情表-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.phasedImplementationDetailsEOService.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) {
|
||||
PhasedImplementationDetailsEO phasedImplementationDetailsEO = phasedImplementationDetailsEOService.queryById(id);
|
||||
if(phasedImplementationDetailsEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(phasedImplementationDetailsEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param phasedImplementationDetailsEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
return super.exportXls(request, phasedImplementationDetailsEO, PhasedImplementationDetailsEO.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, PhasedImplementationDetailsEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
//package com.jero.modules.document.controller;
|
||||
//
|
||||
//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.aspect.annotation.AutoLog;
|
||||
//import com.jero.common.system.base.controller.JeroController;
|
||||
//import com.jero.common.system.query.QueryGenerator;
|
||||
////import com.jero.modules.document.entity.PhasedImplementationDetailsEO;
|
||||
////import com.jero.modules.document.service.IPhasedImplementationDetailsEOService;
|
||||
//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 org.springframework.web.servlet.ModelAndView;
|
||||
//
|
||||
//import javax.servlet.http.HttpServletRequest;
|
||||
//import javax.servlet.http.HttpServletResponse;
|
||||
//import java.util.Arrays;
|
||||
//import java.util.List;
|
||||
//
|
||||
//
|
||||
///**
|
||||
//* @Description: 文档库-分阶段实施详情表
|
||||
//* @Author: jero-boot
|
||||
//* @Date: 2023-02-22
|
||||
//* @Version: V1.0
|
||||
//*/
|
||||
//@Api(tags="文档库-分阶段实施详情表")
|
||||
//@RestController
|
||||
//@RequestMapping("/phone/document/phasedImplementationDetailsEO")
|
||||
//@Slf4j
|
||||
//public class PhonePhasedImplementationDetailsEOController extends JeroController<PhasedImplementationDetailsEO, IPhasedImplementationDetailsEOService> {
|
||||
// @Autowired
|
||||
// private IPhasedImplementationDetailsEOService phasedImplementationDetailsEOService;
|
||||
//
|
||||
// /**
|
||||
// * 分页列表查询
|
||||
// *
|
||||
// * @param phasedImplementationDetailsEO
|
||||
// * @param pageNo
|
||||
// * @param pageSize
|
||||
// * @param req
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库-分阶段实施详情表-分页列表查询")
|
||||
// @ApiOperation(value="文档库-分阶段实施详情表-分页列表查询", notes="文档库-分阶段实施详情表-分页列表查询")
|
||||
// @GetMapping(value = "/page")
|
||||
// public Result<?> queryPageList(PhasedImplementationDetailsEO phasedImplementationDetailsEO,
|
||||
// @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
// @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
// @RequestParam(name="cut", defaultValue="cn") String cut,
|
||||
// HttpServletRequest req) {
|
||||
// QueryWrapper<PhasedImplementationDetailsEO> queryWrapper = QueryGenerator.initQueryWrapper(phasedImplementationDetailsEO, req.getParameterMap());
|
||||
// Page<PhasedImplementationDetailsEO> page = new Page<PhasedImplementationDetailsEO>(pageNo, pageSize);
|
||||
// IPage<PhasedImplementationDetailsEO> pageList = phasedImplementationDetailsEOService.page(page, queryWrapper);
|
||||
// this.phasedImplementationDetailsEOService.disposeData(pageList.getRecords(),cut);
|
||||
// return Result.OK(pageList);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 列表查询
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库-分阶段实施详情表-列表查询")
|
||||
// @ApiOperation(value="文档库-分阶段实施详情表-列表查询", notes="文档库-分阶段实施详情表-列表查询")
|
||||
// @GetMapping(value = "/list")
|
||||
// public Result<List<PhasedImplementationDetailsEO>> queryList() {
|
||||
// List<PhasedImplementationDetailsEO> list = phasedImplementationDetailsEOService.queryList();
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 添加
|
||||
// *
|
||||
// * @param phasedImplementationDetailsEO
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库-分阶段实施详情表-添加")
|
||||
// @ApiOperation(value="文档库-分阶段实施详情表-添加", notes="文档库-分阶段实施详情表-添加")
|
||||
// @PostMapping(value = "/add")
|
||||
// public Result<?> add(@Validated @RequestBody PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
// phasedImplementationDetailsEOService.add(phasedImplementationDetailsEO);
|
||||
// return Result.OK("添加成功!");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 编辑
|
||||
// *
|
||||
// * @param phasedImplementationDetailsEO
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库-分阶段实施详情表-编辑")
|
||||
// @ApiOperation(value="文档库-分阶段实施详情表-编辑", notes="文档库-分阶段实施详情表-编辑")
|
||||
// @PostMapping(value = "/edit")
|
||||
// public Result<?> edit(@Validated @RequestBody PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
// phasedImplementationDetailsEOService.editById(phasedImplementationDetailsEO);
|
||||
// return Result.OK("编辑成功!");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过id删除
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库-分阶段实施详情表-通过id删除")
|
||||
// @ApiOperation(value="文档库-分阶段实施详情表-通过id删除", notes="文档库-分阶段实施详情表-通过id删除")
|
||||
// @PostMapping(value = "/delete")
|
||||
// public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
// phasedImplementationDetailsEOService.deleteById(id);
|
||||
// return Result.OK("删除成功!");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 批量删除
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "文档库-分阶段实施详情表-批量删除")
|
||||
// @ApiOperation(value="文档库-分阶段实施详情表-批量删除", notes="文档库-分阶段实施详情表-批量删除")
|
||||
// @PostMapping(value = "/deleteBatch")
|
||||
// public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
// this.phasedImplementationDetailsEOService.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) {
|
||||
// PhasedImplementationDetailsEO phasedImplementationDetailsEO = phasedImplementationDetailsEOService.queryById(id);
|
||||
// if(phasedImplementationDetailsEO==null) {
|
||||
// return Result.error("未找到对应数据");
|
||||
// }
|
||||
// return Result.OK(phasedImplementationDetailsEO);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 导出excel
|
||||
// *
|
||||
// * @param request
|
||||
// * @param phasedImplementationDetailsEO
|
||||
// */
|
||||
// @RequestMapping(value = "/exportXls")
|
||||
// public ModelAndView exportXls(HttpServletRequest request, PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
// return super.exportXls(request, phasedImplementationDetailsEO, PhasedImplementationDetailsEO.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, PhasedImplementationDetailsEO.class);
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
+107
-107
@@ -1,107 +1,107 @@
|
||||
package com.jero.modules.document.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 com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档库信息表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-01-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("buss_document_library")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="buss_document_library对象", description="文档库信息表")
|
||||
public class BussDocumentLibraryEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**编号*/
|
||||
@ApiModelProperty(value = "编号")
|
||||
private String serialNumber;
|
||||
|
||||
/**标题*/
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
private String titleEn;
|
||||
|
||||
/**适用范围*/
|
||||
@ApiModelProperty(value = "适用范围")
|
||||
private String shi4Yong4Fan4Wei2;
|
||||
|
||||
/**适用地区*/
|
||||
@ApiModelProperty(value = "适用地区")
|
||||
private String region;
|
||||
/**适用地区*/
|
||||
@ApiModelProperty(value = "类别")
|
||||
private String lei4Bie2;
|
||||
|
||||
/**状态*/
|
||||
@ApiModelProperty(value = "状态")
|
||||
@Dict(dicCode ="state")
|
||||
private String state;
|
||||
|
||||
/**技术领域*/
|
||||
@ApiModelProperty(value = "技术领域")
|
||||
@Dict(dicCode ="technology_territory")
|
||||
private String technologyTerritory;
|
||||
|
||||
/**新车型实施日期*/
|
||||
@ApiModelProperty(value = "新车型实施日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private java.util.Date xin1Che1Xing2Shi2Shi1Ri4Qi1;
|
||||
|
||||
/**在产车实施日期*/
|
||||
@ApiModelProperty(value = "在产车实施日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private java.util.Date implementTime;
|
||||
|
||||
/**对应标准*/
|
||||
@ApiModelProperty(value = "对应标准")
|
||||
private String correspondingStandard;
|
||||
|
||||
|
||||
/**代替标准*/
|
||||
@ApiModelProperty(value = "代替标准")
|
||||
@Dict(dicCode ="replace_standard")
|
||||
private String replaceStandard;
|
||||
|
||||
|
||||
/**被代替标准*/
|
||||
@ApiModelProperty(value = "被代替标准")
|
||||
@Dict(dicCode ="replaced_standard")
|
||||
private String replacedStandard;
|
||||
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer pageNo;
|
||||
@TableField(exist = false)
|
||||
private Integer pageSize;
|
||||
|
||||
}
|
||||
//package com.jero.modules.document.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 com.jero.common.aspect.annotation.Dict;
|
||||
//import io.swagger.annotations.ApiModel;
|
||||
//import io.swagger.annotations.ApiModelProperty;
|
||||
//import lombok.Data;
|
||||
//import lombok.EqualsAndHashCode;
|
||||
//import lombok.experimental.Accessors;
|
||||
//import org.springframework.format.annotation.DateTimeFormat;
|
||||
//
|
||||
//import java.io.Serializable;
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * @Description: 文档库信息表
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2022-01-21
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//@Data
|
||||
//@TableName("buss_document_library")
|
||||
//@Accessors(chain = true)
|
||||
//@EqualsAndHashCode(callSuper = false)
|
||||
//@ApiModel(value="buss_document_library对象", description="文档库信息表")
|
||||
//public class BussDocumentLibraryEO implements Serializable {
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// /**主键*/
|
||||
// @TableId(type = IdType.ASSIGN_ID)
|
||||
// @ApiModelProperty(value = "主键")
|
||||
// private String id;
|
||||
//
|
||||
// /**编号*/
|
||||
// @ApiModelProperty(value = "编号")
|
||||
// private String serialNumber;
|
||||
//
|
||||
// /**标题*/
|
||||
// @ApiModelProperty(value = "标题")
|
||||
// private String title;
|
||||
//
|
||||
// private String titleEn;
|
||||
//
|
||||
// /**适用范围*/
|
||||
// @ApiModelProperty(value = "适用范围")
|
||||
// private String shi4Yong4Fan4Wei2;
|
||||
//
|
||||
// /**适用地区*/
|
||||
// @ApiModelProperty(value = "适用地区")
|
||||
// private String region;
|
||||
// /**适用地区*/
|
||||
// @ApiModelProperty(value = "类别")
|
||||
// private String lei4Bie2;
|
||||
//
|
||||
// /**状态*/
|
||||
// @ApiModelProperty(value = "状态")
|
||||
// @Dict(dicCode ="state")
|
||||
// private String state;
|
||||
//
|
||||
// /**技术领域*/
|
||||
// @ApiModelProperty(value = "技术领域")
|
||||
// @Dict(dicCode ="technology_territory")
|
||||
// private String technologyTerritory;
|
||||
//
|
||||
// /**新车型实施日期*/
|
||||
// @ApiModelProperty(value = "新车型实施日期")
|
||||
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
// @DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
// private java.util.Date xin1Che1Xing2Shi2Shi1Ri4Qi1;
|
||||
//
|
||||
// /**在产车实施日期*/
|
||||
// @ApiModelProperty(value = "在产车实施日期")
|
||||
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
// @DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
// private java.util.Date implementTime;
|
||||
//
|
||||
// /**对应标准*/
|
||||
// @ApiModelProperty(value = "对应标准")
|
||||
// private String correspondingStandard;
|
||||
//
|
||||
//
|
||||
// /**代替标准*/
|
||||
// @ApiModelProperty(value = "代替标准")
|
||||
// @Dict(dicCode ="replace_standard")
|
||||
// private String replaceStandard;
|
||||
//
|
||||
//
|
||||
// /**被代替标准*/
|
||||
// @ApiModelProperty(value = "被代替标准")
|
||||
// @Dict(dicCode ="replaced_standard")
|
||||
// private String replacedStandard;
|
||||
//
|
||||
//
|
||||
//
|
||||
// @TableField(exist = false)
|
||||
// private String cut;
|
||||
//
|
||||
// @TableField(exist = false)
|
||||
// private Integer pageNo;
|
||||
// @TableField(exist = false)
|
||||
// private Integer pageSize;
|
||||
//
|
||||
//}
|
||||
|
||||
+98
-98
@@ -1,98 +1,98 @@
|
||||
package com.jero.modules.document.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;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档库-分阶段实施详情表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-02-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("phased_implementation_details")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="phased_implementation_details对象", description="文档库-分阶段实施详情表")
|
||||
public class PhasedImplementationDetailsEO 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 Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**文档库id*/
|
||||
@Excel(name = "文档库id", width = 15)
|
||||
@ApiModelProperty(value = "文档库id")
|
||||
private String bussDocumentLibraryId;
|
||||
|
||||
/**法规编号/条款*/
|
||||
@Excel(name = "法规编号/条款", width = 15)
|
||||
@ApiModelProperty(value = "法规编号/条款")
|
||||
private String standNumberOrClause;
|
||||
|
||||
/**实施类型*/
|
||||
@Excel(name = "实施类型", width = 15)
|
||||
@ApiModelProperty(value = "实施类型")
|
||||
private String implementationType;
|
||||
|
||||
/**实施类型展示文本**/
|
||||
@TableField(exist = false)
|
||||
private String implementationTypeText;
|
||||
|
||||
/**实施日期*/
|
||||
@Excel(name = "实施日期", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "实施日期")
|
||||
private Date implementationDate;
|
||||
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remarks;
|
||||
|
||||
/**排序号*/
|
||||
@Excel(name = "排序号", width = 15)
|
||||
@ApiModelProperty(value = "排序号")
|
||||
private Integer orderNum;
|
||||
}
|
||||
//package com.jero.modules.document.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;
|
||||
//import java.util.Date;
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * @Description: 文档库-分阶段实施详情表
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2023-02-22
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//@Data
|
||||
//@TableName("phased_implementation_details")
|
||||
//@Accessors(chain = true)
|
||||
//@EqualsAndHashCode(callSuper = false)
|
||||
//@ApiModel(value="phased_implementation_details对象", description="文档库-分阶段实施详情表")
|
||||
//public class PhasedImplementationDetailsEO 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 Date createTime;
|
||||
//
|
||||
// /**更新人*/
|
||||
// @ApiModelProperty(value = "更新人")
|
||||
// private String updateBy;
|
||||
//
|
||||
// /**更新日期*/
|
||||
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
// @ApiModelProperty(value = "更新日期")
|
||||
// private Date updateTime;
|
||||
//
|
||||
// /**所属部门*/
|
||||
// @ApiModelProperty(value = "所属部门")
|
||||
// private String sysOrgCode;
|
||||
//
|
||||
// /**文档库id*/
|
||||
// @Excel(name = "文档库id", width = 15)
|
||||
// @ApiModelProperty(value = "文档库id")
|
||||
// private String bussDocumentLibraryId;
|
||||
//
|
||||
// /**法规编号/条款*/
|
||||
// @Excel(name = "法规编号/条款", width = 15)
|
||||
// @ApiModelProperty(value = "法规编号/条款")
|
||||
// private String standNumberOrClause;
|
||||
//
|
||||
// /**实施类型*/
|
||||
// @Excel(name = "实施类型", width = 15)
|
||||
// @ApiModelProperty(value = "实施类型")
|
||||
// private String implementationType;
|
||||
//
|
||||
// /**实施类型展示文本**/
|
||||
// @TableField(exist = false)
|
||||
// private String implementationTypeText;
|
||||
//
|
||||
// /**实施日期*/
|
||||
// @Excel(name = "实施日期", width = 15, format = "yyyy-MM-dd")
|
||||
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
// @DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
// @ApiModelProperty(value = "实施日期")
|
||||
// private Date implementationDate;
|
||||
//
|
||||
// /**备注*/
|
||||
// @Excel(name = "备注", width = 15)
|
||||
// @ApiModelProperty(value = "备注")
|
||||
// private String remarks;
|
||||
//
|
||||
// /**排序号*/
|
||||
// @Excel(name = "排序号", width = 15)
|
||||
// @ApiModelProperty(value = "排序号")
|
||||
// private Integer orderNum;
|
||||
//}
|
||||
|
||||
+79
-78
@@ -2,7 +2,7 @@ package com.jero.modules.document.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
//import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -14,89 +14,90 @@ import java.util.Map;
|
||||
* @Date: 2022-01-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface BussDocumentLibraryEOMapper extends BaseMapper<BussDocumentLibraryEO> {
|
||||
|
||||
int insertInfo(@Param("insertField") String insertField,
|
||||
@Param("insertValue") String insertValue);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page
|
||||
* @param field
|
||||
* @param condition
|
||||
* @return
|
||||
*/
|
||||
IPage<Map<String,Object>> getInfoPage(@Param("page") IPage<Map<String,Object>> page,
|
||||
@Param("field") String field,
|
||||
@Param("condition") String condition);
|
||||
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param
|
||||
* @param field
|
||||
* @param condition
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getInfoList(@Param("field") String field,
|
||||
@Param("condition") String condition);
|
||||
|
||||
/**
|
||||
* 代替标准分页
|
||||
*
|
||||
* @param page
|
||||
* @param field
|
||||
* @param condition
|
||||
* @return
|
||||
*/
|
||||
IPage<Map<String, Object>> replacePageInfo(@Param("page") IPage page,
|
||||
@Param("field") String field,
|
||||
@Param("condition") String condition);
|
||||
|
||||
/**
|
||||
* ocr识别调取已入库文件分页
|
||||
*
|
||||
* @param page
|
||||
* @param field
|
||||
* @param condition
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> ocrPageInfo(
|
||||
@Param("field") String field,
|
||||
@Param("condition") String condition);
|
||||
|
||||
|
||||
/**
|
||||
* 根据代替标准列表查询
|
||||
*
|
||||
* @param
|
||||
* @param replaceStandard
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getInfoListByReplaceStandard(@Param("replaceStandard") String replaceStandard);
|
||||
|
||||
@Deprecated
|
||||
public interface BussDocumentLibraryEOMapper extends BaseMapper<Object> {
|
||||
|
||||
// int insertInfo(@Param("insertField") String insertField,
|
||||
// @Param("insertValue") String insertValue);
|
||||
//
|
||||
// /**
|
||||
// * 分页查询
|
||||
// *
|
||||
// * @param page
|
||||
// * @param field
|
||||
// * @param condition
|
||||
// * @return
|
||||
// */
|
||||
// IPage<Map<String,Object>> getInfoPage(@Param("page") IPage<Map<String,Object>> page,
|
||||
// @Param("field") String field,
|
||||
// @Param("condition") String condition);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 列表查询
|
||||
// *
|
||||
// * @param
|
||||
// * @param field
|
||||
// * @param condition
|
||||
// * @return
|
||||
// */
|
||||
// List<Map<String, Object>> getInfoList(@Param("field") String field,
|
||||
// @Param("condition") String condition);
|
||||
//
|
||||
// /**
|
||||
// * 代替标准分页
|
||||
// *
|
||||
// * @param page
|
||||
// * @param field
|
||||
// * @param condition
|
||||
// * @return
|
||||
// */
|
||||
// IPage<Map<String, Object>> replacePageInfo(@Param("page") IPage page,
|
||||
// @Param("field") String field,
|
||||
// @Param("condition") String condition);
|
||||
//
|
||||
// /**
|
||||
// * ocr识别调取已入库文件分页
|
||||
// *
|
||||
// * @param page
|
||||
// * @param field
|
||||
// * @param condition
|
||||
// * @return
|
||||
// */
|
||||
// List<Map<String, Object>> ocrPageInfo(
|
||||
// @Param("field") String field,
|
||||
// @Param("condition") String condition);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 根据代替标准列表查询
|
||||
// *
|
||||
// * @param
|
||||
// * @param replaceStandard
|
||||
// * @return
|
||||
// */
|
||||
// List<Map<String, Object>> getInfoListByReplaceStandard(@Param("replaceStandard") String replaceStandard);
|
||||
//
|
||||
//
|
||||
List<Map<String,Object>> getListBySerialNumber(@Param("serialNumbers") String serialNumbers);
|
||||
|
||||
List<String> getListBySerialNumberFuzzy(@Param("serialNumber") String serialNumber);
|
||||
|
||||
|
||||
List<Map<String,Object>> selectMapsAll(@Param("ids") String ids);
|
||||
|
||||
List<Map<String,Object>> selectMapsAllBySerialNumber(@Param("serialNumberList") String serialNumberList);
|
||||
|
||||
List<Map<String,Object>> getListInfo(@Param("condition") String condition);
|
||||
|
||||
List<Map<String,Object>> selectMapsByDeleteIds(@Param("id") String id);
|
||||
|
||||
void updateByDeleteId(@Param("correspondingStandardStr") String correspondingStandardStr,
|
||||
@Param("replaceStandardStr") String replaceStandardStr,
|
||||
@Param("id") String id );
|
||||
List<Map<String, Object>> queryListByIds(@Param("ids") String ids);
|
||||
|
||||
BussDocumentLibraryEO getBySerialNumber(@Param("serialNumber") String serialNumber);
|
||||
// List<Map<String,Object>> selectMapsAll(@Param("ids") String ids);
|
||||
//
|
||||
// List<Map<String,Object>> selectMapsAllBySerialNumber(@Param("serialNumberList") String serialNumberList);
|
||||
//
|
||||
// List<Map<String,Object>> getListInfo(@Param("condition") String condition);
|
||||
//
|
||||
// List<Map<String,Object>> selectMapsByDeleteIds(@Param("id") String id);
|
||||
//
|
||||
// void updateByDeleteId(@Param("correspondingStandardStr") String correspondingStandardStr,
|
||||
// @Param("replaceStandardStr") String replaceStandardStr,
|
||||
// @Param("id") String id );
|
||||
// List<Map<String, Object>> queryListByIds(@Param("ids") String ids);
|
||||
//
|
||||
// BussDocumentLibraryEO getBySerialNumber(@Param("serialNumber") String serialNumber);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+14
-14
@@ -1,14 +1,14 @@
|
||||
package com.jero.modules.document.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.modules.document.entity.PhasedImplementationDetailsEO;
|
||||
|
||||
/**
|
||||
* @Description: 文档库-分阶段实施详情表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-02-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface PhasedImplementationDetailsEOMapper extends BaseMapper<PhasedImplementationDetailsEO> {
|
||||
|
||||
}
|
||||
//package com.jero.modules.document.mapper;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
//import com.jero.modules.document.entity.PhasedImplementationDetailsEO;
|
||||
//
|
||||
///**
|
||||
// * @Description: 文档库-分阶段实施详情表
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2023-02-22
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//public interface PhasedImplementationDetailsEOMapper extends BaseMapper<PhasedImplementationDetailsEO> {
|
||||
//
|
||||
//}
|
||||
|
||||
+109
-109
@@ -1,123 +1,123 @@
|
||||
<?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.document.mapper.BussDocumentLibraryEOMapper">
|
||||
<resultMap id="BussDocumentLibraryEOResultMap" type="com.jero.modules.document.entity.BussDocumentLibraryEO">
|
||||
<id column="id" property="id" />
|
||||
<id column="serial_number" property="serialNumber" />
|
||||
<id column="title" property="title" />
|
||||
<id column="title_en" property="titleEn" />
|
||||
<id column="shi4_yong4_fan4_wei2" property="shi4Yong4Fan4Wei2" />
|
||||
<id column="state" property="state" />
|
||||
<id column="technology_territory" property="technologyTerritory" />
|
||||
<id column="xin1_che1_xing2_shi2_shi1_ri4_qi1" property="xin1Che1Xing2Shi2Shi1Ri4Qi1" />
|
||||
<id column="implement_time" property="implementTime" />
|
||||
<id column="corresponding_standard" property="correspondingStandard" />
|
||||
<id column="lei4_bie2" property="lei4Bie2" />
|
||||
</resultMap>
|
||||
<!-- <resultMap id="BussDocumentLibraryEOResultMap" type="com.jero.modules.document.entity.BussDocumentLibraryEO">-->
|
||||
<!-- <id column="id" property="id" />-->
|
||||
<!-- <id column="serial_number" property="serialNumber" />-->
|
||||
<!-- <id column="title" property="title" />-->
|
||||
<!-- <id column="title_en" property="titleEn" />-->
|
||||
<!-- <id column="shi4_yong4_fan4_wei2" property="shi4Yong4Fan4Wei2" />-->
|
||||
<!-- <id column="state" property="state" />-->
|
||||
<!-- <id column="technology_territory" property="technologyTerritory" />-->
|
||||
<!-- <id column="xin1_che1_xing2_shi2_shi1_ri4_qi1" property="xin1Che1Xing2Shi2Shi1Ri4Qi1" />-->
|
||||
<!-- <id column="implement_time" property="implementTime" />-->
|
||||
<!-- <id column="corresponding_standard" property="correspondingStandard" />-->
|
||||
<!-- <id column="lei4_bie2" property="lei4Bie2" />-->
|
||||
<!-- </resultMap>-->
|
||||
|
||||
<insert id="insertInfo">
|
||||
insert into buss_document_library(${insertField})
|
||||
values (${insertValue})
|
||||
</insert>
|
||||
<!-- <insert id="insertInfo">-->
|
||||
<!-- insert into buss_document_library(${insertField})-->
|
||||
<!-- values (${insertValue})-->
|
||||
<!-- </insert>-->
|
||||
|
||||
<!--分页-->
|
||||
<select id="getInfoPage" resultType="java.util.LinkedHashMap">
|
||||
select ${field} from buss_document_library
|
||||
${condition}
|
||||
</select>
|
||||
<!--列表-->
|
||||
<select id="getInfoList" resultType="java.util.LinkedHashMap">
|
||||
select ${field} from buss_document_library
|
||||
${condition}
|
||||
</select>
|
||||
<!--代替标准分页-->
|
||||
<select id="replacePageInfo" resultType="java.util.LinkedHashMap">
|
||||
select ${field} from buss_document_library
|
||||
${condition}
|
||||
</select>
|
||||
<!--ocr识别调取已入库文件分页-->
|
||||
<select id="ocrPageInfo" resultType="java.util.LinkedHashMap">
|
||||
select ${field}
|
||||
${condition}
|
||||
</select>
|
||||
<!--根据代替标准列表查询-->
|
||||
<select id="getInfoListByReplaceStandard" resultType="java.util.LinkedHashMap">
|
||||
select * from buss_document_library
|
||||
where 1=1
|
||||
<if test="replaceStandard != null" >
|
||||
and replace_standard in
|
||||
<foreach collection="replaceStandard.split(',')" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<!--根据编码列表查询-->
|
||||
<select id="getListBySerialNumber" resultType="java.util.LinkedHashMap">
|
||||
select * from buss_document_library
|
||||
where 1=1
|
||||
<if test="serialNumbers != null" >
|
||||
and serial_number in
|
||||
<foreach collection="serialNumbers.split(',')" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<!-- <!–分页–>-->
|
||||
<!-- <select id="getInfoPage" resultType="java.util.LinkedHashMap">-->
|
||||
<!-- select ${field} from buss_document_library-->
|
||||
<!-- ${condition}-->
|
||||
<!-- </select>-->
|
||||
<!-- <!–列表–>-->
|
||||
<!-- <select id="getInfoList" resultType="java.util.LinkedHashMap">-->
|
||||
<!-- select ${field} from buss_document_library-->
|
||||
<!-- ${condition}-->
|
||||
<!-- </select>-->
|
||||
<!-- <!–代替标准分页–>-->
|
||||
<!-- <select id="replacePageInfo" resultType="java.util.LinkedHashMap">-->
|
||||
<!-- select ${field} from buss_document_library-->
|
||||
<!-- ${condition}-->
|
||||
<!-- </select>-->
|
||||
<!-- <!–ocr识别调取已入库文件分页–>-->
|
||||
<!-- <select id="ocrPageInfo" resultType="java.util.LinkedHashMap">-->
|
||||
<!-- select ${field}-->
|
||||
<!-- ${condition}-->
|
||||
<!-- </select>-->
|
||||
<!-- <!–根据代替标准列表查询–>-->
|
||||
<!-- <select id="getInfoListByReplaceStandard" resultType="java.util.LinkedHashMap">-->
|
||||
<!-- select * from buss_document_library-->
|
||||
<!-- where 1=1-->
|
||||
<!-- <if test="replaceStandard != null" >-->
|
||||
<!-- and replace_standard in-->
|
||||
<!-- <foreach collection="replaceStandard.split(',')" index="index" item="item" open="(" separator="," close=")">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
<!-- </select>-->
|
||||
<!-- <!–根据编码列表查询–>-->
|
||||
<!-- <select id="getListBySerialNumber" resultType="java.util.LinkedHashMap">-->
|
||||
<!-- select * from buss_document_library-->
|
||||
<!-- where 1=1-->
|
||||
<!-- <if test="serialNumbers != null" >-->
|
||||
<!-- and serial_number in-->
|
||||
<!-- <foreach collection="serialNumbers.split(',')" index="index" item="item" open="(" separator="," close=")">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="getListBySerialNumberFuzzy" resultType="java.lang.String">
|
||||
select id from buss_document_library
|
||||
where serial_number like concat(concat('%',#{serialNumber}),'%')
|
||||
</select>
|
||||
<!-- <select id="getListBySerialNumberFuzzy" resultType="java.lang.String">-->
|
||||
<!-- select id from buss_document_library-->
|
||||
<!-- where serial_number like concat(concat('%',#{serialNumber}),'%')-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!--分页-->
|
||||
<select id="selectMapsAll" resultType="java.util.LinkedHashMap">
|
||||
select * from buss_document_library
|
||||
where 1=1
|
||||
<if test="ids != null" >
|
||||
and id in
|
||||
<foreach collection="ids.split(',')" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<!-- <!–分页–>-->
|
||||
<!-- <select id="selectMapsAll" resultType="java.util.LinkedHashMap">-->
|
||||
<!-- select * from buss_document_library-->
|
||||
<!-- where 1=1-->
|
||||
<!-- <if test="ids != null" >-->
|
||||
<!-- and id in-->
|
||||
<!-- <foreach collection="ids.split(',')" index="index" item="item" open="(" separator="," close=")">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="selectMapsAllBySerialNumber" resultType="java.util.LinkedHashMap">
|
||||
select * from buss_document_library
|
||||
where 1=1
|
||||
<if test="serialNumberList != null" >
|
||||
and serial_number in
|
||||
<foreach collection="serialNumberList.split(',')" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<!-- <select id="selectMapsAllBySerialNumber" resultType="java.util.LinkedHashMap">-->
|
||||
<!-- select * from buss_document_library-->
|
||||
<!-- where 1=1-->
|
||||
<!-- <if test="serialNumberList != null" >-->
|
||||
<!-- and serial_number in-->
|
||||
<!-- <foreach collection="serialNumberList.split(',')" index="index" item="item" open="(" separator="," close=")">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="getListInfo" resultType="java.util.LinkedHashMap">
|
||||
select * from buss_document_library
|
||||
where ${condition}
|
||||
</select>
|
||||
<!-- <select id="getListInfo" resultType="java.util.LinkedHashMap">-->
|
||||
<!-- select * from buss_document_library-->
|
||||
<!-- where ${condition}-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="selectMapsByDeleteIds" resultType="java.util.LinkedHashMap">
|
||||
select * from buss_document_library
|
||||
where corresponding_standard like concat(concat('%',#{id}),'%')
|
||||
or replace_standard like concat(concat('%',#{id}),'%')
|
||||
</select>
|
||||
<!-- <select id="selectMapsByDeleteIds" resultType="java.util.LinkedHashMap">-->
|
||||
<!-- select * from buss_document_library-->
|
||||
<!-- where corresponding_standard like concat(concat('%',#{id}),'%')-->
|
||||
<!-- or replace_standard like concat(concat('%',#{id}),'%')-->
|
||||
<!-- </select>-->
|
||||
|
||||
<update id="updateByDeleteId">
|
||||
update buss_document_library set
|
||||
corresponding_standard =#{correspondingStandardStr},replace_standard=#{replaceStandardStr}
|
||||
where id=#{id}
|
||||
</update>
|
||||
<!-- <update id="updateByDeleteId">-->
|
||||
<!-- update buss_document_library set-->
|
||||
<!-- corresponding_standard =#{correspondingStandardStr},replace_standard=#{replaceStandardStr}-->
|
||||
<!-- where id=#{id}-->
|
||||
<!-- </update>-->
|
||||
|
||||
<select id="queryListByIds" resultType="java.util.LinkedHashMap">
|
||||
select * from buss_document_library
|
||||
where id in
|
||||
<foreach collection="ids.split(',')" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<!-- <select id="queryListByIds" resultType="java.util.LinkedHashMap">-->
|
||||
<!-- select * from buss_document_library-->
|
||||
<!-- where id in-->
|
||||
<!-- <foreach collection="ids.split(',')" index="index" item="item" open="(" separator="," close=")">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="getBySerialNumber" resultType="com.jero.modules.document.entity.BussDocumentLibraryEO">
|
||||
select * from buss_document_library
|
||||
where serial_number =#{serialNumber}
|
||||
</select>
|
||||
<!-- <select id="getBySerialNumber" resultType="com.jero.modules.document.entity.BussDocumentLibraryEO">-->
|
||||
<!-- select * from buss_document_library-->
|
||||
<!-- where serial_number =#{serialNumber}-->
|
||||
<!-- </select>-->
|
||||
</mapper>
|
||||
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<?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.document.mapper.PhasedImplementationDetailsEOMapper">
|
||||
|
||||
</mapper>
|
||||
+191
-190
@@ -4,7 +4,7 @@ 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.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
//import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.entity.OSSFileForDocumentLibrary;
|
||||
import com.jero.modules.document.vo.QueryConditionVO;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
@@ -21,38 +21,39 @@ import java.util.Map;
|
||||
* @Date: 2022-01-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IBussDocumentLibraryEOService extends IService<BussDocumentLibraryEO> {
|
||||
@Deprecated
|
||||
public interface IBussDocumentLibraryEOService extends IService<Object> {
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids,String cut);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
BussDocumentLibraryEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<BussDocumentLibraryEO> queryList();
|
||||
// /**
|
||||
// * 通过id删除
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// void deleteById(String id);
|
||||
//
|
||||
// /**
|
||||
// * 批量删除
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// void deleteByIds(List<String> ids,String cut);
|
||||
//
|
||||
// /**
|
||||
// * 通过id查询
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// BussDocumentLibraryEO queryById(String id);
|
||||
//
|
||||
// /**
|
||||
// * 列表查询
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// List<BussDocumentLibraryEO> queryList();
|
||||
|
||||
/**
|
||||
* 查询条件
|
||||
@@ -61,176 +62,176 @@ public interface IBussDocumentLibraryEOService extends IService<BussDocumentLibr
|
||||
*/
|
||||
List<Map<String, Object>> queryCondition(String flag, String cut,String searchFlag);
|
||||
|
||||
/**
|
||||
* 查询条件(法规清单或虚拟清单高级搜索需要的数据)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> queryConditionInventory(String flag, String cut);
|
||||
// /**
|
||||
// * 查询条件(法规清单或虚拟清单高级搜索需要的数据)
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// List<Map<String, Object>> queryConditionInventory(String flag, String cut);
|
||||
|
||||
/**
|
||||
* 列表表头
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getHeader(String flag, String cut,String searchFlag);
|
||||
// /**
|
||||
// * 列表表头
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// List<Map<String, Object>> getHeader(String flag, String cut,String searchFlag);
|
||||
//
|
||||
// /**
|
||||
// * 新增表单
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// List<Map<String, Object>> getAddForm(String flag, String cut, String type);
|
||||
//
|
||||
// /**
|
||||
// * 编辑数据查询
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// List<Map<String, Object>> getDocumentInfoById(String id, String cut);
|
||||
|
||||
/**
|
||||
* 新增表单
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getAddForm(String flag, String cut, String type);
|
||||
// /**
|
||||
// * 详情数据查询
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// List<Map<String, Object>> getInfoById(String id, String cut);
|
||||
//
|
||||
// List<Map<String, Object>> getMenuList(String id, String cut);
|
||||
// /**
|
||||
// * 新增数据
|
||||
// *
|
||||
// * @param map
|
||||
// */
|
||||
// void addInfo(Map<String, Object> map);
|
||||
//
|
||||
// /**
|
||||
// * 编辑数据
|
||||
// *
|
||||
// * @param map
|
||||
// */
|
||||
// void updateInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* 编辑数据查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getDocumentInfoById(String id, String cut);
|
||||
// /**
|
||||
// * 分页
|
||||
// *
|
||||
// * @param parameter
|
||||
// * @return
|
||||
// */
|
||||
// IPage getInfoPage(Map<String, Object> parameter);
|
||||
//
|
||||
// /**
|
||||
// * 代替标准分页
|
||||
// *
|
||||
// * @param parameter
|
||||
// * @return
|
||||
// */
|
||||
// IPage replacePageInfo(Map<String, Object> parameter);
|
||||
|
||||
/**
|
||||
* 详情数据查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getInfoById(String id, String cut);
|
||||
// /**
|
||||
// * ocr识别调取已入库文件分页
|
||||
// *
|
||||
// * @param parameter
|
||||
// * @return
|
||||
// */
|
||||
// IPage<Map<String, Object>> ocrPageInfo(Map<String,Object> parameter);
|
||||
|
||||
List<Map<String, Object>> getMenuList(String id, String cut);
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param map
|
||||
*/
|
||||
void addInfo(Map<String, Object> map);
|
||||
// /**
|
||||
// * 添加收藏
|
||||
// *
|
||||
// * @param id
|
||||
// */
|
||||
// void addCollect(String id);
|
||||
//
|
||||
// /**
|
||||
// * 取消收藏
|
||||
// *
|
||||
// * @param id
|
||||
// */
|
||||
// void cancelCollect(String id);
|
||||
//
|
||||
// /**
|
||||
// * 添加订阅
|
||||
// *
|
||||
// * @param id
|
||||
// */
|
||||
// void addSubscribe(String id);
|
||||
//
|
||||
// /**
|
||||
// * 取消订阅
|
||||
// *
|
||||
// * @param id
|
||||
// */
|
||||
// void cancelSubscribe(String id);
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 导出excel
|
||||
// *
|
||||
// * @param map
|
||||
// * @param response
|
||||
// * @param request
|
||||
// */
|
||||
// void exportExcel(Map<String, Object> map,
|
||||
// HttpServletResponse response,
|
||||
// HttpServletRequest request);
|
||||
//
|
||||
// void exportZip(Map<String, Object> map,
|
||||
// HttpServletResponse response,
|
||||
// HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param map
|
||||
*/
|
||||
void updateInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
* @param parameter
|
||||
* @return
|
||||
*/
|
||||
IPage getInfoPage(Map<String, Object> parameter);
|
||||
|
||||
/**
|
||||
* 代替标准分页
|
||||
*
|
||||
* @param parameter
|
||||
* @return
|
||||
*/
|
||||
IPage replacePageInfo(Map<String, Object> parameter);
|
||||
|
||||
/**
|
||||
* ocr识别调取已入库文件分页
|
||||
*
|
||||
* @param parameter
|
||||
* @return
|
||||
*/
|
||||
IPage<Map<String, Object>> ocrPageInfo(Map<String,Object> parameter);
|
||||
|
||||
/**
|
||||
* 添加收藏
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
void addCollect(String id);
|
||||
|
||||
/**
|
||||
* 取消收藏
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
void cancelCollect(String id);
|
||||
|
||||
/**
|
||||
* 添加订阅
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
void addSubscribe(String id);
|
||||
|
||||
/**
|
||||
* 取消订阅
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
void cancelSubscribe(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param map
|
||||
* @param response
|
||||
* @param request
|
||||
*/
|
||||
void exportExcel(Map<String, Object> map,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request);
|
||||
|
||||
void exportZip(Map<String, Object> map,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 模板下载
|
||||
*
|
||||
* @param response
|
||||
* @param request
|
||||
*/
|
||||
void exportTemplate(Map<String, Object> map, HttpServletResponse response, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* ocr识别调取已入库文件-中英文切换
|
||||
*
|
||||
* @param flag
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getHeaderOrConditionForOcr(String flag, String cut);
|
||||
// /**
|
||||
// * 模板下载
|
||||
// *
|
||||
// * @param response
|
||||
// * @param request
|
||||
// */
|
||||
// void exportTemplate(Map<String, Object> map, HttpServletResponse response, HttpServletRequest request);
|
||||
//
|
||||
// /**
|
||||
// * ocr识别调取已入库文件-中英文切换
|
||||
// *
|
||||
// * @param flag
|
||||
// * @param cut
|
||||
// * @return
|
||||
// */
|
||||
// List<Map<String, Object>> getHeaderOrConditionForOcr(String flag, String cut);
|
||||
|
||||
List<Map<String, Object>> getHeaderOrConditionForSplit(String flag, String cut);
|
||||
|
||||
String pullMessage(String departIds, String ids, String documentIds);
|
||||
|
||||
void importZip(MultipartFile file,String cut);
|
||||
|
||||
String verifyBind(List<String> ids);
|
||||
|
||||
List<Map<String,Object>> queryListByIds(String ids);
|
||||
// String pullMessage(String departIds, String ids, String documentIds);
|
||||
//
|
||||
// void importZip(MultipartFile file,String cut);
|
||||
//
|
||||
// String verifyBind(List<String> ids);
|
||||
//
|
||||
// List<Map<String,Object>> queryListByIds(String ids);
|
||||
|
||||
List<Map<String, Object>> getListBySerialNumber(String serialNumbers);
|
||||
|
||||
List<String> getListBySerialNumberFuzzy(String serialNumber);
|
||||
|
||||
List<OSSFileForDocumentLibrary> getFileInfos(String id);
|
||||
|
||||
|
||||
IPage<BussDocumentLibraryEO> queryPageInfoDummy(Page<BussDocumentLibraryEO> page, QueryWrapper<BussDocumentLibraryEO> queryWrapper,BussDocumentLibraryEO bussDocumentLibraryEO);
|
||||
|
||||
IPage getPageDummy(Map<String, Object> parameter);
|
||||
|
||||
void isModifyForOcrAndSplit(Map<String, Object> parameter);
|
||||
|
||||
String getTitle(String id,String cut);
|
||||
|
||||
String sqlJoint(List<QueryConditionVO> queryConditionVOList);
|
||||
|
||||
int updateES();
|
||||
|
||||
/**
|
||||
* 根据serialNumber获取BussDumentLibrar对象
|
||||
* @param serialNumber
|
||||
* @return
|
||||
*/
|
||||
BussDocumentLibraryEO getBySerialNumber(String serialNumber);
|
||||
// List<OSSFileForDocumentLibrary> getFileInfos(String id);
|
||||
//
|
||||
//
|
||||
// IPage<BussDocumentLibraryEO> queryPageInfoDummy(Page<BussDocumentLibraryEO> page, QueryWrapper<BussDocumentLibraryEO> queryWrapper,BussDocumentLibraryEO bussDocumentLibraryEO);
|
||||
//
|
||||
// IPage getPageDummy(Map<String, Object> parameter);
|
||||
//
|
||||
// void isModifyForOcrAndSplit(Map<String, Object> parameter);
|
||||
//
|
||||
// String getTitle(String id,String cut);
|
||||
//
|
||||
// String sqlJoint(List<QueryConditionVO> queryConditionVOList);
|
||||
//
|
||||
// int updateES();
|
||||
//
|
||||
// /**
|
||||
// * 根据serialNumber获取BussDumentLibrar对象
|
||||
// * @param serialNumber
|
||||
// * @return
|
||||
// */
|
||||
// BussDocumentLibraryEO getBySerialNumber(String serialNumber);
|
||||
}
|
||||
|
||||
+66
-66
@@ -1,66 +1,66 @@
|
||||
package com.jero.modules.document.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.document.entity.PhasedImplementationDetailsEO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 文档库-分阶段实施详情表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-02-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IPhasedImplementationDetailsEOService extends IService<PhasedImplementationDetailsEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param phasedImplementationDetailsEO
|
||||
* @return
|
||||
*/
|
||||
void add(PhasedImplementationDetailsEO phasedImplementationDetailsEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param phasedImplementationDetailsEO
|
||||
* @return
|
||||
*/
|
||||
void editById(PhasedImplementationDetailsEO phasedImplementationDetailsEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
PhasedImplementationDetailsEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<PhasedImplementationDetailsEO> queryList();
|
||||
|
||||
boolean insertBatch(List<PhasedImplementationDetailsEO> phasedImplDetailsEOList);
|
||||
|
||||
void disposeData(List<PhasedImplementationDetailsEO> datas, String cut);
|
||||
}
|
||||
//package com.jero.modules.document.service;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.extension.service.IService;
|
||||
//import com.jero.modules.document.entity.PhasedImplementationDetailsEO;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * @Description: 文档库-分阶段实施详情表
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2023-02-22
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//public interface IPhasedImplementationDetailsEOService extends IService<PhasedImplementationDetailsEO> {
|
||||
//
|
||||
// /**
|
||||
// * 保存
|
||||
// *
|
||||
// * @param phasedImplementationDetailsEO
|
||||
// * @return
|
||||
// */
|
||||
// void add(PhasedImplementationDetailsEO phasedImplementationDetailsEO);
|
||||
//
|
||||
// /**
|
||||
// * 更新
|
||||
// *
|
||||
// * @param phasedImplementationDetailsEO
|
||||
// * @return
|
||||
// */
|
||||
// void editById(PhasedImplementationDetailsEO phasedImplementationDetailsEO);
|
||||
//
|
||||
// /**
|
||||
// * 通过id删除
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// void deleteById(String id);
|
||||
//
|
||||
// /**
|
||||
// * 批量删除
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// void deleteByIds(List<String> ids);
|
||||
//
|
||||
// /**
|
||||
// * 通过id查询
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// PhasedImplementationDetailsEO queryById(String id);
|
||||
//
|
||||
// /**
|
||||
// * 列表查询
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// List<PhasedImplementationDetailsEO> queryList();
|
||||
//
|
||||
// boolean insertBatch(List<PhasedImplementationDetailsEO> phasedImplDetailsEOList);
|
||||
//
|
||||
// void disposeData(List<PhasedImplementationDetailsEO> datas, String cut);
|
||||
//}
|
||||
|
||||
+5476
-5479
File diff suppressed because it is too large
Load Diff
+148
-148
@@ -1,148 +1,148 @@
|
||||
package com.jero.modules.document.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.LanguageEnum;
|
||||
import com.jero.modules.document.entity.PhasedImplementationDetailsEO;
|
||||
import com.jero.modules.document.enums.ImplementationTypeEnum;
|
||||
import com.jero.modules.document.mapper.PhasedImplementationDetailsEOMapper;
|
||||
import com.jero.modules.document.service.IPhasedImplementationDetailsEOService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 文档库-分阶段实施详情表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-02-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class PhasedImplementationDetailsEOServiceImpl extends ServiceImpl<PhasedImplementationDetailsEOMapper, PhasedImplementationDetailsEO> implements IPhasedImplementationDetailsEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param phasedImplementationDetailsEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
Date now = new Date();
|
||||
phasedImplementationDetailsEO.setCreateTime(now);
|
||||
phasedImplementationDetailsEO.setUpdateTime(now);
|
||||
save(phasedImplementationDetailsEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param phasedImplementationDetailsEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
Date now = new Date();
|
||||
phasedImplementationDetailsEO.setUpdateTime(now);
|
||||
saveOrUpdate(phasedImplementationDetailsEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过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 PhasedImplementationDetailsEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PhasedImplementationDetailsEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertBatch(List<PhasedImplementationDetailsEO> phasedImplDetailsEOList) {
|
||||
boolean flag = true;
|
||||
if(CollectionUtils.isNotEmpty(phasedImplDetailsEOList)){
|
||||
try {
|
||||
this.saveBatch(phasedImplDetailsEOList);
|
||||
}catch (Exception ex){
|
||||
flag = false;
|
||||
ex.printStackTrace();
|
||||
log.error("批量添加分阶段实施详情信息失败:" + ex.getMessage());
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<PhasedImplementationDetailsEO> datas, String cut) {
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
for (PhasedImplementationDetailsEO data : datas) {
|
||||
String implementationType = data.getImplementationType();
|
||||
if(StringUtils.isNotEmpty(implementationType)){
|
||||
String[] implementationTypeArr = implementationType.split(",");
|
||||
ImplementationTypeEnum[] implementationTypeEnums = ImplementationTypeEnum.values();
|
||||
|
||||
String implementationTypeText = "";
|
||||
if(StringUtils.equals(cut, LanguageEnum.CN.getValue())){
|
||||
implementationTypeText = Arrays.stream(implementationTypeEnums).filter(implementationTypeEnum -> {
|
||||
boolean flag = false;
|
||||
for (String type : implementationTypeArr) {
|
||||
if (org.apache.commons.lang3.StringUtils.equals(type, implementationTypeEnum.getItemValue())) {
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).map(ImplementationTypeEnum::getNameCn).collect(Collectors.joining(","));
|
||||
}else {
|
||||
implementationTypeText = Arrays.stream(implementationTypeEnums).filter(implementationTypeEnum -> {
|
||||
boolean flag = false;
|
||||
for (String type : implementationTypeArr) {
|
||||
if (org.apache.commons.lang3.StringUtils.equals(type, implementationTypeEnum.getItemValue())) {
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).map(ImplementationTypeEnum::getNameEn).collect(Collectors.joining(","));
|
||||
}
|
||||
data.setImplementationTypeText(implementationTypeText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//package com.jero.modules.document.service.impl;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
//import com.jero.common.constant.enums.LanguageEnum;
|
||||
//import com.jero.modules.document.entity.PhasedImplementationDetailsEO;
|
||||
//import com.jero.modules.document.enums.ImplementationTypeEnum;
|
||||
//import com.jero.modules.document.mapper.PhasedImplementationDetailsEOMapper;
|
||||
//import com.jero.modules.document.service.IPhasedImplementationDetailsEOService;
|
||||
//import org.apache.commons.collections4.CollectionUtils;
|
||||
//import org.apache.commons.lang3.StringUtils;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//
|
||||
//import java.util.Arrays;
|
||||
//import java.util.Date;
|
||||
//import java.util.List;
|
||||
//import java.util.stream.Collectors;
|
||||
//
|
||||
///**
|
||||
// * @Description: 文档库-分阶段实施详情表
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2023-02-22
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//@Service
|
||||
//public class PhasedImplementationDetailsEOServiceImpl extends ServiceImpl<PhasedImplementationDetailsEOMapper, PhasedImplementationDetailsEO> implements IPhasedImplementationDetailsEOService {
|
||||
//
|
||||
// /**
|
||||
// * 保存
|
||||
// *
|
||||
// * @param phasedImplementationDetailsEO
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public void add(PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
// Date now = new Date();
|
||||
// phasedImplementationDetailsEO.setCreateTime(now);
|
||||
// phasedImplementationDetailsEO.setUpdateTime(now);
|
||||
// save(phasedImplementationDetailsEO);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 更新
|
||||
// *
|
||||
// * @param phasedImplementationDetailsEO
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public void editById(PhasedImplementationDetailsEO phasedImplementationDetailsEO) {
|
||||
// Date now = new Date();
|
||||
// phasedImplementationDetailsEO.setUpdateTime(now);
|
||||
// saveOrUpdate(phasedImplementationDetailsEO);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过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 PhasedImplementationDetailsEO queryById(String id) {
|
||||
// return getById(id);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 列表查询
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public List<PhasedImplementationDetailsEO> queryList() {
|
||||
// return list();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean insertBatch(List<PhasedImplementationDetailsEO> phasedImplDetailsEOList) {
|
||||
// boolean flag = true;
|
||||
// if(CollectionUtils.isNotEmpty(phasedImplDetailsEOList)){
|
||||
// try {
|
||||
// this.saveBatch(phasedImplDetailsEOList);
|
||||
// }catch (Exception ex){
|
||||
// flag = false;
|
||||
// ex.printStackTrace();
|
||||
// log.error("批量添加分阶段实施详情信息失败:" + ex.getMessage());
|
||||
// }
|
||||
// }
|
||||
// return flag;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void disposeData(List<PhasedImplementationDetailsEO> datas, String cut) {
|
||||
// if(CollectionUtils.isNotEmpty(datas)){
|
||||
// for (PhasedImplementationDetailsEO data : datas) {
|
||||
// String implementationType = data.getImplementationType();
|
||||
// if(StringUtils.isNotEmpty(implementationType)){
|
||||
// String[] implementationTypeArr = implementationType.split(",");
|
||||
// ImplementationTypeEnum[] implementationTypeEnums = ImplementationTypeEnum.values();
|
||||
//
|
||||
// String implementationTypeText = "";
|
||||
// if(StringUtils.equals(cut, LanguageEnum.CN.getValue())){
|
||||
// implementationTypeText = Arrays.stream(implementationTypeEnums).filter(implementationTypeEnum -> {
|
||||
// boolean flag = false;
|
||||
// for (String type : implementationTypeArr) {
|
||||
// if (org.apache.commons.lang3.StringUtils.equals(type, implementationTypeEnum.getItemValue())) {
|
||||
// flag = true;
|
||||
// }
|
||||
// }
|
||||
// return flag;
|
||||
// }).map(ImplementationTypeEnum::getNameCn).collect(Collectors.joining(","));
|
||||
// }else {
|
||||
// implementationTypeText = Arrays.stream(implementationTypeEnums).filter(implementationTypeEnum -> {
|
||||
// boolean flag = false;
|
||||
// for (String type : implementationTypeArr) {
|
||||
// if (org.apache.commons.lang3.StringUtils.equals(type, implementationTypeEnum.getItemValue())) {
|
||||
// flag = true;
|
||||
// }
|
||||
// }
|
||||
// return flag;
|
||||
// }).map(ImplementationTypeEnum::getNameEn).collect(Collectors.joining(","));
|
||||
// }
|
||||
// data.setImplementationTypeText(implementationTypeText);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
+63
-63
@@ -1,63 +1,63 @@
|
||||
package com.jero.modules.document.service.impl;
|
||||
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.enums.LawsStateEnum;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @date 2022/9/25 10:03
|
||||
* @auth zhn
|
||||
*/
|
||||
public class TimedTaskLaws implements Job {
|
||||
@Autowired
|
||||
private BussDocumentLibraryEOServiceImpl bussDocumentLibraryEOService;
|
||||
|
||||
/**
|
||||
* 法规状态为即将实施的法规,根据新车型实施日期和在产车实施日期, 到期后自动更新状态为现行
|
||||
* @param jobExecutionContext
|
||||
* @throws JobExecutionException
|
||||
*/
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String currentTime = sdf.format(new Date());
|
||||
//获取所有的法规
|
||||
List<BussDocumentLibraryEO> bussDocumentLibraryEOList = bussDocumentLibraryEOService.list();
|
||||
if(bussDocumentLibraryEOList.size() != 0){
|
||||
for (BussDocumentLibraryEO bussDocumentLibraryEO : bussDocumentLibraryEOList) {
|
||||
String xin1Che1Xing2Shi2Shi1Ri4Qi1Str = "";
|
||||
String implementTimestr = "";
|
||||
|
||||
String state = bussDocumentLibraryEO.getState();//状态
|
||||
//新车型实施日期
|
||||
Date xin1Che1Xing2Shi2Shi1Ri4Qi1 = bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1();
|
||||
//在产车实施日期
|
||||
Date implementTime = bussDocumentLibraryEO.getImplementTime();
|
||||
if(ObjectUtils.isNotEmpty(xin1Che1Xing2Shi2Shi1Ri4Qi1)){
|
||||
xin1Che1Xing2Shi2Shi1Ri4Qi1Str = sdf.format(xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||
}
|
||||
if(ObjectUtils.isNotEmpty(implementTime)){
|
||||
implementTimestr = sdf.format(implementTime);
|
||||
}
|
||||
//法规状态为即将实施的法规,根据新车型实施日期和在产车实施日期, 到期后自动更新状态为现行
|
||||
if(StringUtils.isNotBlank(state) && LawsStateEnum.THE_UPCOMING.getValue().equals(state)
|
||||
&& (currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str) || currentTime.equals(implementTimestr))){
|
||||
BussDocumentLibraryEO bussDocumentLibraryEOTemp = new BussDocumentLibraryEO();
|
||||
bussDocumentLibraryEOTemp.setId(bussDocumentLibraryEO.getId());
|
||||
bussDocumentLibraryEOTemp.setState(LawsStateEnum.ACTIVE.getValue());
|
||||
bussDocumentLibraryEOService.updateById(bussDocumentLibraryEOTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//package com.jero.modules.document.service.impl;
|
||||
//
|
||||
//import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
//import com.jero.modules.document.enums.LawsStateEnum;
|
||||
//import org.apache.commons.lang3.ObjectUtils;
|
||||
//import org.apache.commons.lang3.StringUtils;
|
||||
//import org.quartz.Job;
|
||||
//import org.quartz.JobExecutionContext;
|
||||
//import org.quartz.JobExecutionException;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//
|
||||
//import java.text.SimpleDateFormat;
|
||||
//import java.util.Date;
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * @description TODO 更新法规实施状态,需要更新国标/海外标准,目前仅处理了文档库是不对的
|
||||
// * @date 2022/9/25 10:03
|
||||
// * @auth zhn
|
||||
// */
|
||||
//public class TimedTaskLaws implements Job {
|
||||
// @Autowired
|
||||
// private BussDocumentLibraryEOServiceImpl bussDocumentLibraryEOService;
|
||||
//
|
||||
// /**
|
||||
// * 法规状态为即将实施的法规,根据新车型实施日期和在产车实施日期, 到期后自动更新状态为现行
|
||||
// * @param jobExecutionContext
|
||||
// * @throws JobExecutionException
|
||||
// */
|
||||
// @Override
|
||||
// public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// String currentTime = sdf.format(new Date());
|
||||
// //获取所有的法规
|
||||
// List<BussDocumentLibraryEO> bussDocumentLibraryEOList = bussDocumentLibraryEOService.list();
|
||||
// if(bussDocumentLibraryEOList.size() != 0){
|
||||
// for (BussDocumentLibraryEO bussDocumentLibraryEO : bussDocumentLibraryEOList) {
|
||||
// String xin1Che1Xing2Shi2Shi1Ri4Qi1Str = "";
|
||||
// String implementTimestr = "";
|
||||
//
|
||||
// String state = bussDocumentLibraryEO.getState();//状态
|
||||
// //新车型实施日期
|
||||
// Date xin1Che1Xing2Shi2Shi1Ri4Qi1 = bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1();
|
||||
// //在产车实施日期
|
||||
// Date implementTime = bussDocumentLibraryEO.getImplementTime();
|
||||
// if(ObjectUtils.isNotEmpty(xin1Che1Xing2Shi2Shi1Ri4Qi1)){
|
||||
// xin1Che1Xing2Shi2Shi1Ri4Qi1Str = sdf.format(xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||
// }
|
||||
// if(ObjectUtils.isNotEmpty(implementTime)){
|
||||
// implementTimestr = sdf.format(implementTime);
|
||||
// }
|
||||
// //法规状态为即将实施的法规,根据新车型实施日期和在产车实施日期, 到期后自动更新状态为现行
|
||||
// if(StringUtils.isNotBlank(state) && LawsStateEnum.THE_UPCOMING.getValue().equals(state)
|
||||
// && (currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str) || currentTime.equals(implementTimestr))){
|
||||
// BussDocumentLibraryEO bussDocumentLibraryEOTemp = new BussDocumentLibraryEO();
|
||||
// bussDocumentLibraryEOTemp.setId(bussDocumentLibraryEO.getId());
|
||||
// bussDocumentLibraryEOTemp.setState(LawsStateEnum.ACTIVE.getValue());
|
||||
// bussDocumentLibraryEOService.updateById(bussDocumentLibraryEOTemp);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
+19
-19
@@ -33,14 +33,14 @@ import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 对外报告数据表
|
||||
* @Description: 资料中心数据表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags = "对外报告数据表")
|
||||
@Api(tags = "资料中心数据表")
|
||||
@RestController
|
||||
@RequestMapping("/com.jero.modules.extRepo/extRepoData")
|
||||
@RequestMapping("/extRepo/extRepoData")
|
||||
@Slf4j
|
||||
public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoDataService> {
|
||||
@Autowired
|
||||
@@ -61,8 +61,8 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-分页列表查询")
|
||||
@ApiOperation(value = "对外报告数据表-分页列表查询", notes = "对外报告数据表-分页列表查询")
|
||||
@AutoLog(value = "资料中心数据表-分页列表查询")
|
||||
@ApiOperation(value = "资料中心数据表-分页列表查询", notes = "资料中心数据表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ExtRepoData extRepoData,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@@ -106,8 +106,8 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-列表查询")
|
||||
@ApiOperation(value = "对外报告数据表-列表查询", notes = "对外报告数据表-列表查询")
|
||||
@AutoLog(value = "资料中心数据表-列表查询")
|
||||
@ApiOperation(value = "资料中心数据表-列表查询", notes = "资料中心数据表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ExtRepoData>> queryList() {
|
||||
List<ExtRepoData> list = extRepoDataService.queryList();
|
||||
@@ -120,8 +120,8 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
||||
* @param extRepoData
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-添加")
|
||||
@ApiOperation(value = "对外报告数据表-添加", notes = "对外报告数据表-添加")
|
||||
@AutoLog(value = "资料中心数据表-添加")
|
||||
@ApiOperation(value = "资料中心数据表-添加", notes = "资料中心数据表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ExtRepoData extRepoData, HttpSession session) {
|
||||
Result<ExtRepoData> result = new Result();
|
||||
@@ -129,7 +129,7 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
||||
session.setAttribute("haveSuperiorManageAuth", false);
|
||||
extRepoFolderService.haveSuperiorManageAuth(extRepoData.getSupFolder(),session);
|
||||
if ((Boolean)session.getAttribute("haveSuperiorManageAuth")) {
|
||||
log.info("对外报告数据表收到文件添加请求,开始处理文件:【" + sdf.format(new Date()) + "】");
|
||||
log.info("资料中心数据表收到文件添加请求,开始处理文件:【" + sdf.format(new Date()) + "】");
|
||||
int res = extRepoDataService.add(extRepoData);
|
||||
if (LanguageEnum.CN.getValue().equals(extRepoData.getCut())) {
|
||||
result.success("添加成功:" + res + "条数据!");
|
||||
@@ -153,8 +153,8 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
||||
* @param extRepoData
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-编辑")
|
||||
@ApiOperation(value = "对外报告数据表-编辑", notes = "对外报告数据表-编辑")
|
||||
@AutoLog(value = "资料中心数据表-编辑")
|
||||
@ApiOperation(value = "资料中心数据表-编辑", notes = "资料中心数据表-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ExtRepoData extRepoData, HttpSession session) {
|
||||
Result<ExtRepoData> result = new Result();
|
||||
@@ -187,8 +187,8 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-通过id删除")
|
||||
@ApiOperation(value = "对外报告数据表-通过id删除", notes = "对外报告数据表-通过id删除")
|
||||
@AutoLog(value = "资料中心数据表-通过id删除")
|
||||
@ApiOperation(value = "资料中心数据表-通过id删除", notes = "资料中心数据表-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam("id") String id,
|
||||
@RequestParam(name = "cut", defaultValue = "cn") String cut, HttpSession session) {
|
||||
@@ -231,8 +231,8 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-批量删除")
|
||||
@ApiOperation(value = "对外报告数据表-批量删除", notes = "对外报告数据表-批量删除")
|
||||
@AutoLog(value = "资料中心数据表-批量删除")
|
||||
@ApiOperation(value = "资料中心数据表-批量删除", notes = "资料中心数据表-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam("ids") String ids,
|
||||
@RequestParam(name = "cut", defaultValue = "cn") String cut) {
|
||||
@@ -270,8 +270,8 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告数据表-通过id查询")
|
||||
@ApiOperation(value = "对外报告数据表-通过id查询", notes = "对外报告数据表-通过id查询")
|
||||
@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();
|
||||
@@ -291,7 +291,7 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ExtRepoData extRepoData) {
|
||||
return super.exportXls(request, extRepoData, ExtRepoData.class, "对外报告数据表");
|
||||
return super.exportXls(request, extRepoData, ExtRepoData.class, "资料中心数据表");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+12
-12
@@ -24,12 +24,12 @@ import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 对外报告文件夹表
|
||||
* @Description: 资料中心文件夹表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags = "对外报告文件夹表")
|
||||
@Api(tags = "资料中心文件夹表")
|
||||
@RestController
|
||||
@RequestMapping("/extRepo/extRepoFolder")
|
||||
@Slf4j
|
||||
@@ -45,8 +45,8 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告文件夹表-列表查询")
|
||||
@ApiOperation(value = "对外报告文件夹表-列表查询", notes = "对外报告文件夹表-列表查询")
|
||||
@AutoLog(value = "资料中心文件夹表-列表查询")
|
||||
@ApiOperation(value = "资料中心文件夹表-列表查询", notes = "资料中心文件夹表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<ERFTreeDataVO> queryList() {
|
||||
ERFTreeDataVO dataVO = new ERFTreeDataVO();
|
||||
@@ -61,8 +61,8 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
||||
* @param extRepoFolder
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告文件夹表-添加")
|
||||
@ApiOperation(value = "对外报告文件夹表-添加", notes = "对外报告文件夹表-添加")
|
||||
@AutoLog(value = "资料中心文件夹表-添加")
|
||||
@ApiOperation(value = "资料中心文件夹表-添加", notes = "资料中心文件夹表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ExtRepoFolder extRepoFolder, HttpSession session) {
|
||||
Result<ExtRepoFolder> result = new Result();
|
||||
@@ -140,8 +140,8 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
||||
* @param extRepoFolder
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告文件夹表-编辑")
|
||||
@ApiOperation(value = "对外报告文件夹表-编辑", notes = "对外报告文件夹表-编辑")
|
||||
@AutoLog(value = "资料中心文件夹表-编辑")
|
||||
@ApiOperation(value = "资料中心文件夹表-编辑", notes = "资料中心文件夹表-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ExtRepoFolder extRepoFolder, HttpSession session) {
|
||||
Result<ExtRepoFolder> result = new Result();
|
||||
@@ -170,8 +170,8 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告文件夹表-通过id删除")
|
||||
@ApiOperation(value = "对外报告文件夹表-通过id删除", notes = "对外报告文件夹表-通过id删除")
|
||||
@AutoLog(value = "资料中心文件夹表-通过id删除")
|
||||
@ApiOperation(value = "资料中心文件夹表-通过id删除", notes = "资料中心文件夹表-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id,
|
||||
@RequestParam(name = "cut", defaultValue = "cn") String cut, HttpSession session) {
|
||||
@@ -231,8 +231,8 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "对外报告文件夹表-通过id查询")
|
||||
@ApiOperation(value = "对外报告文件夹表-通过id查询", notes = "对外报告文件夹表-通过id查询")
|
||||
@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) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 对外报告文件夹 树结构实体类
|
||||
* 资料中心文件夹 树结构实体类
|
||||
*/
|
||||
public class ERFTreeData implements Comparable<ERFTreeData> {
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 对外报告数据表
|
||||
* @Description: 资料中心数据表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
@@ -26,7 +26,7 @@ import java.io.Serializable;
|
||||
@TableName("ext_repo_data")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ext_repo_data对象", description="对外报告数据表")
|
||||
@ApiModel(value="ext_repo_data对象", description="资料中心数据表")
|
||||
public class ExtRepoData implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 对外报告文件夹表
|
||||
* @Description: 资料中心文件夹表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-27
|
||||
* @Version: V1.0
|
||||
@@ -26,7 +26,7 @@ import java.io.Serializable;
|
||||
@TableName("ext_repo_folder")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="ext_repo_folder对象", description="对外报告文件夹表")
|
||||
@ApiModel(value="ext_repo_folder对象", description="资料中心文件夹表")
|
||||
public class ExtRepoFolder implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import java.util.List;
|
||||
|
||||
public enum ExtRepoMamagerRoleIdEnum {
|
||||
MANAGER_ID("系统管理员", "Administrator", "admin", "f6817f48af4fb3af11b9e8bf182f618b", 1),
|
||||
ERMANAGER_ID("对外报告管理员", "ExternalReportsManager", "ExternalReportsManager", "1552536424587862017", 2);
|
||||
ERMANAGER_ID("资料中心管理员", "ExternalReportsManager", "ExternalReportsManager", "1552536424587862017", 2);
|
||||
|
||||
String name;
|
||||
String enName;
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoData;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告数据表
|
||||
* @Description: 资料中心数据表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.modules.extRepo.entity.ExtRepoFolder;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告文件夹表
|
||||
* @Description: 资料中心文件夹表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import com.jero.modules.extRepo.entity.ExtRepoData;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告数据表
|
||||
* @Description: 资料中心数据表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import javax.servlet.http.HttpSession;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告文件夹表
|
||||
* @Description: 资料中心文件夹表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 对外报告数据表
|
||||
* @Description: 资料中心数据表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-25
|
||||
* @Version: V1.0
|
||||
|
||||
+6
-6
@@ -24,7 +24,7 @@ import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 对外报告文件夹表
|
||||
* 资料中心文件夹表
|
||||
*/
|
||||
@Service
|
||||
public class ExtRepoFolderServiceImpl extends ServiceImpl<ExtRepoFolderMapper, ExtRepoFolder> implements IExtRepoFolderService {
|
||||
@@ -53,7 +53,7 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl<ExtRepoFolderMapper, E
|
||||
save(extRepoFolder);
|
||||
editOrderId(extRepoFolder);
|
||||
} catch (Exception ex) {
|
||||
log.error("添加对外报告文件夹失败:" + ex.getMessage());
|
||||
log.error("添加资料中心文件夹失败:" + ex.getMessage());
|
||||
throw new JeroBootException("添加文件夹失败!");
|
||||
}
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl<ExtRepoFolderMapper, E
|
||||
editOrderId(extRepoFolder);
|
||||
editAuth(erf_orig, extRepoFolder);
|
||||
} catch (Exception ex) {
|
||||
log.error("修改对外报告文件夹失败:" + ex.getMessage());
|
||||
log.error("修改资料中心文件夹失败:" + ex.getMessage());
|
||||
throw new JeroBootException("修改文件夹失败!");
|
||||
}
|
||||
}
|
||||
@@ -196,7 +196,7 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl<ExtRepoFolderMapper, E
|
||||
try {
|
||||
removeById(id);
|
||||
} catch (Exception ex) {
|
||||
log.error("删除对外报告文件夹失败:" + ex.getMessage());
|
||||
log.error("删除资料中心文件夹失败:" + ex.getMessage());
|
||||
throw new JeroBootException("删除文件夹失败!");
|
||||
}
|
||||
}
|
||||
@@ -228,7 +228,7 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl<ExtRepoFolderMapper, E
|
||||
Collections.sort(res);
|
||||
return res;
|
||||
} catch (Exception ex) {
|
||||
log.error("查询对外报告文件夹失败:" + ex.getMessage());
|
||||
log.error("查询资料中心文件夹失败:" + ex.getMessage());
|
||||
throw new JeroBootException("查询文件夹失败!");
|
||||
}
|
||||
}
|
||||
@@ -326,7 +326,7 @@ public class ExtRepoFolderServiceImpl extends ServiceImpl<ExtRepoFolderMapper, E
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录用户
|
||||
// 查询当前登录用户角色
|
||||
List<SysUserRole> userRoles = sysUserRoleService.list(new QueryWrapper<SysUserRole>().lambda().eq(SysUserRole::getUserId, loginUser.getId())); // 查询用户所有角色
|
||||
List<String> userRoleIds; // 用户管理员/对外报告管理员
|
||||
List<String> userRoleIds; // 用户管理员/资料中心管理员
|
||||
if (CollectionUtil.isNotEmpty(userRoles)) {
|
||||
List<String> roleIdList = ExtRepoMamagerRoleIdEnum.getIdList();
|
||||
List<String> userRoleIdList = userRoles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
||||
|
||||
+72
-72
@@ -1,72 +1,72 @@
|
||||
package com.jero.modules.lanswitch.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.lanswitch.service.ILanguageSwitchService;
|
||||
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.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: liyawei
|
||||
* @Description:
|
||||
* @Date: Created in 12:07 2022/3/22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/language/switch")
|
||||
@Api(tags="中英文切换通用接口")
|
||||
@Slf4j
|
||||
public class LanguageSwitchController {
|
||||
@Autowired
|
||||
private ILanguageSwitchService languageSwitchService;
|
||||
|
||||
/**
|
||||
* 表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "表头中英文切换")
|
||||
@ApiOperation(value="表头中英文切换", notes="表头中英文切换")
|
||||
@GetMapping(value = "/getHeader")
|
||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = languageSwitchService.getHeader(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "查询条件中英文切换")
|
||||
@ApiOperation(value="查询条件中英文切换", notes="查询条件中英文切换")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = languageSwitchService.queryCondition(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
/**
|
||||
* 表单中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "表单中英文切换")
|
||||
@ApiOperation(value="表单中英文切换", notes="表单中英文切换")
|
||||
@GetMapping(value = "/getForm")
|
||||
public Result<List<Map<String, Object>>> getForm(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = languageSwitchService.getForm(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
}
|
||||
//package com.jero.modules.lanswitch.controller;
|
||||
//
|
||||
//import com.jero.common.api.vo.Result;
|
||||
//import com.jero.common.aspect.annotation.AutoLog;
|
||||
//import com.jero.modules.lanswitch.service.ILanguageSwitchService;
|
||||
//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.web.bind.annotation.GetMapping;
|
||||
//import org.springframework.web.bind.annotation.RequestMapping;
|
||||
//import org.springframework.web.bind.annotation.RequestParam;
|
||||
//import org.springframework.web.bind.annotation.RestController;
|
||||
//
|
||||
//import java.util.List;
|
||||
//import java.util.Map;
|
||||
//
|
||||
///**
|
||||
// * @Author: liyawei
|
||||
// * @Description:
|
||||
// * @Date: Created in 12:07 2022/3/22
|
||||
// */
|
||||
//@RestController
|
||||
//@RequestMapping("/language/switch")
|
||||
//@Api(tags="中英文切换通用接口")
|
||||
//@Slf4j
|
||||
//public class LanguageSwitchController {
|
||||
// @Autowired
|
||||
// private ILanguageSwitchService languageSwitchService;
|
||||
//
|
||||
// /**
|
||||
// * 表头中英文切换
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "表头中英文切换")
|
||||
// @ApiOperation(value="表头中英文切换", notes="表头中英文切换")
|
||||
// @GetMapping(value = "/getHeader")
|
||||
// public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
||||
// @RequestParam(name = "cut") String cut) {
|
||||
// List<Map<String, Object>> list = languageSwitchService.getHeader(flag, cut);
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 查询条件中英文切换
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "查询条件中英文切换")
|
||||
// @ApiOperation(value="查询条件中英文切换", notes="查询条件中英文切换")
|
||||
// @GetMapping(value = "/queryCondition")
|
||||
// public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
// @RequestParam(name = "cut") String cut) {
|
||||
// List<Map<String, Object>> list = languageSwitchService.queryCondition(flag, cut);
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
// /**
|
||||
// * 表单中英文切换
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "表单中英文切换")
|
||||
// @ApiOperation(value="表单中英文切换", notes="表单中英文切换")
|
||||
// @GetMapping(value = "/getForm")
|
||||
// public Result<List<Map<String, Object>>> getForm(@RequestParam(name = "flag") String flag,
|
||||
// @RequestParam(name = "cut") String cut) {
|
||||
// List<Map<String, Object>> list = languageSwitchService.getForm(flag, cut);
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
+36
-36
@@ -1,36 +1,36 @@
|
||||
package com.jero.modules.lanswitch.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: liyawei
|
||||
* @Description:
|
||||
* @Date: Created in 12:08 2022/3/22
|
||||
*/
|
||||
public interface ILanguageSwitchService {
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
* @param flag
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getHeader(String flag, String cut);
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
* @param flag
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> queryCondition(String flag, String cut);
|
||||
|
||||
/**
|
||||
* 表单中英文切换
|
||||
* @param flag
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getForm(String flag, String cut);
|
||||
}
|
||||
//package com.jero.modules.lanswitch.service;
|
||||
//
|
||||
//import java.util.List;
|
||||
//import java.util.Map;
|
||||
//
|
||||
///**
|
||||
// * @Author: liyawei
|
||||
// * @Description:
|
||||
// * @Date: Created in 12:08 2022/3/22
|
||||
// */
|
||||
//public interface ILanguageSwitchService {
|
||||
//
|
||||
// /**
|
||||
// * 列表表头中英文切换
|
||||
// * @param flag
|
||||
// * @param cut
|
||||
// * @return
|
||||
// */
|
||||
// List<Map<String, Object>> getHeader(String flag, String cut);
|
||||
//
|
||||
// /**
|
||||
// * 查询条件中英文切换
|
||||
// * @param flag
|
||||
// * @param cut
|
||||
// * @return
|
||||
// */
|
||||
// List<Map<String, Object>> queryCondition(String flag, String cut);
|
||||
//
|
||||
// /**
|
||||
// * 表单中英文切换
|
||||
// * @param flag
|
||||
// * @param cut
|
||||
// * @return
|
||||
// */
|
||||
// List<Map<String, Object>> getForm(String flag, String cut);
|
||||
//}
|
||||
|
||||
+169
-169
@@ -1,169 +1,169 @@
|
||||
package com.jero.modules.lanswitch.service.impl;
|
||||
|
||||
import com.jero.common.constant.enums.LanguageEnum;
|
||||
import com.jero.common.constant.enums.ModuleEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
import com.jero.modules.lanswitch.service.ILanguageSwitchService;
|
||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
import com.jero.modules.system.entity.SysCategoryTreeVO;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author: liyawei
|
||||
* @Description:
|
||||
* @Date: Created in 12:08 2022/3/22
|
||||
*/
|
||||
@Service
|
||||
public class LanguageSwitchServiceImpl implements ILanguageSwitchService {
|
||||
@Autowired
|
||||
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
|
||||
@Autowired
|
||||
private SysCategoryServiceImpl sysCategoryService;
|
||||
|
||||
/**
|
||||
* 列表表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getHeader(String flag, String cut) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList());
|
||||
}
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if(FieldTypeEnum.TEXT_LINK.getValue().equals(onlCgformField.getFieldShowType())){
|
||||
map.put("urlClick","true");
|
||||
}
|
||||
if("file_name".equals(onlCgformField.getDbFieldName())){
|
||||
//跳转详情的标识
|
||||
map.put("click","true");
|
||||
}
|
||||
//日期添加排序标识
|
||||
if ("create_time".equals(onlCgformField.getDbFieldName())) {
|
||||
map.put("sort", "true");//列表排序标识
|
||||
}
|
||||
if ("update_time".equals(onlCgformField.getDbFieldName())) {
|
||||
map.put("sort", "true");//列表排序标识
|
||||
}
|
||||
|
||||
String dbFieldName = onlCgformField.getDbFieldName();
|
||||
if (ModuleEnum.FILE_SPLIT_ITEMS.getValue().equals(flag)) {
|
||||
map.put("db_field_name", dbFieldName);
|
||||
} else {
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(dbFieldName));
|
||||
}
|
||||
|
||||
if(LanguageEnum.CN.getValue().equals(cut)){
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
}else{
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryCondition(String flag, String cut) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤出搜索条件()
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsQuery()))).collect(Collectors.toList());
|
||||
}
|
||||
//树形数据字典
|
||||
List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTreeByCut(cut); // 查询所有 并以树结构返回
|
||||
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
||||
if (FieldTypeEnum.TREE.getValue().equals(onlCgformField.getFieldShowType())) {
|
||||
List<SysCategoryTreeVO> sysCategoryTreeVOList = sysCategoryTree.stream()
|
||||
.filter(e -> onlCgformField.getDictId().equals(e.getDictId()))
|
||||
.collect(Collectors.toList());
|
||||
map.put("tree", sysCategoryTreeVOList); // 树形结构字段 设置树形结构字段值
|
||||
} else {
|
||||
map.put("tree", new ArrayList<>()); // 其他类型字段 该key为空
|
||||
}
|
||||
|
||||
map.put("field_show_type", onlCgformField.getFieldShowType());//类型(判断是下拉还是输入框,等等)
|
||||
map.put("dict_field", onlCgformField.getDictField()); //下拉类型的数据字典编码
|
||||
if (ModuleEnum.FILE_SPLIT_ITEMS.getValue().equals(flag)) {
|
||||
map.put("db_field_name", onlCgformField.getDbFieldName());//字段
|
||||
} else {
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
}
|
||||
|
||||
if (LanguageEnum.CN.getValue().equals(cut)) {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
} else {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getForm(String flag, String cut) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤出搜索条件()
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowForm()))).collect(Collectors.toList());
|
||||
}
|
||||
//树形数据字典
|
||||
List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTreeByCut(cut); // 查询所有 并以树结构返回
|
||||
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if (FieldTypeEnum.TREE.getValue().equals(onlCgformField.getFieldShowType())) {
|
||||
List<SysCategoryTreeVO> sysCategoryTreeVOList = sysCategoryTree.stream()
|
||||
.filter(e -> onlCgformField.getDictId().equals(e.getDictId()))
|
||||
.collect(Collectors.toList());
|
||||
map.put("tree", sysCategoryTreeVOList); // 树形结构字段 设置树形结构字段值
|
||||
} else {
|
||||
map.put("tree", new ArrayList<>()); // 其他类型字段 该key为空
|
||||
}
|
||||
|
||||
map.put("area", null);//展示区域。没用到
|
||||
map.put("field_show_type", onlCgformField.getFieldShowType());//类型(判断是下拉还是输入框,等等)
|
||||
map.put("field_must_input", onlCgformField.getFieldMustInput());//是否必填
|
||||
map.put("dict_field", onlCgformField.getDictField()); //下拉类型的数据字典编码
|
||||
if (ModuleEnum.FILE_SPLIT_ITEMS.getValue().equals(flag)) {
|
||||
map.put("db_field_name", onlCgformField.getDbFieldName());//字段
|
||||
} else {
|
||||
map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
}
|
||||
map.put("db_length", onlCgformField.getDbLength());//字段长度
|
||||
if (LanguageEnum.CN.getValue().equals(cut)) {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
} else {
|
||||
map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
//package com.jero.modules.lanswitch.service.impl;
|
||||
//
|
||||
//import com.jero.common.constant.enums.LanguageEnum;
|
||||
//import com.jero.common.constant.enums.ModuleEnum;
|
||||
//import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
//import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
//import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
//import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
//import com.jero.modules.lanswitch.service.ILanguageSwitchService;
|
||||
//import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
//import com.jero.modules.system.entity.SysCategoryTreeVO;
|
||||
//import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//
|
||||
//import java.util.ArrayList;
|
||||
//import java.util.HashMap;
|
||||
//import java.util.List;
|
||||
//import java.util.Map;
|
||||
//import java.util.stream.Collectors;
|
||||
//
|
||||
///**
|
||||
// * @Author: liyawei
|
||||
// * @Description:
|
||||
// * @Date: Created in 12:08 2022/3/22
|
||||
// */
|
||||
//@Service
|
||||
//public class LanguageSwitchServiceImpl implements ILanguageSwitchService {
|
||||
// @Autowired
|
||||
// private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
//
|
||||
// @Autowired
|
||||
// private SysCategoryServiceImpl sysCategoryService;
|
||||
//
|
||||
// /**
|
||||
// * 列表表头中英文切换
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public List<Map<String, Object>> getHeader(String flag, String cut) {
|
||||
// List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
// if (fieldList.size() != 0) {
|
||||
// //过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
||||
// fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList());
|
||||
// }
|
||||
// List<Map<String, Object>> list = new ArrayList<>();
|
||||
// for (OnlCgformField onlCgformField : fieldList) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// if(FieldTypeEnum.TEXT_LINK.getValue().equals(onlCgformField.getFieldShowType())){
|
||||
// map.put("urlClick","true");
|
||||
// }
|
||||
// if("file_name".equals(onlCgformField.getDbFieldName())){
|
||||
// //跳转详情的标识
|
||||
// map.put("click","true");
|
||||
// }
|
||||
// //日期添加排序标识
|
||||
// if ("create_time".equals(onlCgformField.getDbFieldName())) {
|
||||
// map.put("sort", "true");//列表排序标识
|
||||
// }
|
||||
// if ("update_time".equals(onlCgformField.getDbFieldName())) {
|
||||
// map.put("sort", "true");//列表排序标识
|
||||
// }
|
||||
//
|
||||
// String dbFieldName = onlCgformField.getDbFieldName();
|
||||
// if (ModuleEnum.FILE_SPLIT_ITEMS.getValue().equals(flag)) {
|
||||
// map.put("db_field_name", dbFieldName);
|
||||
// } else {
|
||||
// map.put("db_field_name", LineHumpUtil.lineToHump(dbFieldName));
|
||||
// }
|
||||
//
|
||||
// if(LanguageEnum.CN.getValue().equals(cut)){
|
||||
// map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
// }else{
|
||||
// map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
// }
|
||||
// list.add(map);
|
||||
// }
|
||||
// return list;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 查询条件中英文切换
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public List<Map<String, Object>> queryCondition(String flag, String cut) {
|
||||
// List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
// if (fieldList.size() != 0) {
|
||||
// //过滤出搜索条件()
|
||||
// fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsQuery()))).collect(Collectors.toList());
|
||||
// }
|
||||
// //树形数据字典
|
||||
// List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTreeByCut(cut); // 查询所有 并以树结构返回
|
||||
//
|
||||
// List<Map<String, Object>> list = new ArrayList<>();
|
||||
// for (OnlCgformField onlCgformField : fieldList) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
//
|
||||
// if (FieldTypeEnum.TREE.getValue().equals(onlCgformField.getFieldShowType())) {
|
||||
// List<SysCategoryTreeVO> sysCategoryTreeVOList = sysCategoryTree.stream()
|
||||
// .filter(e -> onlCgformField.getDictId().equals(e.getDictId()))
|
||||
// .collect(Collectors.toList());
|
||||
// map.put("tree", sysCategoryTreeVOList); // 树形结构字段 设置树形结构字段值
|
||||
// } else {
|
||||
// map.put("tree", new ArrayList<>()); // 其他类型字段 该key为空
|
||||
// }
|
||||
//
|
||||
// map.put("field_show_type", onlCgformField.getFieldShowType());//类型(判断是下拉还是输入框,等等)
|
||||
// map.put("dict_field", onlCgformField.getDictField()); //下拉类型的数据字典编码
|
||||
// if (ModuleEnum.FILE_SPLIT_ITEMS.getValue().equals(flag)) {
|
||||
// map.put("db_field_name", onlCgformField.getDbFieldName());//字段
|
||||
// } else {
|
||||
// map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
// }
|
||||
//
|
||||
// if (LanguageEnum.CN.getValue().equals(cut)) {
|
||||
// map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
// } else {
|
||||
// map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
// }
|
||||
// list.add(map);
|
||||
// }
|
||||
// return list;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public List<Map<String, Object>> getForm(String flag, String cut) {
|
||||
// List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag);
|
||||
// if (fieldList.size() != 0) {
|
||||
// //过滤出搜索条件()
|
||||
// fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowForm()))).collect(Collectors.toList());
|
||||
// }
|
||||
// //树形数据字典
|
||||
// List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTreeByCut(cut); // 查询所有 并以树结构返回
|
||||
//
|
||||
// List<Map<String, Object>> list = new ArrayList<>();
|
||||
// for (OnlCgformField onlCgformField : fieldList) {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
// if (FieldTypeEnum.TREE.getValue().equals(onlCgformField.getFieldShowType())) {
|
||||
// List<SysCategoryTreeVO> sysCategoryTreeVOList = sysCategoryTree.stream()
|
||||
// .filter(e -> onlCgformField.getDictId().equals(e.getDictId()))
|
||||
// .collect(Collectors.toList());
|
||||
// map.put("tree", sysCategoryTreeVOList); // 树形结构字段 设置树形结构字段值
|
||||
// } else {
|
||||
// map.put("tree", new ArrayList<>()); // 其他类型字段 该key为空
|
||||
// }
|
||||
//
|
||||
// map.put("area", null);//展示区域。没用到
|
||||
// map.put("field_show_type", onlCgformField.getFieldShowType());//类型(判断是下拉还是输入框,等等)
|
||||
// map.put("field_must_input", onlCgformField.getFieldMustInput());//是否必填
|
||||
// map.put("dict_field", onlCgformField.getDictField()); //下拉类型的数据字典编码
|
||||
// if (ModuleEnum.FILE_SPLIT_ITEMS.getValue().equals(flag)) {
|
||||
// map.put("db_field_name", onlCgformField.getDbFieldName());//字段
|
||||
// } else {
|
||||
// map.put("db_field_name", LineHumpUtil.lineToHump(onlCgformField.getDbFieldName()));//字段
|
||||
// }
|
||||
// map.put("db_length", onlCgformField.getDbLength());//字段长度
|
||||
// if (LanguageEnum.CN.getValue().equals(cut)) {
|
||||
// map.put("db_field_txt", onlCgformField.getDbFieldTxt());//字段中文名
|
||||
// } else {
|
||||
// map.put("db_field_txt", onlCgformField.getDbFieldEnName());//字段英文名
|
||||
// }
|
||||
// list.add(map);
|
||||
// }
|
||||
// return list;
|
||||
// }
|
||||
//}
|
||||
|
||||
+81
-81
@@ -1,81 +1,81 @@
|
||||
package com.jero.modules.log.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
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;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 市场清单版本更新log表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-04-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("market_list_version_update_log")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="market_list_version_update_log对象", description="市场清单版本更新log表")
|
||||
public class MarketListVersionUpdateLogEO 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 Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**版本号*/
|
||||
@Excel(name = "版本号", width = 15)
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private String versionNum;
|
||||
|
||||
/**升版说明*/
|
||||
@Excel(name = "升版说明", width = 15)
|
||||
@ApiModelProperty(value = "升版说明")
|
||||
private String upgradeExplanation;
|
||||
|
||||
/**清单类型*/
|
||||
@Excel(name = "清单类型", width = 15)
|
||||
@ApiModelProperty(value = "清单类型")
|
||||
private String listType;
|
||||
|
||||
/**清单id*/
|
||||
@Excel(name = "清单id", width = 15)
|
||||
@ApiModelProperty(value = "清单id")
|
||||
private String listId;
|
||||
|
||||
}
|
||||
//package com.jero.modules.log.entity;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.annotation.IdType;
|
||||
//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;
|
||||
//import java.util.Date;
|
||||
//
|
||||
///**
|
||||
// * @Description: 市场清单版本更新log表
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2023-04-24
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//@Data
|
||||
//@TableName("market_list_version_update_log")
|
||||
//@Accessors(chain = true)
|
||||
//@EqualsAndHashCode(callSuper = false)
|
||||
//@ApiModel(value="market_list_version_update_log对象", description="市场清单版本更新log表")
|
||||
//public class MarketListVersionUpdateLogEO 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 Date createTime;
|
||||
//
|
||||
// /**更新人*/
|
||||
// @ApiModelProperty(value = "更新人")
|
||||
// private String updateBy;
|
||||
//
|
||||
// /**更新日期*/
|
||||
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
// @ApiModelProperty(value = "更新日期")
|
||||
// private Date updateTime;
|
||||
//
|
||||
// /**所属部门*/
|
||||
// @ApiModelProperty(value = "所属部门")
|
||||
// private String sysOrgCode;
|
||||
//
|
||||
// /**版本号*/
|
||||
// @Excel(name = "版本号", width = 15)
|
||||
// @ApiModelProperty(value = "版本号")
|
||||
// private String versionNum;
|
||||
//
|
||||
// /**升版说明*/
|
||||
// @Excel(name = "升版说明", width = 15)
|
||||
// @ApiModelProperty(value = "升版说明")
|
||||
// private String upgradeExplanation;
|
||||
//
|
||||
// /**清单类型*/
|
||||
// @Excel(name = "清单类型", width = 15)
|
||||
// @ApiModelProperty(value = "清单类型")
|
||||
// private String listType;
|
||||
//
|
||||
// /**清单id*/
|
||||
// @Excel(name = "清单id", width = 15)
|
||||
// @ApiModelProperty(value = "清单id")
|
||||
// private String listId;
|
||||
//
|
||||
//}
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
package com.jero.modules.log.enums;
|
||||
|
||||
/**
|
||||
* 清单类型枚举类
|
||||
*/
|
||||
public enum ListTypeEnum {
|
||||
MARKET_REGULATION_LIST("市场法规清单","Market Regulation List"),
|
||||
MARKET_CERTIFICATION_LIST("市场认证清单","Market Certification List");
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
private ListTypeEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
//package com.jero.modules.log.enums;
|
||||
//
|
||||
///**
|
||||
// * 清单类型枚举类
|
||||
// */
|
||||
//public enum ListTypeEnum {
|
||||
// MARKET_REGULATION_LIST("市场法规清单","Market Regulation List"),
|
||||
// MARKET_CERTIFICATION_LIST("市场认证清单","Market Certification List");
|
||||
//
|
||||
// String name;
|
||||
// String value;
|
||||
//
|
||||
// private ListTypeEnum(String name, String value) {
|
||||
// this.name = name;
|
||||
// this.value = value;
|
||||
// }
|
||||
//
|
||||
// public String getName() {
|
||||
// return name;
|
||||
// }
|
||||
//
|
||||
// public void setName(String name) {
|
||||
// this.name = name;
|
||||
// }
|
||||
//
|
||||
// public String getValue() {
|
||||
// return value;
|
||||
// }
|
||||
//
|
||||
// public void setValue(String value) {
|
||||
// this.value = value;
|
||||
// }
|
||||
//}
|
||||
|
||||
+14
-14
@@ -1,14 +1,14 @@
|
||||
package com.jero.modules.log.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
|
||||
|
||||
/**
|
||||
* @Description: 市场清单版本更新log表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-04-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface MarketListVersionUpdateLogEOMapper extends BaseMapper<MarketListVersionUpdateLogEO> {
|
||||
|
||||
}
|
||||
//package com.jero.modules.log.mapper;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
//import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
|
||||
//
|
||||
///**
|
||||
// * @Description: 市场清单版本更新log表
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2023-04-24
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//public interface MarketListVersionUpdateLogEOMapper extends BaseMapper<MarketListVersionUpdateLogEO> {
|
||||
//
|
||||
//}
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
<?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.log.mapper.MarketListVersionUpdateLogEOMapper">
|
||||
<resultMap id="MarketListVersionUpdateLogEOResultMap" type="com.jero.modules.log.entity.MarketListVersionUpdateLogEO">
|
||||
<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="version_num" property="versionNum" />
|
||||
<result column="upgrade_explanation" property="upgradeExplanation" />
|
||||
<result column="list_type" property="listType" />
|
||||
<result column="list_id" property="listId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+62
-62
@@ -1,62 +1,62 @@
|
||||
package com.jero.modules.log.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 市场清单版本更新log表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-04-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IMarketListVersionUpdateLogEOService extends IService<MarketListVersionUpdateLogEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param marketListVersionUpdateLogEO
|
||||
* @return
|
||||
*/
|
||||
void add(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param marketListVersionUpdateLogEO
|
||||
* @return
|
||||
*/
|
||||
void editById(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
MarketListVersionUpdateLogEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<MarketListVersionUpdateLogEO> queryList();
|
||||
}
|
||||
//package com.jero.modules.log.service;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.extension.service.IService;
|
||||
//import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * @Description: 市场清单版本更新log表
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2023-04-24
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//public interface IMarketListVersionUpdateLogEOService extends IService<MarketListVersionUpdateLogEO> {
|
||||
//
|
||||
// /**
|
||||
// * 保存
|
||||
// *
|
||||
// * @param marketListVersionUpdateLogEO
|
||||
// * @return
|
||||
// */
|
||||
// void add(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO);
|
||||
//
|
||||
// /**
|
||||
// * 更新
|
||||
// *
|
||||
// * @param marketListVersionUpdateLogEO
|
||||
// * @return
|
||||
// */
|
||||
// void editById(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO);
|
||||
//
|
||||
// /**
|
||||
// * 通过id删除
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// void deleteById(String id);
|
||||
//
|
||||
// /**
|
||||
// * 批量删除
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// void deleteByIds(List<String> ids);
|
||||
//
|
||||
// /**
|
||||
// * 通过id查询
|
||||
// *
|
||||
// * @param id
|
||||
// * @return
|
||||
// */
|
||||
// MarketListVersionUpdateLogEO queryById(String id);
|
||||
//
|
||||
// /**
|
||||
// * 列表查询
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// List<MarketListVersionUpdateLogEO> queryList();
|
||||
//}
|
||||
|
||||
+90
-90
@@ -1,90 +1,90 @@
|
||||
package com.jero.modules.log.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
|
||||
import com.jero.modules.log.mapper.MarketListVersionUpdateLogEOMapper;
|
||||
import com.jero.modules.log.service.IMarketListVersionUpdateLogEOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 市场清单版本更新log表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-04-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class MarketListVersionUpdateLogEOServiceImpl extends ServiceImpl<MarketListVersionUpdateLogEOMapper, MarketListVersionUpdateLogEO> implements IMarketListVersionUpdateLogEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param marketListVersionUpdateLogEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO) {
|
||||
Date now = new Date();
|
||||
marketListVersionUpdateLogEO.setCreateTime(now);
|
||||
marketListVersionUpdateLogEO.setUpdateTime(now);
|
||||
save(marketListVersionUpdateLogEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param marketListVersionUpdateLogEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO) {
|
||||
Date now = new Date();
|
||||
marketListVersionUpdateLogEO.setUpdateTime(now);
|
||||
saveOrUpdate(marketListVersionUpdateLogEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过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 MarketListVersionUpdateLogEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<MarketListVersionUpdateLogEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
//package com.jero.modules.log.service.impl;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
//import com.jero.modules.log.entity.MarketListVersionUpdateLogEO;
|
||||
//import com.jero.modules.log.mapper.MarketListVersionUpdateLogEOMapper;
|
||||
//import com.jero.modules.log.service.IMarketListVersionUpdateLogEOService;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//
|
||||
//import java.util.Date;
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * @Description: 市场清单版本更新log表
|
||||
// * @Author: jero-boot
|
||||
// * @Date: 2023-04-24
|
||||
// * @Version: V1.0
|
||||
// */
|
||||
//@Service
|
||||
//public class MarketListVersionUpdateLogEOServiceImpl extends ServiceImpl<MarketListVersionUpdateLogEOMapper, MarketListVersionUpdateLogEO> implements IMarketListVersionUpdateLogEOService {
|
||||
//
|
||||
// /**
|
||||
// * 保存
|
||||
// *
|
||||
// * @param marketListVersionUpdateLogEO
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public void add(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO) {
|
||||
// Date now = new Date();
|
||||
// marketListVersionUpdateLogEO.setCreateTime(now);
|
||||
// marketListVersionUpdateLogEO.setUpdateTime(now);
|
||||
// save(marketListVersionUpdateLogEO);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 更新
|
||||
// *
|
||||
// * @param marketListVersionUpdateLogEO
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public void editById(MarketListVersionUpdateLogEO marketListVersionUpdateLogEO) {
|
||||
// Date now = new Date();
|
||||
// marketListVersionUpdateLogEO.setUpdateTime(now);
|
||||
// saveOrUpdate(marketListVersionUpdateLogEO);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过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 MarketListVersionUpdateLogEO queryById(String id) {
|
||||
// return getById(id);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 列表查询
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public List<MarketListVersionUpdateLogEO> queryList() {
|
||||
// return list();
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -6,9 +6,9 @@ import java.util.Map;
|
||||
|
||||
public interface ISearchCenterService {
|
||||
|
||||
Result<Map<String, Object>> getDataCount();
|
||||
// Result<Map<String, Object>> getDataCount();
|
||||
|
||||
Result<Map<String, Object>> getWdkCollectAndSubscribeInfoByUser(Map<String,Object> params);
|
||||
// Result<Map<String, Object>> getWdkCollectAndSubscribeInfoByUser(Map<String,Object> params);
|
||||
|
||||
Result<?> getWdkPage(Map<String, Object> params);
|
||||
// Result<?> getWdkPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
+297
-297
@@ -10,8 +10,8 @@ import com.jero.common.constant.enums.LanguageEnum;
|
||||
import com.jero.common.es.JeroElasticsearchTemplate;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.DateUtils;
|
||||
import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
import com.jero.modules.collection.service.IOnlCgformCollectionService;
|
||||
//import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
//import com.jero.modules.collection.service.IOnlCgformCollectionService;
|
||||
import com.jero.modules.document.enums.SearchEnum;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.enums.DictCodeEnum;
|
||||
@@ -36,314 +36,314 @@ public class SearchCenterServiceImpl implements ISearchCenterService {
|
||||
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private IOnlCgformCollectionService onlCgformCollectionService;
|
||||
// @Autowired
|
||||
// private IOnlCgformCollectionService onlCgformCollectionService;
|
||||
@Autowired
|
||||
private JeroElasticsearchTemplate jeroElasticsearchTemplate;
|
||||
public static final String SEARCH_FLAG = "魑";//标识(es数据带此标识的代表全文和段落的数据,不带此标识的代表列表数据)
|
||||
@Autowired
|
||||
private SysDictItemServiceImpl sysDictItemServiceImpl;
|
||||
|
||||
@Override
|
||||
public Result<Map<String, Object>> getDataCount() {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("cut", LanguageEnum.CN.getValue());
|
||||
params.put("pageNo", "1");
|
||||
params.put("pageSize", "10");
|
||||
IPage documentLibraryInfoPage = this.bussDocumentLibraryEOService.getInfoPage(params);
|
||||
long documentLibraryCount = documentLibraryInfoPage.getTotal();
|
||||
// @Override
|
||||
// public Result<Map<String, Object>> getDataCount() {
|
||||
// Map<String, Object> result = new HashMap<>();
|
||||
// Map<String, Object> params = new HashMap<>();
|
||||
// params.put("cut", LanguageEnum.CN.getValue());
|
||||
// params.put("pageNo", "1");
|
||||
// params.put("pageSize", "10");
|
||||
// IPage documentLibraryInfoPage = this.bussDocumentLibraryEOService.getInfoPage(params);
|
||||
// long documentLibraryCount = documentLibraryInfoPage.getTotal();
|
||||
//
|
||||
// result.put("documentLibraryCount", documentLibraryCount);
|
||||
// return Result.OK(result);
|
||||
// }
|
||||
|
||||
result.put("documentLibraryCount", documentLibraryCount);
|
||||
return Result.OK(result);
|
||||
}
|
||||
// @Override
|
||||
// public Result<Map<String, Object>> getWdkCollectAndSubscribeInfoByUser(Map<String,Object> params) {
|
||||
// LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// Map<String, Object> result = new HashMap<>();
|
||||
//
|
||||
// String id = (String) params.get("id");
|
||||
// QueryWrapper<OnlCgformCollection> collectionQueryWrap = new QueryWrapper<>();
|
||||
// collectionQueryWrap.lambda().eq(OnlCgformCollection::getDocumentId, id);
|
||||
// collectionQueryWrap.lambda().eq(OnlCgformCollection::getCreateBy, currentUser.getUsername());
|
||||
// List<OnlCgformCollection> collectionList = this.onlCgformCollectionService.list(collectionQueryWrap);
|
||||
//
|
||||
// result.put("collectionList", collectionList);
|
||||
// return Result.OK(result);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public Result<Map<String, Object>> getWdkCollectAndSubscribeInfoByUser(Map<String,Object> params) {
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
// @Override
|
||||
// public Result<?> getWdkPage(Map<String, Object> params) {
|
||||
// boolean indexExistsFlag = true;
|
||||
// String cut = (String) params.get("cut");
|
||||
// Integer pageNo = Integer.parseInt(params.get("pageNo").toString());
|
||||
// Integer pageSize = Integer.parseInt(params.get("pageSize").toString());
|
||||
// if (StringUtils.equals(cut, LanguageEnum.CN.getValue())) {
|
||||
// indexExistsFlag = jeroElasticsearchTemplate.indexExists(SearchEnum.FULL_TEXT_SEARCH_CN.getValue());
|
||||
// } else if (StringUtils.equals(cut, LanguageEnum.EN.getValue())) {
|
||||
// indexExistsFlag = jeroElasticsearchTemplate.indexExists(SearchEnum.FULL_TEXT_SEARCH_EN.getValue());
|
||||
// }
|
||||
// if (!indexExistsFlag) {
|
||||
// Page page = new Page(pageNo, pageSize);
|
||||
// return Result.OK(page);
|
||||
// }
|
||||
//
|
||||
// // 定义需要查询的字段数组
|
||||
// List<String> fieldList = new ArrayList<>();
|
||||
// fieldList.add("serial_number");
|
||||
// if (StringUtils.equals(cut, LanguageEnum.EN.getValue())) {
|
||||
// fieldList.add("title_en");
|
||||
// } else if (StringUtils.equals(cut, LanguageEnum.CN.getValue())){
|
||||
// fieldList.add("title");
|
||||
// }
|
||||
// fieldList.add("content");
|
||||
// fieldList.add("flag");
|
||||
//
|
||||
// JSONArray queryMapJsonAll = new JSONArray();
|
||||
// JSONArray queryJsonMustNot = new JSONArray();
|
||||
//
|
||||
// JSONArray queryMapInputJson = new JSONArray();
|
||||
// Map<String, Object> mapHighlight = new HashMap<>();
|
||||
// Map<String, Object> mapHighlight1 = new HashMap<>();
|
||||
//
|
||||
// String selectValue = (String) params.get("selectValue");
|
||||
// if(StringUtils.isNotBlank(selectValue)){
|
||||
// Map<String,Object> map = new HashMap<>();
|
||||
// Map<String,Object> map1 = new HashMap<>();
|
||||
// Map<String,Object> map2 = new HashMap<>();
|
||||
// map.put("query",SEARCH_FLAG);
|
||||
// map1.put("flag",map);
|
||||
// map2.put("match",map1);
|
||||
// queryJsonMustNot.add(map2);
|
||||
// }else {
|
||||
// selectValue = SEARCH_FLAG;
|
||||
// }
|
||||
// if (StringUtils.isNotBlank(selectValue)) {
|
||||
// for (String field : fieldList) {
|
||||
// this.setQueryMapJson(queryMapInputJson, selectValue, field);
|
||||
// //高亮
|
||||
// if(!"flag".equals(field)){
|
||||
// this.wdkHighlight(mapHighlight, field);
|
||||
// } else {
|
||||
// // query_string查询
|
||||
// Map<String, Object> map25 = new HashMap<>();
|
||||
// Map<String, Object> map45 = new HashMap<>();
|
||||
// map25.put("query", selectValue);
|
||||
// map25.put("fields", fieldList.toArray());
|
||||
// map25.put("allow_leading_wildcard", false); //禁用了前置通配符
|
||||
// map45.put("query_string", map25);
|
||||
// queryMapInputJson.add(map45);
|
||||
// }
|
||||
// }
|
||||
// mapHighlight1.put("fields", mapHighlight);
|
||||
//
|
||||
// if (CollectionUtils.isNotEmpty(queryMapInputJson)) {
|
||||
// JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapInputJson);
|
||||
// queryMapJsonAll.add(jsonObject);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //指定module_type_flag= WDK
|
||||
// JSONArray moduleTypeFlagQueryJsonArrMust = new JSONArray();
|
||||
// Map<String, Object> moduleTypeFlagValueMap = new HashMap<>();
|
||||
// Map<String, Object> moduleTypeFlagFieldMap = new HashMap<>();
|
||||
// Map<String, Object> moduleTypeFlagMatchMap = new HashMap<>();
|
||||
// moduleTypeFlagValueMap.put("query", "WDK");
|
||||
// moduleTypeFlagFieldMap.put("module_type_flag", moduleTypeFlagValueMap);
|
||||
// moduleTypeFlagMatchMap.put("match", moduleTypeFlagFieldMap);
|
||||
// moduleTypeFlagQueryJsonArrMust.add(moduleTypeFlagMatchMap);
|
||||
// JSONObject moduleTypeFlagQueryJson = jeroElasticsearchTemplate.buildBoolQuery(moduleTypeFlagQueryJsonArrMust, null, null);
|
||||
// queryMapJsonAll.add(moduleTypeFlagQueryJson);
|
||||
//
|
||||
// JSONObject querySort = new JSONObject();
|
||||
// if (StringUtils.isEmpty(selectValue) || StringUtils.equals(selectValue, SEARCH_FLAG)) {
|
||||
// Map<String, Object> createTime = new HashMap<>();
|
||||
// Map<String, Object> createTime1 = new HashMap<>();
|
||||
// createTime.put("order", "desc");
|
||||
// createTime1.put("create_time", createTime);
|
||||
// querySort.putAll(createTime1);
|
||||
// } else {
|
||||
// Map<String, Object> score = new HashMap<>();
|
||||
// Map<String, Object> score1 = new HashMap<>();
|
||||
// score.put("order", "desc");
|
||||
// score1.put("_score", score);
|
||||
// querySort.putAll(score1);
|
||||
// }
|
||||
//
|
||||
// IPage page = this.getWdkPage(
|
||||
// queryMapJsonAll,
|
||||
// mapHighlight1,
|
||||
// pageNo,
|
||||
// pageSize,
|
||||
// cut,
|
||||
// querySort,
|
||||
// queryJsonMustNot,
|
||||
// null
|
||||
// );
|
||||
// return Result.OK(page);
|
||||
// }
|
||||
|
||||
String id = (String) params.get("id");
|
||||
QueryWrapper<OnlCgformCollection> collectionQueryWrap = new QueryWrapper<>();
|
||||
collectionQueryWrap.lambda().eq(OnlCgformCollection::getDocumentId, id);
|
||||
collectionQueryWrap.lambda().eq(OnlCgformCollection::getCreateBy, currentUser.getUsername());
|
||||
List<OnlCgformCollection> collectionList = this.onlCgformCollectionService.list(collectionQueryWrap);
|
||||
|
||||
result.put("collectionList", collectionList);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> getWdkPage(Map<String, Object> params) {
|
||||
boolean indexExistsFlag = true;
|
||||
String cut = (String) params.get("cut");
|
||||
Integer pageNo = Integer.parseInt(params.get("pageNo").toString());
|
||||
Integer pageSize = Integer.parseInt(params.get("pageSize").toString());
|
||||
if (StringUtils.equals(cut, LanguageEnum.CN.getValue())) {
|
||||
indexExistsFlag = jeroElasticsearchTemplate.indexExists(SearchEnum.FULL_TEXT_SEARCH_CN.getValue());
|
||||
} else if (StringUtils.equals(cut, LanguageEnum.EN.getValue())) {
|
||||
indexExistsFlag = jeroElasticsearchTemplate.indexExists(SearchEnum.FULL_TEXT_SEARCH_EN.getValue());
|
||||
}
|
||||
if (!indexExistsFlag) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
return Result.OK(page);
|
||||
}
|
||||
|
||||
// 定义需要查询的字段数组
|
||||
List<String> fieldList = new ArrayList<>();
|
||||
fieldList.add("serial_number");
|
||||
if (StringUtils.equals(cut, LanguageEnum.EN.getValue())) {
|
||||
fieldList.add("title_en");
|
||||
} else if (StringUtils.equals(cut, LanguageEnum.CN.getValue())){
|
||||
fieldList.add("title");
|
||||
}
|
||||
fieldList.add("content");
|
||||
fieldList.add("flag");
|
||||
|
||||
JSONArray queryMapJsonAll = new JSONArray();
|
||||
JSONArray queryJsonMustNot = new JSONArray();
|
||||
|
||||
JSONArray queryMapInputJson = new JSONArray();
|
||||
Map<String, Object> mapHighlight = new HashMap<>();
|
||||
Map<String, Object> mapHighlight1 = new HashMap<>();
|
||||
|
||||
String selectValue = (String) params.get("selectValue");
|
||||
if(StringUtils.isNotBlank(selectValue)){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
Map<String,Object> map1 = new HashMap<>();
|
||||
Map<String,Object> map2 = new HashMap<>();
|
||||
map.put("query",SEARCH_FLAG);
|
||||
map1.put("flag",map);
|
||||
map2.put("match",map1);
|
||||
queryJsonMustNot.add(map2);
|
||||
}else {
|
||||
selectValue = SEARCH_FLAG;
|
||||
}
|
||||
if (StringUtils.isNotBlank(selectValue)) {
|
||||
for (String field : fieldList) {
|
||||
this.setQueryMapJson(queryMapInputJson, selectValue, field);
|
||||
//高亮
|
||||
if(!"flag".equals(field)){
|
||||
this.wdkHighlight(mapHighlight, field);
|
||||
} else {
|
||||
// query_string查询
|
||||
Map<String, Object> map25 = new HashMap<>();
|
||||
Map<String, Object> map45 = new HashMap<>();
|
||||
map25.put("query", selectValue);
|
||||
map25.put("fields", fieldList.toArray());
|
||||
map25.put("allow_leading_wildcard", false); //禁用了前置通配符
|
||||
map45.put("query_string", map25);
|
||||
queryMapInputJson.add(map45);
|
||||
}
|
||||
}
|
||||
mapHighlight1.put("fields", mapHighlight);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(queryMapInputJson)) {
|
||||
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapInputJson);
|
||||
queryMapJsonAll.add(jsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
//指定module_type_flag= WDK
|
||||
JSONArray moduleTypeFlagQueryJsonArrMust = new JSONArray();
|
||||
Map<String, Object> moduleTypeFlagValueMap = new HashMap<>();
|
||||
Map<String, Object> moduleTypeFlagFieldMap = new HashMap<>();
|
||||
Map<String, Object> moduleTypeFlagMatchMap = new HashMap<>();
|
||||
moduleTypeFlagValueMap.put("query", "WDK");
|
||||
moduleTypeFlagFieldMap.put("module_type_flag", moduleTypeFlagValueMap);
|
||||
moduleTypeFlagMatchMap.put("match", moduleTypeFlagFieldMap);
|
||||
moduleTypeFlagQueryJsonArrMust.add(moduleTypeFlagMatchMap);
|
||||
JSONObject moduleTypeFlagQueryJson = jeroElasticsearchTemplate.buildBoolQuery(moduleTypeFlagQueryJsonArrMust, null, null);
|
||||
queryMapJsonAll.add(moduleTypeFlagQueryJson);
|
||||
|
||||
JSONObject querySort = new JSONObject();
|
||||
if (StringUtils.isEmpty(selectValue) || StringUtils.equals(selectValue, SEARCH_FLAG)) {
|
||||
Map<String, Object> createTime = new HashMap<>();
|
||||
Map<String, Object> createTime1 = new HashMap<>();
|
||||
createTime.put("order", "desc");
|
||||
createTime1.put("create_time", createTime);
|
||||
querySort.putAll(createTime1);
|
||||
} else {
|
||||
Map<String, Object> score = new HashMap<>();
|
||||
Map<String, Object> score1 = new HashMap<>();
|
||||
score.put("order", "desc");
|
||||
score1.put("_score", score);
|
||||
querySort.putAll(score1);
|
||||
}
|
||||
|
||||
IPage page = this.getWdkPage(
|
||||
queryMapJsonAll,
|
||||
mapHighlight1,
|
||||
pageNo,
|
||||
pageSize,
|
||||
cut,
|
||||
querySort,
|
||||
queryJsonMustNot,
|
||||
null
|
||||
);
|
||||
return Result.OK(page);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private IPage getWdkPage(JSONArray queryMapJson,
|
||||
Map<String,Object> highlightMap,
|
||||
Integer pageNo,
|
||||
Integer pageSize,
|
||||
String cut,
|
||||
JSONObject querySort,
|
||||
JSONArray queryMustNot,
|
||||
JSONArray queryShould) {
|
||||
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, queryShould);
|
||||
JSONArray jsonArraySort = new JSONArray();
|
||||
jsonArraySort.add(querySort);
|
||||
|
||||
//1. 条件,分页
|
||||
JSONObject queryObject = jeroElasticsearchTemplate.buildQuery(
|
||||
null,
|
||||
jsonObject,
|
||||
highlightMap,
|
||||
jsonArraySort,
|
||||
pageNo - 1,
|
||||
pageSize
|
||||
);
|
||||
|
||||
//2. 数据查询
|
||||
JSONObject search = new JSONObject();
|
||||
if (LanguageEnum.CN.getValue().equals(cut)) {
|
||||
search = jeroElasticsearchTemplate.search(
|
||||
SearchEnum.FULL_TEXT_SEARCH_CN.getValue(),
|
||||
SearchEnum.FULL_TEXT_SEARCH_CN.getValue(),
|
||||
queryObject
|
||||
);
|
||||
} else {
|
||||
search = jeroElasticsearchTemplate.search(
|
||||
SearchEnum.FULL_TEXT_SEARCH_EN.getValue(),
|
||||
SearchEnum.FULL_TEXT_SEARCH_EN.getValue(),
|
||||
queryObject
|
||||
);
|
||||
}
|
||||
|
||||
List<SysDictItem> stateSysDictItems = this.sysDictItemServiceImpl.selectItemsByDictCode(DictCodeEnum.STATE.getValue());
|
||||
|
||||
List<Map<String, Object>> list = (List<Map<String, Object>>) (((Map) search.get("hits")).get("hits"));
|
||||
List<Map<String, Object>> mapList = new ArrayList<>();
|
||||
for (Map<String, Object> map : list) {
|
||||
Map<String, Object> mapSource = (Map<String, Object>) map.get("_source");
|
||||
Map<String, Object> mapHighlight = (Map<String, Object>) map.get("highlight");
|
||||
if(ObjectUtils.isNotEmpty(mapHighlight)){
|
||||
for (Map.Entry<String, Object> entry : mapHighlight.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
List<String> value = (List<String>) entry.getValue();
|
||||
String fieldConyent= "";
|
||||
for (String s : value) {
|
||||
fieldConyent += s;
|
||||
}
|
||||
mapSource.put(key,fieldConyent);
|
||||
}
|
||||
}
|
||||
String state = (String) mapSource.get("state");
|
||||
String state_dictText = "";
|
||||
for (SysDictItem dictItem : stateSysDictItems) {
|
||||
if (StringUtils.equals(dictItem.getItemValue(), state)) {
|
||||
if (StringUtils.equals(cut, LanguageEnum.CN.getValue())) {
|
||||
state_dictText = dictItem.getItemText();
|
||||
} else {
|
||||
state_dictText = dictItem.getEnName();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
mapSource.put("state_dictText", state_dictText);
|
||||
|
||||
String create_time_str = "";
|
||||
if(ObjectUtils.isNotEmpty(mapSource.get("create_time"))){
|
||||
create_time_str = DateUtils.formatTime((Long) mapSource.get("create_time"));
|
||||
}
|
||||
mapSource.put("create_time_str",create_time_str);
|
||||
// 处理中英文切换的时候 展示的标题
|
||||
if (StringUtils.equals(cut, LanguageEnum.EN.getValue())) {
|
||||
mapSource.put("title",mapSource.get("title_en"));
|
||||
}
|
||||
mapList.add(mapSource);
|
||||
}
|
||||
|
||||
//处理分页
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
page.setTotal(Long.parseLong(String.valueOf(((Map) search.get("hits")).get("total"))));
|
||||
page.setRecords(mapList);
|
||||
return page;
|
||||
}
|
||||
// @NotNull
|
||||
// private IPage getWdkPage(JSONArray queryMapJson,
|
||||
// Map<String,Object> highlightMap,
|
||||
// Integer pageNo,
|
||||
// Integer pageSize,
|
||||
// String cut,
|
||||
// JSONObject querySort,
|
||||
// JSONArray queryMustNot,
|
||||
// JSONArray queryShould) {
|
||||
// JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, queryShould);
|
||||
// JSONArray jsonArraySort = new JSONArray();
|
||||
// jsonArraySort.add(querySort);
|
||||
//
|
||||
// //1. 条件,分页
|
||||
// JSONObject queryObject = jeroElasticsearchTemplate.buildQuery(
|
||||
// null,
|
||||
// jsonObject,
|
||||
// highlightMap,
|
||||
// jsonArraySort,
|
||||
// pageNo - 1,
|
||||
// pageSize
|
||||
// );
|
||||
//
|
||||
// //2. 数据查询
|
||||
// JSONObject search = new JSONObject();
|
||||
// if (LanguageEnum.CN.getValue().equals(cut)) {
|
||||
// search = jeroElasticsearchTemplate.search(
|
||||
// SearchEnum.FULL_TEXT_SEARCH_CN.getValue(),
|
||||
// SearchEnum.FULL_TEXT_SEARCH_CN.getValue(),
|
||||
// queryObject
|
||||
// );
|
||||
// } else {
|
||||
// search = jeroElasticsearchTemplate.search(
|
||||
// SearchEnum.FULL_TEXT_SEARCH_EN.getValue(),
|
||||
// SearchEnum.FULL_TEXT_SEARCH_EN.getValue(),
|
||||
// queryObject
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// List<SysDictItem> stateSysDictItems = this.sysDictItemServiceImpl.selectItemsByDictCode(DictCodeEnum.STATE.getValue());
|
||||
//
|
||||
// List<Map<String, Object>> list = (List<Map<String, Object>>) (((Map) search.get("hits")).get("hits"));
|
||||
// List<Map<String, Object>> mapList = new ArrayList<>();
|
||||
// for (Map<String, Object> map : list) {
|
||||
// Map<String, Object> mapSource = (Map<String, Object>) map.get("_source");
|
||||
// Map<String, Object> mapHighlight = (Map<String, Object>) map.get("highlight");
|
||||
// if(ObjectUtils.isNotEmpty(mapHighlight)){
|
||||
// for (Map.Entry<String, Object> entry : mapHighlight.entrySet()) {
|
||||
// String key = entry.getKey();
|
||||
// List<String> value = (List<String>) entry.getValue();
|
||||
// String fieldConyent= "";
|
||||
// for (String s : value) {
|
||||
// fieldConyent += s;
|
||||
// }
|
||||
// mapSource.put(key,fieldConyent);
|
||||
// }
|
||||
// }
|
||||
// String state = (String) mapSource.get("state");
|
||||
// String state_dictText = "";
|
||||
// for (SysDictItem dictItem : stateSysDictItems) {
|
||||
// if (StringUtils.equals(dictItem.getItemValue(), state)) {
|
||||
// if (StringUtils.equals(cut, LanguageEnum.CN.getValue())) {
|
||||
// state_dictText = dictItem.getItemText();
|
||||
// } else {
|
||||
// state_dictText = dictItem.getEnName();
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// mapSource.put("state_dictText", state_dictText);
|
||||
//
|
||||
// String create_time_str = "";
|
||||
// if(ObjectUtils.isNotEmpty(mapSource.get("create_time"))){
|
||||
// create_time_str = DateUtils.formatTime((Long) mapSource.get("create_time"));
|
||||
// }
|
||||
// mapSource.put("create_time_str",create_time_str);
|
||||
// // 处理中英文切换的时候 展示的标题
|
||||
// if (StringUtils.equals(cut, LanguageEnum.EN.getValue())) {
|
||||
// mapSource.put("title",mapSource.get("title_en"));
|
||||
// }
|
||||
// mapList.add(mapSource);
|
||||
// }
|
||||
//
|
||||
// //处理分页
|
||||
// IPage page = new Page(pageNo, pageSize);
|
||||
// page.setTotal(Long.parseLong(String.valueOf(((Map) search.get("hits")).get("total"))));
|
||||
// page.setRecords(mapList);
|
||||
// return page;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 设置文档库高亮字段
|
||||
* @param mapHighlight
|
||||
* @param key
|
||||
*/
|
||||
private void wdkHighlight(Map<String, Object> mapHighlight, String key) {
|
||||
Map<String, Object> mapTemp = new HashMap<>();
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("<text class='highlight-class'>");
|
||||
List<String> list1 = new ArrayList<>();
|
||||
list1.add("</text>");
|
||||
mapTemp.put("pre_tags", list);
|
||||
mapTemp.put("post_tags", list1);
|
||||
mapTemp.put("fragment_size", 320);
|
||||
mapTemp.put("number_of_fragments", 1);
|
||||
mapTemp.put("type", "plain");
|
||||
mapHighlight.put(key, mapTemp);
|
||||
}
|
||||
|
||||
private void setQueryMapJson(JSONArray queryMapJson, String selectValue, String field) {
|
||||
// 前缀匹配 缺点是前缀一定不能断开
|
||||
// 情况举例:用户只记得前面那段字
|
||||
Map<String, Object> map21 = new HashMap<>();
|
||||
Map<String, Object> map31 = new HashMap<>();
|
||||
Map<String, Object> map41 = new HashMap<>();
|
||||
if ("title".equals(field)) {
|
||||
map31.put("boost", 10);
|
||||
} else if ("content".equals(field)) {
|
||||
map31.put("boost", 0.01);
|
||||
}
|
||||
map31.put("value", selectValue);
|
||||
map21.put(field + ".keyword", map31);
|
||||
map41.put("prefix", map21);
|
||||
queryMapJson.add(map41);
|
||||
|
||||
// match_phrase_prefix 词组匹配查询,允许最后词组与文中的任意分词前缀匹配
|
||||
Map<String, Object> map22 = new HashMap<>();
|
||||
Map<String, Object> map32 = new HashMap<>();
|
||||
Map<String, Object> map42 = new HashMap<>();
|
||||
if ("title".equals(field)) {
|
||||
map32.put("boost", 10);
|
||||
} else if ("content".equals(field)) {
|
||||
map32.put("boost", 0.01);
|
||||
}
|
||||
map32.put("query", selectValue);
|
||||
map22.put(field, map32);
|
||||
map42.put("match_phrase_prefix", map22);
|
||||
queryMapJson.add(map42);
|
||||
|
||||
// match分词匹配查询
|
||||
// 情况举例:用户可能他知道开头的前缀几个字,知道中间的几个字
|
||||
Map<String, Object> map23 = new HashMap<>();
|
||||
Map<String, Object> map33 = new HashMap<>();
|
||||
Map<String, Object> map43 = new HashMap<>();
|
||||
if ("title".equals(field)) {
|
||||
map33.put("boost", 10);
|
||||
} else if ("content".equals(field)) {
|
||||
map33.put("boost", 0.01);
|
||||
}
|
||||
map33.put("query", selectValue);
|
||||
map23.put(field, map33);
|
||||
map43.put("match", map23);
|
||||
queryMapJson.add(map43);
|
||||
|
||||
// wildcard模糊查询
|
||||
// 情况举例:用户只记得中间那段字
|
||||
Map<String, Object> map24 = new HashMap<>();
|
||||
Map<String, Object> map44 = new HashMap<>();
|
||||
map24.put(field, "*" + selectValue + "*");
|
||||
map44.put("wildcard", map24);
|
||||
queryMapJson.add(map44);
|
||||
}
|
||||
// private void wdkHighlight(Map<String, Object> mapHighlight, String key) {
|
||||
// Map<String, Object> mapTemp = new HashMap<>();
|
||||
// List<String> list = new ArrayList<>();
|
||||
// list.add("<text class='highlight-class'>");
|
||||
// List<String> list1 = new ArrayList<>();
|
||||
// list1.add("</text>");
|
||||
// mapTemp.put("pre_tags", list);
|
||||
// mapTemp.put("post_tags", list1);
|
||||
// mapTemp.put("fragment_size", 320);
|
||||
// mapTemp.put("number_of_fragments", 1);
|
||||
// mapTemp.put("type", "plain");
|
||||
// mapHighlight.put(key, mapTemp);
|
||||
// }
|
||||
//
|
||||
// private void setQueryMapJson(JSONArray queryMapJson, String selectValue, String field) {
|
||||
// // 前缀匹配 缺点是前缀一定不能断开
|
||||
// // 情况举例:用户只记得前面那段字
|
||||
// Map<String, Object> map21 = new HashMap<>();
|
||||
// Map<String, Object> map31 = new HashMap<>();
|
||||
// Map<String, Object> map41 = new HashMap<>();
|
||||
// if ("title".equals(field)) {
|
||||
// map31.put("boost", 10);
|
||||
// } else if ("content".equals(field)) {
|
||||
// map31.put("boost", 0.01);
|
||||
// }
|
||||
// map31.put("value", selectValue);
|
||||
// map21.put(field + ".keyword", map31);
|
||||
// map41.put("prefix", map21);
|
||||
// queryMapJson.add(map41);
|
||||
//
|
||||
// // match_phrase_prefix 词组匹配查询,允许最后词组与文中的任意分词前缀匹配
|
||||
// Map<String, Object> map22 = new HashMap<>();
|
||||
// Map<String, Object> map32 = new HashMap<>();
|
||||
// Map<String, Object> map42 = new HashMap<>();
|
||||
// if ("title".equals(field)) {
|
||||
// map32.put("boost", 10);
|
||||
// } else if ("content".equals(field)) {
|
||||
// map32.put("boost", 0.01);
|
||||
// }
|
||||
// map32.put("query", selectValue);
|
||||
// map22.put(field, map32);
|
||||
// map42.put("match_phrase_prefix", map22);
|
||||
// queryMapJson.add(map42);
|
||||
//
|
||||
// // match分词匹配查询
|
||||
// // 情况举例:用户可能他知道开头的前缀几个字,知道中间的几个字
|
||||
// Map<String, Object> map23 = new HashMap<>();
|
||||
// Map<String, Object> map33 = new HashMap<>();
|
||||
// Map<String, Object> map43 = new HashMap<>();
|
||||
// if ("title".equals(field)) {
|
||||
// map33.put("boost", 10);
|
||||
// } else if ("content".equals(field)) {
|
||||
// map33.put("boost", 0.01);
|
||||
// }
|
||||
// map33.put("query", selectValue);
|
||||
// map23.put(field, map33);
|
||||
// map43.put("match", map23);
|
||||
// queryMapJson.add(map43);
|
||||
//
|
||||
// // wildcard模糊查询
|
||||
// // 情况举例:用户只记得中间那段字
|
||||
// Map<String, Object> map24 = new HashMap<>();
|
||||
// Map<String, Object> map44 = new HashMap<>();
|
||||
// map24.put(field, "*" + selectValue + "*");
|
||||
// map44.put("wildcard", map24);
|
||||
// queryMapJson.add(map44);
|
||||
// }
|
||||
}
|
||||
|
||||
-34
@@ -8,7 +8,6 @@ import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.enums.LanguageEnum;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.modules.lanswitch.service.ILanguageSwitchService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||
@@ -49,9 +48,6 @@ public class FileSplitItemsEOController extends JeroController<SarFileSplitItems
|
||||
@Autowired
|
||||
private FileSplitItemsEOServiceImpl fileSplitItemsEOService;
|
||||
|
||||
@Autowired
|
||||
private ILanguageSwitchService languageSwitchService;
|
||||
|
||||
@Autowired
|
||||
private IOSSFileService ossFileService;
|
||||
|
||||
@@ -262,36 +258,6 @@ public class FileSplitItemsEOController extends JeroController<SarFileSplitItems
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "查询条件中英文切换")
|
||||
@ApiOperation(value="查询条件中英文切换", notes="查询条件中英文切换")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
@RequiresPermissions("split:sarFileSplitItems:page")
|
||||
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = languageSwitchService.queryCondition(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "表单中英文切换")
|
||||
@ApiOperation(value="表单中英文切换", notes="表单中英文切换")
|
||||
@GetMapping(value = "/getForm")
|
||||
@RequiresPermissions("split:sarFileSplitItems:page")
|
||||
public Result<List<Map<String, Object>>> getForm(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = languageSwitchService.getForm(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件上传统一方法
|
||||
*
|
||||
|
||||
+19
-19
@@ -10,7 +10,6 @@ import com.jero.common.constant.enums.LanguageEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.lanswitch.service.ILanguageSwitchService;
|
||||
import com.jero.modules.laws.common.constant.ResultCommon;
|
||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
@@ -55,8 +54,6 @@ public class SarFileSplitInfoController extends JeroController<SarFileSplitInfoE
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
|
||||
@Autowired
|
||||
private ILanguageSwitchService languageSwitchService;
|
||||
@Autowired
|
||||
private IOSSFileService ossFileService;
|
||||
|
||||
@@ -230,7 +227,7 @@ public class SarFileSplitInfoController extends JeroController<SarFileSplitInfoE
|
||||
}
|
||||
|
||||
/**
|
||||
* ocr识别调取已入库文件
|
||||
* 拆分调取已入库文件
|
||||
* @param parameter
|
||||
* @return
|
||||
*/
|
||||
@@ -240,7 +237,10 @@ public class SarFileSplitInfoController extends JeroController<SarFileSplitInfoE
|
||||
@ResponseBody
|
||||
// @RequiresPermissions("split:sarFileSplitInfo:splitResult")
|
||||
public Result<IPage<Map<String,Object>>> splitResultPageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage<Map<String,Object>> infoPage = bussDocumentLibraryEOService.ocrPageInfo(parameter);
|
||||
// IPage<Map<String,Object>> infoPage = bussDocumentLibraryEOService.ocrPageInfo(parameter);
|
||||
|
||||
// TODO 数据获取需要从企标和国标里拿,需要重写
|
||||
IPage<Map<String,Object>> infoPage = new Page<>();
|
||||
return Result.OK(infoPage);
|
||||
}
|
||||
|
||||
@@ -282,18 +282,18 @@ public class SarFileSplitInfoController extends JeroController<SarFileSplitInfoE
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "查询条件中英文切换")
|
||||
@ApiOperation(value="查询条件中英文切换", notes="查询条件中英文切换")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
// @RequiresPermissions("split:sarFileSplitInfo:page")
|
||||
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = languageSwitchService.queryCondition(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
// /**
|
||||
// * 查询条件中英文切换
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @AutoLog(value = "查询条件中英文切换")
|
||||
// @ApiOperation(value="查询条件中英文切换", notes="查询条件中英文切换")
|
||||
// @GetMapping(value = "/queryCondition")
|
||||
//// @RequiresPermissions("split:sarFileSplitInfo:page")
|
||||
// public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
// @RequestParam(name = "cut") String cut) {
|
||||
// List<Map<String, Object>> list = languageSwitchService.queryCondition(flag, cut);
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
}
|
||||
|
||||
+6
-17
@@ -536,22 +536,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
.filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList())))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
// List<String> fieldListTemp = fieldList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
|
||||
//sql查询字段
|
||||
// List<String> fieldListNew = new ArrayList<>();
|
||||
// fieldListNew.add("id"); // 加上主键
|
||||
// 处理数据为空的字段,如果字段值为空,显示斜杠
|
||||
// for (String field : fieldListTemp) {
|
||||
// String fieldTemp = null;
|
||||
// if(fieldDateList.contains(field)){
|
||||
// String fieldNew = "date_format(" + field + ", '%Y-%m-%d')"; // 转时间格式
|
||||
// fieldTemp = "case when " + fieldNew + " is null then \"\" else " + fieldNew + " end " + field;
|
||||
// fieldListNew.add(fieldTemp);
|
||||
// }else{
|
||||
// fieldTemp = "case when " + field + " is null then \"\" else " + field + " end " + field;
|
||||
// fieldListNew.add(fieldTemp);
|
||||
// }
|
||||
// }
|
||||
|
||||
//sql查询条件
|
||||
String condition = getConditionStr(parameter, "page");
|
||||
int pageNo = Integer.parseInt((String) parameter.get("pageNo"));
|
||||
@@ -608,7 +593,10 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
// 标准选择
|
||||
if(fieldStanList.contains(entry.getKey()) && StringUtils.isNotBlank((String)entry.getValue())) {
|
||||
if (entry.getValue().toString().split(",").length > 0) {
|
||||
List<Map<String, Object>> documentLibraryEOList = documentLibraryEOService.queryListByIds(entry.getValue().toString());
|
||||
// TODO 选取的库错误,需要改为国标库 企标库 。需修改
|
||||
// List<Map<String, Object>> documentLibraryEOList = documentLibraryEOService.queryListByIds(entry.getValue().toString());
|
||||
List<Map<String, Object>> documentLibraryEOList = new ArrayList<>();
|
||||
|
||||
Map<String, String> idSerialNumberMap = new HashMap<>();
|
||||
List<String> idList = new ArrayList<>();
|
||||
for (Map<String, Object> map : documentLibraryEOList) {
|
||||
@@ -722,6 +710,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
return result;
|
||||
}
|
||||
|
||||
// TODO 挪到FileSplitItemsEOServiceImpl中
|
||||
@NotNull
|
||||
private String getConditionStr(Map<String, Object> parameter, String type) {
|
||||
//查询条件
|
||||
|
||||
Reference in New Issue
Block a user