提交 454addd5 编写于 作者: Z zhourui

修改管理设置意见接口

上级 f0b23287
{
"crawlWorkCompleted": {
"enable": false,
"cron": "50 50 22 * * ?",
"count": 2000.0,
"enable": true,
"cron": "50 50 21 * * ?",
"count": 500.0,
"excludeAttachment": [],
"excludeSite": [],
"maxAttachmentSize": 5242880.0,
"###enable": "是否启用###",
"###cron": "定时cron表达式.###",
"###count": "每次处理的数量,默认每小时处理所以默认为2000,同时每次将重爬最旧的25%,按时间轮询25%.###",
"###count": "每次处理的数量,默认每小时处理所以默认为500,同时每次将重爬最旧的25%,按时间轮询25%.###",
"###excludeAttachment": "忽略附件名称.###",
"###excludeSite": "忽略附件位置.###",
"###maxAttachmentSize": "最大附件大小.###"
},
"crawlWork": {
"enable": false,
"cron": "40 40 7-21 * * ?",
"count": 100.0,
"enable": true,
"cron": "40 40 10,12,14,16 * * ?",
"count": 50.0,
"excludeAttachment": [],
"excludeSite": [],
"maxAttachmentSize": 5242880.0,
"###enable": "是否启用###",
"###cron": "定时cron表达式.###",
"###count": "每次处理的数量,默认每小时处理所以默认为100,同时每次将重爬最旧的50%,按时间轮询50%.###",
"###count": "每次处理的数量,默认每小时处理所以默认为50,同时每次将重爬最旧的50%,按时间轮询50%.###",
"###excludeAttachment": "忽略附件名称.###",
"###excludeSite": "忽略附件位置.###",
"###maxAttachmentSize": "最大附件大小.###"
},
"crawlCms": {
"enable": false,
"cron": "30 30 7-21 * * ?",
"count": 100.0,
"enable": true,
"cron": "30 30 9,12,15,18 * * ?",
"count": 30.0,
"excludeAttachment": [],
"maxAttachmentSize": 5242880.0,
"###enable": "是否启用###",
"###cron": "定时cron表达式.###",
"###count": "每次处理的数量,默认每小时处理所以默认为100,同时每次将重爬最旧的50%,按时间轮询50%.###",
"###count": "每次处理的数量,默认每小时处理所以默认为30,同时每次将重爬最旧的50%,按时间轮询50%.###",
"###excludeAttachment": "忽略附件名称.###",
"###maxAttachmentSize": "最大附件大小.###"
},
......
<?xml version="1.0" encoding="UTF-8"?><web-app id="x_attendance_assemble_control" metadata-complete="false" version="3.0"><display-name>x_attendance_assemble_control</display-name><context-param><param-name>project</param-name><param-value>com.x.base.core.project.x_attendance_assemble_control</param-value></context-param><welcome-file-list><welcome-file>/index.html</welcome-file></welcome-file-list></web-app>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?><web-app id="x_bbs_assemble_control" metadata-complete="false" version="3.0"><display-name>x_bbs_assemble_control</display-name><context-param><param-name>project</param-name><param-value>com.x.base.core.project.x_bbs_assemble_control</param-value></context-param><welcome-file-list><welcome-file>/index.html</welcome-file></welcome-file-list></web-app>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?><web-app id="x_calendar_assemble_control" metadata-complete="false" version="3.0"><display-name>x_calendar_assemble_control</display-name><context-param><param-name>project</param-name><param-value>com.x.base.core.project.x_calendar_assemble_control</param-value></context-param><welcome-file-list><welcome-file>/index.html</welcome-file></welcome-file-list></web-app>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?><web-app id="x_cms_assemble_control" metadata-complete="false" version="3.0"><display-name>x_cms_assemble_control</display-name><context-param><param-name>project</param-name><param-value>com.x.base.core.project.x_cms_assemble_control</param-value></context-param><welcome-file-list><welcome-file>/index.html</welcome-file></welcome-file-list></web-app>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?><web-app id="x_organization_assemble_control" metadata-complete="false" version="3.0"><display-name>x_organization_assemble_control</display-name><context-param><param-name>project</param-name><param-value>com.x.base.core.project.x_organization_assemble_control</param-value></context-param><welcome-file-list><welcome-file>/index.html</welcome-file></welcome-file-list></web-app>
\ No newline at end of file
package com.x.processplatform.assemble.surface.jaxrs.read;
import java.util.Objects;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
import com.x.base.core.entity.JpaObject;
import com.x.base.core.entity.annotation.CheckPersistType;
import com.x.base.core.project.annotation.FieldDescribe;
import com.x.base.core.project.exception.ExceptionAccessDenied;
import com.x.base.core.project.exception.ExceptionEntityNotExist;
......@@ -12,13 +12,12 @@ import com.x.base.core.project.gson.GsonPropertyObject;
import com.x.base.core.project.http.ActionResult;
import com.x.base.core.project.http.EffectivePerson;
import com.x.base.core.project.jaxrs.WrapBoolean;
import com.x.base.core.project.tools.StringTools;
import com.x.processplatform.assemble.surface.Business;
import com.x.processplatform.core.entity.content.Read;
import com.x.processplatform.core.entity.element.Application;
import com.x.processplatform.core.entity.element.Process;
import java.util.Objects;
import org.apache.commons.lang3.BooleanUtils;
public class ActionManageOpinion extends BaseAction {
......@@ -33,17 +32,11 @@ public class ActionManageOpinion extends BaseAction {
}
Process process = business.process().pick(read.getProcess());
Application application = business.application().pick(read.getApplication());
if (!business.canManageApplicationOrProcess(effectivePerson, application, process)) {
if (BooleanUtils.isFalse(business.canManageApplicationOrProcess(effectivePerson, application, process))) {
throw new ExceptionAccessDenied(effectivePerson);
}
emc.beginTransaction(Read.class);
if (StringTools.utf8Length(wi.getOpinion()) > JpaObject.length_255B) {
read.setOpinionLob(wi.getOpinion());
read.setOpinion(StringTools.utf8SubString(wi.getOpinion(), JpaObject.length_255B));
} else {
read.setOpinion(Objects.toString(wi.getOpinion(), ""));
read.setOpinionLob(null);
}
read.setOpinion(Objects.toString(wi.getOpinion(), ""));
emc.commit();
Wo wo = new Wo();
wo.setValue(true);
......
package com.x.processplatform.assemble.surface.jaxrs.readcompleted;
import java.util.Objects;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
import com.x.base.core.entity.JpaObject;
import com.x.base.core.entity.annotation.CheckPersistType;
import com.x.base.core.project.annotation.FieldDescribe;
import com.x.base.core.project.exception.ExceptionAccessDenied;
import com.x.base.core.project.exception.ExceptionEntityNotExist;
......@@ -12,13 +12,12 @@ import com.x.base.core.project.gson.GsonPropertyObject;
import com.x.base.core.project.http.ActionResult;
import com.x.base.core.project.http.EffectivePerson;
import com.x.base.core.project.jaxrs.WrapBoolean;
import com.x.base.core.project.tools.StringTools;
import com.x.processplatform.assemble.surface.Business;
import com.x.processplatform.core.entity.content.ReadCompleted;
import com.x.processplatform.core.entity.element.Application;
import com.x.processplatform.core.entity.element.Process;
import java.util.Objects;
import org.apache.commons.lang3.BooleanUtils;
public class ActionManageOpinion extends BaseAction {
......@@ -33,17 +32,11 @@ public class ActionManageOpinion extends BaseAction {
}
Process process = business.process().pick(readCompleted.getProcess());
Application application = business.application().pick(readCompleted.getApplication());
if (!business.canManageApplicationOrProcess(effectivePerson, application, process)) {
if (BooleanUtils.isFalse(business.canManageApplicationOrProcess(effectivePerson, application, process))) {
throw new ExceptionAccessDenied(effectivePerson);
}
emc.beginTransaction(ReadCompleted.class);
if (StringTools.utf8Length(wi.getOpinion()) > JpaObject.length_255B) {
readCompleted.setOpinionLob(wi.getOpinion());
readCompleted.setOpinion(StringTools.utf8SubString(wi.getOpinion(), JpaObject.length_255B));
} else {
readCompleted.setOpinion(Objects.toString(wi.getOpinion(), ""));
readCompleted.setOpinionLob(null);
}
readCompleted.setOpinion(Objects.toString(wi.getOpinion(), ""));
emc.commit();
Wo wo = new Wo();
wo.setValue(true);
......
......@@ -40,13 +40,7 @@ public class ActionManageOpinion extends BaseAction {
throw new ExceptionAccessDenied(effectivePerson);
}
emc.beginTransaction(Read.class);
if (StringTools.utf8Length(wi.getOpinion()) > JpaObject.length_255B) {
task.setOpinionLob(wi.getOpinion());
task.setOpinion(StringTools.utf8SubString(wi.getOpinion(), JpaObject.length_255B));
} else {
task.setOpinion(Objects.toString(wi.getOpinion(), ""));
task.setOpinionLob(null);
}
task.setOpinion(Objects.toString(wi.getOpinion(), ""));
emc.commit();
Wo wo = new Wo();
wo.setValue(true);
......
package com.x.processplatform.assemble.surface.jaxrs.taskcompleted;
import java.util.Objects;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
import com.x.base.core.entity.JpaObject;
import com.x.base.core.entity.annotation.CheckPersistType;
import com.x.base.core.project.annotation.FieldDescribe;
import com.x.base.core.project.exception.ExceptionAccessDenied;
import com.x.base.core.project.exception.ExceptionEntityNotExist;
......@@ -14,13 +14,12 @@ import com.x.base.core.project.http.EffectivePerson;
import com.x.base.core.project.jaxrs.WrapBoolean;
import com.x.base.core.project.logger.Logger;
import com.x.base.core.project.logger.LoggerFactory;
import com.x.base.core.project.tools.StringTools;
import com.x.processplatform.assemble.surface.Business;
import com.x.processplatform.core.entity.content.TaskCompleted;
import com.x.processplatform.core.entity.element.Application;
import com.x.processplatform.core.entity.element.Process;
import java.util.Objects;
import org.apache.commons.lang3.BooleanUtils;
public class ActionManageOpinion extends BaseAction {
......@@ -38,18 +37,11 @@ public class ActionManageOpinion extends BaseAction {
Process process = business.process().pick(taskCompleted.getProcess());
Application application = business.application().pick(taskCompleted.getApplication());
if (!business.canManageApplicationOrProcess(effectivePerson, application, process)) {
if (BooleanUtils.isFalse(business.canManageApplicationOrProcess(effectivePerson, application, process))) {
throw new ExceptionAccessDenied(effectivePerson);
}
emc.beginTransaction(TaskCompleted.class);
if (StringTools.utf8Length(wi.getOpinion()) > JpaObject.length_255B) {
taskCompleted.setOpinionLob(wi.getOpinion());
taskCompleted.setOpinion(StringTools.utf8SubString(wi.getOpinion(), JpaObject.length_255B));
} else {
taskCompleted.setOpinion(Objects.toString(wi.getOpinion(), ""));
taskCompleted.setOpinionLob(null);
}
taskCompleted.setOpinion(Objects.toString(wi.getOpinion(), ""));
emc.commit();
Wo wo = new Wo();
wo.setValue(true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册