修改手机端PC端接口分离
This commit is contained in:
+161
@@ -0,0 +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删除")
|
||||
@DeleteMapping(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="我的收藏-批量删除")
|
||||
@DeleteMapping(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);
|
||||
}
|
||||
}
|
||||
+526
@@ -0,0 +1,526 @@
|
||||
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.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.entity.OSSFileForDocumentLibrary;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 文档库信息表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-01-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="文档库信息表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/document/bussDocumentLibraryEO")
|
||||
@Slf4j
|
||||
public class PhoneBussDocumentLibraryEOController extends JeroController<BussDocumentLibraryEO, 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 = "/replacePageInfo")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("document:getInfoById")
|
||||
public Result<?> replacePageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = bussDocumentLibraryEOService.replacePageInfo(parameter);
|
||||
// Result<IPage> ok = Result.OK(infoPage);
|
||||
// JSONObject jsonResult = JSONObject.fromObject(ok);
|
||||
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<?> ocrPageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage 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<?> transPageInfo(@RequestBody Map<String,Object> parameter) {
|
||||
IPage 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);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-通过id删除")
|
||||
@ApiOperation(value="文档库信息表-通过id删除", notes="文档库信息表-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
@RequiresPermissions("document:deleteBatch")
|
||||
public Result<?> 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<?> 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<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(id);
|
||||
if(bussDocumentLibraryEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(bussDocumentLibraryEO);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 列表查询条件 标识传 1-->用于查询文档库字段属性
|
||||
* @param flag
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-查询条件")
|
||||
@ApiOperation(value="文档库信息表-查询条件", notes="文档库信息表-查询条件")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public Result<List<Map<String,Object>>> queryCondition(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String,Object>> list = bussDocumentLibraryEOService.queryCondition(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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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<?> 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<?> 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<?> 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<?> 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<?> 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<?> 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<?> importZip(@RequestParam(value = "file", required = false) MultipartFile file,
|
||||
@RequestParam(value = "cut",required = false) String cut) throws Exception {
|
||||
try {
|
||||
bussDocumentLibraryEOService.importZip(file,cut);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK("导入成功");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "推送")
|
||||
@GetMapping(value = "/pullMessage")
|
||||
@RequiresPermissions("document:pullMessage")
|
||||
public Result<?> 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<?> 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<?> 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看已上传的文件
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="查看已上传的文件", notes="查看已上传的文件")
|
||||
@GetMapping(value = "/getFileInfos")
|
||||
@RequiresPermissions("document:queryPageInfo")
|
||||
public Result<?> 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<?> 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<?> getTitle() {
|
||||
int count = bussDocumentLibraryEOService.updateES();
|
||||
return Result.OK(count);
|
||||
}
|
||||
}
|
||||
+173
@@ -0,0 +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="文档库-分阶段实施详情表-编辑")
|
||||
@PutMapping(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删除")
|
||||
@DeleteMapping(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="文档库-分阶段实施详情表-批量删除")
|
||||
@DeleteMapping(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);
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -26,7 +26,7 @@ import com.jero.common.aspect.annotation.AutoLog;
|
||||
*/
|
||||
@Api(tags="最近浏览表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/recentBrowse")
|
||||
@RequestMapping("/phone/phone/recentBrowse")
|
||||
@Slf4j
|
||||
public class RecentBrowseController extends JeroController<RecentBrowse, IRecentBrowseService> {
|
||||
@Autowired
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import java.util.Map;
|
||||
|
||||
@Api(tags = "手机端-搜索中心")
|
||||
@RestController
|
||||
@RequestMapping("/phone/search")
|
||||
@RequestMapping("/phone/phone/search")
|
||||
public class SearchCenterController {
|
||||
|
||||
@Autowired
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import java.util.Map;
|
||||
|
||||
@Api(tags = "手机端-任务统计")
|
||||
@RestController
|
||||
@RequestMapping("/phone/taskStatistics")
|
||||
@RequestMapping("/phone/phone/taskStatistics")
|
||||
public class TaskStatisticsController {
|
||||
|
||||
@Autowired
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import java.util.Map;
|
||||
|
||||
@Api(tags = "手机端-待办中心")
|
||||
@RestController
|
||||
@RequestMapping("/phone/toDoCenter")
|
||||
@RequestMapping("/phone/phone/toDoCenter")
|
||||
public class ToDoCenterController {
|
||||
|
||||
@Autowired
|
||||
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
package com.jero.modules.problemKnowledgeBase.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.problemKnowledgeBase.entity.ProblemKnowledgeBaseBrowsingHistoryEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseBrowsingHistoryEOService;
|
||||
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: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库浏览历史表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/problemKnowledgeBase/problemKnowledgeBaseBrowsingHistoryEO")
|
||||
@Slf4j
|
||||
public class PhoneProblemKnowledgeBaseBrowsingHistoryEOController extends JeroController<ProblemKnowledgeBaseBrowsingHistoryEO, IProblemKnowledgeBaseBrowsingHistoryEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseBrowsingHistoryEOService problemKnowledgeBaseBrowsingHistoryEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库浏览历史表-分页列表查询", notes="问题知识库浏览历史表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseBrowsingHistoryEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseBrowsingHistoryEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseBrowsingHistoryEO> page = new Page<ProblemKnowledgeBaseBrowsingHistoryEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseBrowsingHistoryEO> pageList = problemKnowledgeBaseBrowsingHistoryEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-列表查询")
|
||||
@ApiOperation(value="问题知识库浏览历史表-列表查询", notes="问题知识库浏览历史表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseBrowsingHistoryEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseBrowsingHistoryEO> list = problemKnowledgeBaseBrowsingHistoryEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-添加")
|
||||
@ApiOperation(value="问题知识库浏览历史表-添加", notes="问题知识库浏览历史表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO) {
|
||||
problemKnowledgeBaseBrowsingHistoryEOService.add(problemKnowledgeBaseBrowsingHistoryEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-编辑")
|
||||
@ApiOperation(value="问题知识库浏览历史表-编辑", notes="问题知识库浏览历史表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO) {
|
||||
problemKnowledgeBaseBrowsingHistoryEOService.editById(problemKnowledgeBaseBrowsingHistoryEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-通过id删除")
|
||||
@ApiOperation(value="问题知识库浏览历史表-通过id删除", notes="问题知识库浏览历史表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseBrowsingHistoryEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-批量删除")
|
||||
@ApiOperation(value="问题知识库浏览历史表-批量删除", notes="问题知识库浏览历史表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseBrowsingHistoryEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库浏览历史表-通过id查询")
|
||||
@ApiOperation(value="问题知识库浏览历史表-通过id查询", notes="问题知识库浏览历史表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO = problemKnowledgeBaseBrowsingHistoryEOService.queryById(id);
|
||||
if(problemKnowledgeBaseBrowsingHistoryEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseBrowsingHistoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseBrowsingHistoryEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseBrowsingHistoryEO problemKnowledgeBaseBrowsingHistoryEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseBrowsingHistoryEO, ProblemKnowledgeBaseBrowsingHistoryEO.class, "问题知识库浏览历史表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseBrowsingHistoryEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+210
@@ -0,0 +1,210 @@
|
||||
package com.jero.modules.problemKnowledgeBase.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.common.system.vo.LoginUser;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCollectEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.CollectStatusEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseCollectEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库收藏表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库收藏表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/problemKnowledgeBase/problemKnowledgeBaseCollectEO")
|
||||
@Slf4j
|
||||
public class PhoneProblemKnowledgeBaseCollectEOController extends JeroController<ProblemKnowledgeBaseCollectEO, IProblemKnowledgeBaseCollectEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseCollectEOService problemKnowledgeBaseCollectEOService;
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseEOService problemKnowledgeBaseEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库收藏表-分页列表查询", notes="问题知识库收藏表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseCollectEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseCollectEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBaseCollectEO> page = new Page<ProblemKnowledgeBaseCollectEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseCollectEO> pageList = problemKnowledgeBaseCollectEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-列表查询")
|
||||
@ApiOperation(value="问题知识库收藏表-列表查询", notes="问题知识库收藏表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseCollectEO>> queryList() {
|
||||
List<ProblemKnowledgeBaseCollectEO> list = problemKnowledgeBaseCollectEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-添加")
|
||||
@ApiOperation(value="问题知识库收藏表-添加", notes="问题知识库收藏表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO) {
|
||||
problemKnowledgeBaseCollectEOService.add(problemKnowledgeBaseCollectEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-编辑")
|
||||
@ApiOperation(value="问题知识库收藏表-编辑", notes="问题知识库收藏表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO) {
|
||||
problemKnowledgeBaseCollectEOService.editById(problemKnowledgeBaseCollectEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-通过id删除")
|
||||
@ApiOperation(value="问题知识库收藏表-通过id删除", notes="问题知识库收藏表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseCollectEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-批量删除")
|
||||
@ApiOperation(value="问题知识库收藏表-批量删除", notes="问题知识库收藏表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseCollectEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库收藏表-通过id查询")
|
||||
@ApiOperation(value="问题知识库收藏表-通过id查询", notes="问题知识库收藏表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO = problemKnowledgeBaseCollectEOService.queryById(id);
|
||||
if(problemKnowledgeBaseCollectEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseCollectEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseCollectEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseCollectEO problemKnowledgeBaseCollectEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseCollectEO, ProblemKnowledgeBaseCollectEO.class, "问题知识库收藏表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseCollectEO.class);
|
||||
}
|
||||
|
||||
@AutoLog(value = "我的收藏-分页列表查询-问题知识库")
|
||||
@ApiOperation(value="我的收藏-分页列表查询-问题知识库", notes="我的收藏-分页列表查询-问题知识库")
|
||||
@GetMapping(value = "/queryCollectPageList")
|
||||
public Result<?> queryCollectPageList(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
this.problemKnowledgeBaseEOService.createQueryPermission(queryWrapper,problemKnowledgeBaseEO);
|
||||
Page<ProblemKnowledgeBaseEO> page = new Page<ProblemKnowledgeBaseEO>(pageNo, pageSize);
|
||||
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
QueryWrapper<ProblemKnowledgeBaseCollectEO> collectEOQueryWrapper = new QueryWrapper<>();
|
||||
collectEOQueryWrapper.lambda().eq(ProblemKnowledgeBaseCollectEO::getCollectUserId,currentUser.getId());
|
||||
collectEOQueryWrapper.lambda().eq(ProblemKnowledgeBaseCollectEO::getCollectStatus, CollectStatusEnum.COLLECT.getValue());
|
||||
List<ProblemKnowledgeBaseCollectEO> collectEOList = this.problemKnowledgeBaseCollectEOService.list(collectEOQueryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(collectEOList)){
|
||||
List<String> problemKnowledgeBaseIdList = collectEOList.stream().map(ProblemKnowledgeBaseCollectEO::getProblemKnowledgeBaseId).distinct().collect(Collectors.toList());
|
||||
|
||||
queryWrapper.lambda().in(ProblemKnowledgeBaseEO::getId,problemKnowledgeBaseIdList);
|
||||
IPage<ProblemKnowledgeBaseEO> pageList = this.problemKnowledgeBaseEOService.page(page, queryWrapper);
|
||||
this.problemKnowledgeBaseEOService.disposeData(pageList.getRecords(),problemKnowledgeBaseEO.getCut());
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
return Result.OK();
|
||||
}
|
||||
}
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
package com.jero.modules.problemKnowledgeBase.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.problemKnowledgeBase.entity.ProblemKnowledgeBaseCommentEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseCommentEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.vo.ProblemKnowledgeBaseCommentVO;
|
||||
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: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库评论表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/problemKnowledgeBase/problemKnowledgeBaseCommentEO")
|
||||
@Slf4j
|
||||
public class PhoneProblemKnowledgeBaseCommentEOController extends JeroController<ProblemKnowledgeBaseCommentEO, IProblemKnowledgeBaseCommentEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseCommentEOService problemKnowledgeBaseCommentEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库评论表-分页列表查询", notes="问题知识库评论表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBaseCommentEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseCommentEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<ProblemKnowledgeBaseCommentEO> page = new Page<ProblemKnowledgeBaseCommentEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseCommentEO> pageList = problemKnowledgeBaseCommentEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-列表查询")
|
||||
@ApiOperation(value="问题知识库评论表-列表查询", notes="问题知识库评论表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseCommentVO>> queryList(ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO, HttpServletRequest req) {
|
||||
List<ProblemKnowledgeBaseCommentVO> list = this.problemKnowledgeBaseCommentEOService.getInfoList(problemKnowledgeBaseCommentEO,req);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-添加")
|
||||
@ApiOperation(value="问题知识库评论表-添加", notes="问题知识库评论表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO) {
|
||||
problemKnowledgeBaseCommentEOService.add(problemKnowledgeBaseCommentEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-编辑")
|
||||
@ApiOperation(value="问题知识库评论表-编辑", notes="问题知识库评论表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO) {
|
||||
problemKnowledgeBaseCommentEOService.editById(problemKnowledgeBaseCommentEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-通过id删除")
|
||||
@ApiOperation(value="问题知识库评论表-通过id删除", notes="问题知识库评论表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseCommentEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-批量删除")
|
||||
@ApiOperation(value="问题知识库评论表-批量删除", notes="问题知识库评论表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseCommentEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库评论表-通过id查询")
|
||||
@ApiOperation(value="问题知识库评论表-通过id查询", notes="问题知识库评论表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO = problemKnowledgeBaseCommentEOService.queryById(id);
|
||||
if(problemKnowledgeBaseCommentEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseCommentEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseCommentEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseCommentEO problemKnowledgeBaseCommentEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseCommentEO, ProblemKnowledgeBaseCommentEO.class, "问题知识库评论表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseCommentEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
package com.jero.modules.problemKnowledgeBase.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseEOService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
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: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/problemKnowledgeBase/problemKnowledgeBaseEO")
|
||||
@Slf4j
|
||||
public class PhoneProblemKnowledgeBaseEOController extends JeroController<ProblemKnowledgeBaseEO, IProblemKnowledgeBaseEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseEOService problemKnowledgeBaseEOService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库表-分页列表查询", notes="问题知识库表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
boolean administrator = this.sysUserService.isAdministrator();
|
||||
//如果当前登录人是超级管理员角色,进入到管理发布页面时,查询所有的数据,其它用户只能查询自己创建的数据。
|
||||
if(administrator){
|
||||
problemKnowledgeBaseEO.setCreateBy(null);
|
||||
}
|
||||
QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBaseEO, req.getParameterMap());
|
||||
this.problemKnowledgeBaseEOService.createQueryPermission(queryWrapper,problemKnowledgeBaseEO);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<ProblemKnowledgeBaseEO> page = new Page<ProblemKnowledgeBaseEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseEO> pageList = problemKnowledgeBaseEOService.page(page, queryWrapper);
|
||||
this.problemKnowledgeBaseEOService.disposeData(pageList.getRecords(),problemKnowledgeBaseEO.getCut());
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-列表查询")
|
||||
@ApiOperation(value="问题知识库表-列表查询", notes="问题知识库表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBaseEO>> queryList(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,
|
||||
HttpServletRequest req) {
|
||||
List<ProblemKnowledgeBaseEO> list = problemKnowledgeBaseEOService.queryList(problemKnowledgeBaseEO,req);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-添加")
|
||||
@ApiOperation(value="问题知识库表-添加", notes="问题知识库表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
problemKnowledgeBaseEOService.add(problemKnowledgeBaseEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBaseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-编辑")
|
||||
@ApiOperation(value="问题知识库表-编辑", notes="问题知识库表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
problemKnowledgeBaseEOService.editById(problemKnowledgeBaseEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-通过id删除")
|
||||
@ApiOperation(value="问题知识库表-通过id删除", notes="问题知识库表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-批量删除")
|
||||
@ApiOperation(value="问题知识库表-批量删除", notes="问题知识库表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库表-通过id查询")
|
||||
@ApiOperation(value="问题知识库表-通过id查询", notes="问题知识库表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
ProblemKnowledgeBaseEO problemKnowledgeBaseEO = problemKnowledgeBaseEOService.queryById(id,cut);
|
||||
if(problemKnowledgeBaseEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBaseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBaseEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
return super.exportXls(request, problemKnowledgeBaseEO, ProblemKnowledgeBaseEO.class, "问题知识库表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBaseEO.class);
|
||||
}
|
||||
|
||||
@AutoLog(value = "问题知识库表-转发")
|
||||
@ApiOperation(value="问题知识库表-转发", notes="问题知识库表-转发")
|
||||
@PostMapping(value = "/forward")
|
||||
public Result<?> forward(@RequestBody JSONObject json) {
|
||||
return this.problemKnowledgeBaseEOService.forward(json);
|
||||
}
|
||||
|
||||
}
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
package com.jero.modules.problemKnowledgeBase.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.problemKnowledgeBase.entity.ProblemKnowledgeBasePraiseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBasePraiseEOService;
|
||||
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: 2022-08-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问题知识库点赞表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/problemKnowledgeBase/problemKnowledgeBasePraiseEO")
|
||||
@Slf4j
|
||||
public class PhoneProblemKnowledgeBasePraiseEOController extends JeroController<ProblemKnowledgeBasePraiseEO, IProblemKnowledgeBasePraiseEOService> {
|
||||
@Autowired
|
||||
private IProblemKnowledgeBasePraiseEOService problemKnowledgeBasePraiseEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-分页列表查询")
|
||||
@ApiOperation(value="问题知识库点赞表-分页列表查询", notes="问题知识库点赞表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProblemKnowledgeBasePraiseEO> queryWrapper = QueryGenerator.initQueryWrapper(problemKnowledgeBasePraiseEO, req.getParameterMap());
|
||||
Page<ProblemKnowledgeBasePraiseEO> page = new Page<ProblemKnowledgeBasePraiseEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBasePraiseEO> pageList = problemKnowledgeBasePraiseEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-列表查询")
|
||||
@ApiOperation(value="问题知识库点赞表-列表查询", notes="问题知识库点赞表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProblemKnowledgeBasePraiseEO>> queryList() {
|
||||
List<ProblemKnowledgeBasePraiseEO> list = problemKnowledgeBasePraiseEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-添加")
|
||||
@ApiOperation(value="问题知识库点赞表-添加", notes="问题知识库点赞表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO) {
|
||||
problemKnowledgeBasePraiseEOService.add(problemKnowledgeBasePraiseEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-编辑")
|
||||
@ApiOperation(value="问题知识库点赞表-编辑", notes="问题知识库点赞表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO) {
|
||||
problemKnowledgeBasePraiseEOService.editById(problemKnowledgeBasePraiseEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-通过id删除")
|
||||
@ApiOperation(value="问题知识库点赞表-通过id删除", notes="问题知识库点赞表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBasePraiseEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-批量删除")
|
||||
@ApiOperation(value="问题知识库点赞表-批量删除", notes="问题知识库点赞表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBasePraiseEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问题知识库点赞表-通过id查询")
|
||||
@ApiOperation(value="问题知识库点赞表-通过id查询", notes="问题知识库点赞表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO = problemKnowledgeBasePraiseEOService.queryById(id);
|
||||
if(problemKnowledgeBasePraiseEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(problemKnowledgeBasePraiseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param problemKnowledgeBasePraiseEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProblemKnowledgeBasePraiseEO problemKnowledgeBasePraiseEO) {
|
||||
return super.exportXls(request, problemKnowledgeBasePraiseEO, ProblemKnowledgeBasePraiseEO.class, "问题知识库点赞表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProblemKnowledgeBasePraiseEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+564
@@ -0,0 +1,564 @@
|
||||
package com.jero.modules.project.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.itextpdf.text.DocumentException;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
||||
import com.jero.modules.dummy.service.IDummyInventoryBaseEOService;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||
import com.jero.modules.project.vo.ProjectTaskUrgVo;
|
||||
import com.jero.modules.system.entity.SysRole;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 项目库-法规清单表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-04-14
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="项目库-法规清单表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/project/projectLawsInventoryEO")
|
||||
@Slf4j
|
||||
public class PhoneProjectLawsInventoryEOController extends JeroController<ProjectLawsInventoryEO, IProjectLawsInventoryEOService> {
|
||||
@Autowired
|
||||
private IProjectLawsInventoryEOService projectLawsInventoryEOService;
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private IDummyInventoryBaseEOService dummyInventoryBaseEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param projectLawsInventoryEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-分页列表查询")
|
||||
@ApiOperation(value="项目库-法规清单表-分页列表查询", notes="项目库-法规清单表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProjectLawsInventoryEO projectLawsInventoryEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
IPage<ProjectLawsInventoryEO> pageList = this.projectLawsInventoryEOService.queryPage(projectLawsInventoryEO,pageNo,pageSize,req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-列表查询")
|
||||
@ApiOperation(value="项目库-法规清单表-列表查询", notes="项目库-法规清单表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
@RequiresPermissions("projectLawsInventory:list")
|
||||
public Result<List<ProjectLawsInventoryEO>> queryList(ProjectLawsInventoryEO projectLawsInventoryEO,HttpServletRequest req) {
|
||||
List<ProjectLawsInventoryEO> list = projectLawsInventoryEOService.queryList(projectLawsInventoryEO,req);
|
||||
return Result.OK(projectLawsInventoryEO.getCut(),list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param projectLawsInventoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-添加")
|
||||
@ApiOperation(value="项目库-法规清单表-添加", notes="项目库-法规清单表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
projectLawsInventoryEOService.add(projectLawsInventoryEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param projectLawsInventoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-编辑")
|
||||
@ApiOperation(value="项目库-法规清单表-编辑", notes="项目库-法规清单表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
projectLawsInventoryEOService.editById(projectLawsInventoryEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-通过id删除")
|
||||
@ApiOperation(value="项目库-法规清单表-通过id删除", notes="项目库-法规清单表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="projectLibraryId",required=true) String projectLibraryId,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
projectLawsInventoryEOService.deleteById(id,projectLibraryId,cut);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-批量删除")
|
||||
@ApiOperation(value="项目库-法规清单表-批量删除", notes="项目库-法规清单表-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestBody JSONObject json) {
|
||||
String ids = json.getString("ids");
|
||||
String projectLibraryId = json.getString("projectLibraryId");
|
||||
String cut = json.getString("cut");
|
||||
this.projectLawsInventoryEOService.deleteByIds(Arrays.asList(ids.split(",")),projectLibraryId,cut);
|
||||
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) {
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryEOService.queryById(id);
|
||||
if(projectLawsInventoryEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(projectLawsInventoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param projectLawsInventoryEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
return super.exportXls(request, projectLawsInventoryEO, ProjectLawsInventoryEO.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, ProjectLawsInventoryEO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新法规清单状态
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-批量更新状态")
|
||||
@ApiOperation(value="项目库-法规清单表-批量更新状态", notes="项目库-法规清单表-批量更新状态")
|
||||
@PostMapping(value = "/updateStatusBatch")
|
||||
public Result<?> updateStatusBatch(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.updateStatusBatch(json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 匹配相关人员
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-匹配相关人员")
|
||||
@ApiOperation(value="项目库-法规清单表-匹配相关人员", notes="项目库-法规清单表-匹配相关人员")
|
||||
@PostMapping(value = "/matchRelevantPeople")
|
||||
public Result<?> matchRelevantPeople(@RequestBody Map<String,Object> params){
|
||||
return this.projectLawsInventoryEOService.matchRelevantPeople(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程调用接口
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-流程调用")
|
||||
@ApiOperation(value="项目库-法规清单表-流程调用", notes="项目库-法规清单表-流程调用")
|
||||
@PostMapping(value = "/processCall")
|
||||
public Result<?> processCall(@RequestBody JSONObject jsonObject){
|
||||
return this.projectLawsInventoryEOService.processCall(jsonObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-通过id与操作类型查询")
|
||||
@ApiOperation(value="项目库-法规清单表-通过id与操作类型查询", notes="项目库-法规清单表-通过id与操作类型查询")
|
||||
@GetMapping(value = "/queryProjectLawsInventoryInfoById")
|
||||
public Result<?> queryProjectLawsInventoryInfoById(@RequestParam Map<String,Object> params) {
|
||||
List<ProjectLawsInventoryEO> result = projectLawsInventoryEOService.queryProjectLawsInventoryInfoById(params);
|
||||
return Result.OK((String) params.get("cut"),result);
|
||||
}
|
||||
|
||||
@AutoLog(value = "法规清单添加调用文档库数据--分页")
|
||||
@ApiOperation(value="法规清单添加调用文档库数据--分页", notes="法规清单添加调用文档库数据--分页")
|
||||
@PostMapping(value = "/queryPageInfoBussDocument")
|
||||
public Result<?> queryPageInfo(@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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "复制")
|
||||
@ApiOperation(value="复制", notes="复制")
|
||||
@GetMapping(value = "/copyInfoByIds")
|
||||
public Result<?> copyInfoByIds(@RequestParam(name="ids",required=true) String ids,
|
||||
@RequestParam(name="cut",required=true) String cut,
|
||||
@RequestParam(name="operateType",required=true) String operateType) {
|
||||
try {
|
||||
projectLawsInventoryEOService.copyInfoByIds(ids,operateType);
|
||||
} catch (Exception e) {
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
return Result.error("复制失败");
|
||||
}else{
|
||||
return Result.error("Copy the failure");
|
||||
}
|
||||
}
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
return Result.OK("复制成功");
|
||||
}else{
|
||||
return Result.OK("Copy success");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量设置
|
||||
*
|
||||
* @param projectLawsInventoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "批量设置")
|
||||
@ApiOperation(value="批量设置", notes="批量设置")
|
||||
@PostMapping(value = "/setBatch")
|
||||
public Result<?> setBatch(@RequestBody ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
String cut = projectLawsInventoryEO.getCut();
|
||||
try {
|
||||
projectLawsInventoryEOService.setBatch(projectLawsInventoryEO);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("批量设置失败:" + e.getMessage());
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
return Result.error("批量设置失败!");
|
||||
}else{
|
||||
return Result.error("Batch set success");
|
||||
}
|
||||
}
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
return Result.OK("批量设置成功");
|
||||
}else{
|
||||
return Result.OK("Batch set success");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 调取虚拟清单数据
|
||||
*
|
||||
* @param dummyInventoryBaseEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "调取虚拟清单数据")
|
||||
@ApiOperation(value="调取虚拟清单数据", notes="调取虚拟清单数据")
|
||||
@PostMapping(value = "/getPageInfoDummy")
|
||||
public Result<?> getPageInfoDummy(@RequestBody DummyInventoryBaseEO dummyInventoryBaseEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
// dummyInventoryBaseEO.setName("*发*");
|
||||
QueryWrapper<DummyInventoryBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(dummyInventoryBaseEO, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<DummyInventoryBaseEO> page = new Page<DummyInventoryBaseEO>(pageNo, pageSize);
|
||||
IPage<DummyInventoryBaseEO> pageList = dummyInventoryBaseEOService.getPageInfoDummy(page,queryWrapper);
|
||||
return Result.OK(dummyInventoryBaseEO.getCut(),pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "模板下载")
|
||||
@GetMapping(value = "/exportTemplate")
|
||||
public void exportTemplate(ProjectLawsInventoryEO projectLawsInventoryEO, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
projectLawsInventoryEOService.exportTemplate(projectLawsInventoryEO,response,request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
* @param request
|
||||
* @param projectLawsInventoryEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportData")
|
||||
@RequiresPermissions("projectLawsInventory:exportData")
|
||||
public void exportData(HttpServletResponse response,
|
||||
HttpServletRequest request,
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
projectLawsInventoryEOService.exportData(response,request, projectLawsInventoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
*
|
||||
* @param file
|
||||
* @param projectLawsInventoryEO
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importData", method = RequestMethod.POST)
|
||||
public Result<?> importData(@RequestParam(value = "file", required = false) MultipartFile file,
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
projectLawsInventoryEOService.importData(file,projectLawsInventoryEO);
|
||||
return Result.OK("导入成功");
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "变更")
|
||||
@ApiOperation(value="变更", notes="变更")
|
||||
@PostMapping(value = "/change")
|
||||
public Result<?> change(@RequestBody JSONObject params) {
|
||||
return this.projectLawsInventoryEOService.change(params);
|
||||
}
|
||||
|
||||
@AutoLog(value = "下载pdf报告")
|
||||
@ApiOperation(value="下载pdf报告", notes="下载pdf报告")
|
||||
@GetMapping(value = "/downloadReport")
|
||||
public void downloadReport(@RequestParam Map<String,Object> params, HttpServletRequest req, HttpServletResponse resp) throws DocumentException {
|
||||
this.projectLawsInventoryEOService.downloadReport(params,req,resp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询条件 标识传 1-->用于查询文档库字段属
|
||||
* 法规清单添加调取文档库时高级搜索条件
|
||||
* @param flag
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规清单添加调取文档库时高级搜索条件")
|
||||
@ApiOperation(value="法规清单添加调取文档库时高级搜索条件", notes="法规清单添加调取文档库时高级搜索条件")
|
||||
@GetMapping(value = "/queryConditionInventory")
|
||||
public Result<List<Map<String,Object>>> queryConditionInventory(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<Map<String,Object>> list = bussDocumentLibraryEOService.queryConditionInventory(flag,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="法规清单中添加调用文档库数据--分页", notes="法规清单中添加调用文档库数据--分页")
|
||||
@PostMapping(value = "/queryPageDummy")
|
||||
@ResponseBody
|
||||
public net.sf.json.JSONObject queryPageDummy(@RequestBody Map<String,Object> parameter) {
|
||||
IPage infoPage = bussDocumentLibraryEOService.getPageDummy(parameter);
|
||||
Result<IPage> ok = Result.OK(infoPage);
|
||||
net.sf.json.JSONObject jsonResult = net.sf.json.JSONObject.fromObject(ok);
|
||||
return jsonResult;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param params
|
||||
* cut:中英文标识
|
||||
* id:法规清单id
|
||||
* @param req
|
||||
* @param resp
|
||||
* @throws DocumentException
|
||||
*/
|
||||
@AutoLog(value = "下载docx报告")
|
||||
@ApiOperation(value="下载docx报告", notes="下载docx报告")
|
||||
@GetMapping(value = "/downloadDocxReport")
|
||||
public void downloadDocxReport(@RequestParam Map<String,Object> params, HttpServletRequest req, HttpServletResponse resp) throws DocumentException {
|
||||
this.projectLawsInventoryEOService.downloadDocxReport(params,req,resp);
|
||||
}
|
||||
|
||||
@AutoLog(value = "催办")
|
||||
@ApiOperation(value="催办", notes="催办")
|
||||
@PostMapping(value = "/expediting")
|
||||
public Result<?> expediting(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.expediting(json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前登录用户角色
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "当前登录用户角色")
|
||||
@RequestMapping(value = "/getRoleByUserId", method = RequestMethod.GET)
|
||||
public Result<List<SysRole>> getRoleByUserId(String projectLibraryId,String cut) {
|
||||
Result<List<SysRole>> result = new Result<>();
|
||||
List<SysRole> list = projectLawsInventoryEOService.getRoleByUserId(projectLibraryId,cut);
|
||||
if(list==null||list.size()<=0) {
|
||||
result.error500("未找到角色信息");
|
||||
}else {
|
||||
result.setResult(list);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "任务清单催办")
|
||||
@ApiOperation(value="任务清单催办", notes="任务清单催办")
|
||||
@PostMapping(value = "/taskUrg")
|
||||
public Result<?> taskUrg(@RequestBody ProjectTaskUrgVo projectTaskUrgVo) {
|
||||
return this.projectLawsInventoryEOService.taskUrg(projectTaskUrgVo);
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "项目库-法规清单表-根据项目库id更新符合性流程发起人、责任人接口")
|
||||
@ApiOperation(value="项目库-法规清单表-根据项目库id更新符合性流程发起人、责任人接口", notes="项目库-法规清单表-根据项目库id更新符合性流程发起人、责任人接口")
|
||||
@GetMapping(value = "/updateFlowInfoByProjectLibraryIds")
|
||||
public Result<?> updateFlowInfoByProjectLibraryIds(@RequestParam("projectLibraryIds") String projectLibraryIds){
|
||||
return this.projectLawsInventoryEOService.updateFlowInfoByProjectLibraryIds(projectLibraryIds);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-法规清单表-studio发布")
|
||||
@ApiOperation(value="项目库-法规清单表-studio发布", notes="项目库-法规清单表-studio发布")
|
||||
@PostMapping(value = "/studioPublish")
|
||||
public Result<?> studioPublish(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.studioPublish(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-法规清单表-studio撤回")
|
||||
@ApiOperation(value="项目库-法规清单表-studio撤回", notes="项目库-法规清单表-studio撤回")
|
||||
@PostMapping(value = "/studioWithdrew")
|
||||
public Result<?> studioWithdrew(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.studioWithdrew(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-法规清单表-法规工程师退回")
|
||||
@ApiOperation(value="项目库-法规清单表-法规工程师退回", notes="项目库-法规清单表-法规工程师退回")
|
||||
@PostMapping(value = "/regulationOwnerReturned")
|
||||
public Result<?> regulationOwnerReturned(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.regulationOwnerReturned(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "流程重置-迁移法规清单流程历史数据专用")
|
||||
@ApiOperation(value="流程重置-迁移法规清单流程历史数据专用", notes="流程重置-迁移法规清单流程历史数据专用")
|
||||
@PostMapping(value = "/resetFlowTemp")
|
||||
public Result<?> resetFlowTemp(@RequestBody JSONObject params) {
|
||||
return this.projectLawsInventoryEOService.resetFlowTemp(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新法规清单状态
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-批量更新流程状态")
|
||||
@ApiOperation(value="项目库-法规清单表-批量更新流程状态", notes="项目库-法规清单表-批量更新流程状态")
|
||||
@PostMapping(value = "/updateFlowStatusBatch")
|
||||
public Result<?> updateFlowStatusBatch(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.updateFlowStatusBatch(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-法规清单表-引用交付物")
|
||||
@ApiOperation(value="项目库-法规清单表-引用交付物", notes="项目库-法规清单表-引用交付物")
|
||||
@PostMapping(value = "/citeDeliverable")
|
||||
public Result<?> citeDeliverable(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.citeDeliverable(json);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-法规清单表-强制转办")
|
||||
@ApiOperation(value="项目库-法规清单表-强制转办", notes="项目库-法规清单表-强制转办")
|
||||
@PostMapping(value = "/compulsoryTransfer")
|
||||
public Result<?> compulsoryTransfer(@RequestBody JSONObject json) {
|
||||
return this.projectLawsInventoryEOService.compulsoryTransfer(json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过projectId查询责任人
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-通过projectId查询责任人")
|
||||
@ApiOperation(value="项目库-法规清单表-通过projectId查询责任人", notes="项目库-法规清单表-通过projectId查询责任人")
|
||||
@GetMapping(value = "/queryDutyPersonByProjectId")
|
||||
public Result<?> queryDutyPersonByProjectId(@RequestParam Map<String,Object> params){
|
||||
Map<String, List<Map<String, Object>>> res = this.projectLawsInventoryEOService.queryDutyPersonByProjectId(params);
|
||||
return Result.OK(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询不符合项列表
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-查询不符合项列表")
|
||||
@ApiOperation(value="项目库-法规清单表-查询不符合项列表", notes="项目库-法规清单表-查询不符合项列表")
|
||||
@GetMapping(value = "/queryNotComplianList")
|
||||
public Result<?> queryNotComplianList(@RequestParam Map<String,Object> params) {
|
||||
List<Map<String,Object>> result = this.projectLawsInventoryEOService.queryNotComplianList(params);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出不符合项列表
|
||||
* @param request
|
||||
* @param params
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-导出不符合项列表")
|
||||
@ApiOperation(value="项目库-法规清单表-导出不符合项列表", notes="项目库-法规清单表-导出不符合项列表")
|
||||
@RequestMapping(value = "/exportNotComplianList")
|
||||
public void exportNotComplianList(HttpServletResponse response,
|
||||
HttpServletRequest request,
|
||||
@RequestParam Map<String,Object> params) {
|
||||
this.projectLawsInventoryEOService.exportNotComplianList(response,request, params);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-法规清单表-定版校验")
|
||||
@ApiOperation(value="项目库-法规清单表-定版校验", notes="项目库-法规清单表-定版校验")
|
||||
@GetMapping(value = "/finalizationVerify")
|
||||
public Result<?> finalizationVerify(@RequestParam Map<String,Object> params){
|
||||
return this.projectLawsInventoryEOService.finalizationVerify(params);
|
||||
}
|
||||
}
|
||||
+285
@@ -0,0 +1,285 @@
|
||||
package com.jero.modules.project.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
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.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.service.IProjectLibraryBaseService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.text.ParseException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 项目库基础表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="项目库基础表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/project/projectLibraryBase")
|
||||
@Slf4j
|
||||
public class PhoneProjectLibraryBaseController extends JeroController<ProjectLibraryBase, IProjectLibraryBaseService> {
|
||||
@Autowired
|
||||
private IProjectLibraryBaseService projectLibraryBaseService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库基础表-分页列表查询")
|
||||
@ApiOperation(value="项目库基础表-分页列表查询", notes="项目库基础表-分页列表查询")
|
||||
@PostMapping(value = "/page")
|
||||
public Result<?> queryPageList(@RequestBody Map<String,Object> params) {
|
||||
List<ProjectLibraryBase> pageList= projectLibraryBaseService.queryPageList(params);
|
||||
Page pages = projectLibraryBaseService.getPages(Integer.parseInt(params.get("pageNo").toString()), Integer.parseInt(params.get("pageSize").toString()), pageList);
|
||||
return Result.OK(params.get("cut").toString(),pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库基础表-列表查询")
|
||||
@ApiOperation(value="项目库基础表-列表查询", notes="项目库基础表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProjectLibraryBase>> queryList(ProjectLibraryBase projectLibraryBase) {
|
||||
List<ProjectLibraryBase> list = projectLibraryBaseService.getList(projectLibraryBase);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param projectLibraryBase
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库基础表-添加")
|
||||
@ApiOperation(value="项目库基础表-添加", notes="项目库基础表-添加")
|
||||
@RequiresPermissions("projectLibraryBase:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProjectLibraryBase projectLibraryBase) throws ParseException {
|
||||
projectLibraryBaseService.add(projectLibraryBase);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
/**
|
||||
* 项目扩展(添加子项目子项目基本信息、相关人员名单、法规/认证任务计划与被扩展项目保持一致)
|
||||
*
|
||||
* @param projectLibraryBase
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目扩展(添加子项目)")
|
||||
@ApiOperation(value="项目扩展(添加子项目)", notes="项目扩展(添加子项目)")
|
||||
@RequiresPermissions("projectLibraryBase:add")
|
||||
@PostMapping(value = "/addChild")
|
||||
public Result<?> addChild(@Validated @RequestBody ProjectLibraryBase projectLibraryBase) throws ParseException {
|
||||
projectLibraryBaseService.addChild(projectLibraryBase);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param projectLibraryBase
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库基础表-编辑")
|
||||
@ApiOperation(value="项目库基础表-编辑", notes="项目库基础表-编辑")
|
||||
@RequiresPermissions("projectLibraryBase:edit")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProjectLibraryBase projectLibraryBase) {
|
||||
projectLibraryBaseService.editById(projectLibraryBase);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库基础表-通过id删除")
|
||||
@ApiOperation(value="项目库基础表-通过id删除", notes="项目库基础表-通过id删除")
|
||||
@RequiresPermissions("projectLibraryBase:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
projectLibraryBaseService.deleteById(id,cut);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库基础表-批量删除")
|
||||
@ApiOperation(value="项目库基础表-批量删除", notes="项目库基础表-批量删除")
|
||||
@RequiresPermissions("projectLibraryBase:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
this.projectLibraryBaseService.deleteByIds(Arrays.asList(ids.split(",")),cut);
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库基础表-通过id查询")
|
||||
@ApiOperation(value="项目库基础表-通过id查询", notes="项目库基础表-通过id查询")
|
||||
@RequiresPermissions("projectLibraryBase:queryById")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
List<ProjectLibraryBase> data = projectLibraryBaseService.queryById(id,cut);
|
||||
if(data==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(cut,data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param projectLibraryBase
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProjectLibraryBase projectLibraryBase) {
|
||||
return super.exportXls(request, projectLibraryBase, ProjectLibraryBase.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, ProjectLibraryBase.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目详情-统计接口
|
||||
* @param id 项目库id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目详情-统计接口")
|
||||
@ApiOperation(value="项目详情-统计接口", notes="项目详情-统计接口")
|
||||
@GetMapping(value = "/getProjectDetailsStatistics")
|
||||
public Result<?> getProjectDetailsStatistics(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
Map<String,Object> data = projectLibraryBaseService.getProjectDetailsStatistics(id);
|
||||
return Result.OK(cut,data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目详情-统计接口-根据领域分组
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目详情-统计接口-根据领域分组")
|
||||
@ApiOperation(value="项目详情-统计接口-根据领域分组", notes="项目详情-统计接口-根据领域分组")
|
||||
@GetMapping(value = "/getProjectDetailsStatisticsGroupByTerritory")
|
||||
public Result<?> getProjectDetailsStatisticsGroupByTerritory(@RequestParam Map<String,Object> params) {
|
||||
Map<String,Object> data = projectLibraryBaseService.getProjectDetailsStatisticsGroupByTerritory(params);
|
||||
return Result.OK((String)params.get("cut"),data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param params
|
||||
*/
|
||||
@RequestMapping(value = "/exportProjectDetailsStatisticsGroupByTerritoryXls")
|
||||
public void exportProjectDetailsStatisticsGroupByTerritoryXls(HttpServletResponse response,HttpServletRequest request, @RequestParam Map<String,Object> params) {
|
||||
projectLibraryBaseService.exportProjectDetailsStatisticsGroupByTerritoryXls(response,request, params);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 项目置顶,取消置顶(只置顶主项目)
|
||||
* @param id
|
||||
* @param flag 0为置顶, 1为取消置顶
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目置顶,取消置顶(只置顶主项目)")
|
||||
@ApiOperation(value="项目置顶,取消置顶(只置顶主项目)", notes="项目置顶,取消置顶(只置顶主项目)")
|
||||
@GetMapping(value = "/top")
|
||||
public Result<?> top(String id,String flag) {
|
||||
projectLibraryBaseService.top(id,flag);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目所有的版本(主版本和子版本的集合)
|
||||
* @param id 项目id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "获取项目所有的版本(主版本和子版本的集合)")
|
||||
@ApiOperation(value="获取项目所有的版本(主版本和子版本的集合)", notes="获取项目所有的版本(主版本和子版本的集合)")
|
||||
@GetMapping(value = "/getVersionsInfo")
|
||||
public Result<?> getVersionsInfo(String id) {
|
||||
List<String> versionsInfoList = projectLibraryBaseService.getVersionsInfo(id);
|
||||
return Result.OK(versionsInfoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 版本统计
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "版本统计")
|
||||
@ApiOperation(value="版本统计)", notes="版本统计")
|
||||
@PostMapping(value = "/versionStatistics")
|
||||
public Result<?> versionStatistics(@RequestBody Map<String,Object> params) {
|
||||
List<ProjectLibraryBase> projectLibraryBasesList = projectLibraryBaseService.versionStatistics(String.valueOf(params.get("id")));
|
||||
Page pages = projectLibraryBaseService.getPages(Integer.parseInt(params.get("pageNo").toString()), Integer.parseInt(params.get("pageSize").toString()), projectLibraryBasesList);
|
||||
return Result.OK(pages);
|
||||
}
|
||||
|
||||
@AutoLog(value = "对接火山引擎接口getProjectInfo")
|
||||
@ApiOperation(value="对接火山引擎接口-获取项目统计信息1", notes="对接火山引擎接口-获取项目统计信息1")
|
||||
@PostMapping(value = "/getProjectInfo")
|
||||
public Result<?> getProjectInfo(){
|
||||
JSONArray resList = projectLibraryBaseService.getProjectInfo();
|
||||
return Result.OK(resList);
|
||||
}
|
||||
|
||||
@AutoLog(value = "对接火山引擎接口getProjectProgressInfo")
|
||||
@ApiOperation(value="对接火山引擎接口-获取项目统计信息2", notes="对接火山引擎接口-获取项目统计信息2")
|
||||
@PostMapping(value = "/getProjectProgressInfo")
|
||||
public Result<?> getProjectProgressInfo(){
|
||||
JSONArray resList = this.projectLibraryBaseService.getProjectProgressInfo();
|
||||
return Result.OK(resList);
|
||||
}
|
||||
|
||||
// 导出项目进度统计(状态导出)
|
||||
@RequestMapping(value = "/exportProjectProgressStatisticsXls")
|
||||
public void exportProjectProgressStatisticsXls(HttpServletResponse response,HttpServletRequest request, @RequestParam Map<String,Object> params) {
|
||||
this.projectLibraryBaseService.exportProjectProgressStatisticsXls(response,request, params);
|
||||
}
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.jero.modules.searchcenter.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.searchcenter.service.impl.IDocumentSearchService;
|
||||
import com.jero.modules.searchcenter.vo.SearchVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @date 2022/3/14 9:56
|
||||
* @auth zhn
|
||||
*/
|
||||
@Api(tags="搜索中心")
|
||||
@RestController
|
||||
@RequestMapping("/phone/search/document")
|
||||
@Slf4j
|
||||
public class PhoneDocumentSearchController {
|
||||
|
||||
@Autowired
|
||||
private IDocumentSearchService iDocumentSearchService;
|
||||
|
||||
/**
|
||||
* 列表查询条件 标识传 1-->用于查询文档库字段属性
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @param cut 中英文切换
|
||||
* @param searchFlag 搜索中心标识 searchFlag = 0时,查询下拉,树形,日期等字段 type = 1时,查询输入框字段
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-查询条件")
|
||||
@ApiOperation(value="文档库信息表-查询条件", notes="文档库信息表-查询条件")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<List<Map<String,Object>>> queryCondition(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut,
|
||||
@RequestParam(name="searchFlag",required=true) String searchFlag) {
|
||||
List<Map<String,Object>> list = iDocumentSearchService.queryCondition(flag,cut,searchFlag);
|
||||
return Result.OK(list);
|
||||
}
|
||||
/**
|
||||
* 列表表头
|
||||
* @param flag 标识传 1-->用于查询文档库字段属性
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "文档库信息表-列表表头")
|
||||
@ApiOperation(value="文档库信息表-列表表头", notes="文档库信息表-列表表头")
|
||||
@GetMapping(value = "/getHeader")
|
||||
public Result<List<Map<String,Object>>> getHeader(@RequestParam(name="flag",required=true) String flag,
|
||||
@RequestParam(name="cut",required=true) String cut,
|
||||
@RequestParam(name="searchFlag",required=true) String searchFla) {
|
||||
List<Map<String,Object>> list = iDocumentSearchService.getHeader(flag,cut,searchFla);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value="列表查询", notes="列表查询")
|
||||
@PostMapping(value = "/getInfoList")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<?> getInfoList(@RequestBody Map<String,Object> map) {
|
||||
IPage infoList = iDocumentSearchService.getInfoList(map);
|
||||
return Result.OK(infoList);
|
||||
}
|
||||
|
||||
@ApiOperation(value="全部查询", notes="全部查询")
|
||||
@PostMapping(value = "/getFullTextInfoList")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<?> getFullTextInfoList(@RequestBody SearchVO searchVO) {
|
||||
IPage pageInfo = iDocumentSearchService.getFullTextInfoList(searchVO);
|
||||
return Result.OK(pageInfo);
|
||||
}
|
||||
|
||||
@ApiOperation(value="文档库查询段落", notes="文档库查询段落")
|
||||
@PostMapping(value = "/getParagraphInfoList")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<?> getParagraphInfoList(@RequestBody Map<String,Object> map) {
|
||||
IPage pageInfo = iDocumentSearchService.getParagraphInfoList(map);
|
||||
return Result.OK(pageInfo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="根据id删除", notes="根据id删除")
|
||||
@GetMapping(value = "/deleteById")
|
||||
public Result<?> deleteById(@RequestParam String ids) {
|
||||
iDocumentSearchService.deleteById(ids);
|
||||
return Result.OK();
|
||||
}
|
||||
@ApiOperation(value="全部删除", notes="全部删除")
|
||||
@GetMapping(value = "/deleteAll")
|
||||
public Result<?> deleteAll() {
|
||||
iDocumentSearchService.deleteAll();
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
@ApiOperation(value="列表查询问题知识库", notes="列表查询问题知识库")
|
||||
@PostMapping(value = "/getProblemKnowledgeBasePage")
|
||||
//@RequiresPermissions("document:search")
|
||||
public Result<?> getProblemKnowledgeBasePage(@RequestBody Map<String,Object> map) {
|
||||
IPage infoList = iDocumentSearchService.getProblemKnowledgeBasePage(map);
|
||||
return Result.OK(infoList);
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.jero.modules.searchcenter.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.searchcenter.service.ILawsMonthlyReportSearchService;
|
||||
import com.jero.modules.searchcenter.vo.SearchVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @description 搜索中心-法规月报 控制层
|
||||
* @date 2022/8/17 15:03
|
||||
* @auth liyawei
|
||||
*/
|
||||
@Api(tags="搜索中心")
|
||||
@RestController
|
||||
@RequestMapping("/phone/search/lawsMonthlyReport")
|
||||
@Slf4j
|
||||
public class PhoneLawsMonthlyReportSearchController {
|
||||
|
||||
@Autowired
|
||||
private ILawsMonthlyReportSearchService lawsMonthlyReportSearchService;
|
||||
|
||||
@ApiOperation(value="法规月报查询", notes="法规月报查询")
|
||||
@PostMapping(value = "/page")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<?> queryPageInfo(@RequestBody SearchVO searchVO) {
|
||||
IPage pageInfo = lawsMonthlyReportSearchService.pageInfo(searchVO);
|
||||
return Result.OK(pageInfo);
|
||||
}
|
||||
}
|
||||
+210
@@ -0,0 +1,210 @@
|
||||
package com.jero.modules.subscribe.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.subscribe.entity.OnlCgformSubscribe;
|
||||
import com.jero.modules.subscribe.service.IOnlCgformSubscribeService;
|
||||
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;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 我的订阅
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-02-23
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="我的订阅")
|
||||
@RestController
|
||||
@RequestMapping("/phone/subscribe/onlCgformSubscribe")
|
||||
@Slf4j
|
||||
public class PhoneOnlCgformSubscribeController extends JeroController<OnlCgformSubscribe, IOnlCgformSubscribeService> {
|
||||
@Autowired
|
||||
private IOnlCgformSubscribeService onlCgformSubscribeService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param onlCgformSubscribe
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的订阅-分页列表查询")
|
||||
@ApiOperation(value="我的订阅-分页列表查询", notes="我的订阅-分页列表查询")
|
||||
@PostMapping(value = "/page")
|
||||
public Result<?> queryPageList(@RequestBody Map<String,Object> params) {
|
||||
/*
|
||||
public Result<?> queryPageList(OnlCgformSubscribe onlCgformSubscribe,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<OnlCgformSubscribe> queryWrapper = QueryGenerator.initQueryWrapper(onlCgformSubscribe, req.getParameterMap());
|
||||
Page<OnlCgformSubscribe> page = new Page<OnlCgformSubscribe>(pageNo, pageSize);
|
||||
IPage<OnlCgformSubscribe> pageList = onlCgformSubscribeService.page(page, queryWrapper);
|
||||
*/
|
||||
IPage<OnlCgformSubscribe> pageList = onlCgformSubscribeService.queryPageList(params);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表头中英文切换
|
||||
*
|
||||
* @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 =onlCgformSubscribeService.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 = onlCgformSubscribeService.queryCondition(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的订阅-列表查询")
|
||||
@ApiOperation(value="我的订阅-列表查询", notes="我的订阅-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<OnlCgformSubscribe>> queryList(OnlCgformSubscribe onlCgformSubscribe) {
|
||||
List<OnlCgformSubscribe> list = onlCgformSubscribeService.queryList(onlCgformSubscribe);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param onlCgformSubscribe
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的订阅-添加")
|
||||
@ApiOperation(value="我的订阅-添加", notes="我的订阅-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody OnlCgformSubscribe onlCgformSubscribe) {
|
||||
LambdaQueryWrapper<OnlCgformSubscribe> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(OnlCgformSubscribe::getDocumentId, onlCgformSubscribe.getDocumentId())
|
||||
.eq(OnlCgformSubscribe::getId, onlCgformSubscribe.getId());
|
||||
int count = onlCgformSubscribeService.count(lambdaQueryWrapper);
|
||||
if (count == 0) {
|
||||
onlCgformSubscribeService.add(onlCgformSubscribe);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
else{
|
||||
return Result.error("该值不可重复添加,系统中已存在");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param onlCgformSubscribe
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的订阅-编辑")
|
||||
@ApiOperation(value="我的订阅-编辑", notes="我的订阅-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody OnlCgformSubscribe onlCgformSubscribe) {
|
||||
onlCgformSubscribeService.editById(onlCgformSubscribe);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的订阅-通过id删除")
|
||||
@ApiOperation(value="我的订阅-通过id删除", notes="我的订阅-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
onlCgformSubscribeService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "我的订阅-批量删除")
|
||||
@ApiOperation(value="我的订阅-批量删除", notes="我的订阅-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.onlCgformSubscribeService.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) {
|
||||
OnlCgformSubscribe onlCgformSubscribe = onlCgformSubscribeService.queryById(id);
|
||||
if(onlCgformSubscribe==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(onlCgformSubscribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param onlCgformSubscribe
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, OnlCgformSubscribe onlCgformSubscribe) {
|
||||
return super.exportXls(request, onlCgformSubscribe, OnlCgformSubscribe.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, OnlCgformSubscribe.class);
|
||||
}
|
||||
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.jero.modules.todoCenter.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
|
||||
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.Map;
|
||||
|
||||
@Api(tags="待办中心-项目流程")
|
||||
@RestController
|
||||
@RequestMapping("/phone/todoCenter/projectProcess")
|
||||
@Slf4j
|
||||
public class PhoneProjectProcessTodoCenterController {
|
||||
|
||||
@Autowired
|
||||
private IProcessInfoEOService processInfoEOService;
|
||||
|
||||
@AutoLog(value = "分页查询-待办任务列表")
|
||||
@ApiOperation(value="分页查询-待办任务列表", notes="分页查询-待办任务列表")
|
||||
@GetMapping(value = "/todoTaskList")
|
||||
public Result<?> todoTaskList(@RequestParam Map<String,Object> params) {
|
||||
IPage page = this.processInfoEOService.projectProcessTodoTaskList(params);
|
||||
return Result.OK(page);
|
||||
}
|
||||
|
||||
@AutoLog(value = "分页查询-已办任务列表")
|
||||
@ApiOperation(value="分页查询-已办任务列表", notes="分页查询-已办任务列表")
|
||||
@GetMapping(value = "/doneProcess")
|
||||
public Result<?> doneProcess(@RequestParam Map<String,Object> params) {
|
||||
IPage page = this.processInfoEOService.projectProcessDoneProcess(params);
|
||||
return Result.OK(page);
|
||||
}
|
||||
|
||||
@AutoLog(value = "分页查询-已发任务列表")
|
||||
@ApiOperation(value="分页查询-已发任务列表", notes="分页查询-已发任务列表")
|
||||
@GetMapping(value = "/issuedProcess")
|
||||
public Result<?> issuedProcess(@RequestParam Map<String,Object> params) {
|
||||
IPage page = this.processInfoEOService.projectProcessIssuedProcess(params);
|
||||
return Result.OK(page);
|
||||
}
|
||||
|
||||
@AutoLog(value = "待办中心-法规评估-初始化历史数据")
|
||||
@ApiOperation(value="待办中心-法规评估-初始化历史数据", notes="待办中心-法规评估-初始化历史数据")
|
||||
@GetMapping(value = "/initHistoryData")
|
||||
public Result<?> initHistoryData(@RequestParam Map<String,Object> params) {
|
||||
return this.processInfoEOService.initHistoryData(params);
|
||||
}
|
||||
|
||||
@AutoLog(value = "待办中心-符合性流程数据迁移")
|
||||
@ApiOperation(value="待办中心-符合性流程数据迁移", notes="待办中心-符合性流程数据迁移")
|
||||
@GetMapping(value = "/complianceDataMigration")
|
||||
public Result<?> complianceDataMigration(@RequestParam Map<String,Object> params) {
|
||||
return this.processInfoEOService.complianceDataMigration(params);
|
||||
}
|
||||
}
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
package com.jero.modules.wkflow.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.wkflow.entity.ProcessHistoryEO;
|
||||
import com.jero.modules.wkflow.service.IProcessHistoryEOService;
|
||||
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;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 流程历史表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-05-18
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="流程历史表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/wkflow/processHistoryEO")
|
||||
@Slf4j
|
||||
public class PhoneProcessHistoryEOController extends JeroController<ProcessHistoryEO, IProcessHistoryEOService> {
|
||||
@Autowired
|
||||
private IProcessHistoryEOService processHistoryEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param processHistoryEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "流程历史表-分页列表查询")
|
||||
@ApiOperation(value="流程历史表-分页列表查询", notes="流程历史表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProcessHistoryEO processHistoryEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProcessHistoryEO> queryWrapper = QueryGenerator.initQueryWrapper(processHistoryEO, req.getParameterMap());
|
||||
Page<ProcessHistoryEO> page = new Page<ProcessHistoryEO>(pageNo, pageSize);
|
||||
IPage<ProcessHistoryEO> pageList = processHistoryEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "流程历史表-列表查询")
|
||||
@ApiOperation(value="流程历史表-列表查询", notes="流程历史表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProcessHistoryEO>> queryList(@RequestParam Map<String,Object> params) {
|
||||
List<ProcessHistoryEO> list = processHistoryEOService.queryList(params);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param processHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "流程历史表-添加")
|
||||
@ApiOperation(value="流程历史表-添加", notes="流程历史表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProcessHistoryEO processHistoryEO) {
|
||||
processHistoryEOService.add(processHistoryEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param processHistoryEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "流程历史表-编辑")
|
||||
@ApiOperation(value="流程历史表-编辑", notes="流程历史表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProcessHistoryEO processHistoryEO) {
|
||||
processHistoryEOService.editById(processHistoryEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "流程历史表-通过id删除")
|
||||
@ApiOperation(value="流程历史表-通过id删除", notes="流程历史表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
processHistoryEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "流程历史表-批量删除")
|
||||
@ApiOperation(value="流程历史表-批量删除", notes="流程历史表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.processHistoryEOService.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) {
|
||||
ProcessHistoryEO processHistoryEO = processHistoryEOService.queryById(id);
|
||||
if(processHistoryEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(processHistoryEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param processHistoryEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProcessHistoryEO processHistoryEO) {
|
||||
return super.exportXls(request, processHistoryEO, ProcessHistoryEO.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, ProcessHistoryEO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程调用接口
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-任务清单表-流程调用")
|
||||
@ApiOperation(value="项目库-任务清单表-流程调用", notes="项目库-任务清单表-流程调用")
|
||||
@PostMapping(value = "/processCall")
|
||||
public Result<?> processCall(@RequestBody JSONObject jsonObject){
|
||||
return this.processHistoryEOService.processCall(jsonObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "流程历史表-符合性流程-列表查询")
|
||||
@ApiOperation(value="流程历史表-符合性流程-列表查询", notes="流程历史表-符合性流程-列表查询")
|
||||
@GetMapping(value = "/queryComplianceProcessHistoryList")
|
||||
public Result<List<ProcessHistoryEO>> queryComplianceProcessHistoryList(@RequestParam Map<String,Object> params) {
|
||||
List<ProcessHistoryEO> list = processHistoryEOService.queryComplianceProcessHistoryList(params);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
}
|
||||
+285
@@ -0,0 +1,285 @@
|
||||
package com.jero.modules.wkflow.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.entity.ProjectNameInfoEO;
|
||||
import com.jero.modules.project.entity.ProjectYearNameInfoEO;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||
import com.jero.modules.project.service.IProjectLibraryBaseService;
|
||||
import com.jero.modules.project.service.IProjectNameInfoEOService;
|
||||
import com.jero.modules.project.service.IProjectYearNameInfoEOService;
|
||||
import com.jero.modules.wkflow.entity.BusMes;
|
||||
import com.jero.modules.wkflow.entity.BusProcessName;
|
||||
import com.jero.modules.wkflow.entity.BusProcessNew;
|
||||
import com.jero.modules.wkflow.entity.TaskCommonQuery;
|
||||
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
||||
import com.jero.modules.wkflow.feginClient.impl.TaskFeignClientImpl;
|
||||
import com.jero.modules.wkflow.page.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.zhyd.oauth.utils.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@Api(tags="待办任务")
|
||||
@RestController
|
||||
@RequestMapping("/phone/task")
|
||||
public class PhoneTaskController {
|
||||
|
||||
@Autowired
|
||||
private TaskFeignClientImpl taskFeignClient;
|
||||
@Autowired
|
||||
private IProjectLawsInventoryEOService projectLawsInventoryEOService;
|
||||
@Autowired
|
||||
private IProjectLibraryBaseService projectLibraryBaseService;
|
||||
@Autowired
|
||||
private IProjectNameInfoEOService projectNameInfoEOService;
|
||||
@Autowired
|
||||
private IProjectYearNameInfoEOService projectYearNameInfoEOService;
|
||||
|
||||
/**
|
||||
* 通用接口
|
||||
* @param taskIds
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "查询待办任务数据")
|
||||
@ApiOperation(value="查询待办任务数据", notes="查询待办任务数据")
|
||||
@GetMapping("/queryTaskByTaskIds")
|
||||
public BusProcessNew queryTaskByTaskIds(@RequestParam("taskIds") String taskIds){
|
||||
return taskFeignClient.queryTaskByTaskIds(taskIds);
|
||||
}
|
||||
|
||||
@AutoLog(value = "根据待办id,查询任务明细数据")
|
||||
@ApiOperation(value="根据待办id,查询任务明细数据", notes="根据待办id,查询任务明细数据")
|
||||
@GetMapping("/queryTaskDetailByTaskIds")
|
||||
public String queryTaskDetailByTaskIds(@RequestParam("taskIds") String taskIds) {
|
||||
return taskFeignClient.queryTaskDetailByTaskIds(taskIds);
|
||||
}
|
||||
|
||||
@AutoLog(value = "保存任务")
|
||||
@ApiOperation(value="保存任务", notes="保存任务")
|
||||
@PostMapping("/saveTask")
|
||||
public Result<String> saveTask(@RequestBody BusMes busMes){
|
||||
return taskFeignClient.saveTask(busMes);
|
||||
}
|
||||
|
||||
@AutoLog(value = "我的已办任务列表")
|
||||
@ApiOperation(value="我的已办任务列表", notes="我的已办任务列表")
|
||||
@PostMapping("/hastodoTasksList")
|
||||
public Result<Map<String, Object>> HastodoTasksListByUserId(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
return taskFeignClient.HastodoTasksListByUserId(taskCommonQuery);
|
||||
}
|
||||
|
||||
@AutoLog(value = "我的待办任务列表")
|
||||
@ApiOperation(value="我的待办任务列表", notes="我的待办任务列表")
|
||||
@PostMapping("/todoTaskList")
|
||||
public Page todoTaskListByUserId(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
taskCommonQuery.setUserId(sysUser.getId());
|
||||
List<BusProcessName> busProcessNames = taskFeignClient.todoTaskListByUserId(taskCommonQuery);
|
||||
List list1 = this.startPage(busProcessNames, taskCommonQuery.getCurrent(), taskCommonQuery.getSize());
|
||||
Page pageInfo = new Page();
|
||||
if(busProcessNames!=null){
|
||||
this.disposeTaskToConfirm(busProcessNames,taskCommonQuery);
|
||||
pageInfo.setList(list1);
|
||||
pageInfo.setPageNo(taskCommonQuery.getCurrent());
|
||||
pageInfo.setCount(Long.valueOf(busProcessNames.size()));
|
||||
pageInfo.setPageSize(taskCommonQuery.getSize());
|
||||
}else{
|
||||
List<BusProcessName> list = new ArrayList<>();
|
||||
pageInfo.setList(list);
|
||||
pageInfo.setPageNo(taskCommonQuery.getCurrent());
|
||||
pageInfo.setCount(Long.valueOf(0));
|
||||
pageInfo.setPageSize(taskCommonQuery.getSize());
|
||||
}
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理任务确认流程回显数据
|
||||
* @param busProcessNames
|
||||
*/
|
||||
public void disposeTaskToConfirm(List<BusProcessName> busProcessNames,TaskCommonQuery taskCommonQuery){
|
||||
List<String> projectLawsInventoryIdList = busProcessNames.stream().filter(busProcessName -> {
|
||||
boolean flag = false;
|
||||
if(org.apache.commons.lang3.StringUtils.equals(busProcessName.getPrcType(), FlowTypeEnum.RWQRLC.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(BusProcessName::getProjectLawsInventoryId).distinct().collect(Collectors.toList());
|
||||
List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = new ArrayList<>();
|
||||
|
||||
if(CollectionUtils.isNotEmpty(projectLawsInventoryIdList)){
|
||||
QueryWrapper<ProjectLawsInventoryEO> lawsInventoryQueryWrap = new QueryWrapper<>();
|
||||
lawsInventoryQueryWrap.lambda().in(ProjectLawsInventoryEO::getId,projectLawsInventoryIdList);
|
||||
projectLawsInventoryEOList = this.projectLawsInventoryEOService.list(lawsInventoryQueryWrap);
|
||||
|
||||
List<String> projectLibraryIdList = projectLawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getProjectLibraryId).distinct().collect(Collectors.toList());
|
||||
if(CollectionUtils.isNotEmpty(projectLibraryIdList)){
|
||||
QueryWrapper<ProjectLibraryBase> libraryBaseQueryWrap = new QueryWrapper<>();
|
||||
libraryBaseQueryWrap.lambda().in(ProjectLibraryBase::getId,projectLibraryIdList);
|
||||
projectLibraryBaseList = this.projectLibraryBaseService.list(libraryBaseQueryWrap);
|
||||
this.projectLibraryBaseService.disposeData(projectLibraryBaseList,taskCommonQuery.getCut(),true);
|
||||
}
|
||||
for (BusProcessName busProcessName : busProcessNames) {
|
||||
if(org.apache.commons.lang3.StringUtils.equals(busProcessName.getPrcType(),FlowTypeEnum.RWQRLC.getValue())){
|
||||
if(CollectionUtils.isNotEmpty(projectLawsInventoryEOList)){
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryS = projectLawsInventoryEOList.stream().filter(lawsInventory -> {
|
||||
boolean flag = false;
|
||||
if(org.apache.commons.lang3.StringUtils.equals(busProcessName.getProjectLawsInventoryId(),lawsInventory.getId())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if(CollectionUtils.isNotEmpty(projectLawsInventoryS) && CollectionUtils.isNotEmpty(projectLibraryBaseList)){
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryS.get(0);
|
||||
busProcessName.setSerialNumber(projectLawsInventoryEO.getSerialNumber());
|
||||
busProcessName.setTitle(projectLawsInventoryEO.getTitle());
|
||||
|
||||
List<ProjectLibraryBase> projectLibraryBaseS = projectLibraryBaseList.stream().filter(projectLibraryBase -> {
|
||||
boolean flag = false;
|
||||
if (org.apache.commons.lang3.StringUtils.equals(projectLibraryBase.getId(), projectLawsInventoryEO.getProjectLibraryId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if(CollectionUtils.isNotEmpty(projectLibraryBaseS)){
|
||||
ProjectLibraryBase projectLibraryBase = projectLibraryBaseS.get(0);
|
||||
ProjectNameInfoEO projectNameInfoEO = this.projectNameInfoEOService.getOne(
|
||||
new QueryWrapper<ProjectNameInfoEO>().lambda().eq(ProjectNameInfoEO::getId, projectLibraryBase.getProjectNameId())
|
||||
);
|
||||
ProjectYearNameInfoEO projectYearNameInfoEO = this.projectYearNameInfoEOService.getOne(
|
||||
new QueryWrapper<ProjectYearNameInfoEO>().lambda().eq(ProjectYearNameInfoEO::getId, projectLibraryBase.getYearNameId())
|
||||
);
|
||||
|
||||
busProcessName.setProjectName(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + "-" +projectLibraryBase.getTargetMarketName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@AutoLog(value = "查询草稿")
|
||||
@ApiOperation(value="查询草稿", notes="查询草稿")
|
||||
@PostMapping("/queryTaskDraft")
|
||||
public Page queryTaskDraft(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
List<BusProcessName> busProcessNames = taskFeignClient.queryTaskDraft(taskCommonQuery);
|
||||
List list1 = this.startPage(busProcessNames, taskCommonQuery.getCurrent(), taskCommonQuery.getSize());
|
||||
Page pageInfo = new Page();
|
||||
if(busProcessNames!=null){
|
||||
pageInfo.setList(list1);
|
||||
pageInfo.setPageNo(taskCommonQuery.getCurrent());
|
||||
pageInfo.setCount(Long.valueOf(busProcessNames.size()));
|
||||
pageInfo.setPageSize(taskCommonQuery.getSize());
|
||||
}else{
|
||||
List<BusProcessName> list = new ArrayList<BusProcessName>();
|
||||
pageInfo.setList(list);
|
||||
pageInfo.setPageNo(taskCommonQuery.getCurrent());
|
||||
pageInfo.setCount(Long.valueOf(0));
|
||||
pageInfo.setPageSize(taskCommonQuery.getSize());
|
||||
}
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
@AutoLog(value = "已办流程")
|
||||
@ApiOperation(value="已办流程", notes="已办流程")
|
||||
@PostMapping("/doneProcess")
|
||||
public Page doneProcess(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
taskCommonQuery.setUserId(sysUser.getId());
|
||||
return taskFeignClient.doneProcess(taskCommonQuery);
|
||||
}
|
||||
|
||||
@AutoLog(value = "已发流程")
|
||||
@ApiOperation(value="已发流程", notes="已发流程")
|
||||
@PostMapping("/IssuedProcess")
|
||||
public Page IssuedProcess(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
taskCommonQuery.setUserId(sysUser.getId());
|
||||
return taskFeignClient.issuedProcess(taskCommonQuery);
|
||||
}
|
||||
|
||||
@AutoLog(value = "监控流程列表")
|
||||
@ApiOperation(value="监控流程列表", notes="监控流程列表")
|
||||
@PostMapping("/allProcess")
|
||||
public Page allProcess(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
return taskFeignClient.allProcess(taskCommonQuery);
|
||||
}
|
||||
|
||||
@AutoLog(value = "已办流程-根据taskId查询已办明细")
|
||||
@ApiOperation(value="已办流程-根据taskId查询已办明细", notes="已办流程-根据taskId查询已办明细")
|
||||
@GetMapping("/haveFinishedFlowDetail")
|
||||
public String haveFinishedFlowDetail(@RequestParam Map<String,Object> params){
|
||||
/**
|
||||
* params
|
||||
* taskId: 待办id 不能为null
|
||||
*/
|
||||
if(StringUtils.isEmpty((String) params.get("taskId"))){
|
||||
throw new RuntimeException("待办id不能为空。");
|
||||
}
|
||||
return taskFeignClient.haveFinishedFlowDetail(params);
|
||||
}
|
||||
|
||||
@AutoLog(value = "删除草稿")
|
||||
@ApiOperation(value="删除草稿", notes="删除草稿")
|
||||
@GetMapping("/deleteDraft")
|
||||
public Result<String> deleteDraft(@RequestParam("id")String id){
|
||||
return taskFeignClient.deleteDraft(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始分页
|
||||
* @param list
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页多少条数据
|
||||
* @return
|
||||
*/
|
||||
public static List startPage(List list, Integer pageNum,
|
||||
Integer pageSize) {
|
||||
if (list == null) {
|
||||
return null;
|
||||
}
|
||||
if (list.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Integer count = list.size(); // 记录总数
|
||||
Integer pageCount = 0; // 页数
|
||||
if (count % pageSize == 0) {
|
||||
pageCount = count / pageSize;
|
||||
} else {
|
||||
pageCount = count / pageSize + 1;
|
||||
}
|
||||
|
||||
int fromIndex = 0; // 开始索引
|
||||
int toIndex = 0; // 结束索引
|
||||
|
||||
if (pageNum != pageCount) {
|
||||
fromIndex = (pageNum - 1) * pageSize;
|
||||
toIndex = fromIndex + pageSize;
|
||||
} else {
|
||||
fromIndex = (pageNum - 1) * pageSize;
|
||||
toIndex = count;
|
||||
}
|
||||
|
||||
List pageList = list.subList(fromIndex, toIndex);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user