ソースを参照

Merge remote-tracking branch 'origin/master' into master

yangyj 3 年 前
コミット
e037a3be6f
21 ファイル変更569 行追加36 行削除
  1. 34 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/MessageWarningDTO.java
  2. 67 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/MessageWarning.java
  3. 17 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/MessageWarningClient.java
  4. 4 2
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/OperationLogClient.java
  5. 4 1
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/RecycleBinClient.java
  6. 64 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/MessageWarningVO.java
  7. 1 1
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/WbsTreeContractClient.java
  8. 30 6
      blade-service/blade-business/src/main/java/org/springblade/business/controller/ArchiveFileController.java
  9. 30 8
      blade-service/blade-business/src/main/java/org/springblade/business/controller/ContractLogController.java
  10. 2 2
      blade-service/blade-business/src/main/java/org/springblade/business/controller/ImageClassificationFileController.java
  11. 44 8
      blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java
  12. 107 0
      blade-service/blade-business/src/main/java/org/springblade/business/controller/MessageWarningController.java
  13. 3 1
      blade-service/blade-business/src/main/java/org/springblade/business/controller/UserOpinionController.java
  14. 19 0
      blade-service/blade-business/src/main/java/org/springblade/business/feignClient/MessageWarningClientImpl.java
  15. 3 4
      blade-service/blade-business/src/main/java/org/springblade/business/feignClient/OperationLogClientImpl.java
  16. 4 2
      blade-service/blade-business/src/main/java/org/springblade/business/feignClient/RecycleBinClientImpl.java
  17. 3 1
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.xml
  18. 33 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/MessageWarningMapper.java
  19. 23 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/MessageWarningMapper.xml
  20. 37 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/IMessageWarningService.java
  21. 40 0
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/MessageWarningServiceImpl.java

+ 34 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/MessageWarningDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.business.entity.MessageWarning;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-09-05
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class MessageWarningDTO extends MessageWarning {
+	private static final long serialVersionUID = 1L;
+
+}

+ 67 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/MessageWarning.java

@@ -0,0 +1,67 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.springblade.core.mp.base.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2022-09-05
+ */
+@Data
+@TableName("u_message_warning")
+@EqualsAndHashCode(callSuper = true)
+public class MessageWarning extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("消息类型:1任务催办,2监测预警,3废除通知,4工单反馈,5系统消息")
+    private Integer type;
+
+    @ApiModelProperty("时间")
+    private String time;
+
+    @ApiModelProperty("内容")
+    private String content;
+
+    @ApiModelProperty("推送的目标人")
+    private Long pushUser;
+
+    @ApiModelProperty("项目ID")
+    private Long projectId;
+
+    @ApiModelProperty("合同段ID")
+    private Long contractId;
+
+    /**
+     * 是否已读
+     */
+    @ApiModelProperty("是否已读, 1为是")
+    private Integer isRead;
+
+    @ApiModelProperty("创建人")
+    private String createUserName;
+
+
+}

+ 17 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/MessageWarningClient.java

@@ -0,0 +1,17 @@
+package org.springblade.business.feign;
+
+import org.springblade.business.vo.MessageWarningVO;
+import org.springblade.common.constant.BusinessConstant;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+@FeignClient(value = BusinessConstant.APPLICATION_WEATHER_NAME)
+public interface MessageWarningClient {
+
+    String API_PREFIX = "/messageWarningClient";
+
+    @PostMapping(API_PREFIX + "/savePushUserMessageWarning")
+    void savePushUserMessageWarning(@RequestBody MessageWarningVO vo);
+
+}

+ 4 - 2
blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/OperationLogClient.java

@@ -6,6 +6,8 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 
+import java.util.List;
+
 @FeignClient(value =
         BusinessConstant.APPLICATION_WEATHER_NAME
 )
@@ -16,9 +18,9 @@ public interface OperationLogClient {
     /**
      * 保存操作日志
      * @param type 操作类型,详见业务字典中操作类型
-     * @param operationObjId 操作的业务对象ID
+     * @param operationObjIds 操作的业务对象ID
      */
     @PostMapping(API_PREFIX + "/saveUserOperationLog")
-    void saveUserOperationLog(@RequestBody Integer type, @RequestParam String operationModule, @RequestParam String operationView, @RequestParam Object operationObjId, @RequestParam String operationObjName);
+    void saveUserOperationLog(@RequestParam Integer type, @RequestParam String operationModule, @RequestParam String operationView, @RequestBody List<String> operationObjIds, @RequestParam String operationObjName);
 
 }

+ 4 - 1
blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/RecycleBinClient.java

@@ -3,8 +3,11 @@ package org.springblade.business.feign;
 import org.springblade.common.constant.BusinessConstant;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 
+import java.util.List;
+
 @FeignClient(value = BusinessConstant.APPLICATION_WEATHER_NAME)
 public interface RecycleBinClient {
 
@@ -23,6 +26,6 @@ public interface RecycleBinClient {
      * @param contractId 合同段ID
      */
     @PostMapping(API_PREFIX + "/saveDelBusinessData")
-    void saveDelBusinessData(@RequestParam String businessIds, @RequestParam String title, @RequestParam Integer deletedType, @RequestParam String position, @RequestParam String projectId, @RequestParam String contractId);
+    void saveDelBusinessData(@RequestBody List<String> businessIds, @RequestParam String title, @RequestParam Integer deletedType, @RequestParam String position, @RequestParam String projectId, @RequestParam String contractId);
 
 }

+ 64 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/MessageWarningVO.java

@@ -0,0 +1,64 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.apache.http.client.utils.DateUtils;
+import org.springblade.business.entity.MessageWarning;
+import org.springblade.common.utils.SnowFlakeUtil;
+import org.springblade.core.secure.utils.AuthUtil;
+
+import java.util.Date;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2022-09-05
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class MessageWarningVO extends MessageWarning {
+	private static final long serialVersionUID = 1L;
+
+	@ApiModelProperty("开始时间")
+	private String startTime;
+
+	@ApiModelProperty("结束时间")
+	private String endTime;
+
+	public MessageWarningVO(Long projectId, Long contractId, Integer type, String content, Long pushUser, Integer isRead){
+		this.setId(SnowFlakeUtil.getId());
+		this.setProjectId(projectId);
+		this.setContractId(contractId);
+		this.setType(type);
+		this.setContent(content);
+		this.setPushUser(pushUser);
+		this.setIsRead(isRead);
+
+		this.setCreateUserName(AuthUtil.getNickName());
+		this.setCreateUser(AuthUtil.getUserId());
+		Date nowDate = new Date();
+		this.setCreateTime(nowDate);
+		this.setTime(DateUtils.formatDate(nowDate, "yyyy-MM-dd HH:mm:ss"));
+	}
+
+	public MessageWarningVO(){}
+
+}

+ 1 - 1
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/WbsTreeContractClient.java

@@ -74,7 +74,7 @@ public interface WbsTreeContractClient {
     WbsTreeContract getContractNodeByPrimaryKeyId(@RequestParam String primaryKeyId);
 
     @PostMapping(API_PREFIX + "/removeContractTreeNode")
-    Boolean removeContractTreeNode(@RequestParam List<String> ids);
+    Boolean removeContractTreeNode(@RequestBody List<String> ids);
 
     /**
      * 根据合同段ID和id获取合同段划分树的节点信息

+ 30 - 6
blade-service/blade-business/src/main/java/org/springblade/business/controller/ArchiveFileController.java

@@ -13,12 +13,15 @@ import lombok.AllArgsConstructor;
 
 import org.apache.commons.lang.StringUtils;
 import org.springblade.business.entity.Task;
+import org.springblade.business.feign.MessageWarningClient;
 import org.springblade.business.feign.OperationLogClient;
 import org.springblade.business.feign.RecycleBinClient;
 import org.springblade.business.feign.TaskClient;
 import org.springblade.business.utils.FileUtils;
+import org.springblade.business.vo.MessageWarningVO;
 import org.springblade.business.vo.StartTaskVO;
 import org.springblade.business.vo.TaskVO;
+import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.evisa.feign.EVisaClient;
@@ -70,6 +73,8 @@ public class ArchiveFileController extends BladeController {
 
 	private final RecycleBinClient recycleBinClient;
 
+	private final MessageWarningClient messageWarningClient;
+
 	/**
 	 * 批量认证(特殊签章 签个透明空白图片,主要目的是在验签的时候有验签信息 )
 	 */
@@ -156,10 +161,29 @@ public class ArchiveFileController extends BladeController {
 					//已审批的任务,修改业务数据的审批状态为未上报并撤签即可
 					this.archiveFileService.update(Wrappers.<ArchiveFile>lambdaUpdate().set(ArchiveFile::getEVisaFile, null).set(ArchiveFile::getStatus, 0).in(ArchiveFile::getId, Arrays.asList(task.getFormDataId().split(","))));
 				}
-				ArchiveFile archiveFile = this.archiveFileService.getBaseMapper().selectById(task.getFormDataId());
+				List<ArchiveFile> archiveFiles = this.archiveFileService.getBaseMapper().selectBatchIds(Arrays.asList(task.getFormDataId().split(",")));
+				for(ArchiveFile archiveFile : archiveFiles){
+					try{
+						//保证推送人
+						this.messageWarningClient.savePushUserMessageWarning(new MessageWarningVO(
+								Long.parseLong(archiveFile.getProjectId()),
+								Long.parseLong(archiveFile.getContractId()),
+								//废除提醒
+								3,
+								//内容
+								AuthUtil.getNickName() + "废除了【" + archiveFile.getFileName() + "】流程,请及时查看",
+								//推送的目标人
+								archiveFile.getCreateUser(),
+								//默认未读
+								0
+						));
+					}catch (Exception e){
+						e.printStackTrace();
+					}
 
-				//保存操作记录
-				this.operationLogClient.saveUserOperationLog(26, "其它文件", "工程文件", task.getFormDataId(), archiveFile.getFileName());
+					//保存操作记录
+					this.operationLogClient.saveUserOperationLog(26, "其它文件", "工程文件", Func.toStrList(archiveFile.getId().toString()), archiveFile.getFileName());
+				}
 			}
 		}
 
@@ -188,7 +212,7 @@ public class ArchiveFileController extends BladeController {
 			}
 
 			//新增操作日志
-			this.operationLogClient.saveUserOperationLog(25, "其它文件", "工程文件", archiveTaskIds, title);
+			this.operationLogClient.saveUserOperationLog(25, "其它文件", "工程文件", Func.toStrList(archiveTaskIds), title);
 
 			//启动流程
 			this.taskClient.startTask(taskVO);
@@ -314,10 +338,10 @@ public class ArchiveFileController extends BladeController {
 				}
 
 				//保存操作日志
-				this.operationLogClient.saveUserOperationLog(27, "其他文件", "工程文件", ids, title);
+				this.operationLogClient.saveUserOperationLog(27, "其他文件", "工程文件", Func.toStrList(ids), title);
 
 				//保存回收站记录
-				this.recycleBinClient.saveDelBusinessData(ids, title, 1, position, fileList.get(0).getProjectId(), fileList.get(0).getContractId());
+				this.recycleBinClient.saveDelBusinessData(Func.toStrList(ids), title, 1, position, fileList.get(0).getProjectId(), fileList.get(0).getContractId());
 			}
 		}catch (Exception e){
 			e.printStackTrace();

+ 30 - 8
blade-service/blade-business/src/main/java/org/springblade/business/controller/ContractLogController.java

@@ -11,13 +11,13 @@ import lombok.AllArgsConstructor;
 import org.apache.commons.lang.StringUtils;
 import org.springblade.business.entity.ContractLog;
 import org.springblade.business.entity.Task;
+import org.springblade.business.feign.MessageWarningClient;
 import org.springblade.business.feign.OperationLogClient;
 import org.springblade.business.feign.TaskClient;
-import org.springblade.business.vo.ContractLogVO;
-import org.springblade.business.vo.FileUserVO;
-import org.springblade.business.vo.StartTaskVO;
-import org.springblade.business.vo.TaskVO;
+import org.springblade.business.vo.*;
+import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
 import org.springblade.manager.feign.WbsTreeContractClient;
 import org.springblade.manager.vo.WbsTreeContractTreeVOS;
 import org.springframework.beans.BeanUtils;
@@ -49,6 +49,8 @@ public class ContractLogController extends BladeController {
 
 	private final OperationLogClient operationLogClient;
 
+	private final MessageWarningClient messageWarningClient;
+
 	/**
 	 * 获取合同段当前日志节点下的填报日期记录
 	 */
@@ -81,10 +83,30 @@ public class ContractLogController extends BladeController {
 					// todo ================== 调用撤签
 				}
 
-				ContractLog contractLog = this.contractLogService.getBaseMapper().selectById(task.getFormDataId());
+				List<ContractLog> contractLogs = this.contractLogService.getBaseMapper().selectBatchIds(Arrays.asList(task.getFormDataId().split(",")));
+				for(ContractLog contractLog : contractLogs){
+					try{
+						//保存推送记录
+						this.messageWarningClient.savePushUserMessageWarning(new MessageWarningVO(
+								contractLog.getProjectId(),
+								contractLog.getContractId(),
+								//废除通知
+								3,
+								//内容
+								AuthUtil.getNickName() + "废除了【" + contractLog.getFileName() + "】流程,请及时查看",
+								//推送的目标人
+								contractLog.getCreateUser(),
+								//默认未读
+								0
+
+						));
+					}catch (Exception e){
+						e.printStackTrace();
+					}
 
-				//保存操作记录
-				this.operationLogClient.saveUserOperationLog(9, "台账日志", "日志填报", task.getFormDataId(), contractLog.getFileName());
+					//保存操作记录
+					this.operationLogClient.saveUserOperationLog(9, "台账日志", "日志填报", Func.toStrList(task.getFormDataId()), contractLog.getFileName());
+				}
 			}
 		}
 		return R.data(true);
@@ -123,7 +145,7 @@ public class ContractLogController extends BladeController {
 				}
 
 				//保存操作记录
-				this.operationLogClient.saveUserOperationLog(8, "台账日志", "日志填报", startTaskVO.getIds(), title);
+				this.operationLogClient.saveUserOperationLog(8, "台账日志", "日志填报", Func.toStrList(startTaskVO.getIds()), title);
 				return R.data(true);
 			}
 		}

+ 2 - 2
blade-service/blade-business/src/main/java/org/springblade/business/controller/ImageClassificationFileController.java

@@ -589,10 +589,10 @@ public class ImageClassificationFileController extends BladeController {
 			}
 
 			//保存操作日志
-			this.operationLogClient.saveUserOperationLog(31, "其它文件", "影像资料", ids, title);
+			this.operationLogClient.saveUserOperationLog(31, "其它文件", "影像资料", Func.toStrList(ids), title);
 
 			//保存回收站记录
-			this.recycleBinClient.saveDelBusinessData(ids, title, 1, position, fileList.get(0).getProjectId().toString(), fileList.get(0).getContractId().toString());
+			this.recycleBinClient.saveDelBusinessData(Func.toStrList(ids), title, 1, position, fileList.get(0).getProjectId().toString(), fileList.get(0).getContractId().toString());
 		}catch (Exception e){
 			e.printStackTrace();
 		}

+ 44 - 8
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -15,6 +15,7 @@ import javax.validation.Valid;
 import org.apache.commons.lang.StringUtils;
 import org.jetbrains.annotations.NotNull;
 import org.springblade.business.entity.*;
+import org.springblade.business.feign.MessageWarningClient;
 import org.springblade.business.feign.OperationLogClient;
 import org.springblade.business.feign.RecycleBinClient;
 import org.springblade.business.feign.TaskClient;
@@ -98,6 +99,8 @@ public class InformationWriteQueryController extends BladeController {
 
 	private final NewIOSSClient newIOSSClient;
 
+	private final MessageWarningClient messageWarningClient;
+
 	/**
 	 * 初始化合同段导图树
 	 */
@@ -550,6 +553,8 @@ public class InformationWriteQueryController extends BladeController {
 						wrapper.set(InformationQuery::getStatus, 0);
 						//将电签的pdf路径置空
 						wrapper.set(InformationQuery::getEVisaPdfUrl, null);
+						//将上报批次置空
+						wrapper.set(InformationQuery::getReportNumber, null);
 
 						this.informationQueryService.update(wrapper.in(InformationQuery::getId, Arrays.asList(task.getFormDataId().split(","))));
 					}
@@ -558,10 +563,40 @@ public class InformationWriteQueryController extends BladeController {
 					String title = "批量废除";
 					if(queries != null && queries.size() > 0){
 						title = queries.stream().map(InformationQuery::getName).distinct().collect(Collectors.joining());
+
+						for(InformationQuery query : queries){
+							if(StringUtils.isNotEmpty(query.getFileUserIdAndName())){
+								String[] userArray = query.getFileUserIdAndName().split(",");
+								for(String str : userArray){
+									String[] strs = str.split("-");
+									try{
+										//保存通知记录
+										this.messageWarningClient.savePushUserMessageWarning(
+												new MessageWarningVO(
+														query.getProjectId(),
+														query.getContractId(),
+														//废除通知
+														3,
+														//内容
+														AuthUtil.getNickName() + "废除了【" + query.getName() + "】",
+														//推送的目标人
+														Long.parseLong(strs[0]),
+														//默认未读
+														0
+												));
+									}catch (Exception e){
+										e.printStackTrace();
+									}
+								}
+							}
+						}
+
+
 					}
 
+
 					//保存操作记录
-					this.operationLogClient.saveUserOperationLog(6, "资料管理", "工序资料", task.getFormDataId(), title);
+					this.operationLogClient.saveUserOperationLog(6, "资料管理", "工序资料", Func.toStrList(task.getFormDataId()), title);
 				}
 				return R.data(true, "废除成功");
 			}catch (Exception e){
@@ -601,7 +636,7 @@ public class InformationWriteQueryController extends BladeController {
 								StringBuilder stringBuilder = new StringBuilder();
 								taskUsers.forEach(users -> stringBuilder.append(",").append(users.getTaskUser()).append("-").append(users.getTaskUserName()));
 								//修改记录
-								this.informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().set(InformationQuery::getStatus, 1).set(InformationQuery::getAuditUserIdAndName, stringBuilder.substring(1)).eq(InformationQuery::getId, id));
+								this.informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().set(InformationQuery::getReportNumber, taskVO.getBatch()).set(InformationQuery::getStatus, 1).set(InformationQuery::getAuditUserIdAndName, stringBuilder.substring(1)).eq(InformationQuery::getId, id));
 							}
 						}
 					}
@@ -617,7 +652,7 @@ public class InformationWriteQueryController extends BladeController {
 				}
 
 				//保存操作记录
-				this.operationLogClient.saveUserOperationLog(5, "资料管理", "工序资料", startTaskVO.getIds(), title);
+				this.operationLogClient.saveUserOperationLog(5, "资料管理", "工序资料", Func.toStrList(startTaskVO.getIds()), title);
 				return R.data(true);
 			}
 		}
@@ -1070,7 +1105,7 @@ public class InformationWriteQueryController extends BladeController {
 		WbsTreeContract queries = this.wbsTreeContractClient.getContractWbsTreeByPrimaryKeyId(pKeyId);
 
 		//保存操作记录
-		this.operationLogClient.saveUserOperationLog(3, "资料管理", "工序资料", pKeyId, StringUtils.isNotEmpty(queries.getFullName()) ? queries.getFullName() : queries.getDeptName());
+		this.operationLogClient.saveUserOperationLog(3, "资料管理", "工序资料", Func.toStrList(pKeyId.toString()), StringUtils.isNotEmpty(queries.getFullName()) ? queries.getFullName() : queries.getDeptName());
 		return R.data(this.wbsTreeContractClient.updateContractNodeParameter(node));
 	}
 
@@ -1149,11 +1184,12 @@ public class InformationWriteQueryController extends BladeController {
 		}
 
 		//保存操作记录
-		this.operationLogClient.saveUserOperationLog(4, "资料管理", "工序资料", ids, nodeName);
+		List<String> idArray = JSONArray.parseArray(JSONObject.toJSONString(ids.split(",")), String.class);
+		this.operationLogClient.saveUserOperationLog(4, "资料管理", "工序资料", idArray, nodeName);
 		//保存进回收站
-		this.recycleBinClient.saveDelBusinessData(ids, removeNode.getDeptName(), 2, parentNodeName.toString(), removeNode.getProjectId(), removeNode.getContractId());
+		this.recycleBinClient.saveDelBusinessData(idArray, StringUtils.isNotEmpty(removeNode.getFullName()) ? removeNode.getFullName() : removeNode.getDeptName(), 2, parentNodeName.toString(), removeNode.getProjectId(), removeNode.getContractId());
 
-		return R.data(this.wbsTreeContractClient.removeContractTreeNode(Func.toStrList(ids)));
+		return R.data(this.wbsTreeContractClient.removeContractTreeNode(idArray));
 	}
 
 	/**
@@ -1339,7 +1375,7 @@ public class InformationWriteQueryController extends BladeController {
 			try{
 				//保存操作记录
 				this.operationLogClient.saveUserOperationLog(operationType, "资料管理", "工序资料",
-						String.join(",", JSONArray.parseArray(JSONObject.toJSONString(saveList.stream().map(WbsTreeContract::getPKeyId).distinct().collect(Collectors.toList())), String.class)),
+						JSONArray.parseArray(JSONObject.toJSONString(saveList.stream().map(WbsTreeContract::getPKeyId).distinct().collect(Collectors.toList())), String.class),
 						saveList.stream().map(wbs -> StringUtils.isNotEmpty(wbs.getFullName()) ? wbs.getFullName() : wbs.getDeptName()).collect(Collectors.joining()));
 
 			}catch (Exception e){

+ 107 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/MessageWarningController.java

@@ -0,0 +1,107 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+
+import org.apache.commons.lang.StringUtils;
+import org.springblade.business.entity.MessageWarning;
+import org.springblade.business.vo.MessageWarningVO;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.system.entity.DictBiz;
+import org.springblade.system.feign.IDictBizClient;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.business.service.IMessageWarningService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.Comparator;
+import java.util.List;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2022-09-05
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/OperationWarning")
+@Api(value = "消息提醒", tags = "消息提醒接口")
+public class MessageWarningController extends BladeController {
+
+	private final IMessageWarningService messageWarningService;
+
+	private final IDictBizClient dictBizClient;
+
+	/**
+	 * 获取消息类型(左侧菜单)
+	 */
+	@GetMapping("/queryMessageType")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "获取消息类型(左侧菜单)")
+	public R<List<DictBiz>> queryMessageType() {
+		List<DictBiz> dictBizs = this.dictBizClient.getList("business_message_type", "notRoot").getData();
+		if(dictBizs != null && dictBizs.size() > 0){
+			dictBizs.sort(Comparator.comparing(DictBiz::getSort));
+		}
+		return R.data(dictBizs);
+	}
+
+	/**
+	 * 分页 
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "分页", notes = "传入operationWarning")
+	public R<IPage<MessageWarning>> list(MessageWarningVO vo, Query query) {
+		QueryWrapper<MessageWarning> wrapper = Condition.getQueryWrapper(vo);
+		//获取当前人的数据
+		wrapper.lambda().eq(MessageWarning::getPushUser, AuthUtil.getUserId().toString());
+		if(StringUtils.isNotEmpty(vo.getStartTime())){
+			wrapper.lambda().between(MessageWarning::getCreateTime, vo.getStartTime(), vo.getEndTime());
+		}
+
+		//时间倒序,状态正序(已读在后,未读在前)
+		wrapper.lambda().orderByDesc(MessageWarning::getCreateTime).orderByAsc(MessageWarning::getStatus);
+
+		return R.data(this.messageWarningService.page(Condition.getPage(query), wrapper));
+	}
+
+	
+	/**
+	 * 删除 
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(this.messageWarningService.deleteLogic(Func.toLongList(ids)));
+	}
+
+	
+}

+ 3 - 1
blade-service/blade-business/src/main/java/org/springblade/business/controller/UserOpinionController.java

@@ -10,10 +10,10 @@ import lombok.AllArgsConstructor;
 import javax.validation.Valid;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.lang.time.DateUtils;
 import org.springblade.business.entity.UserOpinionFile;
 import org.springblade.business.entity.UserOpinionFlow;
 import org.springblade.business.entity.UserOpinionGood;
+import org.springblade.business.feign.MessageWarningClient;
 import org.springblade.business.service.IUserOpinionFileService;
 import org.springblade.business.service.IUserOpinionFlowService;
 import org.springblade.business.service.IUserOpinionGoodService;
@@ -68,6 +68,8 @@ public class UserOpinionController extends BladeController {
 
 	private final IUserOpinionGoodService userOpinionGoodService;
 
+	private final MessageWarningClient messageWarningClient;
+
 	/**
 	 * 取消点赞
 	 * @param userOpinionId 工单ID

+ 19 - 0
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/MessageWarningClientImpl.java

@@ -0,0 +1,19 @@
+package org.springblade.business.feignClient;
+
+import lombok.AllArgsConstructor;
+import org.springblade.business.feign.MessageWarningClient;
+import org.springblade.business.service.IMessageWarningService;
+import org.springblade.business.vo.MessageWarningVO;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@AllArgsConstructor
+public class MessageWarningClientImpl implements MessageWarningClient {
+
+    private final IMessageWarningService messageWarningService;
+
+    @Override
+    public void savePushUserMessageWarning(MessageWarningVO vo) {
+        this.messageWarningService.savePushUserMessageWarning(vo);
+    }
+}

+ 3 - 4
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/OperationLogClientImpl.java

@@ -1,7 +1,6 @@
 package org.springblade.business.feignClient;
 
 import lombok.AllArgsConstructor;
-import org.apache.commons.lang.StringUtils;
 import org.springblade.business.entity.OperationLog;
 import org.springblade.business.feign.OperationLogClient;
 import org.springblade.business.service.IOperationLogService;
@@ -24,7 +23,7 @@ public class OperationLogClientImpl implements OperationLogClient {
     private final IDictBizClient dictBizClient;
 
     @Override
-    public void saveUserOperationLog(Integer type, String operationModule, String operationView, Object operationObjId, String operationObjName) {
+    public void saveUserOperationLog(Integer type, String operationModule, String operationView, List<String> operationObjIds, String operationObjName) {
         try{
             //获取业务字典
             List<DictBiz> dictBizList = this.dictBizClient.getList("operation_type", "notRoot").getData();
@@ -46,9 +45,9 @@ public class OperationLogClientImpl implements OperationLogClient {
             newData.setOperationMedium("PC");
             //业务数据
             newData.setOperationType(type);
-            if(operationObjId != null && StringUtils.isNotEmpty(operationObjId.toString())){
+            if(operationObjIds != null && operationObjIds.size() > 0){
                 //业务数据ID
-                newData.setBusinessId(operationObjId.toString());
+                newData.setBusinessId(String.join(",", operationObjIds));
             }
             //操作页面
             newData.setOperationView(operationView);

+ 4 - 2
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/RecycleBinClientImpl.java

@@ -6,6 +6,8 @@ import org.springblade.business.feign.RecycleBinClient;
 import org.springblade.business.service.IRecycleBinService;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.List;
+
 @RestController
 @AllArgsConstructor
 public class RecycleBinClientImpl implements RecycleBinClient {
@@ -13,7 +15,7 @@ public class RecycleBinClientImpl implements RecycleBinClient {
     private final IRecycleBinService recycleBinService;
 
     @Override
-    public void saveDelBusinessData(String businessIds, String title, Integer deletedType, String position, String projectId, String contractId) {
-        this.recycleBinService.save(new RecycleBin(businessIds, title, deletedType, position, projectId, contractId));
+    public void saveDelBusinessData(List<String> businessIds, String title, Integer deletedType, String position, String projectId, String contractId) {
+        this.recycleBinService.save(new RecycleBin(String.join(",", businessIds), title, deletedType, position, projectId, contractId));
     }
 }

+ 3 - 1
blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.xml

@@ -110,7 +110,8 @@
             from
             (
                 select
-                  id
+                  id,
+                  date_format(create_time,'%Y-%m-%d') as createTimes
                 from u_information_query
                 where
                   is_deleted = 0
@@ -176,6 +177,7 @@
                     #{wbsIdc}
                 </foreach>
             </if>
+            order by create_time DESC
         ) AS query
         where
           1 = 1

+ 33 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/MessageWarningMapper.java

@@ -0,0 +1,33 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springblade.business.entity.MessageWarning;
+import org.springblade.business.vo.MessageWarningVO;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-09-05
+ */
+public interface MessageWarningMapper extends BaseMapper<MessageWarning> {
+
+}

+ 23 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/MessageWarningMapper.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.business.mapper.MessageWarningMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="operationWarningResultMap" type="org.springblade.business.entity.MessageWarning">
+        <result column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="type" property="type"/>
+        <result column="time" property="time"/>
+        <result column="content" property="content"/>
+        <result column="is_read" property="isRead"/>
+        <result column="create_user_name" property="createUserName"/>
+        <result column="push_user" property="pushUser"/>
+    </resultMap>
+
+</mapper>

+ 37 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/IMessageWarningService.java

@@ -0,0 +1,37 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.service;
+
+import org.springblade.business.entity.MessageWarning;
+import org.springblade.business.vo.MessageWarningVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2022-09-05
+ */
+public interface IMessageWarningService extends BaseService<MessageWarning> {
+
+	/**
+	 * 保存记录
+	 */
+	void savePushUserMessageWarning(MessageWarningVO vo);
+
+}

+ 40 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/MessageWarningServiceImpl.java

@@ -0,0 +1,40 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.business.service.impl;
+
+import org.springblade.business.entity.MessageWarning;
+import org.springblade.business.mapper.MessageWarningMapper;
+import org.springblade.business.service.IMessageWarningService;
+import org.springblade.business.vo.MessageWarningVO;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2022-09-05
+ */
+@Service
+public class MessageWarningServiceImpl extends BaseServiceImpl<MessageWarningMapper, MessageWarning> implements IMessageWarningService {
+
+	@Override
+	public void savePushUserMessageWarning(MessageWarningVO vo) {
+
+	}
+}