diff --git a/javascript/youhong.ai/pcn/workflow_code_block.js b/javascript/youhong.ai/pcn/workflow_code_block.js
index ac558a7..ff52a8a 100644
--- a/javascript/youhong.ai/pcn/workflow_code_block.js
+++ b/javascript/youhong.ai/pcn/workflow_code_block.js
@@ -610,4 +610,74 @@ $(() => {
})()
-/* ******************* 提交外出流程 ******************* */
\ No newline at end of file
+/* ******************* 提交外出流程 ******************* */
+
+
+/* ******************* 明细数据统计数量添加 ******************* */
+
+$(() => {
+ let config = {
+ // 数据来源表配置
+ sourceConfig: {
+ key: '',
+ table: '',
+ type: ''
+ },
+ // 需要修改的表配置
+ targetConfig: {
+ key: '',
+ table: '',
+ type: [{
+ type: '',
+ changeField: ''
+ }, {
+ type: '',
+ changeField: ''
+ }]
+ }
+ }
+
+ function changeTargetFieldValue() {
+ let sourceConfig = config.sourceConfig;
+ let targetConfig = config.targetConfig;
+ let targetDetailRowArr = WfForm.getDetailAllRowIndexStr(targetConfig.table).split(",");
+ let targetMap = new Map()
+ // 组装明细数据
+ targetDetailRowArr.forEach(item => {
+ let fieldMark = WfForm.convertFieldNameToId(targetConfig.key, targetConfig.table)
+ let fieldId = fieldMark + "_" + item
+ let fieldValue = WfForm.getFieldValue(fieldId);
+ targetMap.set(fieldValue, item)
+ })
+ let sourceDetailRowArr = WfForm.getDetailAllRowIndexStr(sourceConfig.table).split(",");
+ sourceDetailRowArr.forEach(item => {
+ let fieldMark = WfForm.convertFieldNameToId(sourceConfig.key, sourceConfig.table)
+ let fieldId = fieldMark + "_" + item
+ let fieldValue = WfForm.getFieldValue(fieldId);
+ let typeFieldMark = WfForm.convertFieldNameToId(sourceConfig.type, sourceConfig.table)
+ let typeFieldId = typeFieldMark + "_" + item
+ let typeFieldValue = WfForm.getFieldValue(typeFieldId);
+ targetConfig.type.forEach(typeItem => {
+ if (typeItem.type == typeFieldValue) {
+ // 需要修改对应行的字段
+ let targetRowIndex = targetMap.get(fieldValue);
+ let fieldMark = WfForm.convertFieldNameToId(typeItem.changeField, targetConfig.table)
+ let fieldId = fieldMark + "_" + targetRowIndex
+ let targetRowValue = WfForm.getFieldValue(fieldId);
+ let result = +targetRowValue + 1
+ WfForm.changeFieldValue(fieldId, {
+ value: result
+ })
+ }
+ })
+ })
+ }
+
+ WfForm.registerCheckEvent(WfForm.OPER_SUBMIT, callback => {
+ changeTargetFieldValue()
+ callback()
+ })
+
+})
+
+/* ******************* 明细数据数量统计添加 end ******************* */
\ No newline at end of file
diff --git a/src/main/java/com/api/youhong/ai/geerde/requestlog/controller/RequestLogAuthorityController.java b/src/main/java/com/api/youhong/ai/geerde/requestlog/controller/RequestLogAuthorityController.java
new file mode 100644
index 0000000..b8cf5d8
--- /dev/null
+++ b/src/main/java/com/api/youhong/ai/geerde/requestlog/controller/RequestLogAuthorityController.java
@@ -0,0 +1,49 @@
+package com.api.youhong.ai.geerde.requestlog.controller;
+
+import aiyh.utils.ApiResult;
+import aiyh.utils.Util;
+import com.api.youhong.ai.geerde.requestlog.service.RequestLogAuthorityService;
+import org.apache.log4j.Logger;
+import weaver.hrm.HrmUserVarify;
+import weaver.hrm.User;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.*;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+
+/**
+ *
签字意见权限控制
+ *
+ * create: 2023/3/21 15:40
+ *
+ * @author youHong.ai
+ */
+@Path("/aiyh/geerde/request-log")
+public class RequestLogAuthorityController {
+
+ private final RequestLogAuthorityService service = new RequestLogAuthorityService();
+
+ private final Logger log = Util.getLogger();
+
+ /**
+ * 获取隐私权限信息
+ *
+ * @return
+ */
+ @Path("privacy/get")
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ @Consumes(MediaType.APPLICATION_JSON)
+ public String getPrivacyAuthority(@Context HttpServletRequest request, @Context HttpServletResponse response,
+ @QueryParam("workflowId") String workflowId) {
+ try {
+ User user = HrmUserVarify.getUser(request, response);
+ return ApiResult.success(service.getPrivacyAuthority(user, workflowId));
+ } catch (Exception e) {
+ log.info("get privacy authority error!" + Util.getErrString(e));
+ return ApiResult.error(e.getMessage());
+ }
+ }
+}
diff --git a/src/main/java/com/api/youhong/ai/geerde/requestlog/mapper/RequestLogAuthorityMapper.java b/src/main/java/com/api/youhong/ai/geerde/requestlog/mapper/RequestLogAuthorityMapper.java
new file mode 100644
index 0000000..0201d68
--- /dev/null
+++ b/src/main/java/com/api/youhong/ai/geerde/requestlog/mapper/RequestLogAuthorityMapper.java
@@ -0,0 +1,33 @@
+package com.api.youhong.ai.geerde.requestlog.mapper;
+
+import aiyh.utils.annotation.recordset.ParamMapper;
+import aiyh.utils.annotation.recordset.Select;
+import aiyh.utils.annotation.recordset.SelectOracle;
+import aiyh.utils.annotation.recordset.SqlMapper;
+import com.api.youhong.ai.geerde.requestlog.pojo.RequestLogAuthority;
+
+/**
+ *
+ *
+ * create: 2023/3/21 15:51
+ *
+ * @author youHong.ai
+ */
+@SqlMapper
+public interface RequestLogAuthorityMapper {
+
+ /**
+ * 查询隐私权限组配置信息
+ *
+ * @param userLike 用户id
+ * @param workflowId 流程ID
+ * @return 查询结果
+ */
+
+ @Select("select * from uf_request_log_authority_deg where workflow_type = #{workflowId} " +
+ "and concat(',',authority_members,',') like #{userLike} and enable_status = 1")
+ @SelectOracle("select * from uf_request_log_authority_deg where workflow_type = #{workflowId} " +
+ "and (',' || authority_members || ',') like #{userLike} and enable_status = 1")
+ RequestLogAuthority selectLogPrivacyConfig(@ParamMapper("userLike") String userLike,
+ @ParamMapper("workflowId") String workflowId);
+}
diff --git a/src/main/java/com/api/youhong/ai/geerde/requestlog/pojo/RequestLogAuthority.java b/src/main/java/com/api/youhong/ai/geerde/requestlog/pojo/RequestLogAuthority.java
new file mode 100644
index 0000000..a3edf5b
--- /dev/null
+++ b/src/main/java/com/api/youhong/ai/geerde/requestlog/pojo/RequestLogAuthority.java
@@ -0,0 +1,29 @@
+package com.api.youhong.ai.geerde.requestlog.pojo;
+
+import aiyh.utils.annotation.recordset.SqlOracleDbFieldAnn;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+/**
+ * 配置信息
+ *
+ * create: 2023/3/21 15:55
+ *
+ * @author youHong.ai
+ */
+@Getter
+@Setter
+@ToString
+public class RequestLogAuthority {
+ private Integer id;
+ /** 流程 */
+ @SqlOracleDbFieldAnn("WORKFLOW_TYPE")
+ private String workflowType;
+ /** 是否启用 */
+ @SqlOracleDbFieldAnn("ENABLE_STATUS")
+ private Integer enableStatus;
+ /** 权限组成员 */
+ @SqlOracleDbFieldAnn("AUTHORITY_MEMBER")
+ private String authorityMember;
+}
diff --git a/src/main/java/com/api/youhong/ai/geerde/requestlog/service/RequestLogAuthorityService.java b/src/main/java/com/api/youhong/ai/geerde/requestlog/service/RequestLogAuthorityService.java
new file mode 100644
index 0000000..05f3519
--- /dev/null
+++ b/src/main/java/com/api/youhong/ai/geerde/requestlog/service/RequestLogAuthorityService.java
@@ -0,0 +1,25 @@
+package com.api.youhong.ai.geerde.requestlog.service;
+
+import aiyh.utils.Util;
+import com.api.youhong.ai.geerde.requestlog.mapper.RequestLogAuthorityMapper;
+import com.api.youhong.ai.geerde.requestlog.pojo.RequestLogAuthority;
+import weaver.hrm.User;
+
+import java.util.Objects;
+
+/**
+ *
+ *
+ * create: 2023/3/21 15:42
+ *
+ * @author youHong.ai
+ */
+public class RequestLogAuthorityService {
+
+ private final RequestLogAuthorityMapper mapper = Util.getMapper(RequestLogAuthorityMapper.class);
+
+ public boolean getPrivacyAuthority(User user, String workflowId) {
+ RequestLogAuthority requestLogAuthority = mapper.selectLogPrivacyConfig("%," + user.getUID() + ",%", workflowId);
+ return !Objects.isNull(requestLogAuthority);
+ }
+}
diff --git a/src/main/java/com/api/youhong/ai/zhiji/pictureaddwater/controller/PictureAddWaterController.java b/src/main/java/com/api/youhong/ai/zhiji/pictureaddwater/controller/PictureAddWaterController.java
new file mode 100644
index 0000000..d4f9b82
--- /dev/null
+++ b/src/main/java/com/api/youhong/ai/zhiji/pictureaddwater/controller/PictureAddWaterController.java
@@ -0,0 +1,75 @@
+package com.api.youhong.ai.zhiji.pictureaddwater.controller;
+
+import aiyh.utils.ApiResult;
+import aiyh.utils.Util;
+import com.api.youhong.ai.zhiji.pictureaddwater.service.PictureAddWaterService;
+import io.swagger.v3.oas.annotations.parameters.RequestBody;
+import org.apache.log4j.Logger;
+import weaver.hrm.HrmUserVarify;
+import weaver.hrm.User;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.*;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import java.util.Map;
+
+/**
+ * 图片添加水印
+ *
+ * create: 2023/3/22 16:23
+ *
+ * @author youHong.ai
+ */
+@Path("/aiyh/zhiji/picture-add-water/")
+public class PictureAddWaterController {
+
+
+ private final PictureAddWaterService service = new PictureAddWaterService();
+
+ private final Logger log = Util.getLogger();
+
+ /**
+ * 查询需要前端判断添加水印的流程和流程字段
+ *
+ * @return 前端必要的配置参数
+ */
+ @Path("/queryWatermark/{workflowId}")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ public String queryWatermark(@PathParam("workflowId") String workflowId) {
+ try {
+ return ApiResult.success(service.getWatermarkConfig(workflowId));
+ } catch (Exception e) {
+ log.error("query add water config error!" + Util.getErrString(e));
+ return ApiResult.error(e.toString());
+ }
+ }
+
+
+ /**
+ * 图片添加水印请求
+ *
+ * @param request 请求体
+ * @param response 响应对象
+ * @param param 请求参数
+ * @return 添加水印后的图片信息
+ */
+ @Path("/addWatermark")
+ @POST
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ public String addWatermark(@Context HttpServletRequest request, @Context HttpServletResponse response,
+ @RequestBody Map param) {
+
+ User user = HrmUserVarify.getUser(request, response);
+ try {
+ return ApiResult.success(service.addWaterMark(user, param));
+ } catch (Exception e) {
+ log.error("add water to picture error!" + Util.getErrString(e));
+ return ApiResult.error(e.toString());
+ }
+ }
+}
diff --git a/src/main/java/com/api/youhong/ai/zhiji/pictureaddwater/mapper/PictureAddWaterMapper.java b/src/main/java/com/api/youhong/ai/zhiji/pictureaddwater/mapper/PictureAddWaterMapper.java
new file mode 100644
index 0000000..ddf4656
--- /dev/null
+++ b/src/main/java/com/api/youhong/ai/zhiji/pictureaddwater/mapper/PictureAddWaterMapper.java
@@ -0,0 +1,24 @@
+package com.api.youhong.ai.zhiji.pictureaddwater.mapper;
+
+import aiyh.utils.annotation.recordset.ParamMapper;
+import aiyh.utils.annotation.recordset.Select;
+import aiyh.utils.annotation.recordset.SqlMapper;
+import com.api.youhong.ai.zhiji.pictureaddwater.vo.ConfigInfoVo;
+
+/**
+ *
+ *
+ * create: 2023/3/22 16:28
+ *
+ * @author youHong.ai
+ */
+@SqlMapper
+public interface PictureAddWaterMapper {
+
+
+ @Select("select cf.workflow_type ,cf.workflow_node ,cf.enable ,wf.fieldname workflow_field from $t{tableName}" +
+ " cf left join workflow_field_table_view wf on wf.id = cf.workflow_field " +
+ " where cf.workflow_type = #{workflowId}")
+ ConfigInfoVo getConfigInfo(@ParamMapper("tableName") String tableName,
+ @ParamMapper("workflowId") String workflowId);
+}
diff --git a/src/main/java/com/api/youhong/ai/zhiji/pictureaddwater/service/PictureAddWaterService.java b/src/main/java/com/api/youhong/ai/zhiji/pictureaddwater/service/PictureAddWaterService.java
new file mode 100644
index 0000000..c611ff3
--- /dev/null
+++ b/src/main/java/com/api/youhong/ai/zhiji/pictureaddwater/service/PictureAddWaterService.java
@@ -0,0 +1,233 @@
+package com.api.youhong.ai.zhiji.pictureaddwater.service;
+
+import aiyh.utils.ApiResult;
+import aiyh.utils.Util;
+import aiyh.utils.fileUtil.WatermarkPoint;
+import aiyh.utils.fileUtil.WatermarkPointEnum;
+import aiyh.utils.fileUtil.WritWatermark;
+import aiyh.utils.mapUtil.ParaMap;
+import aiyh.utils.sqlUtil.sqlResult.impl.PrepSqlResultImpl;
+import aiyh.utils.zwl.common.ToolUtil;
+import com.api.workflow.constant.RequestAuthenticationConstant;
+import com.api.youhong.ai.zhiji.pictureaddwater.mapper.PictureAddWaterMapper;
+import com.api.youhong.ai.zhiji.pictureaddwater.vo.ConfigInfoVo;
+import com.engine.workflow.biz.requestForm.FileBiz;
+import org.h2.util.StringUtils;
+import weaver.conn.RecordSet;
+import weaver.docs.docs.DocManager;
+import weaver.hrm.User;
+
+import java.awt.*;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ *
+ * create: 2023/3/22 16:25
+ *
+ * @author youHong.ai
+ */
+public class PictureAddWaterService {
+
+
+ private final PictureAddWaterMapper mapper = Util.getMapper(PictureAddWaterMapper.class);
+
+ private final ToolUtil toolUtil = new ToolUtil();
+
+
+ public ConfigInfoVo getWatermarkConfig(String workflowId) {
+ ConfigInfoVo configInfo = mapper.getConfigInfo("uf_watermark_cofig", workflowId);
+ return configInfo;
+ }
+
+ /**
+ * 给图片添加水印信息
+ *
+ * @param user user对象
+ * @param param 请求参数
+ * @return 添加水印后的文档信息
+ */
+ public Object addWaterMark(User user, Map param) {
+ String fileIds = param.get("fileIds");
+ String location = param.get("location");
+ String time = param.get("time");
+ if (StringUtils.isNullOrEmpty(time)) {
+ time = Util.getTime("yyyy-MM-dd HH:mm:ss");
+ }
+ String pressText = "地点:" + location + "\n" + "时间:" + time;
+ String watermarkColor = toolUtil.getSystemParamValue("WATERMARK_COLOR");
+ if (StringUtils.isNullOrEmpty(watermarkColor)) {
+ watermarkColor = "0,0,0";
+ }
+ // 处理文字水印的RGB颜色
+ String[] RGBStr = watermarkColor.replace(",", ",").split(",");
+ int[] RGB = Arrays.stream(RGBStr).mapToInt(Integer::parseInt).toArray();
+ if (RGB.length < 3) {
+ RGB = new int[]{0, 0, 0};
+ }
+ int R = RGB[0];
+ int G = RGB[1];
+ int B = RGB[2];
+ if (R < 0) {
+ R = 0;
+ }
+ if (R > 255) {
+ R = 255;
+ }
+ if (G < 0) {
+ G = 0;
+ }
+ if (G > 255) {
+ G = 255;
+ }
+ if (B < 0) {
+ B = 0;
+ }
+ if (B > 255) {
+ B = 255;
+ }
+ Color color = new Color(R, G, B);
+ String fontName = toolUtil.getSystemParamValue("FONT_NAME");
+ if (StringUtils.isNullOrEmpty(fontName)) {
+ fontName = "Microsoft YaHei";
+ }
+ int fontSize = Util.getIntValue(toolUtil.getSystemParamValue("FONT_SIZE"), 10);
+ StringBuilder newIds = new StringBuilder();
+ int index = 0;
+ // 根据fileId 查询物理文件
+ String query = "select imagefileid from docimagefile where docid in ( " + fileIds + ")";
+ RecordSet rs = new RecordSet();
+ rs.executeQuery(query);
+
+ while (rs.next()) {
+ int id = rs.getInt(1);
+ int newId;
+ try {
+ toolUtil.writeDebuggerLog("开始添加水印,传递字体大小!");
+ newId = WritWatermark.addTextWatermarkById(id, pressText, color, fontName, Font.PLAIN, fontSize
+ , new WatermarkPoint(WatermarkPointEnum.RIGHT_BOTTOM), 0, 1, 1.3);
+ } catch (IOException e) {
+ return ApiResult.error("图片水印添加失败!");
+ }
+ if (index == 0) {
+ newIds.append(newId);
+ } else {
+ newIds.append(",").append(newId);
+ }
+ index++;
+ }
+ // 复制原图的权限信息等
+ // 复制原来的文件信息,并将现有的信息进行绑定
+ DocManager docManager = new DocManager();
+ String[] picIdStrArr = fileIds.split(",");
+ String[] newImgArr = newIds.toString().split(",");
+ int[] picIdArr = Arrays.stream(picIdStrArr).mapToInt(Integer::parseInt).toArray();
+ StringBuilder newDocIds = new StringBuilder();
+ for (int i = 0; i < picIdArr.length; i++) {
+ docManager.setId(picIdArr[i]);
+// 复制文件
+ int newId = 0;
+ try {
+ newId = docManager.copyDoc();
+ } catch (Exception e) {
+ e.printStackTrace();
+ toolUtil.writeErrorLog("file copy fail!");
+ }
+ if (i == 0) {
+ newDocIds.append(newId);
+ } else {
+ newDocIds.append(",").append(newId);
+ }
+// 替换复制出来的数据的物理文件关联关系
+ PrepSqlResultImpl prepSqlResult = aiyh.utils.Util.createSqlBuilder().updateSql("docimagefile"
+ , ParaMap.create().put("imagefileid", newImgArr[i])
+ , aiyh.utils.Util.createPrepWhereImpl().whereAnd("docid").whereEqual(newId));
+ rs.executeUpdate(prepSqlResult.getSqlStr(), prepSqlResult.getArgs());
+ }
+
+ // 替换原来图片的字段
+ String isSaveResource = toolUtil.getSystemParamValue("SAVE_RESOURCE");
+ String sourceField = toolUtil.getSystemParamValue("RESOURCE_FIELD");
+ if (StringUtils.isNullOrEmpty(isSaveResource)) {
+ isSaveResource = "0";
+ }
+ String fieldName = param.get("fieldName");
+ String tableName = param.get("tableName");
+ String isWrite = param.get("isWrite");
+ String isAppend = param.get("isAppend");
+// String sourceField = param.get("sourceField");
+ String requestId = param.get("requestId");
+ String oldFileIds = param.get("oldFileIds");
+ if ("true".equals(isWrite)) {
+ if ("true".equals(isAppend)) {
+// // 查询原字段是否存在图片
+// String queryStr = "";
+// try {
+// queryStr = "select " + fieldName + " from " + tableName + " where requestid = ?";
+// rs.executeQuery(queryStr, requestId);
+// rs.next();
+// String oldImg = Util.null2String(rs.getString(1));
+// if (!StringUtils.isNullOrEmpty(oldImg)) {
+ newDocIds.append(",").append(oldFileIds);
+// }
+// }catch (Exception e){
+// toolUtil.writeErrorLog("查询错误:" + queryStr);
+// }
+ }
+ if ("0".equals(isSaveResource)) {
+ // 不保存原来的图片
+ String update = "update " +
+ tableName +
+ " set " +
+ fieldName +
+ " = '" +
+ newDocIds +
+ "' where " +
+ " requestid = ?";
+ rs.executeUpdate(update, requestId);
+ } else {
+ String update = "update " +
+ tableName +
+ " set " +
+ fieldName +
+ " = '" +
+ newDocIds +
+ "' , " +
+ sourceField +
+ " = '" +
+ fileIds +
+ "' where " +
+ " requestid = ?";
+ rs.executeUpdate(update, requestId);
+ }
+ }
+
+ // 查询新文件信息
+ String listType = Util.null2String(String.valueOf(param.get("listType")), "list");
+ int requestid = Util.getIntValue(Util.null2String(String.valueOf(param.get("requestid"))), -1);
+ int desrequestid = Util.getIntValue(Util.null2String(String.valueOf(param.get("desrequestid"))), -1);
+ int isprint = Util.getIntValue(Util.null2String(String.valueOf(param.get("isprint"))), 0);
+ int workflowid = Util.getIntValue(Util.null2String(String.valueOf(param.get("workflowid"))), 0);
+ String f_weaver_belongto_userid = Util.null2String(String.valueOf(param.get("f_weaver_belongto_userid")));
+ String f_weaver_belongto_usertype = Util.null2String(String.valueOf(param.get("f_weaver_belongto_usertype")));
+ String authStr = Util.null2String(String.valueOf(param.get(RequestAuthenticationConstant.AUTHORITY_STRING)));
+ String authSignatureStr = Util.null2String(String.valueOf(param.get(RequestAuthenticationConstant.AUTHORITY_SIGNATURESTRING)));
+ Map paramsMap = new HashMap<>();
+ paramsMap.put("user", user);
+ Map retobj;
+ try {
+ retobj = FileBiz.getFileDatas(Util.null2String(newDocIds.toString()), listType, requestid, desrequestid,
+ isprint, f_weaver_belongto_userid, f_weaver_belongto_usertype, true, false, authStr, authSignatureStr, paramsMap);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return ApiResult.error("查询附件信息失败:" + e);
+ }
+ Map result = new HashMap<>();
+ result.put("fileData", retobj);
+ result.put("fileIds", newDocIds.toString());
+ return result;
+ }
+}
diff --git a/src/main/java/com/api/youhong/ai/zhiji/pictureaddwater/vo/ConfigInfoVo.java b/src/main/java/com/api/youhong/ai/zhiji/pictureaddwater/vo/ConfigInfoVo.java
new file mode 100644
index 0000000..cb0a061
--- /dev/null
+++ b/src/main/java/com/api/youhong/ai/zhiji/pictureaddwater/vo/ConfigInfoVo.java
@@ -0,0 +1,67 @@
+package com.api.youhong.ai.zhiji.pictureaddwater.vo;
+
+/**
+ * @author EBU7-dev1-ayh
+ * @create 2021/9/14 0014 21:28
+ * peizhi xinxi Vo
+ */
+
+
+public class ConfigInfoVo {
+ int workflowType;
+ String workflowField;
+ String workflowNode;
+ int enable;
+
+ public ConfigInfoVo() {
+ }
+
+ public ConfigInfoVo(int workflowType, String workflowField, String workflowNode, int enable) {
+ this.workflowType = workflowType;
+ this.workflowField = workflowField;
+ this.workflowNode = workflowNode;
+ this.enable = enable;
+ }
+
+ public int getWorkflowType() {
+ return workflowType;
+ }
+
+ public void setWorkflowType(int workflowType) {
+ this.workflowType = workflowType;
+ }
+
+ public String getWorkflowField() {
+ return workflowField;
+ }
+
+ public void setWorkflowField(String workflowField) {
+ this.workflowField = workflowField;
+ }
+
+ public String getWorkflowNode() {
+ return workflowNode;
+ }
+
+ public void setWorkflowNode(String workflowNode) {
+ this.workflowNode = workflowNode;
+ }
+
+ public int getEnable() {
+ return enable;
+ }
+
+ public void setEnable(int enable) {
+ this.enable = enable;
+ }
+
+ @Override
+ public String toString() {
+ return "ConfigInfoVo{" +
+ "workflowType=" + workflowType +
+ ", workflowField='" + workflowField + '\'' +
+ ", workflowNode='" + workflowNode + '\'' +
+ ", enable=" + enable +
+ '}';
+ }
+}
diff --git a/src/main/java/com/customization/youhong/deerge/requestlog/impl/InterceptRequestLogImpl.java b/src/main/java/com/customization/youhong/deerge/requestlog/impl/InterceptRequestLogImpl.java
new file mode 100644
index 0000000..5670e1c
--- /dev/null
+++ b/src/main/java/com/customization/youhong/deerge/requestlog/impl/InterceptRequestLogImpl.java
@@ -0,0 +1,408 @@
+package com.customization.youhong.deerge.requestlog.impl;
+
+import aiyh.utils.Util;
+import aiyh.utils.tool.cn.hutool.core.util.StrUtil;
+import com.customization.youhong.deerge.requestlog.mapper.InterceptRequestLogMapper;
+import com.engine.core.cfg.annotation.ServiceDynamicProxy;
+import com.engine.core.cfg.annotation.ServiceMethodDynamicProxy;
+import com.engine.core.impl.aop.AbstractServiceProxy;
+import com.engine.workflow.entity.requestForm.AutoApproveEntity;
+import com.engine.workflow.entity.requestForm.RequestOperationResultBean;
+import com.engine.workflow.service.RequestFormService;
+import com.engine.workflow.service.impl.RequestFormServiceImpl;
+import org.apache.log4j.Logger;
+import weaver.workflow.request.RequestManager;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Map;
+
+
+/**
+ * 拦截请求日志,签字意见
+ *
+ * create: 2023/3/21 13:36
+ *
+ * @author youHong.ai
+ */
+
+@ServiceDynamicProxy(target = RequestFormServiceImpl.class, desc = "拦截签字意见信息,是否需要隐私控制")
+public class InterceptRequestLogImpl extends AbstractServiceProxy implements RequestFormService {
+
+
+ public static final String SUCCESS = "SUCCESS";
+ private final Logger log = Util.getLogger();
+
+ private final InterceptRequestLogMapper mapper = Util.getMapper(InterceptRequestLogMapper.class);
+
+ @Override
+ public Map judgeCreateRight(HttpServletRequest request) {
+ return null;
+ }
+
+ @Override
+ public String loadForm(HttpServletRequest request) {
+ return null;
+ }
+
+ @Override
+ public String loadPreView(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map loadDetailData(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map saveDetailPaging(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map copyCustomPageFile(String custompage) {
+ return null;
+ }
+
+ @Override
+ public Map updateReqInfo(HttpServletRequest request) {
+ return null;
+ }
+
+ @Override
+ public Map getLinkageResult(HttpServletRequest request, String type) {
+ return null;
+ }
+
+ @Override
+ public Map getRightMenu(HttpServletRequest httpServletRequest, Map map) {
+ return null;
+ }
+
+ @Override
+ public Map getStatusData(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map getStatusCount(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map getResourcesKey(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map getModifyLog(HttpServletRequest request) {
+ return null;
+ }
+
+ @Override
+ public Map requestBatchSubmit(HttpServletRequest request) {
+ return null;
+ }
+
+ @Override
+ public Map judgeRejectWay(HttpServletRequest request) {
+ return null;
+ }
+
+ @Override
+ public Map getRejectOption(Map params) {
+ return null;
+ }
+
+ @Override
+ @ServiceMethodDynamicProxy(desc = "保存和提交流程时,判断是否开启隐私")
+ public Map requestSubmit(HttpServletRequest request) {
+
+ Map result = (Map) executeMethod(request);
+ try {
+ log.info("调用提交流程和保存流程后的返回参数: " + result);
+ RequestOperationResultBean data = (RequestOperationResultBean) result.get("data");
+ String type = Util.null2String(data.getType());
+ if (SUCCESS.equals(type)) {
+ // 保存成功,这里对隐私的签字意见做处理
+ String userId = request.getParameter("userId");
+ String enablePrivacy = request.getParameter("enablePrivacy");
+ String nodeId = request.getParameter("nodeid");
+ String requestId = request.getParameter("requestid");
+ String remark = request.getParameter("remark");
+ if (StrUtil.isBlank(enablePrivacy)) {
+ return result;
+ }
+ if (!Boolean.parseBoolean(enablePrivacy)) {
+ return result;
+ }
+ if ("-1".equals(requestId)) {
+ Map submitParams = data.getSubmitParams();
+ requestId = Util.null2String(submitParams.get("requestid"));
+ }
+ // 查询logId
+ Integer logId = mapper.selectRequestLogId(requestId, remark, nodeId, userId);
+ // 插入logId隐私信息
+ int dataId = Util.getModeDataId("uf_privacy_log_info", 1);
+ Boolean flag = mapper.insertPrivacyLog(dataId, logId, userId, nodeId, requestId);
+ if (!flag) {
+ Util.deleteModeId("uf_privacy_log_info", dataId);
+ }
+ }
+ } catch (Exception e) {
+ log.error("add privacy request log error! " + Util.getErrString(e));
+ }
+ return result;
+ }
+
+ @Override
+ public Map forwardSubmit(HttpServletRequest request) {
+ return null;
+ }
+
+ @Override
+ public Map requestWithdraw(HttpServletRequest httpServletRequest) {
+ return null;
+ }
+
+ @Override
+ public Map remarkSubmit(HttpServletRequest request) {
+ return null;
+ }
+
+ @Override
+ public Map functionManage(HttpServletRequest request, HttpServletResponse response) {
+ return null;
+ }
+
+ @Override
+ public Map triggerSubWf(HttpServletRequest request) {
+ return null;
+ }
+
+ @Override
+ public Map uploadFile(HttpServletRequest request, HttpServletResponse response) {
+ return null;
+ }
+
+ @Override
+ public Map getFileFieldObj(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map createWfCode(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map getWfCodeFieldValue(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map requestImport(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map requestDetailImport(HttpServletRequest request) {
+ return null;
+ }
+
+ @Override
+ public Map chooseExceptionOperator(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map overTimeSetting(HttpServletRequest request) {
+ return null;
+ }
+
+ @Override
+ public Map getPrintLogBase(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map getPrintLogData(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map freeFlowRead(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map freeFlowSave(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map editLockOper(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map loadPrintTemplates(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map doEvalExpression(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map generatePrintLog(HttpServletRequest request) {
+ return null;
+ }
+
+ @Override
+ public Map getForwardDatas(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map doBack(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map getFormTab(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map getSelectNextFlowCondition(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map getSelectNextFlowNodes(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map getRemindData(Map params) {
+ return null;
+ }
+
+ @Override
+ public Map judgeRequestIsValid(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map takeBack(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map getCustomOperation(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map runCustomOperationAction(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map JudgeAutoApprove(AutoApproveEntity autoApproveEntity) {
+ return null;
+ }
+
+ @Override
+ public Map delApproveLog(AutoApproveEntity autoApproveEntity) {
+ return null;
+ }
+
+ @Override
+ public Map verifyRequestForView(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map doTakEnd(HttpServletRequest httpServletRequest, Map map) {
+ return null;
+ }
+
+ @Override
+ public Map importFieldLinkageCfg(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map importFormulaCfg(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map getDetailDataKeyId(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map judgeWorkflowPenetrate(AutoApproveEntity autoApproveEntity, RequestManager requestManager) {
+ return null;
+ }
+
+ @Override
+ public Map getThPreviewUrl(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map getThMouldList(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map getDetailExpSet(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map saveDetailExpSet(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map exportFieldSet(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map getNextNodeContent(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map delRequestVerify(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map getFreeNodeBrowserItem(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map saveFreeNodeFormConfig(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map conformCheck(Map map) {
+ return null;
+ }
+
+ @Override
+ public Map getDetailByRequestId(Map map) {
+ return null;
+ }
+}
diff --git a/src/main/java/com/customization/youhong/deerge/requestlog/impl/RequestLogShowOrHiddenImpl.java b/src/main/java/com/customization/youhong/deerge/requestlog/impl/RequestLogShowOrHiddenImpl.java
new file mode 100644
index 0000000..719d594
--- /dev/null
+++ b/src/main/java/com/customization/youhong/deerge/requestlog/impl/RequestLogShowOrHiddenImpl.java
@@ -0,0 +1,118 @@
+package com.customization.youhong.deerge.requestlog.impl;
+
+import aiyh.utils.Util;
+import aiyh.utils.tool.cn.hutool.core.collection.CollectionUtil;
+import aiyh.utils.tool.cn.hutool.core.util.StrUtil;
+import com.customization.youhong.deerge.requestlog.mapper.InterceptRequestLogMapper;
+import com.engine.core.cfg.annotation.ServiceDynamicProxy;
+import com.engine.core.cfg.annotation.ServiceMethodDynamicProxy;
+import com.engine.core.impl.aop.AbstractServiceProxy;
+import com.engine.workflow.service.RequestLogService;
+import com.engine.workflow.service.impl.RequestLogServiceImpl;
+import org.apache.log4j.Logger;
+import weaver.hrm.HrmUserVarify;
+import weaver.hrm.User;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 是否显示隐私签字意见
+ *
+ * create: 2023/3/22 11:23
+ *
+ * @author youHong.ai
+ */
+@ServiceDynamicProxy(target = RequestLogServiceImpl.class, desc = "拦截签字意见信息,是否需要隐私控制")
+public class RequestLogShowOrHiddenImpl extends AbstractServiceProxy implements RequestLogService {
+
+ private final Logger log = Util.getLogger();
+
+ private final InterceptRequestLogMapper mapper = Util.getMapper(InterceptRequestLogMapper.class);
+
+ @Override
+ public Map getRequestLogBaseInfo(Map params) {
+ return null;
+ }
+
+ @Override
+ @ServiceMethodDynamicProxy(desc = "控制是否显示隐私签字意见")
+ public Map getRequestLogList(HttpServletRequest request, Map params) {
+ Map result = (Map) executeMethod(request, params);
+
+ try {
+ String isMonitor = request.getParameter("ismonitor");
+ boolean isPrint = "1".equals(Util.null2String(request.getParameter("isprint")));
+ // 如果是流程监控,全部返回
+ if (!StrUtil.isBlank(isMonitor) && !isPrint) {
+ return result;
+ }
+ User user = HrmUserVarify.getUser(request, null);
+ List