Merge remote-tracking branch 'origin/dev_20230526_Mobile'
# Conflicts: # jero-web/src/common/lang/en-us.js # jero-web/src/common/lang/zh-cn.js # jero-web/src/components/tools/UserMenu.vue
This commit is contained in:
@@ -647,3 +647,16 @@ ALTER TABLE `project_task_planning`
|
||||
|
||||
-- 工作流数据库-增加固定数据 2023-05-17 未同步生产环境
|
||||
INSERT INTO `t_form`(`OBJECT_ID`, `CODE`, `CREATE_TIME`, `WIDGET_JSON`, `JSON`, `NAME`, `SHOW_KEY`, `IS_DELETED`, `MODEL_ID`, `JSON_EVAL`, `HTML`, `RUN_TYPE`, `CATEGORY_ID`, `HTML_READONLY`) VALUES ('xgjfwlc', '0007', '2023-05-17 13:52:26', NULL, NULL, '修改交付物流程', NULL, 0, '15007', NULL, NULL, 'json', '4bdf0b396b4aa6ea10dd5e19956a1e22', NULL);
|
||||
|
||||
-- 最近浏览表 2023-06-08 未同步生产环境
|
||||
CREATE TABLE `recent_browse` (
|
||||
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门',
|
||||
`browse_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浏览类型',
|
||||
`browse_data_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浏览数据id',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '最近浏览' ROW_FORMAT = Dynamic;
|
||||
+1
@@ -4,6 +4,7 @@ public enum DictCodeEnum {
|
||||
|
||||
DUTY_TERRITORY("责任领域","duty_territory"),
|
||||
BRAND("品牌","brand"),
|
||||
STATE("文档库-状态","state"),
|
||||
;
|
||||
String name;
|
||||
String value;
|
||||
|
||||
+11
@@ -56,6 +56,9 @@ import com.jero.modules.message.websocket.WebSocket;
|
||||
import com.jero.modules.ocr.service.IOcrRecordEOService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.phone.entity.RecentBrowse;
|
||||
import com.jero.modules.phone.enums.BrowseTypeEnum;
|
||||
import com.jero.modules.phone.service.IRecentBrowseService;
|
||||
import com.jero.modules.searchcenter.enums.ModuleTypeFlagEnum;
|
||||
import com.jero.modules.split.common.FileUnZip;
|
||||
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||
@@ -195,6 +198,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
private OnlCgformSubscribeMapper onlCgformSubscribeMapper;
|
||||
@Autowired
|
||||
private IPhasedImplementationDetailsEOService phasedImplementationDetailsEOService;
|
||||
@Autowired
|
||||
private IRecentBrowseService recentBrowseService;
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
@@ -214,6 +219,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
// 删除文档库浏览记录表信息.
|
||||
this.recentBrowseService.deleteByBrowseTypeAndBrowseDataIdList(BrowseTypeEnum.WDK.getValue(),Arrays.asList(id.split(",")));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -352,6 +359,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
e.printStackTrace();
|
||||
log.error("文档库删除es失败");
|
||||
}
|
||||
// 删除文档库浏览记录表信息.
|
||||
this.recentBrowseService.deleteByBrowseTypeAndBrowseDataIdList(BrowseTypeEnum.WDK.getValue(),ids);
|
||||
}
|
||||
|
||||
private void updateDeletedDate(List<String> ids) {
|
||||
@@ -2657,6 +2666,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
if(StringUtils.isNotBlank(s)){
|
||||
stringMapCn.put(onlCgformField.getDbFieldName(), s);
|
||||
stringMapEn.put(onlCgformField.getDbFieldName(), s);
|
||||
mapBaseDateCn.put(onlCgformField.getDbFieldName(),s);
|
||||
mapBaseDateEn.put(onlCgformField.getDbFieldName(),s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+163
@@ -0,0 +1,163 @@
|
||||
package com.jero.modules.phone.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.phone.entity.RecentBrowse;
|
||||
import com.jero.modules.phone.service.IRecentBrowseService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 最近浏览表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-06-08
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="最近浏览表")
|
||||
@RestController
|
||||
@RequestMapping("/phone/recentBrowse")
|
||||
@Slf4j
|
||||
public class RecentBrowseController extends JeroController<RecentBrowse, IRecentBrowseService> {
|
||||
@Autowired
|
||||
private IRecentBrowseService recentBrowseService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param recentBrowse
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "最近浏览表-分页列表查询")
|
||||
@ApiOperation(value="最近浏览表-分页列表查询", notes="最近浏览表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(RecentBrowse recentBrowse,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
return this.recentBrowseService.queryPageList(recentBrowse,pageNo,pageSize,req);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "最近浏览表-列表查询")
|
||||
@ApiOperation(value="最近浏览表-列表查询", notes="最近浏览表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<RecentBrowse>> queryList() {
|
||||
List<RecentBrowse> list = recentBrowseService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param recentBrowse
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "最近浏览表-添加")
|
||||
@ApiOperation(value="最近浏览表-添加", notes="最近浏览表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody RecentBrowse recentBrowse) {
|
||||
recentBrowseService.add(recentBrowse);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param recentBrowse
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "最近浏览表-编辑")
|
||||
@ApiOperation(value="最近浏览表-编辑", notes="最近浏览表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody RecentBrowse recentBrowse) {
|
||||
recentBrowseService.editById(recentBrowse);
|
||||
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) {
|
||||
recentBrowseService.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.recentBrowseService.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) {
|
||||
RecentBrowse recentBrowse = recentBrowseService.queryById(id);
|
||||
if(recentBrowse==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(recentBrowse);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param recentBrowse
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, RecentBrowse recentBrowse) {
|
||||
return super.exportXls(request, recentBrowse, RecentBrowse.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, RecentBrowse.class);
|
||||
}
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.jero.modules.phone.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.phone.service.ISearchCenterService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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/search")
|
||||
public class SearchCenterController {
|
||||
|
||||
@Autowired
|
||||
private ISearchCenterService searchCenterService;
|
||||
|
||||
@AutoLog(value = "手机端-搜索-获取数据总数")
|
||||
@ApiOperation(value = "手机端-搜索-获取数据总数", notes = "手机端-搜索-获取数据总数")
|
||||
@GetMapping(value = "/getDataCount")
|
||||
public Result<Map<String, Object>> getDataCount() {
|
||||
return this.searchCenterService.getDataCount();
|
||||
}
|
||||
|
||||
@AutoLog(value = "手机端-搜索-根据用户获取文档库订阅和收藏信息")
|
||||
@ApiOperation(value = "手机端-搜索-根据用户获取文档库订阅和收藏信息", notes = "手机端-搜索-根据用户获取文档库订阅和收藏信息")
|
||||
@GetMapping(value = "/getWdkCollectAndSubscribeInfoByUser")
|
||||
public Result<Map<String, Object>> getWdkCollectAndSubscribeInfoByUser(@RequestParam Map<String,Object> params) {
|
||||
return this.searchCenterService.getWdkCollectAndSubscribeInfoByUser(params);
|
||||
}
|
||||
|
||||
@AutoLog(value = "手机端-搜索-查询文档库搜索中心数据")
|
||||
@ApiOperation(value = "手机端-搜索-查询文档库搜索中心数据", notes = "手机端-搜索-查询文档库搜索中心数据")
|
||||
@GetMapping(value = "/getWdkPage")
|
||||
public Result<?> getWdkPage(@RequestParam Map<String,Object> params) {
|
||||
return this.searchCenterService.getWdkPage(params);
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.jero.modules.phone.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.phone.service.ITaskStatisticsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "手机端-任务统计")
|
||||
@RestController
|
||||
@RequestMapping("/phone/taskStatistics")
|
||||
public class TaskStatisticsController {
|
||||
|
||||
@Autowired
|
||||
private ITaskStatisticsService taskStatisticsService;
|
||||
|
||||
@AutoLog(value = "手机端-任务统计-获取待办任务总数")
|
||||
@ApiOperation(value = "手机端-任务统计-获取待办任务总数", notes = "手机端-任务统计-获取待办任务总数")
|
||||
@GetMapping(value = "/getRegulatoryCertificationProcessDataCount")
|
||||
public Result<Map<String, Object>> getRegulatoryCertificationProcessDataCount() {
|
||||
return this.taskStatisticsService.getRegulatoryCertificationProcessDataCount();
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.jero.modules.phone.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.phone.service.IToDoCenterService;
|
||||
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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")
|
||||
public class ToDoCenterController {
|
||||
|
||||
@Autowired
|
||||
private IToDoCenterService toDoCenterService;
|
||||
|
||||
@AutoLog(value = "手机端-待办中心-查询待办任务分页列表")
|
||||
@ApiOperation(value = "手机端-待办中心-查询待办任务分页列表", notes = "手机端-待办中心-查询待办任务分页列表")
|
||||
@GetMapping(value = "/queryTodoTaskPage")
|
||||
public Result<?> queryTodoTaskPage(@RequestParam Map<String,Object> params) {
|
||||
IPage page = this.toDoCenterService.queryTodoTaskPage(params);
|
||||
return Result.OK(page);
|
||||
}
|
||||
|
||||
@AutoLog(value = "手机端-待办中心-查询待办任务-Prehomo数据分页列表")
|
||||
@ApiOperation(value = "手机端-待办中心-查询待办任务-Prehomo数据分页列表", notes = "手机端-待办中心-查询待办任务-Prehomo数据分页列表")
|
||||
@GetMapping(value = "/queryPreHomoPage")
|
||||
public Result<?> queryPreHomoPage(@RequestParam Map<String,Object> params) {
|
||||
String cut = (String) params.get("cut");
|
||||
IPage<ProjectCertificationInventoryEO> page = this.toDoCenterService.queryPreHomoPage(params);
|
||||
return Result.OK(cut,page);
|
||||
}
|
||||
|
||||
@AutoLog(value = "手机端-待办中心-根据id查询认证清单详情")
|
||||
@ApiOperation(value = "手机端-待办中心-根据id查询认证清单详情", notes = "手机端-待办中心-根据id查询认证清单详情")
|
||||
@GetMapping(value = "/queryProjectCertificationInventoryById")
|
||||
public Result<?> queryProjectCertificationInventoryById(@RequestParam Map<String,Object> params) {
|
||||
return this.toDoCenterService.queryProjectCertificationInventoryById(params);
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
package com.jero.modules.phone.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 最近浏览表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-06-08
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("recent_browse")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="recent_browse对象", description="最近浏览表")
|
||||
public class RecentBrowse implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**浏览类型*/
|
||||
@Excel(name = "浏览类型", width = 15)
|
||||
@ApiModelProperty(value = "浏览类型")
|
||||
private java.lang.String browseType;
|
||||
|
||||
/**浏览数据id*/
|
||||
@Excel(name = "浏览数据id", width = 15)
|
||||
@ApiModelProperty(value = "浏览数据id")
|
||||
private java.lang.String browseDataId;
|
||||
|
||||
// 展示标题
|
||||
@TableField(exist = false)
|
||||
private String title;
|
||||
|
||||
// 浏览类型展示字段
|
||||
@TableField(exist = false)
|
||||
private String browseTypeName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
// 法规月报专用
|
||||
@TableField(exist = false)
|
||||
private String fileId;
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.jero.modules.phone.enums;
|
||||
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
|
||||
/**
|
||||
* 浏览类型枚举类
|
||||
*/
|
||||
public enum BrowseTypeEnum {
|
||||
WDK("Document Library", "文档库", "Document Library"),
|
||||
ZSFX("Knowledge sharing", "知识分享", "Knowledge sharing"),
|
||||
FGYB("Regulatory Monthly Report", "法规月报", "Regulatory Monthly Report"),
|
||||
;
|
||||
|
||||
|
||||
String cnName;
|
||||
String enName;
|
||||
String value;
|
||||
|
||||
private BrowseTypeEnum(String value, String cnName, String enName) {
|
||||
this.value = value;
|
||||
this.cnName = cnName;
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getCnName() {
|
||||
return cnName;
|
||||
}
|
||||
|
||||
public void setCnName(String cnName) {
|
||||
this.cnName = cnName;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value, String cut) {
|
||||
BrowseTypeEnum[] values = values();
|
||||
for (BrowseTypeEnum taskStatusEnum : values) {
|
||||
if (taskStatusEnum.value.equals(value)) {
|
||||
if (StringUtils.equals(cut, CutEnum.CN.getValue())) {
|
||||
return taskStatusEnum.cnName;
|
||||
} else {
|
||||
return taskStatusEnum.enName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.phone.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.phone.entity.RecentBrowse;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 最近浏览表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-06-08
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface RecentBrowseMapper extends BaseMapper<RecentBrowse> {
|
||||
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.phone.mapper.RecentBrowseMapper">
|
||||
<resultMap id="RecentBrowseResultMap" type="com.jero.modules.phone.entity.RecentBrowse">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="browse_type" property="browseType" />
|
||||
<result column="browse_data_id" property="browseDataId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.jero.modules.phone.service;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.phone.entity.RecentBrowse;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 最近浏览表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-06-08
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IRecentBrowseService extends IService<RecentBrowse> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param recentBrowse
|
||||
* @return
|
||||
*/
|
||||
void add(RecentBrowse recentBrowse);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param recentBrowse
|
||||
* @return
|
||||
*/
|
||||
void editById(RecentBrowse recentBrowse);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
RecentBrowse queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<RecentBrowse> queryList();
|
||||
|
||||
Result<?> queryPageList(RecentBrowse recentBrowse, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 根据浏览类型和浏览数据id删除数据
|
||||
* @param browseType
|
||||
* @param browseDataIdList
|
||||
*/
|
||||
void deleteByBrowseTypeAndBrowseDataIdList(String browseType, List<String> browseDataIdList);
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.jero.modules.phone.service;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface ISearchCenterService {
|
||||
|
||||
Result<Map<String, Object>> getDataCount();
|
||||
|
||||
Result<Map<String, Object>> getWdkCollectAndSubscribeInfoByUser(Map<String,Object> params);
|
||||
|
||||
Result<?> getWdkPage(Map<String, Object> params);
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.jero.modules.phone.service;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface ITaskStatisticsService {
|
||||
Result<Map<String, Object>> getRegulatoryCertificationProcessDataCount();
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.jero.modules.phone.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface IToDoCenterService {
|
||||
IPage queryTodoTaskPage(Map<String, Object> params);
|
||||
|
||||
IPage<ProjectCertificationInventoryEO> queryPreHomoPage(Map<String,Object> params);
|
||||
|
||||
Result<?> queryProjectCertificationInventoryById(Map<String, Object> params);
|
||||
}
|
||||
+227
@@ -0,0 +1,227 @@
|
||||
package com.jero.modules.phone.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.BrowserType;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.phone.entity.RecentBrowse;
|
||||
import com.jero.modules.phone.enums.BrowseTypeEnum;
|
||||
import com.jero.modules.phone.mapper.RecentBrowseMapper;
|
||||
import com.jero.modules.phone.service.IRecentBrowseService;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseEOService;
|
||||
import com.jero.modules.report.entity.LawsMonthlyReportManageEO;
|
||||
import com.jero.modules.report.service.ILawsMonthlyReportManageEOService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description: 最近浏览表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-06-08
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class RecentBrowseServiceImpl extends ServiceImpl<RecentBrowseMapper, RecentBrowse> implements IRecentBrowseService {
|
||||
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseEOService problemKnowledgeBaseEOService;
|
||||
@Autowired
|
||||
private ILawsMonthlyReportManageEOService lawsMonthlyReportManageEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param recentBrowse
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(RecentBrowse recentBrowse) {
|
||||
Date now = new Date();
|
||||
recentBrowse.setCreateTime(now);
|
||||
recentBrowse.setUpdateTime(now);
|
||||
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// 添加时,只保留最新的一条浏览记录 将之前的浏览记录删掉。
|
||||
QueryWrapper<RecentBrowse> rbRemoveWrap = new QueryWrapper<>();
|
||||
rbRemoveWrap.lambda().eq(RecentBrowse::getCreateBy, currentUser.getUsername());
|
||||
rbRemoveWrap.lambda().eq(RecentBrowse::getBrowseType, recentBrowse.getBrowseType());
|
||||
rbRemoveWrap.lambda().eq(RecentBrowse::getBrowseDataId, recentBrowse.getBrowseDataId());
|
||||
this.remove(rbRemoveWrap);
|
||||
|
||||
this.save(recentBrowse);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param recentBrowse
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(RecentBrowse recentBrowse) {
|
||||
Date now = new Date();
|
||||
recentBrowse.setUpdateTime(now);
|
||||
saveOrUpdate(recentBrowse);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public RecentBrowse queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<RecentBrowse> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> queryPageList(RecentBrowse recentBrowse, Integer pageNo, Integer pageSize, HttpServletRequest req) {
|
||||
QueryWrapper<RecentBrowse> queryWrapper = QueryGenerator.initQueryWrapper(recentBrowse, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<RecentBrowse> page = new Page<RecentBrowse>(pageNo, pageSize);
|
||||
IPage<RecentBrowse> pageList = this.page(page, queryWrapper);
|
||||
this.disposeData(recentBrowse, pageList.getRecords());
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
public void disposeData(RecentBrowse recentBrowse, List<RecentBrowse> datas) {
|
||||
if (CollectionUtils.isNotEmpty(datas)) {
|
||||
String cut = recentBrowse.getCut();
|
||||
|
||||
List<String> wdkIdList = datas.stream().filter(data -> {
|
||||
boolean flag = (StringUtils.equals(data.getBrowseType(), BrowseTypeEnum.WDK.getValue()));
|
||||
return flag;
|
||||
}).map(RecentBrowse::getBrowseDataId).distinct().collect(Collectors.toList());
|
||||
List<BussDocumentLibraryEO> bdlEoList = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(wdkIdList)) {
|
||||
QueryWrapper<BussDocumentLibraryEO> bdlQueryWrap = new QueryWrapper<>();
|
||||
bdlQueryWrap.lambda().in(BussDocumentLibraryEO::getId, wdkIdList);
|
||||
bdlEoList = this.bussDocumentLibraryEOService.list(bdlQueryWrap);
|
||||
}
|
||||
|
||||
List<String> zsfxIdList = datas.stream().filter(data -> {
|
||||
boolean flag = (StringUtils.equals(data.getBrowseType(), BrowseTypeEnum.ZSFX.getValue()));
|
||||
return flag;
|
||||
}).map(RecentBrowse::getBrowseDataId).distinct().collect(Collectors.toList());
|
||||
List<ProblemKnowledgeBaseEO> pkbEoList = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(zsfxIdList)) {
|
||||
QueryWrapper<ProblemKnowledgeBaseEO> pkbQueryWrap = new QueryWrapper<>();
|
||||
pkbQueryWrap.lambda().in(ProblemKnowledgeBaseEO::getId, zsfxIdList);
|
||||
pkbEoList = this.problemKnowledgeBaseEOService.list(pkbQueryWrap);
|
||||
}
|
||||
|
||||
List<String> fgybIdList = datas.stream().filter(data -> {
|
||||
boolean flag = (StringUtils.equals(data.getBrowseType(), BrowseTypeEnum.FGYB.getValue()));
|
||||
return flag;
|
||||
}).map(RecentBrowse::getBrowseDataId).distinct().collect(Collectors.toList());
|
||||
List<LawsMonthlyReportManageEO> lmrEoList = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(fgybIdList)) {
|
||||
QueryWrapper<LawsMonthlyReportManageEO> lmrQueryWrap = new QueryWrapper<>();
|
||||
lmrQueryWrap.lambda().in(LawsMonthlyReportManageEO::getId, fgybIdList);
|
||||
lmrEoList = this.lawsMonthlyReportManageEOService.list(lmrQueryWrap);
|
||||
}
|
||||
|
||||
for (RecentBrowse data : datas) {
|
||||
StringBuilder titleSb = new StringBuilder();
|
||||
if (StringUtils.equals(data.getBrowseType(), BrowseTypeEnum.WDK.getValue())) {
|
||||
List<BussDocumentLibraryEO> bdlEos = bdlEoList.stream().filter(bdlEo -> {
|
||||
boolean flag = (StringUtils.equals(bdlEo.getId(), data.getBrowseDataId()));
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(bdlEos)) {
|
||||
BussDocumentLibraryEO bdlEo = bdlEos.get(0);
|
||||
String title = bdlEo.getTitle();
|
||||
if (StringUtils.equals(cut, CutEnum.EN.getValue())) {
|
||||
title = bdlEo.getTitleEn();
|
||||
}
|
||||
titleSb.append(title).append(" ").append(bdlEo.getSerialNumber());
|
||||
}
|
||||
} else if (StringUtils.equals(data.getBrowseType(), BrowseTypeEnum.ZSFX.getValue())) {
|
||||
List<ProblemKnowledgeBaseEO> pkbEos = pkbEoList.stream().filter(pkbEo -> {
|
||||
boolean flag = (StringUtils.equals(pkbEo.getId(), data.getBrowseDataId()));
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(pkbEos)) {
|
||||
ProblemKnowledgeBaseEO pkbEo = pkbEos.get(0);
|
||||
titleSb.append(pkbEo.getTitle());
|
||||
}
|
||||
} else if (StringUtils.equals(data.getBrowseType(), BrowseTypeEnum.FGYB.getValue())) {
|
||||
List<LawsMonthlyReportManageEO> lmrEos = lmrEoList.stream().filter(lmrEo -> {
|
||||
boolean flag = (StringUtils.equals(lmrEo.getId(), data.getBrowseDataId()));
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(lmrEos)) {
|
||||
LawsMonthlyReportManageEO lmrEo = lmrEos.get(0);
|
||||
titleSb.append(lmrEo.getName());
|
||||
data.setFileId(lmrEo.getFileId());
|
||||
}
|
||||
}
|
||||
data.setTitle(titleSb.toString());
|
||||
data.setBrowseTypeName(BrowseTypeEnum.getTextByValue(data.getBrowseType(), cut));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void deleteByBrowseTypeAndBrowseDataIdList(String browseType, List<String> browseDataIdList) {
|
||||
QueryWrapper<RecentBrowse> rbRemoveWrap = new QueryWrapper<>();
|
||||
rbRemoveWrap.lambda().eq(RecentBrowse::getBrowseType, browseType);
|
||||
rbRemoveWrap.lambda().in(RecentBrowse::getBrowseDataId, browseDataIdList);
|
||||
this.remove(rbRemoveWrap);
|
||||
}
|
||||
}
|
||||
+396
@@ -0,0 +1,396 @@
|
||||
package com.jero.modules.phone.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.es.JeroElasticsearchTemplate;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.DateUtils;
|
||||
import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
import com.jero.modules.collection.service.IOnlCgformCollectionService;
|
||||
import com.jero.modules.document.enums.SearchEnum;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.enums.DictCodeEnum;
|
||||
import com.jero.modules.phone.service.ISearchCenterService;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.ReleaseStatusEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseEOService;
|
||||
import com.jero.modules.report.entity.LawsMonthlyReportManageEO;
|
||||
import com.jero.modules.report.service.ILawsMonthlyReportManageEOService;
|
||||
import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
|
||||
import com.jero.modules.subscribe.service.IOnlCgformSubscribeService;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class SearchCenterServiceImpl implements ISearchCenterService {
|
||||
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseEOService problemKnowledgeBaseEOService;
|
||||
@Autowired
|
||||
private ILawsMonthlyReportManageEOService lawsMonthlyReportManageEOService;
|
||||
@Autowired
|
||||
private IOnlCgformCollectionService onlCgformCollectionService;
|
||||
@Autowired
|
||||
private IOnlCgformSubscribeService onlCgformSubscribeService;
|
||||
@Autowired
|
||||
private JeroElasticsearchTemplate jeroElasticsearchTemplate;
|
||||
public static final String SEARCH_FLAG = "魑";//标识(es数据带此标识的代表全文和段落的数据,不带此标识的代表列表数据)
|
||||
@Autowired
|
||||
private SysDictItemServiceImpl sysDictItemServiceImpl;
|
||||
|
||||
@Override
|
||||
public Result<Map<String, Object>> getDataCount() {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("cut", CutEnum.CN.getValue());
|
||||
params.put("pageNo", "1");
|
||||
params.put("pageSize", "10");
|
||||
IPage documentLibraryInfoPage = this.bussDocumentLibraryEOService.getInfoPage(params);
|
||||
long documentLibraryCount = documentLibraryInfoPage.getTotal();
|
||||
|
||||
int pageNo = 1;
|
||||
int pageSize = 10;
|
||||
ProblemKnowledgeBaseEO problemKnowledgeBaseEO = new ProblemKnowledgeBaseEO();
|
||||
boolean administrator = this.sysUserService.isAdministrator();
|
||||
//如果当前登录人是超级管理员角色,进入到管理发布页面时,查询所有的数据,其它用户只能查询自己创建的数据。
|
||||
if (administrator) {
|
||||
problemKnowledgeBaseEO.setCreateBy(null);
|
||||
} else {
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
problemKnowledgeBaseEO.setCreateBy(currentUser.getUsername());
|
||||
}
|
||||
QueryWrapper<ProblemKnowledgeBaseEO> pkbQueryWrap = new QueryWrapper<>();
|
||||
pkbQueryWrap.lambda().eq(ProblemKnowledgeBaseEO::getReleaseStatus, ReleaseStatusEnum.HAVE_RELEASED.getValue());
|
||||
this.problemKnowledgeBaseEOService.createQueryPermission(pkbQueryWrap, problemKnowledgeBaseEO);
|
||||
Page<ProblemKnowledgeBaseEO> pkbPage = new Page<ProblemKnowledgeBaseEO>(pageNo, pageSize);
|
||||
IPage<ProblemKnowledgeBaseEO> problemKnowledgeBaseInfoPage = this.problemKnowledgeBaseEOService.page(pkbPage, pkbQueryWrap);
|
||||
long problemKnowledgeBaseCount = problemKnowledgeBaseInfoPage.getTotal();
|
||||
|
||||
QueryWrapper<LawsMonthlyReportManageEO> lmrmQueryWrap = new QueryWrapper<>();
|
||||
Page<LawsMonthlyReportManageEO> lmrmPage = new Page<LawsMonthlyReportManageEO>(pageNo, pageSize);
|
||||
IPage<LawsMonthlyReportManageEO> lawsMonthlyReportManageInfoPage = this.lawsMonthlyReportManageEOService.getPageInfo(lmrmPage, lmrmQueryWrap);
|
||||
long lawsMonthlyReportManageCount = lawsMonthlyReportManageInfoPage.getTotal();
|
||||
|
||||
result.put("documentLibraryCount", documentLibraryCount);
|
||||
result.put("problemKnowledgeBaseCount", problemKnowledgeBaseCount);
|
||||
result.put("lawsMonthlyReportManageCount", lawsMonthlyReportManageCount);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Map<String, Object>> getWdkCollectAndSubscribeInfoByUser(Map<String,Object> params) {
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
|
||||
String id = (String) params.get("id");
|
||||
QueryWrapper<OnlCgformCollection> collectionQueryWrap = new QueryWrapper<>();
|
||||
collectionQueryWrap.lambda().eq(OnlCgformCollection::getDocumentId, id);
|
||||
collectionQueryWrap.lambda().eq(OnlCgformCollection::getCreateBy, currentUser.getUsername());
|
||||
List<OnlCgformCollection> collectionList = this.onlCgformCollectionService.list(collectionQueryWrap);
|
||||
|
||||
QueryWrapper<OnlCgformSubscribe> subscribeQueryWrap = new QueryWrapper();
|
||||
subscribeQueryWrap.lambda().eq(OnlCgformSubscribe::getDocumentId, id);
|
||||
subscribeQueryWrap.lambda().eq(OnlCgformSubscribe::getCreateBy, currentUser.getUsername());
|
||||
List<OnlCgformSubscribe> subscribeList = this.onlCgformSubscribeService.list(subscribeQueryWrap);
|
||||
|
||||
result.put("subscribeList", subscribeList);
|
||||
result.put("collectionList", collectionList);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> getWdkPage(Map<String, Object> params) {
|
||||
boolean indexExistsFlag = true;
|
||||
String cut = (String) params.get("cut");
|
||||
Integer pageNo = Integer.parseInt(params.get("pageNo").toString());
|
||||
Integer pageSize = Integer.parseInt(params.get("pageSize").toString());
|
||||
if (StringUtils.equals(cut, CutEnum.CN.getValue())) {
|
||||
indexExistsFlag = jeroElasticsearchTemplate.indexExists(SearchEnum.FULL_TEXT_SEARCH_CN.getValue());
|
||||
} else if (StringUtils.equals(cut, CutEnum.EN.getValue())) {
|
||||
indexExistsFlag = jeroElasticsearchTemplate.indexExists(SearchEnum.FULL_TEXT_SEARCH_EN.getValue());
|
||||
}
|
||||
if (!indexExistsFlag) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
return Result.OK(page);
|
||||
}
|
||||
|
||||
// 定义需要查询的字段数组
|
||||
List<String> fieldList = new ArrayList<>();
|
||||
fieldList.add("serial_number");
|
||||
if (StringUtils.equals(cut,CutEnum.EN.getValue())) {
|
||||
fieldList.add("title_en");
|
||||
} else if (StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
fieldList.add("title");
|
||||
}
|
||||
fieldList.add("content");
|
||||
fieldList.add("flag");
|
||||
|
||||
JSONArray queryMapJsonAll = new JSONArray();
|
||||
JSONArray queryJsonMustNot = new JSONArray();
|
||||
|
||||
JSONArray queryMapInputJson = new JSONArray();
|
||||
Map<String, Object> mapHighlight = new HashMap<>();
|
||||
Map<String, Object> mapHighlight1 = new HashMap<>();
|
||||
|
||||
String selectValue = (String) params.get("selectValue");
|
||||
if(StringUtils.isNotBlank(selectValue)){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
Map<String,Object> map1 = new HashMap<>();
|
||||
Map<String,Object> map2 = new HashMap<>();
|
||||
map.put("query",SEARCH_FLAG);
|
||||
map1.put("flag",map);
|
||||
map2.put("match",map1);
|
||||
queryJsonMustNot.add(map2);
|
||||
}else {
|
||||
selectValue = SEARCH_FLAG;
|
||||
}
|
||||
if (StringUtils.isNotBlank(selectValue)) {
|
||||
for (String field : fieldList) {
|
||||
this.setQueryMapJson(queryMapInputJson, selectValue, field);
|
||||
//高亮
|
||||
if(!"flag".equals(field)){
|
||||
this.wdkHighlight(mapHighlight, field);
|
||||
} else {
|
||||
// query_string查询
|
||||
Map<String, Object> map25 = new HashMap<>();
|
||||
Map<String, Object> map45 = new HashMap<>();
|
||||
map25.put("query", selectValue);
|
||||
map25.put("fields", fieldList.toArray());
|
||||
map25.put("allow_leading_wildcard", false); //禁用了前置通配符
|
||||
map45.put("query_string", map25);
|
||||
queryMapInputJson.add(map45);
|
||||
}
|
||||
}
|
||||
mapHighlight1.put("fields", mapHighlight);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(queryMapInputJson)) {
|
||||
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapInputJson);
|
||||
queryMapJsonAll.add(jsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
//指定module_type_flag= WDK
|
||||
JSONArray moduleTypeFlagQueryJsonArrMust = new JSONArray();
|
||||
Map<String, Object> moduleTypeFlagValueMap = new HashMap<>();
|
||||
Map<String, Object> moduleTypeFlagFieldMap = new HashMap<>();
|
||||
Map<String, Object> moduleTypeFlagMatchMap = new HashMap<>();
|
||||
moduleTypeFlagValueMap.put("query", "WDK");
|
||||
moduleTypeFlagFieldMap.put("module_type_flag", moduleTypeFlagValueMap);
|
||||
moduleTypeFlagMatchMap.put("match", moduleTypeFlagFieldMap);
|
||||
moduleTypeFlagQueryJsonArrMust.add(moduleTypeFlagMatchMap);
|
||||
JSONObject moduleTypeFlagQueryJson = jeroElasticsearchTemplate.buildBoolQuery(moduleTypeFlagQueryJsonArrMust, null, null);
|
||||
queryMapJsonAll.add(moduleTypeFlagQueryJson);
|
||||
|
||||
JSONObject querySort = new JSONObject();
|
||||
if (StringUtils.isEmpty(selectValue) || StringUtils.equals(selectValue, SEARCH_FLAG)) {
|
||||
Map<String, Object> createTime = new HashMap<>();
|
||||
Map<String, Object> createTime1 = new HashMap<>();
|
||||
createTime.put("order", "desc");
|
||||
createTime1.put("create_time", createTime);
|
||||
querySort.putAll(createTime1);
|
||||
} else {
|
||||
Map<String, Object> score = new HashMap<>();
|
||||
Map<String, Object> score1 = new HashMap<>();
|
||||
score.put("order", "desc");
|
||||
score1.put("_score", score);
|
||||
querySort.putAll(score1);
|
||||
}
|
||||
|
||||
IPage page = this.getWdkPage(
|
||||
queryMapJsonAll,
|
||||
mapHighlight1,
|
||||
pageNo,
|
||||
pageSize,
|
||||
cut,
|
||||
querySort,
|
||||
queryJsonMustNot,
|
||||
null
|
||||
);
|
||||
return Result.OK(page);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private IPage getWdkPage(JSONArray queryMapJson,
|
||||
Map<String,Object> highlightMap,
|
||||
Integer pageNo,
|
||||
Integer pageSize,
|
||||
String cut,
|
||||
JSONObject querySort,
|
||||
JSONArray queryMustNot,
|
||||
JSONArray queryShould) {
|
||||
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, queryShould);
|
||||
JSONArray jsonArraySort = new JSONArray();
|
||||
jsonArraySort.add(querySort);
|
||||
|
||||
//1. 条件,分页
|
||||
JSONObject queryObject = jeroElasticsearchTemplate.buildQuery(
|
||||
null,
|
||||
jsonObject,
|
||||
highlightMap,
|
||||
jsonArraySort,
|
||||
pageNo - 1,
|
||||
pageSize
|
||||
);
|
||||
|
||||
//2. 数据查询
|
||||
JSONObject search = new JSONObject();
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
search = jeroElasticsearchTemplate.search(
|
||||
SearchEnum.FULL_TEXT_SEARCH_CN.getValue(),
|
||||
SearchEnum.FULL_TEXT_SEARCH_CN.getValue(),
|
||||
queryObject
|
||||
);
|
||||
} else {
|
||||
search = jeroElasticsearchTemplate.search(
|
||||
SearchEnum.FULL_TEXT_SEARCH_EN.getValue(),
|
||||
SearchEnum.FULL_TEXT_SEARCH_EN.getValue(),
|
||||
queryObject
|
||||
);
|
||||
}
|
||||
|
||||
List<SysDictItem> stateSysDictItems = this.sysDictItemServiceImpl.selectItemsByDictCode(DictCodeEnum.STATE.getValue());
|
||||
|
||||
List<Map<String, Object>> list = (List<Map<String, Object>>) (((Map) search.get("hits")).get("hits"));
|
||||
List<Map<String, Object>> mapList = new ArrayList<>();
|
||||
for (Map<String, Object> map : list) {
|
||||
Map<String, Object> mapSource = (Map<String, Object>) map.get("_source");
|
||||
Map<String, Object> mapHighlight = (Map<String, Object>) map.get("highlight");
|
||||
if(ObjectUtils.isNotEmpty(mapHighlight)){
|
||||
for (Map.Entry<String, Object> entry : mapHighlight.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
List<String> value = (List<String>) entry.getValue();
|
||||
String fieldConyent= "";
|
||||
for (String s : value) {
|
||||
fieldConyent += s;
|
||||
}
|
||||
mapSource.put(key,fieldConyent);
|
||||
}
|
||||
}
|
||||
String state = (String) mapSource.get("state");
|
||||
String state_dictText = "";
|
||||
for (SysDictItem dictItem : stateSysDictItems) {
|
||||
if (StringUtils.equals(dictItem.getItemValue(), state)) {
|
||||
if (StringUtils.equals(cut, CutEnum.CN.getValue())) {
|
||||
state_dictText = dictItem.getItemText();
|
||||
} else {
|
||||
state_dictText = dictItem.getEnName();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
mapSource.put("state_dictText", state_dictText);
|
||||
|
||||
String create_time_str = "";
|
||||
if(ObjectUtils.isNotEmpty(mapSource.get("create_time"))){
|
||||
create_time_str = DateUtils.formatTime((Long) mapSource.get("create_time"));
|
||||
}
|
||||
mapSource.put("create_time_str",create_time_str);
|
||||
// 处理中英文切换的时候 展示的标题
|
||||
if (StringUtils.equals(cut,CutEnum.EN.getValue())) {
|
||||
mapSource.put("title",mapSource.get("title_en"));
|
||||
}
|
||||
mapList.add(mapSource);
|
||||
}
|
||||
|
||||
//处理分页
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
page.setTotal(Long.parseLong(String.valueOf(((Map) search.get("hits")).get("total"))));
|
||||
page.setRecords(mapList);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置文档库高亮字段
|
||||
* @param mapHighlight
|
||||
* @param key
|
||||
*/
|
||||
private void wdkHighlight(Map<String, Object> mapHighlight, String key) {
|
||||
Map<String, Object> mapTemp = new HashMap<>();
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("<text class='highlight-class'>");
|
||||
List<String> list1 = new ArrayList<>();
|
||||
list1.add("</text>");
|
||||
mapTemp.put("pre_tags", list);
|
||||
mapTemp.put("post_tags", list1);
|
||||
mapTemp.put("fragment_size", 320);
|
||||
mapTemp.put("number_of_fragments", 1);
|
||||
mapTemp.put("type", "plain");
|
||||
mapHighlight.put(key, mapTemp);
|
||||
}
|
||||
|
||||
private void setQueryMapJson(JSONArray queryMapJson, String selectValue, String field) {
|
||||
// 前缀匹配 缺点是前缀一定不能断开
|
||||
// 情况举例:用户只记得前面那段字
|
||||
Map<String, Object> map21 = new HashMap<>();
|
||||
Map<String, Object> map31 = new HashMap<>();
|
||||
Map<String, Object> map41 = new HashMap<>();
|
||||
if ("title".equals(field)) {
|
||||
map31.put("boost", 10);
|
||||
} else if ("content".equals(field)) {
|
||||
map31.put("boost", 0.01);
|
||||
}
|
||||
map31.put("value", selectValue);
|
||||
map21.put(field + ".keyword", map31);
|
||||
map41.put("prefix", map21);
|
||||
queryMapJson.add(map41);
|
||||
|
||||
// match_phrase_prefix 词组匹配查询,允许最后词组与文中的任意分词前缀匹配
|
||||
Map<String, Object> map22 = new HashMap<>();
|
||||
Map<String, Object> map32 = new HashMap<>();
|
||||
Map<String, Object> map42 = new HashMap<>();
|
||||
if ("title".equals(field)) {
|
||||
map32.put("boost", 10);
|
||||
} else if ("content".equals(field)) {
|
||||
map32.put("boost", 0.01);
|
||||
}
|
||||
map32.put("query", selectValue);
|
||||
map22.put(field, map32);
|
||||
map42.put("match_phrase_prefix", map22);
|
||||
queryMapJson.add(map42);
|
||||
|
||||
// match分词匹配查询
|
||||
// 情况举例:用户可能他知道开头的前缀几个字,知道中间的几个字
|
||||
Map<String, Object> map23 = new HashMap<>();
|
||||
Map<String, Object> map33 = new HashMap<>();
|
||||
Map<String, Object> map43 = new HashMap<>();
|
||||
if ("title".equals(field)) {
|
||||
map33.put("boost", 10);
|
||||
} else if ("content".equals(field)) {
|
||||
map33.put("boost", 0.01);
|
||||
}
|
||||
map33.put("query", selectValue);
|
||||
map23.put(field, map33);
|
||||
map43.put("match", map23);
|
||||
queryMapJson.add(map43);
|
||||
|
||||
// wildcard模糊查询
|
||||
// 情况举例:用户只记得中间那段字
|
||||
Map<String, Object> map24 = new HashMap<>();
|
||||
Map<String, Object> map44 = new HashMap<>();
|
||||
map24.put(field, "*" + selectValue + "*");
|
||||
map44.put("wildcard", map24);
|
||||
queryMapJson.add(map44);
|
||||
}
|
||||
}
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
package com.jero.modules.phone.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.phone.service.ITaskStatisticsService;
|
||||
import com.jero.modules.project.enums.CertificationFlowNodeEnum;
|
||||
import com.jero.modules.project.enums.TaskStatusEnum;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
|
||||
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
|
||||
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
|
||||
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
|
||||
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class TaskStatisticsServiceImpl implements ITaskStatisticsService {
|
||||
|
||||
@Autowired
|
||||
private IProcessInfoEOService processInfoEOService;
|
||||
@Autowired
|
||||
private IProcessInfoDetailEOService processInfoDetailEOService;
|
||||
|
||||
@Override
|
||||
public Result<Map<String, Object>> getRegulatoryCertificationProcessDataCount() {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<ProcessInfoDetailEO> pidQueryWrap = new QueryWrapper<>();
|
||||
pidQueryWrap.lambda().eq(ProcessInfoDetailEO::getUserId, currentUser.getId());
|
||||
pidQueryWrap.lambda().eq(ProcessInfoDetailEO::getStatus, TaskStatusEnum.NOT_DONE.getValue());
|
||||
List<ProcessInfoDetailEO> pidEoList = this.processInfoDetailEOService.list(pidQueryWrap);
|
||||
|
||||
int publishingCount = 0;
|
||||
int designCount = 0;
|
||||
int verifyCount = 0;
|
||||
int preHomoCount = 0;
|
||||
int technologyEvaluationCount = 0;
|
||||
int opinionCollectionCount = 0;
|
||||
|
||||
if (CollectionUtils.isNotEmpty(pidEoList)) {
|
||||
List<String> processInfoIdList = pidEoList.stream().map(ProcessInfoDetailEO::getProcessInfoId).distinct().collect(Collectors.toList());
|
||||
QueryWrapper<ProcessInfoEO> piQueryWrap = new QueryWrapper<>();
|
||||
piQueryWrap.lambda().in(ProcessInfoEO::getId, processInfoIdList);
|
||||
List<ProcessInfoEO> piEoList = this.processInfoEOService.list(piQueryWrap);
|
||||
if (CollectionUtils.isNotEmpty(piEoList)) {
|
||||
List<ProcessInfoEO> publishingList = piEoList.stream().filter(piEo -> {
|
||||
return StringUtils.equals(piEo.getFlowType(), FlowTypeEnum.QDQR.getValue());
|
||||
}).collect(Collectors.toList());
|
||||
publishingCount = publishingList.size();
|
||||
|
||||
List<ProcessInfoEO> designList = piEoList.stream().filter(piEo -> {
|
||||
return StringUtils.equals(piEo.getFlowType(), FlowTypeEnum.SJFHXSHLC.getValue());
|
||||
}).collect(Collectors.toList());
|
||||
designCount = designList.size();
|
||||
|
||||
List<ProcessInfoEO> verifyList = piEoList.stream().filter(piEo -> {
|
||||
return StringUtils.equals(piEo.getFlowType(), FlowTypeEnum.YZFHXSCLC.getValue());
|
||||
}).collect(Collectors.toList());
|
||||
verifyCount = verifyList.size();
|
||||
|
||||
List<ProcessInfoEO> preHomoList = piEoList.stream().filter(piEo -> {
|
||||
return StringUtils.equals(piEo.getFlowType(), FlowTypeEnum.CERTIFICATION_LC.getValue());
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(preHomoList)) {
|
||||
preHomoCount = this.getPreHomoCount(pidEoList, preHomoList);
|
||||
}
|
||||
|
||||
List<ProcessInfoEO> technologyEvaluationList = piEoList.stream().filter(piEo -> {
|
||||
return StringUtils.equals(piEo.getFlowType(), FlowTypeEnum.FGJSPG.getValue());
|
||||
}).collect(Collectors.toList());
|
||||
technologyEvaluationCount = technologyEvaluationList.size();
|
||||
|
||||
List<ProcessInfoEO> opinionCollectionList = piEoList.stream().filter(piEo -> {
|
||||
return StringUtils.equals(piEo.getFlowType(), FlowTypeEnum.FGYJSJLC.getValue());
|
||||
}).collect(Collectors.toList());
|
||||
opinionCollectionCount = opinionCollectionList.size();
|
||||
}
|
||||
}
|
||||
|
||||
result.put("publishingCount", publishingCount);
|
||||
result.put("designCount", designCount);
|
||||
result.put("verifyCount", verifyCount);
|
||||
result.put("preHomoCount", preHomoCount);
|
||||
result.put("technologyEvaluationCount", technologyEvaluationCount);
|
||||
result.put("opinionCollectionCount", opinionCollectionCount);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
private int getPreHomoCount(List<ProcessInfoDetailEO> pidEoList, List<ProcessInfoEO> preHomoList) {
|
||||
int preHomoCount = 0;
|
||||
for (ProcessInfoEO piEo : preHomoList) {
|
||||
List<ProcessInfoDetailEO> pidEosTemp = pidEoList.stream().filter(pidEo -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(piEo.getId(), pidEo.getProcessInfoId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if (CollectionUtils.isNotEmpty(pidEosTemp)) {
|
||||
List<ProcessInfoDetailEO> zrrjsrwPidEos = pidEosTemp.stream().filter(pidEo -> {
|
||||
return StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.ZRRJSRW.getKey());
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(zrrjsrwPidEos)) {
|
||||
preHomoCount += 1;
|
||||
}
|
||||
|
||||
List<ProcessInfoDetailEO> rzgcsscPidEos = pidEosTemp.stream().filter(pidEo -> {
|
||||
return StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.RZGCSSC.getKey());
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(rzgcsscPidEos)) {
|
||||
preHomoCount += 1;
|
||||
}
|
||||
|
||||
List<ProcessInfoDetailEO> zrrtjrwPidEos = pidEosTemp.stream().filter(pidEo -> {
|
||||
return StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.ZRRTJRW.getKey());
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(zrrtjrwPidEos)) {
|
||||
preHomoCount += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return preHomoCount;
|
||||
}
|
||||
}
|
||||
+486
@@ -0,0 +1,486 @@
|
||||
package com.jero.modules.phone.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.DateUtils;
|
||||
import com.jero.modules.phone.service.IToDoCenterService;
|
||||
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectTaskInventoryDetailEO;
|
||||
import com.jero.modules.project.enums.CertificationFlowNodeEnum;
|
||||
import com.jero.modules.project.enums.CertificationInventoryFlowStatusEnum;
|
||||
import com.jero.modules.project.enums.ProjectInventoryFieldEnum;
|
||||
import com.jero.modules.project.enums.TaskStatusEnum;
|
||||
import com.jero.modules.project.service.IProjectCertificationInventoryEOService;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||
import com.jero.modules.project.service.IProjectTaskInventoryDetailEOService;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.enums.ProjectRoleEnum;
|
||||
import com.jero.modules.system.service.ISysCategoryService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
|
||||
import com.jero.modules.todoCenter.enums.DesignComplianceFlowNodeKeyEnum;
|
||||
import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum;
|
||||
import com.jero.modules.todoCenter.enums.VerifyComplianceFlowNodeKeyEnum;
|
||||
import com.jero.modules.todoCenter.mapper.ProcessInfoEOMapper;
|
||||
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
|
||||
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
|
||||
import com.jero.modules.todoCenter.vo.ProcessInfoVO;
|
||||
import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum;
|
||||
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class ToDoCenterServiceImpl implements IToDoCenterService {
|
||||
|
||||
@Autowired
|
||||
private ProcessInfoEOMapper processInfoEOMapper;
|
||||
@Autowired
|
||||
private IProcessInfoEOService processInfoEOService;
|
||||
@Autowired
|
||||
private IProcessInfoDetailEOService processInfoDetailEOService;
|
||||
@Autowired
|
||||
private IProjectTaskInventoryDetailEOService projectTaskInventoryDetailEOService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IProjectLawsInventoryEOService projectLawsInventoryEOService;
|
||||
@Autowired
|
||||
private ISysCategoryService sysCategoryService;
|
||||
@Autowired
|
||||
private SysDictItemServiceImpl sysDictItemServiceImpl;
|
||||
@Autowired
|
||||
private IProjectCertificationInventoryEOService projectCertificationInventoryEOService;
|
||||
|
||||
@Override
|
||||
public IPage queryTodoTaskPage(Map<String, Object> params) {
|
||||
String cut = (String) params.get("cut");
|
||||
Integer pageNo = Integer.parseInt(params.get("pageNo").toString());
|
||||
Integer pageSize = Integer.parseInt(params.get("pageSize").toString());
|
||||
|
||||
String mobileProcessing = (String) params.get("mobileProcessing");
|
||||
Integer monthNum = Integer.parseInt((String) params.get("selectModel"));
|
||||
if(monthNum > 0){
|
||||
// 创建一个Calendar对象,表示当前时间
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
// 往后推算日期
|
||||
calendar.add(Calendar.MONTH, monthNum);
|
||||
|
||||
// 将时间设置为0点0分0秒
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
|
||||
// 将日期格式化为字符串并输出
|
||||
String frontEndTime = DateUtils.date_sdf.get().format(new Date());
|
||||
String afterEndTime = DateUtils.date_sdf.get().format(calendar.getTime());
|
||||
|
||||
params.put("frontEndTime",frontEndTime);
|
||||
params.put("afterEndTime",afterEndTime);
|
||||
}
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
List<String> flowTypeList = new ArrayList<>();
|
||||
flowTypeList.add(FlowTypeEnum.RWQRLC.getValue());
|
||||
flowTypeList.add(FlowTypeEnum.SJFHXSHLC.getValue());
|
||||
flowTypeList.add(FlowTypeEnum.YZFHXSCLC.getValue());
|
||||
|
||||
params.put("flowTypeList", flowTypeList);
|
||||
params.put("taskStatus", TaskStatusEnum.NOT_DONE.getValue());
|
||||
params.put("currentUserId", currentUser.getId());
|
||||
|
||||
List<String> qdqrFlowTypeValue = new ArrayList<>();
|
||||
if(StringUtils.equals(mobileProcessing,YesOrNoEnum.NO.getValue()) || StringUtils.isEmpty(mobileProcessing)){
|
||||
qdqrFlowTypeValue.add(FlowTypeEnum.QDQR.getValue());
|
||||
}
|
||||
qdqrFlowTypeValue.add(FlowTypeEnum.CERTIFICATION_LC.getValue());
|
||||
params.put("qdqrFlowTypeValue", qdqrFlowTypeValue);
|
||||
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
|
||||
IPage<ProcessInfoVO> result = this.processInfoEOMapper.queryPhoneTodoTaskListList(page, params);
|
||||
List<ProcessInfoVO> datas = result.getRecords();
|
||||
|
||||
this.disposeData(cut, datas);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void disposeData(String cut, List<ProcessInfoVO> datas) {
|
||||
if (CollectionUtils.isNotEmpty(datas)) {
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
QueryWrapper<ProcessInfoDetailEO> pidQueryWrap = new QueryWrapper<>();
|
||||
pidQueryWrap.lambda().eq(ProcessInfoDetailEO::getFlowType, FlowTypeEnum.CERTIFICATION_LC.getValue());
|
||||
pidQueryWrap.lambda().eq(ProcessInfoDetailEO::getUserId, currentUser.getId());
|
||||
pidQueryWrap.lambda().eq(ProcessInfoDetailEO::getStatus, TaskStatusEnum.NOT_DONE.getValue());
|
||||
List<ProcessInfoDetailEO> pidEoList = this.processInfoDetailEOService.list(pidQueryWrap);
|
||||
Iterator<ProcessInfoVO> datasIt = datas.iterator();
|
||||
List<ProcessInfoVO> datasTemp = new ArrayList<>();
|
||||
while (datasIt.hasNext()) {
|
||||
ProcessInfoVO data = datasIt.next();
|
||||
if (StringUtils.equals(data.getFlowType(), FlowTypeEnum.CERTIFICATION_LC.getValue())) {
|
||||
List<ProcessInfoDetailEO> pidEos = pidEoList.stream().filter(pidEo -> {
|
||||
boolean flag = StringUtils.equals(pidEo.getProcessInfoId(), data.getId());
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
// 判断当前用户在这个认证流程中 有几个任务。 责任人 接受、责任人 提交交付物、认证工程审批
|
||||
if (CollectionUtils.isNotEmpty(pidEos)) {
|
||||
List<ProcessInfoDetailEO> zrrjsrwPidEos = pidEos.stream().filter(pidEo -> {
|
||||
return StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.ZRRJSRW.getKey());
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(zrrjsrwPidEos)) {
|
||||
ProcessInfoVO processInfoVOTemp = new ProcessInfoVO();
|
||||
BeanUtils.copyProperties(data, processInfoVOTemp);
|
||||
processInfoVOTemp.setTaskDefinitionKey(CertificationFlowNodeEnum.TASK_RESPONSIBILITY_CONFIRMATION.getKey());
|
||||
datasTemp.add(processInfoVOTemp);
|
||||
}
|
||||
|
||||
List<ProcessInfoDetailEO> rzgcsscPidEos = pidEos.stream().filter(pidEo -> {
|
||||
return StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.RZGCSSC.getKey());
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(rzgcsscPidEos)) {
|
||||
ProcessInfoVO processInfoVOTemp = new ProcessInfoVO();
|
||||
BeanUtils.copyProperties(data, processInfoVOTemp);
|
||||
processInfoVOTemp.setTaskDefinitionKey(CertificationFlowNodeEnum.TASK_REVIEW.getKey());
|
||||
datasTemp.add(processInfoVOTemp);
|
||||
}
|
||||
|
||||
List<ProcessInfoDetailEO> zrrtjrwPidEos = pidEos.stream().filter(pidEo -> {
|
||||
return StringUtils.equals(pidEo.getTaskDefinitionKey(), CertificationFlowNodeEnum.ZRRTJRW.getKey());
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(zrrtjrwPidEos)) {
|
||||
ProcessInfoVO processInfoVOTemp = new ProcessInfoVO();
|
||||
BeanUtils.copyProperties(data, processInfoVOTemp);
|
||||
processInfoVOTemp.setTaskDefinitionKey(CertificationFlowNodeEnum.TASK_HANDLING.getKey());
|
||||
datasTemp.add(processInfoVOTemp);
|
||||
}
|
||||
}
|
||||
datasIt.remove();
|
||||
}
|
||||
}
|
||||
datas.addAll(datasTemp);
|
||||
this.disposeData(datas, cut, TaskStatusEnum.NOT_DONE.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
public void disposeData(List<ProcessInfoVO> datas, String cut, String taskStatus) {
|
||||
if (CollectionUtils.isNotEmpty(datas)) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date currentDate = new Date();
|
||||
try {
|
||||
currentDate = sdf.parse(sdf.format(currentDate));
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
List<String> processInfoIdList = datas.stream().map(ProcessInfoVO::getId).distinct().collect(Collectors.toList());
|
||||
|
||||
QueryWrapper<ProcessInfoDetailEO> processInfoDetailQueryWrap = new QueryWrapper<>();
|
||||
processInfoDetailQueryWrap.lambda().in(ProcessInfoDetailEO::getProcessInfoId, processInfoIdList);
|
||||
List<ProcessInfoDetailEO> processInfoDetailEOList = this.processInfoDetailEOService.list(processInfoDetailQueryWrap);
|
||||
|
||||
Map<String, List<ProcessInfoDetailEO>> lastAssigneeDetailMap = processInfoDetailEOList.stream().filter(processInfoDetailEO -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(processInfoDetailEO.getStatus(), TaskStatusEnum.HAVE_DONE.getValue()) && processInfoDetailEO.getSubmitTime() != null) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.groupingBy(ProcessInfoDetailEO::getProcessInfoId));
|
||||
|
||||
Map<String, List<ProcessInfoDetailEO>> assigneeDetailMap = processInfoDetailEOList.stream().filter(processInfoDetailEO -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(processInfoDetailEO.getStatus(), TaskStatusEnum.NOT_DONE.getValue()) && processInfoDetailEO.getSubmitTime() == null) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.groupingBy(ProcessInfoDetailEO::getProcessInfoId));
|
||||
//设置责任人反馈意见
|
||||
this.processInfoEOService.setPersonChargeFeedback(datas);
|
||||
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
datas.forEach(data -> {
|
||||
String standardInfo = data.getStandardInfo();
|
||||
if (StringUtils.isNotBlank(standardInfo)) {
|
||||
String standardInfoTemp = standardInfo.replaceAll("、", " ");
|
||||
data.setStandardInfo(standardInfoTemp);
|
||||
}
|
||||
//设置上一个操作人。
|
||||
for (Map.Entry<String, List<ProcessInfoDetailEO>> detailMap : lastAssigneeDetailMap.entrySet()) {
|
||||
if (StringUtils.equals(data.getId(), detailMap.getKey())) {
|
||||
List<ProcessInfoDetailEO> detailEOList = detailMap.getValue();
|
||||
|
||||
Collections.sort(detailEOList, new Comparator<ProcessInfoDetailEO>() {
|
||||
@Override
|
||||
public int compare(ProcessInfoDetailEO o1, ProcessInfoDetailEO o2) {
|
||||
return o2.getSubmitTime().compareTo(o1.getSubmitTime());
|
||||
}
|
||||
});
|
||||
|
||||
String userId = detailEOList.get(0).getUserId();
|
||||
userIdList.add(userId);
|
||||
data.setLastAssignee(userId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//设置当前操作人
|
||||
for (Map.Entry<String, List<ProcessInfoDetailEO>> detailMap : assigneeDetailMap.entrySet()) {
|
||||
if (StringUtils.equals(data.getId(), detailMap.getKey())) {
|
||||
List<ProcessInfoDetailEO> detailEOList = detailMap.getValue();
|
||||
data.setAssignee(detailEOList.stream().map(ProcessInfoDetailEO::getUserId).collect(Collectors.joining(",")));
|
||||
userIdList.addAll(detailEOList.stream().map(ProcessInfoDetailEO::getUserId).collect(Collectors.toList()));
|
||||
|
||||
// 如果上一操作人是空,则证明该流程当前处理人也是上一个操作人。
|
||||
if (StringUtils.isEmpty(data.getLastAssignee())) {
|
||||
List<String> collect = detailEOList.stream().filter(detailEO -> {
|
||||
return (StringUtils.equals(detailEO.getTaskDefinitionKey(), DesignComplianceNodeEnum.THE_RESPONSIBLE_PERSON_HANDLES_THE_TASK.getKey())
|
||||
|| StringUtils.equals(detailEO.getTaskDefinitionKey(), DesignComplianceNodeEnum.SPONSOR_REVIEW.getKey()));
|
||||
}).map(ProcessInfoDetailEO::getUserId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(collect)) {
|
||||
data.setLastAssignee(collect.get(0));
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
List<String> taskIdList = datas.stream().map(ProcessInfoVO::getTaskId).distinct().collect(Collectors.toList());
|
||||
List<ProjectTaskInventoryDetailEO> taskInventoryDetailList = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(taskIdList)) {
|
||||
QueryWrapper<ProjectTaskInventoryDetailEO> taskInventoryDetailQueryWrap = new QueryWrapper<>();
|
||||
taskInventoryDetailQueryWrap.lambda().in(ProjectTaskInventoryDetailEO::getTaskId, taskIdList);
|
||||
taskInventoryDetailList = this.projectTaskInventoryDetailEOService.list(taskInventoryDetailQueryWrap);
|
||||
}
|
||||
List<ProjectTaskInventoryDetailEO> finalTaskInventoryDetailList = taskInventoryDetailList;
|
||||
|
||||
List<SysUser> sysUserList = this.sysUserService.querySysUserListByIdList(userIdList);
|
||||
|
||||
Date finalCurrentDate = currentDate;
|
||||
datas.forEach(data -> {
|
||||
if (StringUtils.isNotEmpty(data.getFlowType())) {
|
||||
data.setFlowTypeShow(FlowTypeEnum.getTextByValue(data.getFlowType(), cut));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(data.getStatus())) {
|
||||
data.setStatusShow(TodoCenterStatusEnum.getTextByValue(data.getStatus(), cut));
|
||||
}
|
||||
|
||||
if (CollectionUtils.isNotEmpty(sysUserList)) {
|
||||
if (StringUtils.isNotEmpty(data.getLastAssignee())) {
|
||||
String lastUserName = sysUserList.stream().filter(sysUser -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(data.getLastAssignee(), sysUser.getId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(SysUser::getUsername).collect(Collectors.joining(","));
|
||||
data.setLastAssigneeName(lastUserName);
|
||||
}
|
||||
//如果流程没有结束,才可以展示当前处理人。
|
||||
if (!StringUtils.equals(data.getStatus(), TodoCenterStatusEnum.COMPLETED.getValue())) {
|
||||
if (StringUtils.isNotEmpty(data.getAssignee())) {
|
||||
String[] assigneeArr = data.getAssignee().split(",");
|
||||
String currentUserName = sysUserList.stream().filter(sysUser -> {
|
||||
boolean flag = false;
|
||||
for (String assignee : assigneeArr) {
|
||||
if (StringUtils.equals(assignee, sysUser.getId())) {
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).map(SysUser::getUsername).collect(Collectors.joining(","));
|
||||
data.setAssigneeName(currentUserName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//设置任务清单明细表id
|
||||
if (CollectionUtils.isNotEmpty(finalTaskInventoryDetailList)) {
|
||||
String primaryKeyId = finalTaskInventoryDetailList.stream().filter(taskInventoryDetail -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(data.getTaskId(), taskInventoryDetail.getTaskId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(ProjectTaskInventoryDetailEO::getId).collect(Collectors.joining(","));
|
||||
data.setPrimaryKeyId(primaryKeyId);
|
||||
}
|
||||
|
||||
//判断当前任务是否过期
|
||||
Date endTime = data.getEndTime();
|
||||
if (ObjectUtils.isNotEmpty(endTime)) {
|
||||
try {
|
||||
endTime = sdf.parse(sdf.format(endTime));
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (finalCurrentDate.after(endTime) || finalCurrentDate.equals(endTime)) {
|
||||
data.setEndTimePastDueFlag(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
List<String> createByUserIdList = datas.stream().map(ProcessInfoVO::getCreateBy).distinct().collect(Collectors.toList());
|
||||
List<SysUser> createByUserList = this.sysUserService.querySysUserListByIdList(createByUserIdList);
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
List<String> projectLawsInventoryIdList = datas.stream().filter(data -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.isNotEmpty(data.getProjectLawsInventoryId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(ProcessInfoVO::getProjectLawsInventoryId).collect(Collectors.toList());
|
||||
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(projectLawsInventoryIdList)) {
|
||||
QueryWrapper<ProjectLawsInventoryEO> lawsInventoryEOQueryWrapper = new QueryWrapper<>();
|
||||
lawsInventoryEOQueryWrapper.lambda().in(ProjectLawsInventoryEO::getId, projectLawsInventoryIdList);
|
||||
projectLawsInventoryEOList = this.projectLawsInventoryEOService.list(lawsInventoryEOQueryWrapper);
|
||||
}
|
||||
List<SysCategory> categoryList = this.sysCategoryService.list();
|
||||
|
||||
List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.getBaseMapper().selectItemsAll();
|
||||
for (ProcessInfoVO data : datas) {
|
||||
if (CollectionUtils.isNotEmpty(projectLawsInventoryEOList)) {
|
||||
// 处理展示的交付物类型信息
|
||||
String projectLawsInventoryId = data.getProjectLawsInventoryId();
|
||||
String deliverableTypeName = this.projectLawsInventoryEOService.getDeliverableTypeNameById(projectLawsInventoryId, cut, data.getFlowType(), projectLawsInventoryEOList, categoryList);
|
||||
data.setDeliverableTypeName(deliverableTypeName);
|
||||
|
||||
// 处理责任领域展示信息
|
||||
String dutyTerritoryName = this.projectLawsInventoryEOService.getDutyTerritoryNameById(projectLawsInventoryId, cut, projectLawsInventoryEOList, sysDictItems, ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
|
||||
data.setDutyTerritoryName(dutyTerritoryName);
|
||||
}
|
||||
}
|
||||
datas.forEach(data -> {
|
||||
// 设置发起人的名称
|
||||
if (CollectionUtils.isNotEmpty(createByUserList) && StringUtils.isNotEmpty(data.getCreateBy())) {
|
||||
String createBy = createByUserList.stream().filter(createByUser -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(createByUser.getId(), data.getCreateBy())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(SysUser::getUsername).distinct().collect(Collectors.joining(","));
|
||||
data.setCreateBy(createBy);
|
||||
}
|
||||
|
||||
if (!StringUtils.equals(data.getFlowType(), FlowTypeEnum.QDQR.getValue()) && !StringUtils.equals(data.getFlowType(), FlowTypeEnum.CERTIFICATION_LC.getValue())) {
|
||||
// 获取当前用户所拥有的待办任务信息
|
||||
List<ProcessInfoDetailEO> currentUserProcessInfoDetailInfos = processInfoDetailEOList.stream().filter(detail -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.isNotEmpty(taskStatus)) {
|
||||
flag = (StringUtils.equals(detail.getProcessInfoId(), data.getId()) && StringUtils.equals(detail.getUserId(), currentUser.getId()) && StringUtils.equals(taskStatus, detail.getStatus()));
|
||||
} else {
|
||||
flag = (StringUtils.equals(detail.getProcessInfoId(), data.getId()) && StringUtils.equals(detail.getUserId(), currentUser.getId()));
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if (CollectionUtils.isNotEmpty(currentUserProcessInfoDetailInfos)) {
|
||||
// 设置taskId
|
||||
data.setTaskId(currentUserProcessInfoDetailInfos.get(0).getTaskId());
|
||||
// 设置taskDefinitionKey
|
||||
data.setTaskDefinitionKey(currentUserProcessInfoDetailInfos.get(0).getTaskDefinitionKey());
|
||||
String taskDefinitionKeyName = "";
|
||||
if (StringUtils.equals(data.getFlowType(), FlowTypeEnum.SJFHXSHLC.getValue())) {
|
||||
taskDefinitionKeyName = DesignComplianceFlowNodeKeyEnum.getTextByValue(currentUserProcessInfoDetailInfos.get(0).getTaskDefinitionKey(), cut);
|
||||
} else if (StringUtils.equals(data.getFlowType(), FlowTypeEnum.YZFHXSCLC.getValue())) {
|
||||
taskDefinitionKeyName = VerifyComplianceFlowNodeKeyEnum.getTextByValue(currentUserProcessInfoDetailInfos.get(0).getTaskDefinitionKey(), cut);
|
||||
}
|
||||
data.setTaskDefinitionKeyName(taskDefinitionKeyName);
|
||||
}
|
||||
}
|
||||
// 如果是清单确认流程,将任务节点设置为 清单校核:Checklist verification
|
||||
if (StringUtils.equals(data.getFlowType(), FlowTypeEnum.QDQR.getValue())) {
|
||||
String taskDefinitionKeyName = "清单校核";
|
||||
if (StringUtils.equals(cut, CutEnum.EN.getValue())) {
|
||||
taskDefinitionKeyName = "Checklist verification";
|
||||
}
|
||||
data.setTaskDefinitionKeyName(taskDefinitionKeyName);
|
||||
}
|
||||
// 如果是Pre-Homo流程
|
||||
if (StringUtils.equals(data.getFlowType(), FlowTypeEnum.CERTIFICATION_LC.getValue()) && data.getEndTime() != null) {
|
||||
data.setTaskDefinitionKeyName(CertificationFlowNodeEnum.getTextByValue(data.getTaskDefinitionKey(), cut));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<ProjectCertificationInventoryEO> queryPreHomoPage(Map<String,Object> params) {
|
||||
ProjectCertificationInventoryEO pciEo = new ProjectCertificationInventoryEO();
|
||||
|
||||
String cut = (String) params.get("cut");
|
||||
String projectLibraryId = (String) params.get("projectLibraryId");
|
||||
String taskDefinitionKey = (String) params.get("taskDefinitionKey");
|
||||
Integer pageNo = Integer.parseInt((String) params.get("pageNo"));
|
||||
Integer pageSize = Integer.parseInt((String) params.get("pageSize"));
|
||||
|
||||
QueryWrapper<ProjectCertificationInventoryEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId, projectLibraryId);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
|
||||
if (StringUtils.equals(taskDefinitionKey, CertificationFlowNodeEnum.TASK_RESPONSIBILITY_CONFIRMATION.getKey())) {
|
||||
pciEo.setRoleCode(ProjectRoleEnum.PERSON_LIABLE.getValue());
|
||||
queryWrapper.lambda().eq(ProjectCertificationInventoryEO::getFlowStatus, CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue());
|
||||
} else if (StringUtils.equals(taskDefinitionKey, CertificationFlowNodeEnum.TASK_HANDLING.getKey())) {
|
||||
pciEo.setRoleCode(ProjectRoleEnum.PERSON_LIABLE.getValue());
|
||||
queryWrapper.and(queryWrap -> {
|
||||
queryWrap.lambda().eq(ProjectCertificationInventoryEO::getFlowStatus, CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue());
|
||||
queryWrap.or().lambda().eq(ProjectCertificationInventoryEO::getFlowStatus, CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue());
|
||||
});
|
||||
} else if (StringUtils.equals(taskDefinitionKey, CertificationFlowNodeEnum.TASK_REVIEW.getKey())) {
|
||||
pciEo.setRoleCode(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue());
|
||||
queryWrapper.lambda().eq(ProjectCertificationInventoryEO::getFlowStatus, CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue());
|
||||
}
|
||||
|
||||
Page<ProjectCertificationInventoryEO> page = new Page<ProjectCertificationInventoryEO>(pageNo, pageSize);
|
||||
IPage<ProjectCertificationInventoryEO> pageList = this.projectCertificationInventoryEOService.queryPage(queryWrapper, page, pciEo, cut);
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> queryProjectCertificationInventoryById(Map<String, Object> params) {
|
||||
String id = (String) params.get("id");
|
||||
String cut = (String) params.get("cut");
|
||||
if (StringUtils.isEmpty(id)) {
|
||||
throw new JeroBootException("id不能为空,请检查!");
|
||||
}
|
||||
|
||||
ProjectCertificationInventoryEO pciEo = this.projectCertificationInventoryEOService.getById(id);
|
||||
if (ObjectUtils.isEmpty(pciEo)) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
|
||||
List<ProjectCertificationInventoryEO> pciEoList = new ArrayList<>();
|
||||
pciEoList.add(pciEo);
|
||||
this.projectCertificationInventoryEOService.disposeData(pciEoList, cut);
|
||||
return Result.OK(pciEoList.get(0));
|
||||
}
|
||||
}
|
||||
+16
-1
@@ -23,6 +23,8 @@ import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.message.websocket.WebSocket;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.phone.enums.BrowseTypeEnum;
|
||||
import com.jero.modules.phone.service.IRecentBrowseService;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.*;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.CollectStatusEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.PraiseStatusEnum;
|
||||
@@ -41,6 +43,7 @@ import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jsoup.Jsoup;
|
||||
@@ -98,6 +101,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
private ISysDepartService sysDepartService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IRecentBrowseService recentBrowseService;
|
||||
|
||||
|
||||
public static final String SEARCH_FLAG = "魑";
|
||||
@@ -129,6 +134,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
problemKnowledgeBaseEO.setReleaseUserId(currentUser.getId());
|
||||
problemKnowledgeBaseEO.setReleaseTime(now);
|
||||
problemKnowledgeBaseEO.setCreateBy(currentUser.getUsername());
|
||||
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||
}
|
||||
save(problemKnowledgeBaseEO);
|
||||
@@ -428,6 +434,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
convertAfterMap.put("standard_title",problemKnowledgeBaseEO.getStandTitle());
|
||||
convertAfterMap.put("content",problemKnowledgeBaseEO.getContent());
|
||||
convertAfterMap.put("create_time",new Date());
|
||||
convertAfterMap.put("create_by",problemKnowledgeBaseEO.getCreateBy());
|
||||
convertAfterMap.put("show_permissions",problemKnowledgeBaseEO.getShowPermissions());
|
||||
}
|
||||
}
|
||||
@@ -470,6 +477,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
|
||||
// 删除知识分享浏览记录表信息.
|
||||
this.recentBrowseService.deleteByBrowseTypeAndBrowseDataIdList(BrowseTypeEnum.ZSFX.getValue(),Arrays.asList(id.split(",")));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -494,6 +504,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
|
||||
this.problemKnowledgeBaseCommentEOService.remove(deleteWrapper);
|
||||
|
||||
// 删除知识分享浏览记录表信息.
|
||||
this.recentBrowseService.deleteByBrowseTypeAndBrowseDataIdList(BrowseTypeEnum.ZSFX.getValue(),ids);
|
||||
|
||||
for (String problemKnowledgeBaseId : ids) {
|
||||
this.deleteElasticsearchData(problemKnowledgeBaseId);
|
||||
}
|
||||
@@ -509,7 +522,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
public ProblemKnowledgeBaseEO queryById(String id,String cut) {
|
||||
ProblemKnowledgeBaseEO problemKnowledgeBaseEO = getById(id);
|
||||
List<ProblemKnowledgeBaseEO> problemKnowledgeBaseEOList = new ArrayList<>();
|
||||
problemKnowledgeBaseEOList.add(problemKnowledgeBaseEO);
|
||||
if (ObjectUtils.isNotEmpty(problemKnowledgeBaseEO)) {
|
||||
problemKnowledgeBaseEOList.add(problemKnowledgeBaseEO);
|
||||
}
|
||||
this.disposeData(problemKnowledgeBaseEOList,cut);
|
||||
if (CollectionUtils.isNotEmpty(problemKnowledgeBaseEOList)) {
|
||||
problemKnowledgeBaseEO = problemKnowledgeBaseEOList.get(0);
|
||||
|
||||
+10
-1
@@ -1220,7 +1220,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
detail.setTaskDefinitionKey(taskDefinitionKey);
|
||||
detail.setStatus(TaskStatusEnum.NOT_DONE.getValue());
|
||||
detail.setCreateTime(new Date());
|
||||
detail.setStatus(TaskStatusEnum.NOT_DONE.getValue());
|
||||
});
|
||||
|
||||
List<String> userIdList = processInfoDetailEOList.stream().map(ProcessInfoDetailEO::getUserId).distinct().collect(Collectors.toList());
|
||||
@@ -1228,6 +1227,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
removeWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId,processInfoId);
|
||||
removeWrap.lambda().in(ProcessInfoDetailEO::getUserId,userIdList);
|
||||
removeWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,taskDefinitionKey);
|
||||
if(!StringUtils.equals(taskDefinitionKey,CertificationFlowNodeEnum.RZGCSSC.getKey())){
|
||||
List<String> dataIdList = processInfoDetailEOList.stream().map(ProcessInfoDetailEO::getProjectLawsInventoryId).distinct().collect(Collectors.toList());
|
||||
removeWrap.lambda().in(ProcessInfoDetailEO::getProjectLawsInventoryId,dataIdList);
|
||||
}
|
||||
// 删除用户在这个认证清单流程中其它的待办任务
|
||||
this.processInfoDetailEOService.remove(removeWrap);
|
||||
|
||||
@@ -2016,6 +2019,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRTJRW.getKey());
|
||||
detailUpdateWrap.in(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList);
|
||||
detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue());
|
||||
detailUpdateWrap.set(ProcessInfoDetailEO::getUpdateTime,new Date());
|
||||
detailUpdateWrap.set(ProcessInfoDetailEO::getUpdateBy,currentUser.getUsername());
|
||||
this.processInfoDetailEOService.update(detailUpdateWrap);
|
||||
|
||||
// 给认证工程师分配待办中心的任务 认证工程师审查
|
||||
@@ -2102,6 +2107,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRJSRW.getKey());
|
||||
detailUpdateWrap.in(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList);
|
||||
detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue());
|
||||
detailUpdateWrap.set(ProcessInfoDetailEO::getUpdateTime,new Date());
|
||||
detailUpdateWrap.set(ProcessInfoDetailEO::getUpdateBy,currentUser.getUsername());
|
||||
this.processInfoDetailEOService.update(detailUpdateWrap);
|
||||
|
||||
// 给责任人分配待办中心的任务 (待提交)
|
||||
@@ -2217,6 +2224,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRJSRW.getKey());
|
||||
detailUpdateWrap.in(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList);
|
||||
detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue());
|
||||
detailUpdateWrap.set(ProcessInfoDetailEO::getUpdateTime,new Date());
|
||||
detailUpdateWrap.set(ProcessInfoDetailEO::getUpdateBy,currentUser.getUsername());
|
||||
this.processInfoDetailEOService.update(detailUpdateWrap);
|
||||
|
||||
this.certificationInventoryEOListSortByInventoryVerifyEndTimeAsc(projectCertificationInventoryEOList);
|
||||
|
||||
+15
-5
@@ -16,6 +16,8 @@ import com.jero.modules.document.utils.ReadWordUtil;
|
||||
import com.jero.modules.dummy.enums.InventoryStateEnum;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.phone.enums.BrowseTypeEnum;
|
||||
import com.jero.modules.phone.service.IRecentBrowseService;
|
||||
import com.jero.modules.report.entity.LawsMonthlyReportManageEO;
|
||||
import com.jero.modules.report.mapper.LawsMonthlyReportManageEOMapper;
|
||||
import com.jero.modules.report.service.ILawsMonthlyReportManageEOService;
|
||||
@@ -52,6 +54,8 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
|
||||
public static final String SEARCH_FLAG = "魑";//标识(es数据带此标识的代表全文和段落的数据,不带此标识的代表列表数据)
|
||||
|
||||
@Autowired
|
||||
private IRecentBrowseService recentBrowseService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -90,6 +94,8 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
// 删除法规月报浏览记录表信息.
|
||||
this.recentBrowseService.deleteByBrowseTypeAndBrowseDataIdList(BrowseTypeEnum.FGYB.getValue(),Arrays.asList(id.split(",")));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -101,6 +107,8 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
// 删除法规月报浏览记录表信息.
|
||||
this.recentBrowseService.deleteByBrowseTypeAndBrowseDataIdList(BrowseTypeEnum.FGYB.getValue(),ids);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -192,20 +200,20 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
//文件相关封装中文的全文内容(es) 非搜索条件下的:flag---SEARCH_FLAG
|
||||
putMap(id, "法规月报",
|
||||
fileText, monthlyReportManageEO.getName(),
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCn, SEARCH_FLAG);
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCn, SEARCH_FLAG,monthlyReportManageEO);
|
||||
//文件相关封装英文的全文内容(es)
|
||||
putMap(id, "monthly report",
|
||||
fileText, monthlyReportManageEO.getName(),
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEn, SEARCH_FLAG);
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEn, SEARCH_FLAG,monthlyReportManageEO);
|
||||
|
||||
//文件相关封装中文的全文内容(es) 搜索条件下的: flag---null
|
||||
putMap(id + monthlyReportManageEO.getFileId(), "法规月报",
|
||||
fileText, monthlyReportManageEO.getName(),
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCnForSearch, null);
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCnForSearch, null,monthlyReportManageEO);
|
||||
//文件相关封装英文的全文内容(es)
|
||||
putMap(id + monthlyReportManageEO.getFileId(), "monthly report",
|
||||
fileText, monthlyReportManageEO.getName(),
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEnForSearch, null);
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEnForSearch, null,monthlyReportManageEO);
|
||||
|
||||
mapListTempCn.add(stringMapCn);
|
||||
mapListTempCn.add(stringMapCnForSearch);
|
||||
@@ -250,7 +258,8 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
String content, String title ,
|
||||
String fileName, String fileId, Date issueTime, String cut,
|
||||
Map<String, Object> stringMap,
|
||||
String flag){
|
||||
String flag,
|
||||
LawsMonthlyReportManageEO monthlyReportManageEO){
|
||||
stringMap.put("id", id);
|
||||
stringMap.put("module_type", moduleType);
|
||||
stringMap.put("module_type_flag", ModuleTypeFlagEnum.LAWS_MONTHLY_REPORT.getValue()); // 默认法规月报标识
|
||||
@@ -259,6 +268,7 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
stringMap.put("file_name", fileName);
|
||||
stringMap.put("file_id", fileId);
|
||||
stringMap.put("create_time", issueTime);
|
||||
stringMap.put("create_by", monthlyReportManageEO.getCreateBy());
|
||||
stringMap.put("cut",cut);
|
||||
stringMap.put("flag",flag);
|
||||
|
||||
|
||||
+30
@@ -12,6 +12,7 @@ import com.jero.common.constant.enums.ModuleEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.common.es.JeroElasticsearchTemplate;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.DateUtils;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
import com.jero.modules.collection.entity.OnlCgformCollection;
|
||||
@@ -20,6 +21,7 @@ import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
import com.jero.modules.document.enums.SearchEnum;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||
import com.jero.modules.enums.DictCodeEnum;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseUserEO;
|
||||
@@ -681,6 +683,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
|
||||
List<Map<String, Object>> list = (List<Map<String, Object>>) (((Map) search.get("hits")).get("hits"));
|
||||
List<Map<String, Object>> mapList = new ArrayList<>();
|
||||
List<SysDictItem> stateSysDictItems = this.sysDictItemServiceImpl.selectItemsByDictCode(DictCodeEnum.STATE.getValue());
|
||||
for (Map<String, Object> map : list) {
|
||||
Map<String, Object> mapSource = (Map<String, Object>) map.get("_source");
|
||||
Map<String, Object> mapHighlight = (Map<String, Object>) map.get("highlight");
|
||||
@@ -700,6 +703,28 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
mapSource.put("file_text","");
|
||||
}
|
||||
}
|
||||
|
||||
String state = (String) mapSource.get("state");
|
||||
String state_dictText = "";
|
||||
for (SysDictItem dictItem : stateSysDictItems) {
|
||||
if (StringUtils.equals(dictItem.getItemValue(), state)) {
|
||||
if (StringUtils.equals(cut, CutEnum.CN.getValue())) {
|
||||
state_dictText = dictItem.getItemText();
|
||||
} else {
|
||||
state_dictText = dictItem.getEnName();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
mapSource.put("state_dictText", state_dictText);
|
||||
|
||||
String create_time_str = "";
|
||||
if(ObjectUtils.isNotEmpty(mapSource.get("create_time"))){
|
||||
create_time_str = DateUtils.formatTime((Long) mapSource.get("create_time"));
|
||||
}
|
||||
mapSource.put("create_time_str",create_time_str);
|
||||
|
||||
mapList.add(mapSource);
|
||||
}
|
||||
|
||||
@@ -1442,6 +1467,11 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
mapSource.put("content","");
|
||||
}*/
|
||||
}
|
||||
String create_time_str = "";
|
||||
if(ObjectUtils.isNotEmpty(mapSource.get("create_time"))){
|
||||
create_time_str = DateUtils.formatTime((Long) mapSource.get("create_time"));
|
||||
}
|
||||
mapSource.put("create_time_str",create_time_str);
|
||||
mapList.add(mapSource);
|
||||
}
|
||||
|
||||
|
||||
+6
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.es.JeroElasticsearchTemplate;
|
||||
import com.jero.common.util.DateUtils;
|
||||
import com.jero.modules.document.enums.SearchEnum;
|
||||
import com.jero.modules.searchcenter.service.ILawsMonthlyReportSearchService;
|
||||
import com.jero.modules.searchcenter.vo.SearchVO;
|
||||
@@ -211,6 +212,11 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
mapSource.put(key,fieldConyent);
|
||||
}
|
||||
}
|
||||
String create_time_str = "";
|
||||
if(ObjectUtils.isNotEmpty(mapSource.get("create_time"))){
|
||||
create_time_str = DateUtils.formatTime((Long) mapSource.get("create_time"));
|
||||
}
|
||||
mapSource.put("create_time_str",create_time_str);
|
||||
mapList.add(mapSource);
|
||||
}
|
||||
|
||||
|
||||
+7
@@ -37,4 +37,11 @@ public interface ProcessInfoEOMapper extends BaseMapper<ProcessInfoEO> {
|
||||
* @return
|
||||
*/
|
||||
IPage<ProcessInfoVO> queryLawsAssessPageList(IPage page, Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 手机端-查询待办任务数据
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
IPage<ProcessInfoVO> queryPhoneTodoTaskListList(IPage page, Map<String, Object> params);
|
||||
}
|
||||
|
||||
+176
-1
@@ -33,11 +33,29 @@
|
||||
and temp.standard_info like CONCAT(CONCAT('%',#{params.standardInfo}),'%')
|
||||
</if>
|
||||
<if test="params.flowType != null and params.flowType !=''">
|
||||
and temp.flow_type = #{params.flowType}
|
||||
and temp.flow_type in
|
||||
<foreach collection="params.flowType.split(',')" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.status != null and params.status !=''">
|
||||
and temp.status = #{params.status}
|
||||
</if>
|
||||
<if test="params.frontEndTime != null and params.frontEndTime !=''">
|
||||
and (
|
||||
temp.end_time >= #{params.frontEndTime}
|
||||
<if test="params.afterEndTime != null and params.afterEndTime !=''">
|
||||
and temp.end_time <= #{params.afterEndTime}
|
||||
</if>
|
||||
)
|
||||
</if>
|
||||
<!-- 手机端查询参数,根据phoneQueryValue查询 标准信息、项目名称 -->
|
||||
<if test="params.phoneQueryValue != null and params.phoneQueryValue !=''">
|
||||
and (
|
||||
temp.standard_info like CONCAT(CONCAT('%',#{params.phoneQueryValue}),'%')
|
||||
or temp.project_name like CONCAT(CONCAT('%',#{params.phoneQueryValue}),'%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
@@ -374,4 +392,161 @@
|
||||
order by temp.end_time desc
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryPhoneTodoTaskListList" resultType="com.jero.modules.todoCenter.vo.ProcessInfoVO">
|
||||
select
|
||||
temp.*,
|
||||
(case temp.flow_type when '10' THEN '1' when '21' THEN '2' when '2' THEN '3' when '4' THEN '4' END) as flow_type_show_order_by
|
||||
from (
|
||||
SELECT
|
||||
pi.id,
|
||||
pi.project_library_id,
|
||||
pi.project_laws_inventory_id,
|
||||
pi.buss_document_library_id,
|
||||
pi.acti_proc_inst_id,
|
||||
concat(
|
||||
pni.project_name,
|
||||
'-',
|
||||
pyni.year_name,
|
||||
'-',
|
||||
(
|
||||
SELECT
|
||||
<if test="params.cut == 'cn'">
|
||||
CASE WHEN GROUP_CONCAT( item_text SEPARATOR ',' ) IS NULL THEN '' ELSE GROUP_CONCAT( item_text SEPARATOR ',' ) END AS item_text
|
||||
</if>
|
||||
<if test="params.cut == 'en'">
|
||||
CASE WHEN GROUP_CONCAT( en_name SEPARATOR ',' ) IS NULL THEN '' ELSE GROUP_CONCAT( en_name SEPARATOR ',' ) END AS item_text
|
||||
</if>
|
||||
FROM
|
||||
sys_dict_item
|
||||
WHERE
|
||||
FIND_IN_SET( item_value, plb.target_market ) > 0
|
||||
AND dict_id = ( SELECT id FROM sys_dict WHERE dict_code = 'region' )
|
||||
) ,
|
||||
'-',
|
||||
plb.project_version
|
||||
) AS project_name,
|
||||
pyni.year_name,
|
||||
pli.serial_number,
|
||||
pli.title,
|
||||
bdl.title_en,
|
||||
<if test="params.cut == 'cn'">
|
||||
concat(pli.serial_number,' ',pli.title) as standard_info,
|
||||
</if>
|
||||
<if test="params.cut == 'en'">
|
||||
concat(pli.serial_number,' ',bdl.title_en) as standard_info,
|
||||
</if>
|
||||
(case pi.flow_type when '32' THEN '2' when '34' THEN '4' else pi.flow_type END) as flow_type,
|
||||
pi.create_by,
|
||||
pi.end_time,
|
||||
pi.STATUS,
|
||||
pi.prc_num,
|
||||
pi.prc_name,
|
||||
plb.project_name_id,
|
||||
plb.target_market,
|
||||
plb.studio_engineer,
|
||||
plb.project_version,
|
||||
plb.parent_id
|
||||
FROM
|
||||
process_info pi
|
||||
LEFT JOIN project_library_base plb ON plb.id = pi.project_library_id
|
||||
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
|
||||
LEFT JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
|
||||
LEFT JOIN project_laws_inventory pli ON pi.project_laws_inventory_id = pli.id
|
||||
LEFT JOIN buss_document_library bdl ON pi.buss_document_library_id = bdl.id
|
||||
where (
|
||||
pi.id IN (
|
||||
SELECT
|
||||
pid.process_info_id
|
||||
FROM
|
||||
process_info_detail pid
|
||||
where pid.user_id = #{params.currentUserId} and pid.status = #{params.taskStatus}
|
||||
)
|
||||
)
|
||||
AND pi.flow_type IN
|
||||
<foreach collection="params.flowTypeList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
union
|
||||
SELECT
|
||||
pi.id,
|
||||
pi.project_library_id,
|
||||
pi.project_laws_inventory_id,
|
||||
pi.buss_document_library_id,
|
||||
pi.acti_proc_inst_id,
|
||||
concat(
|
||||
pni.project_name,
|
||||
'-',
|
||||
pyni.year_name,
|
||||
'-',
|
||||
(
|
||||
SELECT
|
||||
<if test="params.cut == 'cn'">
|
||||
CASE WHEN GROUP_CONCAT( item_text SEPARATOR ',' ) IS NULL THEN '' ELSE GROUP_CONCAT( item_text SEPARATOR ',' ) END AS item_text
|
||||
</if>
|
||||
<if test="params.cut == 'en'">
|
||||
CASE WHEN GROUP_CONCAT( en_name SEPARATOR ',' ) IS NULL THEN '' ELSE GROUP_CONCAT( en_name SEPARATOR ',' ) END AS item_text
|
||||
</if>
|
||||
FROM
|
||||
sys_dict_item
|
||||
WHERE
|
||||
FIND_IN_SET( item_value, plb.target_market ) > 0
|
||||
AND dict_id = ( SELECT id FROM sys_dict WHERE dict_code = 'region' )
|
||||
) ,
|
||||
'-',
|
||||
plb.project_version
|
||||
) AS project_name,
|
||||
pyni.year_name,
|
||||
'--' as serial_number,
|
||||
'--' as standard_info,
|
||||
'' as title,
|
||||
'' as title_en,
|
||||
pi.flow_type,
|
||||
pi.create_by,
|
||||
(
|
||||
select
|
||||
pid.end_time
|
||||
from
|
||||
process_info_detail pid
|
||||
where pid.process_info_id = pi.id and pid.STATUS = 'NotDone' and pid.end_time is not null order by pid.end_time asc limit 1
|
||||
) as end_time,
|
||||
pi.STATUS,
|
||||
pi.prc_num,
|
||||
pi.prc_name,
|
||||
plb.project_name_id,
|
||||
plb.target_market,
|
||||
plb.studio_engineer,
|
||||
plb.project_version,
|
||||
plb.parent_id
|
||||
FROM
|
||||
process_info pi
|
||||
LEFT JOIN project_library_base plb ON plb.id = pi.project_library_id
|
||||
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
|
||||
LEFT JOIN project_year_name_info pyni ON pyni.id = plb.year_name_id
|
||||
LEFT JOIN project_laws_inventory pli ON pi.project_laws_inventory_id = pli.id
|
||||
WHERE (
|
||||
pi.id IN (
|
||||
SELECT
|
||||
pid.process_info_id
|
||||
FROM
|
||||
process_info_detail pid
|
||||
where pid.user_id = #{params.currentUserId} and pid.status = #{params.taskStatus}
|
||||
)
|
||||
)
|
||||
AND pi.flow_type IN
|
||||
<foreach collection="params.qdqrFlowTypeValue" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
)temp
|
||||
<include refid="BaseQuerySql"/>
|
||||
order by
|
||||
temp.end_time IS NULL,
|
||||
temp.end_time,
|
||||
temp.project_name IS NULL,
|
||||
temp.project_name,
|
||||
standard_info IS NULL,
|
||||
standard_info,
|
||||
flow_type_show_order_by
|
||||
ASC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+6
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.todoCenter.vo.ProcessInfoVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -126,4 +128,8 @@ public interface IProcessInfoEOService extends IService<ProcessInfoEO> {
|
||||
* @return
|
||||
*/
|
||||
Result<?> complianceDataMigration(Map<String, Object> params);
|
||||
|
||||
void disposeData(List<ProcessInfoVO> datas, String cut, String taskStatus);
|
||||
|
||||
public void setPersonChargeFeedback(List<ProcessInfoVO> datas);
|
||||
}
|
||||
|
||||
+2
@@ -528,6 +528,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
||||
* @param datas
|
||||
* @param cut
|
||||
*/
|
||||
@Override
|
||||
public void disposeData(List<ProcessInfoVO> datas, String cut, String taskStatus){
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
@@ -847,6 +848,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
||||
* 设置符合性流程中责任人反馈意见
|
||||
* @param datas
|
||||
*/
|
||||
@Override
|
||||
public void setPersonChargeFeedback(List<ProcessInfoVO> datas){
|
||||
//符合性流程实例id
|
||||
List<String> complianceProcessPrcIdList = datas.stream().filter(data -> {
|
||||
|
||||
Reference in New Issue
Block a user