提交 a86df867 编写于 作者: ibizdev's avatar ibizdev

xignzi006 发布系统代码

上级 6fa34d1b
......@@ -4238,6 +4238,43 @@
}
]
},
{
"srfkey": "Metric__AmountDataType",
"emptytext": "未定义",
"codelisttype":"static",
"items": [
{
"id": "1",
"label": "十进制",
"text": "十进制",
"data":"",
"codename":"Item_1",
"value": "1",
"disabled": false
}
, {
"id": "2",
"label": "整数",
"text": "整数",
"data":"",
"codename":"Item_2",
"value": "2",
"disabled": false
}
, {
"id": "0",
"label": "金钱",
"text": "金钱",
"data":"",
"codename":"Item_0",
"value": "0",
"disabled": false
}
]
},
{
"srfkey": "FQG_ActivityPointer",
"emptytext": "未定义",
......
......@@ -1179,6 +1179,16 @@
"viewtag": "85781d107d628dfc6cdf9693797f073e",
"memo": "系统自动添加"
},
"metriceditview": {
"title": "目标度量信息",
"caption": "目标度量",
"viewtype": "DEEDITVIEW",
"viewmodule": "Base",
"viewname": "MetricEditView",
"viewfilename": "metric-edit-view",
"viewtag": "8764cc6860a8981a549fcf693bbc44f6",
"memo": "系统自动添加"
},
"taskquickcreate": {
"title": "快速新建:任务",
"caption": "快速新建:任务",
......@@ -1379,6 +1389,16 @@
"viewtag": "9a96ebf2e57358b3590b9d4479edb77a",
"memo": "系统自动添加"
},
"metricgridview": {
"title": "目标度量信息",
"caption": "目标度量",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Base",
"viewname": "MetricGridView",
"viewfilename": "metric-grid-view",
"viewtag": "9af073dea1ea05903d52e8bdc5a03dd5",
"memo": ""
},
"goaledit_childgoalview": {
"title": "子目标信息",
"caption": "目标",
......
/**
* 快速市场活动
*
* @export
* @interface BulkOperation
*/
export interface BulkOperation {
/**
* 参数
*
* @returns {*}
* @memberof BulkOperation
*/
parameters?: any;
/**
* Customers
*
* @returns {*}
* @memberof BulkOperation
*/
customers?: any;
/**
* 遍历的路径
*
* @returns {*}
* @memberof BulkOperation
*/
traversedpath?: any;
/**
* 开始日期
*
* @returns {*}
* @memberof BulkOperation
*/
scheduledstart?: any;
/**
* 成员总数
*
* @returns {*}
* @memberof BulkOperation
*/
targetmemberscount?: any;
/**
* BCC
*
* @returns {*}
* @memberof BulkOperation
*/
bcc?: any;
/**
* 实际持续时间
*
* @returns {*}
* @memberof BulkOperation
*/
actualdurationminutes?: any;
/**
* 汇率
*
* @returns {*}
* @memberof BulkOperation
*/
exchangerate?: any;
/**
* 批量操作号
*
* @returns {*}
* @memberof BulkOperation
*/
bulkoperationnumber?: any;
/**
* 截止日期
*
* @returns {*}
* @memberof BulkOperation
*/
scheduledend?: any;
/**
* 暂候时间(分钟)
*
* @returns {*}
* @memberof BulkOperation
*/
onholdtime?: any;
/**
* 保留的语音邮件
*
* @returns {*}
* @memberof BulkOperation
*/
leftvoicemail?: any;
/**
* 时区规则版本号
*
* @returns {*}
* @memberof BulkOperation
*/
timezoneruleversionnumber?: any;
/**
* 说明
*
* @returns {*}
* @memberof BulkOperation
*/
description?: any;
/**
* Outsource Vendors
*
* @returns {*}
* @memberof BulkOperation
*/
partners?: any;
/**
* 工作流信息
*
* @returns {*}
* @memberof BulkOperation
*/
workflowinfo?: any;
/**
* 服务
*
* @returns {*}
* @memberof BulkOperation
*/
serviceid?: any;
/**
* 社交渠道
*
* @returns {*}
* @memberof BulkOperation
*/
community?: any;
/**
* 由工作流创建
*
* @returns {*}
* @memberof BulkOperation
*/
workflowcreated?: any;
/**
* 活动类型
*
* @returns {*}
* @memberof BulkOperation
*/
createdrecordtypecode?: any;
/**
* 错误号
*
* @returns {*}
* @memberof BulkOperation
*/
errornumber?: any;
/**
* Record Created On
*
* @returns {*}
* @memberof BulkOperation
*/
overriddencreatedon?: any;
/**
* 导入文件名称
*
* @returns {*}
* @memberof BulkOperation
*/
regardingobjectid?: any;
/**
* 状态
*
* @returns {*}
* @memberof BulkOperation
*/
statecode?: any;
/**
* 负责人类型
*
* @returns {*}
* @memberof BulkOperation
*/
owneridtype?: any;
/**
* 上次尝试传递的日期
*
* @returns {*}
* @memberof BulkOperation
*/
deliverylastattemptedon?: any;
/**
* 传递优先级
*
* @returns {*}
* @memberof BulkOperation
*/
deliveryprioritycode?: any;
/**
* 建立人
*
* @returns {*}
* @memberof BulkOperation
*/
createman?: any;
/**
* Organizer
*
* @returns {*}
* @memberof BulkOperation
*/
organizer?: any;
/**
* 流程阶段
*
* @returns {*}
* @memberof BulkOperation
*/
stageid?: any;
/**
* 成员类型
*
* @returns {*}
* @memberof BulkOperation
*/
targetedrecordtypecode?: any;
/**
* 定期实例类型
*
* @returns {*}
* @memberof BulkOperation
*/
instancetypecode?: any;
/**
* To
*
* @returns {*}
* @memberof BulkOperation
*/
to?: any;
/**
* 负责人
*
* @returns {*}
* @memberof BulkOperation
*/
owneridyominame?: any;
/**
* 计划持续时间
*
* @returns {*}
* @memberof BulkOperation
*/
scheduleddurationminutes?: any;
/**
* 关于
*
* @returns {*}
* @memberof BulkOperation
*/
regardingobjectidyominame?: any;
/**
* Exchange 项目 ID
*
* @returns {*}
* @memberof BulkOperation
*/
exchangeitemid?: any;
/**
* 活动
*
* @returns {*}
* @memberof BulkOperation
*/
activityid?: any;
/**
* From
*
* @returns {*}
* @memberof BulkOperation
*/
from?: any;
/**
* 隐藏
*
* @returns {*}
* @memberof BulkOperation
*/
mapiprivate?: any;
/**
* 负责人
*
* @returns {*}
* @memberof BulkOperation
*/
ownerid?: any;
/**
* 状态描述
*
* @returns {*}
* @memberof BulkOperation
*/
statuscode?: any;
/**
* 操作
*
* @returns {*}
* @memberof BulkOperation
*/
operationtypecode?: any;
/**
* 活动附加参数
*
* @returns {*}
* @memberof BulkOperation
*/
activityadditionalparams?: any;
/**
* UTC 转换时区代码
*
* @returns {*}
* @memberof BulkOperation
*/
utcconversiontimezonecode?: any;
/**
* Import Sequence Number
*
* @returns {*}
* @memberof BulkOperation
*/
importsequencenumber?: any;
/**
* 系列 ID
*
* @returns {*}
* @memberof BulkOperation
*/
seriesid?: any;
/**
* 是定期活动
*
* @returns {*}
* @memberof BulkOperation
*/
regularactivity?: any;
/**
* 实际结束时间
*
* @returns {*}
* @memberof BulkOperation
*/
actualend?: any;
/**
* 流程
*
* @returns {*}
* @memberof BulkOperation
*/
processid?: any;
/**
* Required Attendees
*
* @returns {*}
* @memberof BulkOperation
*/
requiredattendees?: any;
/**
* 更新人
*
* @returns {*}
* @memberof BulkOperation
*/
updateman?: any;
/**
* 上一暂候时间
*
* @returns {*}
* @memberof BulkOperation
*/
lastonholdtime?: any;
/**
* 更新时间
*
* @returns {*}
* @memberof BulkOperation
*/
updatedate?: any;
/**
* Exchange WebLink
*
* @returns {*}
* @memberof BulkOperation
*/
exchangeweblink?: any;
/**
* 发送日期
*
* @returns {*}
* @memberof BulkOperation
*/
senton?: any;
/**
* 建立时间
*
* @returns {*}
* @memberof BulkOperation
*/
createdate?: any;
/**
* 失败数
*
* @returns {*}
* @memberof BulkOperation
*/
failurecount?: any;
/**
* SLAName
*
* @returns {*}
* @memberof BulkOperation
*/
slaname?: any;
/**
* 活动类型
*
* @returns {*}
* @memberof BulkOperation
*/
activitytypecode?: any;
/**
* 成功数
*
* @returns {*}
* @memberof BulkOperation
*/
successcount?: any;
/**
* CC
*
* @returns {*}
* @memberof BulkOperation
*/
cc?: any;
/**
* Optional Attendees
*
* @returns {*}
* @memberof BulkOperation
*/
optionalattendees?: any;
/**
* 实际开始时间
*
* @returns {*}
* @memberof BulkOperation
*/
actualstart?: any;
/**
* 排序日期
*
* @returns {*}
* @memberof BulkOperation
*/
sortdate?: any;
/**
* RegardingObjectTypeCode
*
* @returns {*}
* @memberof BulkOperation
*/
regardingobjecttypecode?: any;
/**
* 已记帐
*
* @returns {*}
* @memberof BulkOperation
*/
billed?: any;
/**
* 优先级
*
* @returns {*}
* @memberof BulkOperation
*/
prioritycode?: any;
/**
* 版本号
*
* @returns {*}
* @memberof BulkOperation
*/
versionnumber?: any;
/**
* 主题
*
* @returns {*}
* @memberof BulkOperation
*/
subject?: any;
/**
* Resources
*
* @returns {*}
* @memberof BulkOperation
*/
resources?: any;
/**
* 货币
*
* @returns {*}
* @memberof BulkOperation
*/
transactioncurrencyid?: any;
/**
* SLA
*
* @returns {*}
* @memberof BulkOperation
*/
slaid?: any;
}
\ No newline at end of file
/**
* 知识文章
*
* @export
* @interface KnowledgeArticle
*/
export interface KnowledgeArticle {
/**
* 知识文章视图(上次更新时间)
*
* @returns {*}
* @memberof KnowledgeArticle
*/
knowledgearticleviews_date?: any;
/**
* 关键字
*
* @returns {*}
* @memberof KnowledgeArticle
*/
keywords?: any;
/**
* 状态描述
*
* @returns {*}
* @memberof KnowledgeArticle
*/
statuscode?: any;
/**
* 主要文章
*
* @returns {*}
* @memberof KnowledgeArticle
*/
primary?: any;
/**
* 过期状态 ID
*
* @returns {*}
* @memberof KnowledgeArticle
*/
expirationstateid?: any;
/**
* Rating(Count)
*
* @returns {*}
* @memberof KnowledgeArticle
*/
rating_count?: any;
/**
* 内容
*
* @returns {*}
* @memberof KnowledgeArticle
*/
content?: any;
/**
* 负责人
*
* @returns {*}
* @memberof KnowledgeArticle
*/
ownerid?: any;
/**
* RootArticled
*
* @returns {*}
* @memberof KnowledgeArticle
*/
rootarticled?: any;
/**
* 知识文章视图(状态)
*
* @returns {*}
* @memberof KnowledgeArticle
*/
knowledgearticleviews_state?: any;
/**
* Rating(sum)
*
* @returns {*}
* @memberof KnowledgeArticle
*/
rating_sum?: any;
/**
* 状态
*
* @returns {*}
* @memberof KnowledgeArticle
*/
statecode?: any;
/**
* 遍历的路径
*
* @returns {*}
* @memberof KnowledgeArticle
*/
traversedpath?: any;
/**
* 更新人
*
* @returns {*}
* @memberof KnowledgeArticle
*/
updateman?: any;
/**
* 已发布状态
*
* @returns {*}
* @memberof KnowledgeArticle
*/
publishstatusid?: any;
/**
* 文章公共编号
*
* @returns {*}
* @memberof KnowledgeArticle
*/
articlepublicnumber?: any;
/**
* primaryauthoridName
*
* @returns {*}
* @memberof KnowledgeArticle
*/
primaryauthoridname?: any;
/**
* 记录创建日期
*
* @returns {*}
* @memberof KnowledgeArticle
*/
overriddencreatedon?: any;
/**
* 负责人
*
* @returns {*}
* @memberof KnowledgeArticle
*/
owneridyominame?: any;
/**
* 主要作者 ID
*
* @returns {*}
* @memberof KnowledgeArticle
*/
primaryauthorid?: any;
/**
* 是最新版本
*
* @returns {*}
* @memberof KnowledgeArticle
*/
latestversion?: any;
/**
* 评分(状态)
*
* @returns {*}
* @memberof KnowledgeArticle
*/
rating_state?: any;
/**
* 建立时间
*
* @returns {*}
* @memberof KnowledgeArticle
*/
createdate?: any;
/**
* VersionNumber
*
* @returns {*}
* @memberof KnowledgeArticle
*/
versionnumber?: any;
/**
* UTC 转换时区代码
*
* @returns {*}
* @memberof KnowledgeArticle
*/
utcconversiontimezonecode?: any;
/**
* 已过期状态
*
* @returns {*}
* @memberof KnowledgeArticle
*/
expirationstatusid?: any;
/**
* 知识文章
*
* @returns {*}
* @memberof KnowledgeArticle
*/
knowledgearticleid?: any;
/**
* 设置类别关联
*
* @returns {*}
* @memberof KnowledgeArticle
*/
setcategoryassociations?: any;
/**
* 说明
*
* @returns {*}
* @memberof KnowledgeArticle
*/
description?: any;
/**
* 设置产品关联
*
* @returns {*}
* @memberof KnowledgeArticle
*/
setproductassociations?: any;
/**
* 次要版本号
*
* @returns {*}
* @memberof KnowledgeArticle
*/
minorversionnumber?: any;
/**
* 阶段 ID
*
* @returns {*}
* @memberof KnowledgeArticle
*/
stageid?: any;
/**
* 进程 ID
*
* @returns {*}
* @memberof KnowledgeArticle
*/
processid?: any;
/**
* 主要版本号
*
* @returns {*}
* @memberof KnowledgeArticle
*/
majorversionnumber?: any;
/**
* 评分
*
* @returns {*}
* @memberof KnowledgeArticle
*/
rating?: any;
/**
* 负责人 ID 类型
*
* @returns {*}
* @memberof KnowledgeArticle
*/
owneridtype?: any;
/**
* 发布日期
*
* @returns {*}
* @memberof KnowledgeArticle
*/
publishon?: any;
/**
* 知识文章视图
*
* @returns {*}
* @memberof KnowledgeArticle
*/
knowledgearticleviews?: any;
/**
* 评分(上次更新时间)
*
* @returns {*}
* @memberof KnowledgeArticle
*/
rating_date?: any;
/**
* 汇率
*
* @returns {*}
* @memberof KnowledgeArticle
*/
exchangerate?: any;
/**
* 为审阅做准备
*
* @returns {*}
* @memberof KnowledgeArticle
*/
readyforreview?: any;
/**
* 导入序号
*
* @returns {*}
* @memberof KnowledgeArticle
*/
importsequencenumber?: any;
/**
* SubjectIdDsc
*
* @returns {*}
* @memberof KnowledgeArticle
*/
subjectiddsc?: any;
/**
* 审阅
*
* @returns {*}
* @memberof KnowledgeArticle
*/
review?: any;
/**
* LanguageLocaleIdLocaleId
*
* @returns {*}
* @memberof KnowledgeArticle
*/
languagelocaleidlocaleid?: any;
/**
* 更新时间
*
* @returns {*}
* @memberof KnowledgeArticle
*/
updatedate?: any;
/**
* 建立人
*
* @returns {*}
* @memberof KnowledgeArticle
*/
createman?: any;
/**
* 已计划状态
*
* @returns {*}
* @memberof KnowledgeArticle
*/
scheduledstatusid?: any;
/**
* 时区规则版本号
*
* @returns {*}
* @memberof KnowledgeArticle
*/
timezoneruleversionnumber?: any;
/**
* 内部
*
* @returns {*}
* @memberof KnowledgeArticle
*/
internal?: any;
/**
* 标题
*
* @returns {*}
* @memberof KnowledgeArticle
*/
title?: any;
/**
* 更新内容
*
* @returns {*}
* @memberof KnowledgeArticle
*/
updatecontent?: any;
/**
* 到期日期
*
* @returns {*}
* @memberof KnowledgeArticle
*/
expirationdate?: any;
/**
* 已过期审阅选项
*
* @returns {*}
* @memberof KnowledgeArticle
*/
expiredreviewoptions?: any;
/**
* 父文章内容 ID
*
* @returns {*}
* @memberof KnowledgeArticle
*/
parentarticlecontentid?: any;
/**
* 上篇文章内容 ID
*
* @returns {*}
* @memberof KnowledgeArticle
*/
previousarticlecontentid?: any;
/**
* 货币
*
* @returns {*}
* @memberof KnowledgeArticle
*/
transactioncurrencyid?: any;
/**
* 根文章 ID
*
* @returns {*}
* @memberof KnowledgeArticle
*/
rootarticleid?: any;
/**
* 主题
*
* @returns {*}
* @memberof KnowledgeArticle
*/
subjectid?: any;
/**
* 语言
*
* @returns {*}
* @memberof KnowledgeArticle
*/
languagelocaleid?: any;
}
\ No newline at end of file
......@@ -21,6 +21,7 @@ import ibizlist_en_US from '@locale/lanres/entities/ibiz-list/ibiz-list_en_US';
import campaignresponse_en_US from '@locale/lanres/entities/campaign-response/campaign-response_en_US';
import phonecall_en_US from '@locale/lanres/entities/phone-call/phone-call_en_US';
import salesorderdetail_en_US from '@locale/lanres/entities/sales-order-detail/sales-order-detail_en_US';
import bulkoperation_en_US from '@locale/lanres/entities/bulk-operation/bulk-operation_en_US';
import listcontact_en_US from '@locale/lanres/entities/list-contact/list-contact_en_US';
import appointment_en_US from '@locale/lanres/entities/appointment/appointment_en_US';
import campaigncampaign_en_US from '@locale/lanres/entities/campaign-campaign/campaign-campaign_en_US';
......@@ -36,6 +37,7 @@ import campaignactivity_en_US from '@locale/lanres/entities/campaign-activity/ca
import listlead_en_US from '@locale/lanres/entities/list-lead/list-lead_en_US';
import opportunitycompetitor_en_US from '@locale/lanres/entities/opportunity-competitor/opportunity-competitor_en_US';
import competitorsalesliterature_en_US from '@locale/lanres/entities/competitor-sales-literature/competitor-sales-literature_en_US';
import knowledgearticle_en_US from '@locale/lanres/entities/knowledge-article/knowledge-article_en_US';
import salesliteratureitem_en_US from '@locale/lanres/entities/sales-literature-item/sales-literature-item_en_US';
import contact_en_US from '@locale/lanres/entities/contact/contact_en_US';
import product_en_US from '@locale/lanres/entities/product/product_en_US';
......@@ -141,9 +143,11 @@ export default {
menuitem29: "快速市场活动",
menuitem24: "绩效",
menuitem25: "目标",
menuitem31: "目标度量",
menuitem26: "预测",
menuitem27: "服务",
menuitem28: "服务案例",
menuitem32: "知识文章",
bottom_exp: "底部内容",
footer_left: "底部左侧",
footer_center: "底部中间",
......@@ -175,6 +179,7 @@ export default {
campaignresponse: campaignresponse_en_US,
phonecall: phonecall_en_US,
salesorderdetail: salesorderdetail_en_US,
bulkoperation: bulkoperation_en_US,
listcontact: listcontact_en_US,
appointment: appointment_en_US,
campaigncampaign: campaigncampaign_en_US,
......@@ -190,6 +195,7 @@ export default {
listlead: listlead_en_US,
opportunitycompetitor: opportunitycompetitor_en_US,
competitorsalesliterature: competitorsalesliterature_en_US,
knowledgearticle: knowledgearticle_en_US,
salesliteratureitem: salesliteratureitem_en_US,
contact: contact_en_US,
product: product_en_US,
......
......@@ -21,6 +21,7 @@ import ibizlist_zh_CN from '@locale/lanres/entities/ibiz-list/ibiz-list_zh_CN';
import campaignresponse_zh_CN from '@locale/lanres/entities/campaign-response/campaign-response_zh_CN';
import phonecall_zh_CN from '@locale/lanres/entities/phone-call/phone-call_zh_CN';
import salesorderdetail_zh_CN from '@locale/lanres/entities/sales-order-detail/sales-order-detail_zh_CN';
import bulkoperation_zh_CN from '@locale/lanres/entities/bulk-operation/bulk-operation_zh_CN';
import listcontact_zh_CN from '@locale/lanres/entities/list-contact/list-contact_zh_CN';
import appointment_zh_CN from '@locale/lanres/entities/appointment/appointment_zh_CN';
import campaigncampaign_zh_CN from '@locale/lanres/entities/campaign-campaign/campaign-campaign_zh_CN';
......@@ -36,6 +37,7 @@ import campaignactivity_zh_CN from '@locale/lanres/entities/campaign-activity/ca
import listlead_zh_CN from '@locale/lanres/entities/list-lead/list-lead_zh_CN';
import opportunitycompetitor_zh_CN from '@locale/lanres/entities/opportunity-competitor/opportunity-competitor_zh_CN';
import competitorsalesliterature_zh_CN from '@locale/lanres/entities/competitor-sales-literature/competitor-sales-literature_zh_CN';
import knowledgearticle_zh_CN from '@locale/lanres/entities/knowledge-article/knowledge-article_zh_CN';
import salesliteratureitem_zh_CN from '@locale/lanres/entities/sales-literature-item/sales-literature-item_zh_CN';
import contact_zh_CN from '@locale/lanres/entities/contact/contact_zh_CN';
import product_zh_CN from '@locale/lanres/entities/product/product_zh_CN';
......@@ -141,9 +143,11 @@ export default {
menuitem29: "快速市场活动",
menuitem24: "绩效",
menuitem25: "目标",
menuitem31: "目标度量",
menuitem26: "预测",
menuitem27: "服务",
menuitem28: "服务案例",
menuitem32: "知识文章",
bottom_exp: "底部内容",
footer_left: "底部左侧",
footer_center: "底部中间",
......@@ -175,6 +179,7 @@ export default {
campaignresponse: campaignresponse_zh_CN,
phonecall: phonecall_zh_CN,
salesorderdetail: salesorderdetail_zh_CN,
bulkoperation: bulkoperation_zh_CN,
listcontact: listcontact_zh_CN,
appointment: appointment_zh_CN,
campaigncampaign: campaigncampaign_zh_CN,
......@@ -190,6 +195,7 @@ export default {
listlead: listlead_zh_CN,
opportunitycompetitor: opportunitycompetitor_zh_CN,
competitorsalesliterature: competitorsalesliterature_zh_CN,
knowledgearticle: knowledgearticle_zh_CN,
salesliteratureitem: salesliteratureitem_zh_CN,
contact: contact_zh_CN,
product: product_zh_CN,
......
......@@ -547,6 +547,12 @@ export default {
"1": "男",
"empty": ""
},
Metric__AmountDataType: {
"1": "十进制",
"2": "整数",
"0": "金钱",
"empty": ""
},
FQG_ActivityPointer: {
"ALL": "全部活动",
"TASK": "任务",
......
......@@ -547,6 +547,12 @@ export default {
"1": "男",
"empty": "",
},
Metric__AmountDataType: {
"1": "十进制",
"2": "整数",
"0": "金钱",
"empty": "",
},
FQG_ActivityPointer: {
"ALL": "全部活动",
"TASK": "任务",
......
export default {
fields: {
parameters: "参数",
customers: "Customers",
traversedpath: "遍历的路径",
scheduledstart: "开始日期",
targetmemberscount: "成员总数",
bcc: "BCC",
actualdurationminutes: "实际持续时间",
exchangerate: "汇率",
bulkoperationnumber: "批量操作号",
scheduledend: "截止日期",
onholdtime: "暂候时间(分钟)",
leftvoicemail: "保留的语音邮件",
timezoneruleversionnumber: "时区规则版本号",
description: "说明",
partners: "Outsource Vendors",
workflowinfo: "工作流信息",
serviceid: "服务",
community: "社交渠道",
workflowcreated: "由工作流创建",
createdrecordtypecode: "活动类型",
errornumber: "错误号",
overriddencreatedon: "Record Created On",
regardingobjectid: "导入文件名称",
statecode: "状态",
owneridtype: "负责人类型",
deliverylastattemptedon: "上次尝试传递的日期",
deliveryprioritycode: "传递优先级",
createman: "建立人",
organizer: "Organizer",
stageid: "流程阶段",
targetedrecordtypecode: "成员类型",
instancetypecode: "定期实例类型",
to: "To",
owneridyominame: "负责人",
scheduleddurationminutes: "计划持续时间",
regardingobjectidyominame: "关于",
exchangeitemid: "Exchange 项目 ID",
activityid: "活动",
from: "From",
mapiprivate: "隐藏",
ownerid: "负责人",
statuscode: "状态描述",
operationtypecode: "操作",
activityadditionalparams: "活动附加参数",
utcconversiontimezonecode: "UTC 转换时区代码",
importsequencenumber: "Import Sequence Number",
seriesid: "系列 ID",
regularactivity: "是定期活动",
actualend: "实际结束时间",
processid: "流程",
requiredattendees: "Required Attendees",
updateman: "更新人",
lastonholdtime: "上一暂候时间",
updatedate: "更新时间",
exchangeweblink: "Exchange WebLink",
senton: "发送日期",
createdate: "建立时间",
failurecount: "失败数",
slaname: "SLAName",
activitytypecode: "活动类型",
successcount: "成功数",
cc: "CC",
optionalattendees: "Optional Attendees",
actualstart: "实际开始时间",
sortdate: "排序日期",
regardingobjecttypecode: "RegardingObjectTypeCode",
billed: "已记帐",
prioritycode: "优先级",
versionnumber: "版本号",
subject: "主题",
resources: "Resources",
transactioncurrencyid: "货币",
slaid: "SLA",
},
};
\ No newline at end of file
export default {
fields: {
parameters: "参数",
customers: "Customers",
traversedpath: "遍历的路径",
scheduledstart: "开始日期",
targetmemberscount: "成员总数",
bcc: "BCC",
actualdurationminutes: "实际持续时间",
exchangerate: "汇率",
bulkoperationnumber: "批量操作号",
scheduledend: "截止日期",
onholdtime: "暂候时间(分钟)",
leftvoicemail: "保留的语音邮件",
timezoneruleversionnumber: "时区规则版本号",
description: "说明",
partners: "Outsource Vendors",
workflowinfo: "工作流信息",
serviceid: "服务",
community: "社交渠道",
workflowcreated: "由工作流创建",
createdrecordtypecode: "活动类型",
errornumber: "错误号",
overriddencreatedon: "Record Created On",
regardingobjectid: "导入文件名称",
statecode: "状态",
owneridtype: "负责人类型",
deliverylastattemptedon: "上次尝试传递的日期",
deliveryprioritycode: "传递优先级",
createman: "建立人",
organizer: "Organizer",
stageid: "流程阶段",
targetedrecordtypecode: "成员类型",
instancetypecode: "定期实例类型",
to: "To",
owneridyominame: "负责人",
scheduleddurationminutes: "计划持续时间",
regardingobjectidyominame: "关于",
exchangeitemid: "Exchange 项目 ID",
activityid: "活动",
from: "From",
mapiprivate: "隐藏",
ownerid: "负责人",
statuscode: "状态描述",
operationtypecode: "操作",
activityadditionalparams: "活动附加参数",
utcconversiontimezonecode: "UTC 转换时区代码",
importsequencenumber: "Import Sequence Number",
seriesid: "系列 ID",
regularactivity: "是定期活动",
actualend: "实际结束时间",
processid: "流程",
requiredattendees: "Required Attendees",
updateman: "更新人",
lastonholdtime: "上一暂候时间",
updatedate: "更新时间",
exchangeweblink: "Exchange WebLink",
senton: "发送日期",
createdate: "建立时间",
failurecount: "失败数",
slaname: "SLAName",
activitytypecode: "活动类型",
successcount: "成功数",
cc: "CC",
optionalattendees: "Optional Attendees",
actualstart: "实际开始时间",
sortdate: "排序日期",
regardingobjecttypecode: "RegardingObjectTypeCode",
billed: "已记帐",
prioritycode: "优先级",
versionnumber: "版本号",
subject: "主题",
resources: "Resources",
transactioncurrencyid: "货币",
slaid: "SLA",
},
};
\ No newline at end of file
export default {
fields: {
knowledgearticleviews_date: "知识文章视图(上次更新时间)",
keywords: "关键字",
statuscode: "状态描述",
primary: "主要文章",
expirationstateid: "过期状态 ID",
rating_count: "Rating(Count)",
content: "内容",
ownerid: "负责人",
rootarticled: "RootArticled",
knowledgearticleviews_state: "知识文章视图(状态)",
rating_sum: "Rating(sum)",
statecode: "状态",
traversedpath: "遍历的路径",
updateman: "更新人",
publishstatusid: "已发布状态",
articlepublicnumber: "文章公共编号",
primaryauthoridname: "primaryauthoridName",
overriddencreatedon: "记录创建日期",
owneridyominame: "负责人",
primaryauthorid: "主要作者 ID",
latestversion: "是最新版本",
rating_state: "评分(状态)",
createdate: "建立时间",
versionnumber: "VersionNumber",
utcconversiontimezonecode: "UTC 转换时区代码",
expirationstatusid: "已过期状态",
knowledgearticleid: "知识文章",
setcategoryassociations: "设置类别关联",
description: "说明",
setproductassociations: "设置产品关联",
minorversionnumber: "次要版本号",
stageid: "阶段 ID",
processid: "进程 ID",
majorversionnumber: "主要版本号",
rating: "评分",
owneridtype: "负责人 ID 类型",
publishon: "发布日期",
knowledgearticleviews: "知识文章视图",
rating_date: "评分(上次更新时间)",
exchangerate: "汇率",
readyforreview: "为审阅做准备",
importsequencenumber: "导入序号",
subjectiddsc: "SubjectIdDsc",
review: "审阅",
languagelocaleidlocaleid: "LanguageLocaleIdLocaleId",
updatedate: "更新时间",
createman: "建立人",
scheduledstatusid: "已计划状态",
timezoneruleversionnumber: "时区规则版本号",
internal: "内部",
title: "标题",
updatecontent: "更新内容",
expirationdate: "到期日期",
expiredreviewoptions: "已过期审阅选项",
parentarticlecontentid: "父文章内容 ID",
previousarticlecontentid: "上篇文章内容 ID",
transactioncurrencyid: "货币",
rootarticleid: "根文章 ID",
subjectid: "主题",
languagelocaleid: "语言",
},
};
\ No newline at end of file
export default {
fields: {
knowledgearticleviews_date: "知识文章视图(上次更新时间)",
keywords: "关键字",
statuscode: "状态描述",
primary: "主要文章",
expirationstateid: "过期状态 ID",
rating_count: "Rating(Count)",
content: "内容",
ownerid: "负责人",
rootarticled: "RootArticled",
knowledgearticleviews_state: "知识文章视图(状态)",
rating_sum: "Rating(sum)",
statecode: "状态",
traversedpath: "遍历的路径",
updateman: "更新人",
publishstatusid: "已发布状态",
articlepublicnumber: "文章公共编号",
primaryauthoridname: "primaryauthoridName",
overriddencreatedon: "记录创建日期",
owneridyominame: "负责人",
primaryauthorid: "主要作者 ID",
latestversion: "是最新版本",
rating_state: "评分(状态)",
createdate: "建立时间",
versionnumber: "VersionNumber",
utcconversiontimezonecode: "UTC 转换时区代码",
expirationstatusid: "已过期状态",
knowledgearticleid: "知识文章",
setcategoryassociations: "设置类别关联",
description: "说明",
setproductassociations: "设置产品关联",
minorversionnumber: "次要版本号",
stageid: "阶段 ID",
processid: "进程 ID",
majorversionnumber: "主要版本号",
rating: "评分",
owneridtype: "负责人 ID 类型",
publishon: "发布日期",
knowledgearticleviews: "知识文章视图",
rating_date: "评分(上次更新时间)",
exchangerate: "汇率",
readyforreview: "为审阅做准备",
importsequencenumber: "导入序号",
subjectiddsc: "SubjectIdDsc",
review: "审阅",
languagelocaleidlocaleid: "LanguageLocaleIdLocaleId",
updatedate: "更新时间",
createman: "建立人",
scheduledstatusid: "已计划状态",
timezoneruleversionnumber: "时区规则版本号",
internal: "内部",
title: "标题",
updatecontent: "更新内容",
expirationdate: "到期日期",
expiredreviewoptions: "已过期审阅选项",
parentarticlecontentid: "父文章内容 ID",
previousarticlecontentid: "上篇文章内容 ID",
transactioncurrencyid: "货币",
rootarticleid: "根文章 ID",
subjectid: "主题",
languagelocaleid: "语言",
},
};
\ No newline at end of file
......@@ -24,11 +24,41 @@ export default {
caption: "目标度量",
title: "目标度量选择表格视图",
},
editview: {
caption: "目标度量",
title: "目标度量信息",
},
gridview: {
caption: "目标度量",
title: "目标度量信息",
},
pickupview: {
caption: "目标度量",
title: "目标度量数据选择视图",
},
},
main_form: {
details: {
group1: "metric基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "目标度量",
srfmajortext: "公制名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
metricname: "公制名称",
amount: "度量类型",
amountdatatype: "金额数据类型",
stretchtracked: "跟踪扩展目标值",
description: "说明",
metricid: "目标度量",
},
uiactions: {
},
},
main_grid: {
columns: {
metricname: "公制名称",
......@@ -45,4 +75,80 @@ export default {
uiactions: {
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Save And New",
tip: "Save And New",
},
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "New",
tip: "New",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "Copy",
tip: "Copy {0}",
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
};
\ No newline at end of file
......@@ -23,11 +23,41 @@ export default {
caption: "目标度量",
title: "目标度量选择表格视图",
},
editview: {
caption: "目标度量",
title: "目标度量信息",
},
gridview: {
caption: "目标度量",
title: "目标度量信息",
},
pickupview: {
caption: "目标度量",
title: "目标度量数据选择视图",
},
},
main_form: {
details: {
group1: "metric基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "目标度量",
srfmajortext: "公制名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
metricname: "公制名称",
amount: "度量类型",
amountdatatype: "金额数据类型",
stretchtracked: "跟踪扩展目标值",
description: "说明",
metricid: "目标度量",
},
uiactions: {
},
},
main_grid: {
columns: {
metricname: "公制名称",
......@@ -44,4 +74,80 @@ export default {
uiactions: {
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: "保存并新建",
tip: "保存并新建",
},
tbitem5: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "删除并关闭",
tip: "删除并关闭",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "新建",
tip: "新建",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "拷贝",
tip: "拷贝",
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
};
\ No newline at end of file
......@@ -561,6 +561,24 @@ mock.onGet('v7/centralappmenu').reply((config: any) => {
textcls: '',
appfunctag: 'Auto13',
resourcetag: '',
},
{
id: 'C332BAD9-C1DC-44D2-A872-CD400C39C69F',
name: 'menuitem31',
text: '目标度量',
type: 'MENUITEM',
counterid: '',
tooltip: '目标度量',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-line-chart',
icon: '',
textcls: '',
appfunctag: '_2',
resourcetag: '',
},
{
id: '9014c07bd1da4beac8c7fc4f34c54eec',
......@@ -617,6 +635,24 @@ mock.onGet('v7/centralappmenu').reply((config: any) => {
textcls: '',
appfunctag: 'Auto8',
resourcetag: '',
},
{
id: '4A58B77A-F97D-4B19-A757-75C0A110FB78',
name: 'menuitem32',
text: '知识文章',
type: 'MENUITEM',
counterid: '',
tooltip: '知识文章',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-files-o',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
},
],
},
......
......@@ -4246,6 +4246,43 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
},
]
},
{
srfkey: "Metric__AmountDataType",
emptytext: "未定义",
"codelisttype":"static",
items: [
{
id: "1",
label: "十进制",
text: "十进制",
"data":"",
"codename":"Item_1",
value: "1",
disabled: false,
},
{
id: "2",
label: "整数",
text: "整数",
"data":"",
"codename":"Item_2",
value: "2",
disabled: false,
},
{
id: "0",
label: "金钱",
text: "金钱",
"data":"",
"codename":"Item_0",
value: "0",
disabled: false,
},
]
},
{
srfkey: "FQG_ActivityPointer",
emptytext: "未定义",
......
import qs from 'qs';
import { MockAdapter } from '@/mock/mock-adapter';
const mock = MockAdapter.getInstance();
// 模拟数据
const mockDatas: Array<any> = [
];
//getwflink
mock.onGet(new RegExp(/^\/wfcore\/ibizbusinesscentral-app-crm\/bulkoperations\/[a-zA-Z0-9\-\;]+\/usertasks\/[a-zA-Z0-9\-\;]+\/ways$/)).reply((config: any) => {
console.groupCollapsed("实体:bulkoperation 方法: getwflink");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status,[
{"sequenceFlowId":"dfdsfdsfdsfdsfds","sequenceFlowName":"同意",
"taskId":"aaaaddddccccddddd","processDefinitionKey":"support-workorders-approve-v1",
"processInstanceId":"ddlfldldfldsfds","refViewKey":""},
{"sequenceFlowId":"ddssdfdfdfdfsfdf","sequenceFlowName":"不同意",
"taskId":"aaaaddddccccddddd","processDefinitionKey":"support-workorders-approve-v1",
"processInstanceId":"ddfdsldlfdlldsf","refViewKey":"workorder_ltform_editview"}
]];
});
// getwfstep
mock.onGet(new RegExp(/^\/wfcore\/ibizbusinesscentral-app-crm\/bulkoperations\/process-definitions-nodes$/)).reply((config: any) => {
console.groupCollapsed("实体:bulkoperation 方法: getwfstep");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, [
{"userTaskId":"sddfddfd-dfdf-fdfd-fdf-dfdfd",
"userTaskName":"待审",
"cnt":0,
"processDefinitionKey":"support-workorders-approve-v1",
"processDefinitionName":"工单审批流程v1"
},
{"userTaskId":"sddfddfd-dfdf-fdfd-fdf-87927",
"userTaskName":"待分配",
"cnt":3,
"processDefinitionKey":"support-workorders-approve-v1",
"processDefinitionName":"工单审批流程v1"}
]];
});
// createBatch
mock.onPost(new RegExp(/^\/bulkoperations\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:bulkoperation 方法: createBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// updateBatch
mock.onPut(new RegExp(/^\/bulkoperations\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:bulkoperation 方法: updateBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// removeBatch
mock.onDelete(new RegExp(/^\/bulkoperations\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:bulkoperation 方法: removeBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// Select
mock.onGet(new RegExp(/^\/bulkoperations\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:bulkoperation 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['activityid'];
const matchArray:any = new RegExp(/^\/bulkoperations\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.activityid, tempValue.activityid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/bulkoperations\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:bulkoperation 方法: Create");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['activityid'];
const matchArray:any = new RegExp(/^\/bulkoperations\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas[0]);
console.groupEnd();
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/bulkoperations\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:bulkoperation 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['activityid'];
const matchArray:any = new RegExp(/^\/bulkoperations\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.activityid, tempValue.activityid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['activityid'] == tempValue['activityid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/bulkoperations\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:bulkoperation 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/bulkoperations\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:bulkoperation 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['activityid'];
const matchArray:any = new RegExp(/^\/bulkoperations\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.activityid, tempValue.activityid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['activityid'] == tempValue['activityid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/bulkoperations\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:bulkoperation 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['activityid'];
const matchArray:any = new RegExp(/^\/bulkoperations\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.activityid, tempValue.activityid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['activityid'] == tempValue['activityid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/bulkoperations\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:bulkoperation 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchDefault
mock.onGet(new RegExp(/^\/bulkoperations\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:bulkoperation 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/bulkoperations\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:bulkoperation 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['activityid'];
const matchArray:any = new RegExp(/^\/bulkoperations\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.activityid, tempValue.activityid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/bulkoperations\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:bulkoperation 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['activityid'];
const matchArray:any = new RegExp(/^\/bulkoperations\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.activityid, tempValue.activityid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
import qs from 'qs';
import { MockAdapter } from '@/mock/mock-adapter';
const mock = MockAdapter.getInstance();
// 模拟数据
const mockDatas: Array<any> = [
];
//getwflink
mock.onGet(new RegExp(/^\/wfcore\/ibizbusinesscentral-app-crm\/knowledgearticles\/[a-zA-Z0-9\-\;]+\/usertasks\/[a-zA-Z0-9\-\;]+\/ways$/)).reply((config: any) => {
console.groupCollapsed("实体:knowledgearticle 方法: getwflink");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status,[
{"sequenceFlowId":"dfdsfdsfdsfdsfds","sequenceFlowName":"同意",
"taskId":"aaaaddddccccddddd","processDefinitionKey":"support-workorders-approve-v1",
"processInstanceId":"ddlfldldfldsfds","refViewKey":""},
{"sequenceFlowId":"ddssdfdfdfdfsfdf","sequenceFlowName":"不同意",
"taskId":"aaaaddddccccddddd","processDefinitionKey":"support-workorders-approve-v1",
"processInstanceId":"ddfdsldlfdlldsf","refViewKey":"workorder_ltform_editview"}
]];
});
// getwfstep
mock.onGet(new RegExp(/^\/wfcore\/ibizbusinesscentral-app-crm\/knowledgearticles\/process-definitions-nodes$/)).reply((config: any) => {
console.groupCollapsed("实体:knowledgearticle 方法: getwfstep");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, [
{"userTaskId":"sddfddfd-dfdf-fdfd-fdf-dfdfd",
"userTaskName":"待审",
"cnt":0,
"processDefinitionKey":"support-workorders-approve-v1",
"processDefinitionName":"工单审批流程v1"
},
{"userTaskId":"sddfddfd-dfdf-fdfd-fdf-87927",
"userTaskName":"待分配",
"cnt":3,
"processDefinitionKey":"support-workorders-approve-v1",
"processDefinitionName":"工单审批流程v1"}
]];
});
// createBatch
mock.onPost(new RegExp(/^\/knowledgearticles\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:knowledgearticle 方法: createBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// updateBatch
mock.onPut(new RegExp(/^\/knowledgearticles\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:knowledgearticle 方法: updateBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// removeBatch
mock.onDelete(new RegExp(/^\/knowledgearticles\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:knowledgearticle 方法: removeBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// Select
mock.onGet(new RegExp(/^\/knowledgearticles\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:knowledgearticle 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['knowledgearticleid'];
const matchArray:any = new RegExp(/^\/knowledgearticles\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.knowledgearticleid, tempValue.knowledgearticleid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/knowledgearticles\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:knowledgearticle 方法: Create");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['knowledgearticleid'];
const matchArray:any = new RegExp(/^\/knowledgearticles\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas[0]);
console.groupEnd();
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/knowledgearticles\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:knowledgearticle 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['knowledgearticleid'];
const matchArray:any = new RegExp(/^\/knowledgearticles\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.knowledgearticleid, tempValue.knowledgearticleid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['knowledgearticleid'] == tempValue['knowledgearticleid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/knowledgearticles\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:knowledgearticle 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/knowledgearticles\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:knowledgearticle 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['knowledgearticleid'];
const matchArray:any = new RegExp(/^\/knowledgearticles\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.knowledgearticleid, tempValue.knowledgearticleid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['knowledgearticleid'] == tempValue['knowledgearticleid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/knowledgearticles\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:knowledgearticle 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['knowledgearticleid'];
const matchArray:any = new RegExp(/^\/knowledgearticles\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.knowledgearticleid, tempValue.knowledgearticleid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['knowledgearticleid'] == tempValue['knowledgearticleid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/knowledgearticles\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:knowledgearticle 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchDefault
mock.onGet(new RegExp(/^\/knowledgearticles\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:knowledgearticle 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/knowledgearticles\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:knowledgearticle 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['knowledgearticleid'];
const matchArray:any = new RegExp(/^\/knowledgearticles\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.knowledgearticleid, tempValue.knowledgearticleid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/knowledgearticles\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:knowledgearticle 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['knowledgearticleid'];
const matchArray:any = new RegExp(/^\/knowledgearticles\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.knowledgearticleid, tempValue.knowledgearticleid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
......@@ -30,6 +30,7 @@ import './entity/ibiz-lists/ibiz-lists';
import './entity/campaign-responses/campaign-responses';
import './entity/phone-calls/phone-calls';
import './entity/sales-order-details/sales-order-details';
import './entity/bulk-operations/bulk-operations';
import './entity/list-contacts/list-contacts';
import './entity/appointments/appointments';
import './entity/campaign-campaigns/campaign-campaigns';
......@@ -45,6 +46,7 @@ import './entity/campaign-activitys/campaign-activitys';
import './entity/list-leads/list-leads';
import './entity/opportunity-competitors/opportunity-competitors';
import './entity/competitor-sales-literatures/competitor-sales-literatures';
import './entity/knowledge-articles/knowledge-articles';
import './entity/sales-literature-items/sales-literature-items';
import './entity/contacts/contacts';
import './entity/products/products';
......
......@@ -951,6 +951,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "ContactPickupGridView",
"viewtag": "85781d107d628dfc6cdf9693797f073e"
},
"metriceditview": {
"title": "目标度量信息",
"caption": "目标度量",
"viewtype": "DEEDITVIEW",
"viewmodule": "Base",
"viewname": "MetricEditView",
"viewtag": "8764cc6860a8981a549fcf693bbc44f6"
},
"taskquickcreate": {
"title": "快速新建:任务",
"caption": "快速新建:任务",
......@@ -1111,6 +1119,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "ContactEditView",
"viewtag": "9a96ebf2e57358b3590b9d4479edb77a"
},
"metricgridview": {
"title": "目标度量信息",
"caption": "目标度量",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Base",
"viewname": "MetricGridView",
"viewtag": "9af073dea1ea05903d52e8bdc5a03dd5"
},
"goaledit_childgoalview": {
"title": "子目标信息",
"caption": "目标",
......
......@@ -73,6 +73,7 @@ export const PageComponents = {
Vue.component('lead-info-market', () => import('@pages/sales/lead-info-market/lead-info-market.vue'));
Vue.component('competitor-info-abstract', () => import('@pages/sales/competitor-info-abstract/competitor-info-abstract.vue'));
Vue.component('metric-pickup-view', () => import('@pages/base/metric-pickup-view/metric-pickup-view.vue'));
Vue.component('metric-edit-view', () => import('@pages/base/metric-edit-view/metric-edit-view.vue'));
Vue.component('phone-call-edit-view', () => import('@pages/base/phone-call-edit-view/phone-call-edit-view.vue'));
Vue.component('contact-info-address', () => import('@pages/base/contact-info-address/contact-info-address.vue'));
Vue.component('sales-order-quick-create-view', () => import('@pages/sales/sales-order-quick-create-view/sales-order-quick-create-view.vue'));
......@@ -149,6 +150,7 @@ export const PageComponents = {
Vue.component('goal-summary-view', () => import('@pages/sales/goal-summary-view/goal-summary-view.vue'));
Vue.component('account-info', () => import('@pages/base/account-info/account-info.vue'));
Vue.component('lead-info-detail', () => import('@pages/sales/lead-info-detail/lead-info-detail.vue'));
Vue.component('metric-grid-view', () => import('@pages/base/metric-grid-view/metric-grid-view.vue'));
Vue.component('sales-order-detail-soproduct-grid-view', () => import('@pages/sales/sales-order-detail-soproduct-grid-view/sales-order-detail-soproduct-grid-view.vue'));
Vue.component('account-info-all', () => import('@pages/base/account-info-all/account-info-all.vue'));
Vue.component('opportunity-competitor-edit-view', () => import('@pages/sales/opportunity-competitor-edit-view/opportunity-competitor-edit-view.vue'));
......
......@@ -1982,6 +1982,20 @@ const router = new Router({
},
component: () => import('@pages/base/metric-pickup-view/metric-pickup-view.vue'),
},
{
path: 'metrics/:metric?/editview/:editview?',
meta: {
caption: 'entities.metric.views.editview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'metrics', parameterName: 'metric' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/base/metric-edit-view/metric-edit-view.vue'),
},
{
path: 'phonecalls/:phonecall?/editview/:editview?',
meta: {
......@@ -4398,6 +4412,20 @@ const router = new Router({
},
component: () => import('@pages/sales/lead-info-detail/lead-info-detail.vue'),
},
{
path: 'metrics/:metric?/gridview/:gridview?',
meta: {
caption: 'entities.metric.views.gridview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'metrics', parameterName: 'metric' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/base/metric-grid-view/metric-grid-view.vue'),
},
{
path: 'salesorders/:salesorder?/salesorderdetails/:salesorderdetail?/soproductgridview/:soproductgridview?',
meta: {
......
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 快速市场活动服务对象基类
*
* @export
* @class BulkOperationServiceBase
* @extends {EntityServie}
*/
export default class BulkOperationServiceBase extends EntityService {
/**
* Creates an instance of BulkOperationServiceBase.
*
* @param {*} [opts={}]
* @memberof BulkOperationServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof BulkOperationServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='bulkoperation';
this.APPDEKEY = 'activityid';
this.APPDENAME = 'bulkoperations';
this.APPDETEXT = 'subject';
this.APPNAME = 'crm';
this.SYSTEMNAME = 'ibizbusinesscentral';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof BulkOperationServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/bulkoperations/${context.bulkoperation}/select`,isloading);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof BulkOperationServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/bulkoperations`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof BulkOperationServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/bulkoperations/${context.bulkoperation}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof BulkOperationServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/bulkoperations/${context.bulkoperation}`,isloading);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof BulkOperationServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/bulkoperations/${context.bulkoperation}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof BulkOperationServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/bulkoperations/getdraft`,isloading);
res.data.bulkoperation = data.bulkoperation;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof BulkOperationServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/bulkoperations/${context.bulkoperation}/checkkey`,data,isloading);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof BulkOperationServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/bulkoperations/${context.bulkoperation}/save`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof BulkOperationServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/bulkoperations/fetchdefault`,tempData,isloading);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import BulkOperationServiceBase from './bulk-operation-service-base';
/**
* 快速市场活动服务对象
*
* @export
* @class BulkOperationService
* @extends {BulkOperationServiceBase}
*/
export default class BulkOperationService extends BulkOperationServiceBase {
/**
* Creates an instance of BulkOperationService.
*
* @param {*} [opts={}]
* @memberof BulkOperationService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -66,6 +66,21 @@ export default class ContactServiceBase extends EntityService {
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && true){
let masterData:any = {};
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
if(opportunitiesData && opportunitiesData.length && opportunitiesData.length > 0){
opportunitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunities = opportunitiesData;
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
......@@ -96,6 +111,21 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData.listcontacts = listcontactsData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(tempContext.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
return res;
}
let masterData:any = {};
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
......@@ -111,21 +141,6 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData.opportunities = opportunitiesData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res;
}
let masterData:any = {};
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
......@@ -156,21 +171,6 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData.listcontacts = listcontactsData;
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
if(opportunitiesData && opportunitiesData.length && opportunitiesData.length > 0){
opportunitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunities = opportunitiesData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -180,9 +180,9 @@ export default class ContactServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/contacts`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(tempContext.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res;
}
......@@ -198,6 +198,21 @@ export default class ContactServiceBase extends EntityService {
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){
let masterData:any = {};
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
if(opportunitiesData && opportunitiesData.length && opportunitiesData.length > 0){
opportunitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunities = opportunitiesData;
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
......@@ -228,6 +243,14 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData.listcontacts = listcontactsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/accounts/${context.account}/contacts/${context.contact}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
return res;
}
let masterData:any = {};
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
......@@ -243,14 +266,6 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData.opportunities = opportunitiesData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/accounts/${context.account}/contacts/${context.contact}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res;
}
let masterData:any = {};
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
......@@ -281,26 +296,11 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData.listcontacts = listcontactsData;
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
if(opportunitiesData && opportunitiesData.length && opportunitiesData.length > 0){
opportunitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunities = opportunitiesData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/contacts/${context.contact}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res;
}
......@@ -332,15 +332,15 @@ export default class ContactServiceBase extends EntityService {
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){
let res:any = await Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res;
}
let res:any = await Http.getInstance().get(`/contacts/${context.contact}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res;
}
......@@ -357,16 +357,16 @@ export default class ContactServiceBase extends EntityService {
if(context.account && true){
let res:any = await Http.getInstance().get(`/accounts/${context.account}/contacts/getdraft`,isloading);
res.data.contact = data.contact;
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res;
}
let res:any = await Http.getInstance().get(`/contacts/getdraft`,isloading);
res.data.contact = data.contact;
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res;
}
......@@ -382,6 +382,21 @@ export default class ContactServiceBase extends EntityService {
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){
let masterData:any = {};
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
if(opportunitiesData && opportunitiesData.length && opportunitiesData.length > 0){
opportunitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunities = opportunitiesData;
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
......@@ -412,26 +427,11 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData.listcontacts = listcontactsData;
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
if(opportunitiesData && opportunitiesData.length && opportunitiesData.length > 0){
opportunitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunities = opportunitiesData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/checkkey`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res;
}
return Http.getInstance().post(`/contacts/${context.contact}/checkkey`,data,isloading);
......@@ -449,6 +449,21 @@ export default class ContactServiceBase extends EntityService {
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){
let masterData:any = {};
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
if(opportunitiesData && opportunitiesData.length && opportunitiesData.length > 0){
opportunitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunities = opportunitiesData;
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
......@@ -479,6 +494,14 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData.listcontacts = listcontactsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
return res;
}
let masterData:any = {};
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
......@@ -494,14 +517,6 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData.opportunities = opportunitiesData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res;
}
let masterData:any = {};
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
......@@ -532,26 +547,11 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData.listcontacts = listcontactsData;
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
if(opportunitiesData && opportunitiesData.length && opportunitiesData.length > 0){
opportunitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunities = opportunitiesData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/contacts/${context.contact}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res;
}
......@@ -567,6 +567,21 @@ export default class ContactServiceBase extends EntityService {
public async SetPrimary(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){
let masterData:any = {};
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
if(opportunitiesData && opportunitiesData.length && opportunitiesData.length > 0){
opportunitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunities = opportunitiesData;
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
......@@ -597,26 +612,11 @@ export default class ContactServiceBase extends EntityService {
}
}
masterData.listcontacts = listcontactsData;
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
if(opportunitiesData && opportunitiesData.length && opportunitiesData.length > 0){
opportunitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunities = opportunitiesData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/setprimary`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res;
}
return Http.getInstance().post(`/contacts/${context.contact}/setprimary`,data,isloading);
......
......@@ -62,6 +62,7 @@ export class EntityServiceRegister {
this.allEntityService.set('campaignresponse', () => import('@/service/campaign-response/campaign-response-service'));
this.allEntityService.set('phonecall', () => import('@/service/phone-call/phone-call-service'));
this.allEntityService.set('salesorderdetail', () => import('@/service/sales-order-detail/sales-order-detail-service'));
this.allEntityService.set('bulkoperation', () => import('@/service/bulk-operation/bulk-operation-service'));
this.allEntityService.set('listcontact', () => import('@/service/list-contact/list-contact-service'));
this.allEntityService.set('appointment', () => import('@/service/appointment/appointment-service'));
this.allEntityService.set('campaigncampaign', () => import('@/service/campaign-campaign/campaign-campaign-service'));
......@@ -77,6 +78,7 @@ export class EntityServiceRegister {
this.allEntityService.set('listlead', () => import('@/service/list-lead/list-lead-service'));
this.allEntityService.set('opportunitycompetitor', () => import('@/service/opportunity-competitor/opportunity-competitor-service'));
this.allEntityService.set('competitorsalesliterature', () => import('@/service/competitor-sales-literature/competitor-sales-literature-service'));
this.allEntityService.set('knowledgearticle', () => import('@/service/knowledge-article/knowledge-article-service'));
this.allEntityService.set('salesliteratureitem', () => import('@/service/sales-literature-item/sales-literature-item-service'));
this.allEntityService.set('contact', () => import('@/service/contact/contact-service'));
this.allEntityService.set('product', () => import('@/service/product/product-service'));
......
......@@ -62,11 +62,11 @@ export default class IBizListServiceBase extends EntityService {
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let listleadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listleads'),'undefined')){
listleadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listleads') as any);
if(listleadsData && listleadsData.length && listleadsData.length > 0){
listleadsData.forEach((item:any) => {
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
listcontactsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -76,7 +76,7 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData.listleads = listleadsData;
masterData.listcontacts = listcontactsData;
let campaignlistsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists'),'undefined')){
campaignlistsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists') as any);
......@@ -92,11 +92,11 @@ export default class IBizListServiceBase extends EntityService {
}
}
masterData.campaignlists = campaignlistsData;
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
listcontactsData.forEach((item:any) => {
let listaccountsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){
listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any);
if(listaccountsData && listaccountsData.length && listaccountsData.length > 0){
listaccountsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -106,12 +106,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData.listcontacts = listcontactsData;
let listaccountsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){
listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any);
if(listaccountsData && listaccountsData.length && listaccountsData.length > 0){
listaccountsData.forEach((item:any) => {
masterData.listaccounts = listaccountsData;
let listleadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listleads'),'undefined')){
listleadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listleads') as any);
if(listleadsData && listleadsData.length && listleadsData.length > 0){
listleadsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -121,7 +121,7 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData.listaccounts = listaccountsData;
masterData.listleads = listleadsData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -131,10 +131,10 @@ export default class IBizListServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/ibizlists`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
this.tempStorage.setItem(tempContext.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
return res;
}
......@@ -149,11 +149,11 @@ export default class IBizListServiceBase extends EntityService {
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let listleadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listleads'),'undefined')){
listleadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listleads') as any);
if(listleadsData && listleadsData.length && listleadsData.length > 0){
listleadsData.forEach((item:any) => {
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
listcontactsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -163,7 +163,7 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData.listleads = listleadsData;
masterData.listcontacts = listcontactsData;
let campaignlistsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists'),'undefined')){
campaignlistsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists') as any);
......@@ -179,11 +179,11 @@ export default class IBizListServiceBase extends EntityService {
}
}
masterData.campaignlists = campaignlistsData;
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
listcontactsData.forEach((item:any) => {
let listaccountsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){
listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any);
if(listaccountsData && listaccountsData.length && listaccountsData.length > 0){
listaccountsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -193,12 +193,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData.listcontacts = listcontactsData;
let listaccountsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){
listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any);
if(listaccountsData && listaccountsData.length && listaccountsData.length > 0){
listaccountsData.forEach((item:any) => {
masterData.listaccounts = listaccountsData;
let listleadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listleads'),'undefined')){
listleadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listleads') as any);
if(listleadsData && listleadsData.length && listleadsData.length > 0){
listleadsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -208,13 +208,13 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData.listaccounts = listaccountsData;
masterData.listleads = listleadsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/ibizlists/${context.ibizlist}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
return res;
}
......@@ -242,10 +242,10 @@ export default class IBizListServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/ibizlists/${context.ibizlist}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
return res;
}
......@@ -261,10 +261,10 @@ export default class IBizListServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/ibizlists/getdraft`,isloading);
res.data.ibizlist = data.ibizlist;
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
return res;
}
......@@ -292,11 +292,11 @@ export default class IBizListServiceBase extends EntityService {
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let listleadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listleads'),'undefined')){
listleadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listleads') as any);
if(listleadsData && listleadsData.length && listleadsData.length > 0){
listleadsData.forEach((item:any) => {
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
listcontactsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -306,7 +306,7 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData.listleads = listleadsData;
masterData.listcontacts = listcontactsData;
let campaignlistsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists'),'undefined')){
campaignlistsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists') as any);
......@@ -322,11 +322,11 @@ export default class IBizListServiceBase extends EntityService {
}
}
masterData.campaignlists = campaignlistsData;
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
listcontactsData.forEach((item:any) => {
let listaccountsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){
listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any);
if(listaccountsData && listaccountsData.length && listaccountsData.length > 0){
listaccountsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -336,12 +336,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData.listcontacts = listcontactsData;
let listaccountsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){
listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any);
if(listaccountsData && listaccountsData.length && listaccountsData.length > 0){
listaccountsData.forEach((item:any) => {
masterData.listaccounts = listaccountsData;
let listleadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listleads'),'undefined')){
listleadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listleads') as any);
if(listleadsData && listleadsData.length && listleadsData.length > 0){
listleadsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -351,13 +351,13 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData.listaccounts = listaccountsData;
masterData.listleads = listleadsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/ibizlists/${context.ibizlist}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
return res;
}
......
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 知识文章服务对象基类
*
* @export
* @class KnowledgeArticleServiceBase
* @extends {EntityServie}
*/
export default class KnowledgeArticleServiceBase extends EntityService {
/**
* Creates an instance of KnowledgeArticleServiceBase.
*
* @param {*} [opts={}]
* @memberof KnowledgeArticleServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof KnowledgeArticleServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='knowledgearticle';
this.APPDEKEY = 'knowledgearticleid';
this.APPDENAME = 'knowledgearticles';
this.APPDETEXT = 'title';
this.APPNAME = 'crm';
this.SYSTEMNAME = 'ibizbusinesscentral';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof KnowledgeArticleServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/knowledgearticles/${context.knowledgearticle}/select`,isloading);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof KnowledgeArticleServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/knowledgearticles`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof KnowledgeArticleServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/knowledgearticles/${context.knowledgearticle}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof KnowledgeArticleServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/knowledgearticles/${context.knowledgearticle}`,isloading);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof KnowledgeArticleServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/knowledgearticles/${context.knowledgearticle}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof KnowledgeArticleServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/knowledgearticles/getdraft`,isloading);
res.data.knowledgearticle = data.knowledgearticle;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof KnowledgeArticleServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`/knowledgearticles/${context.knowledgearticle}/checkkey`,data,isloading);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof KnowledgeArticleServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/knowledgearticles/${context.knowledgearticle}/save`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof KnowledgeArticleServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/knowledgearticles/fetchdefault`,tempData,isloading);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import KnowledgeArticleServiceBase from './knowledge-article-service-base';
/**
* 知识文章服务对象
*
* @export
* @class KnowledgeArticleService
* @extends {KnowledgeArticleServiceBase}
*/
export default class KnowledgeArticleService extends KnowledgeArticleServiceBase {
/**
* Creates an instance of KnowledgeArticleService.
*
* @param {*} [opts={}]
* @memberof KnowledgeArticleService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -69,21 +69,21 @@ export default class OpportunityServiceBase extends EntityService {
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && true){
let masterData:any = {};
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
item.opportunityproductid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunitycompetitors = opportunitycompetitorsData;
masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
......@@ -99,21 +99,21 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData.quotes = quotesData;
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null;
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunityproducts = opportunityproductsData;
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -123,28 +123,28 @@ export default class OpportunityServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(tempContext.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
if(context.contact && true){
let masterData:any = {};
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
item.opportunityproductid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunitycompetitors = opportunitycompetitorsData;
masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
......@@ -160,21 +160,21 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData.quotes = quotesData;
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null;
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunityproducts = opportunityproductsData;
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -184,27 +184,27 @@ export default class OpportunityServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/contacts/${context.contact}/opportunities`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(tempContext.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
let masterData:any = {};
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
item.opportunityproductid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunitycompetitors = opportunitycompetitorsData;
masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
......@@ -220,21 +220,21 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData.quotes = quotesData;
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null;
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunityproducts = opportunityproductsData;
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -244,9 +244,9 @@ export default class OpportunityServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/opportunities`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(tempContext.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
......@@ -262,21 +262,21 @@ export default class OpportunityServiceBase extends EntityService {
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){
let masterData:any = {};
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
item.opportunityproductid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunitycompetitors = opportunitycompetitorsData;
masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
......@@ -292,45 +292,45 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData.quotes = quotesData;
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null;
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunityproducts = opportunityproductsData;
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
if(context.contact && context.opportunity){
let masterData:any = {};
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
item.opportunityproductid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunitycompetitors = opportunitycompetitorsData;
masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
......@@ -346,44 +346,44 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData.quotes = quotesData;
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null;
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunityproducts = opportunityproductsData;
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/contacts/${context.contact}/opportunities/${context.opportunity}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
let masterData:any = {};
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
item.opportunityproductid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunitycompetitors = opportunitycompetitorsData;
masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
......@@ -399,26 +399,26 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData.quotes = quotesData;
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null;
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunityproducts = opportunityproductsData;
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/opportunities/${context.opportunity}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
......@@ -453,22 +453,22 @@ export default class OpportunityServiceBase extends EntityService {
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){
let res:any = await Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
if(context.contact && context.opportunity){
let res:any = await Http.getInstance().get(`/contacts/${context.contact}/opportunities/${context.opportunity}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
let res:any = await Http.getInstance().get(`/opportunities/${context.opportunity}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
......@@ -485,24 +485,24 @@ export default class OpportunityServiceBase extends EntityService {
if(context.account && context.contact && true){
let res:any = await Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/opportunities/getdraft`,isloading);
res.data.opportunity = data.opportunity;
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
if(context.contact && true){
let res:any = await Http.getInstance().get(`/contacts/${context.contact}/opportunities/getdraft`,isloading);
res.data.opportunity = data.opportunity;
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
let res:any = await Http.getInstance().get(`/opportunities/getdraft`,isloading);
res.data.opportunity = data.opportunity;
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
......@@ -518,21 +518,21 @@ export default class OpportunityServiceBase extends EntityService {
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){
let masterData:any = {};
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
item.opportunityproductid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunitycompetitors = opportunitycompetitorsData;
masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
......@@ -548,45 +548,45 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData.quotes = quotesData;
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null;
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunityproducts = opportunityproductsData;
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/checkkey`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
if(context.contact && context.opportunity){
let masterData:any = {};
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
item.opportunityproductid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunitycompetitors = opportunitycompetitorsData;
masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
......@@ -602,26 +602,26 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData.quotes = quotesData;
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null;
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunityproducts = opportunityproductsData;
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/contacts/${context.contact}/opportunities/${context.opportunity}/checkkey`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
return Http.getInstance().post(`/opportunities/${context.opportunity}/checkkey`,data,isloading);
......@@ -639,21 +639,21 @@ export default class OpportunityServiceBase extends EntityService {
public async Lose(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){
let masterData:any = {};
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
item.opportunityproductid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunitycompetitors = opportunitycompetitorsData;
masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
......@@ -669,45 +669,45 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData.quotes = quotesData;
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null;
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunityproducts = opportunityproductsData;
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/lose`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
if(context.contact && context.opportunity){
let masterData:any = {};
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
item.opportunityproductid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunitycompetitors = opportunitycompetitorsData;
masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
......@@ -723,26 +723,26 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData.quotes = quotesData;
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null;
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunityproducts = opportunityproductsData;
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/contacts/${context.contact}/opportunities/${context.opportunity}/lose`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
return Http.getInstance().post(`/opportunities/${context.opportunity}/lose`,data,isloading);
......@@ -760,21 +760,21 @@ export default class OpportunityServiceBase extends EntityService {
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){
let masterData:any = {};
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
item.opportunityproductid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunitycompetitors = opportunitycompetitorsData;
masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
......@@ -790,45 +790,45 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData.quotes = quotesData;
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null;
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunityproducts = opportunityproductsData;
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
if(context.contact && context.opportunity){
let masterData:any = {};
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
item.opportunityproductid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunitycompetitors = opportunitycompetitorsData;
masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
......@@ -844,44 +844,44 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData.quotes = quotesData;
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null;
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunityproducts = opportunityproductsData;
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/contacts/${context.contact}/opportunities/${context.opportunity}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
let masterData:any = {};
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
item.opportunityproductid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunitycompetitors = opportunitycompetitorsData;
masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
......@@ -897,26 +897,26 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData.quotes = quotesData;
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null;
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunityproducts = opportunityproductsData;
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/opportunities/${context.opportunity}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
......@@ -932,21 +932,21 @@ export default class OpportunityServiceBase extends EntityService {
public async Win(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){
let masterData:any = {};
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
item.opportunityproductid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunitycompetitors = opportunitycompetitorsData;
masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
......@@ -962,45 +962,45 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData.quotes = quotesData;
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null;
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunityproducts = opportunityproductsData;
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/win`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
if(context.contact && context.opportunity){
let masterData:any = {};
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
item.opportunityproductid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunitycompetitors = opportunitycompetitorsData;
masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
......@@ -1016,26 +1016,26 @@ export default class OpportunityServiceBase extends EntityService {
}
}
masterData.quotes = quotesData;
let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunityproductsData.forEach((item:any) => {
let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null;
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunityproducts = opportunityproductsData;
masterData.opportunitycompetitors = opportunitycompetitorsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/contacts/${context.contact}/opportunities/${context.opportunity}/win`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
return res;
}
return Http.getInstance().post(`/opportunities/${context.opportunity}/win`,data,isloading);
......
......@@ -62,11 +62,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let competitorsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures'),'undefined')){
competitorsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures') as any);
if(competitorsalesliteraturesData && competitorsalesliteraturesData.length && competitorsalesliteraturesData.length > 0){
competitorsalesliteraturesData.forEach((item:any) => {
let productsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){
productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any);
if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){
productsalesliteraturesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -76,7 +76,7 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData.competitorsalesliteratures = competitorsalesliteraturesData;
masterData.productsalesliteratures = productsalesliteraturesData;
let salesliteratureitemsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems'),'undefined')){
salesliteratureitemsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems') as any);
......@@ -92,11 +92,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData.salesliteratureitems = salesliteratureitemsData;
let productsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){
productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any);
if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){
productsalesliteraturesData.forEach((item:any) => {
let competitorsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures'),'undefined')){
competitorsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures') as any);
if(competitorsalesliteraturesData && competitorsalesliteraturesData.length && competitorsalesliteraturesData.length > 0){
competitorsalesliteraturesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -106,7 +106,7 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData.productsalesliteratures = productsalesliteraturesData;
masterData.competitorsalesliteratures = competitorsalesliteraturesData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -116,9 +116,9 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/salesliteratures`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
this.tempStorage.setItem(tempContext.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(tempContext.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(tempContext.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(tempContext.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
return res;
}
......@@ -133,11 +133,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let competitorsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures'),'undefined')){
competitorsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures') as any);
if(competitorsalesliteraturesData && competitorsalesliteraturesData.length && competitorsalesliteraturesData.length > 0){
competitorsalesliteraturesData.forEach((item:any) => {
let productsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){
productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any);
if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){
productsalesliteraturesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -147,7 +147,7 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData.competitorsalesliteratures = competitorsalesliteraturesData;
masterData.productsalesliteratures = productsalesliteraturesData;
let salesliteratureitemsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems'),'undefined')){
salesliteratureitemsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems') as any);
......@@ -163,11 +163,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData.salesliteratureitems = salesliteratureitemsData;
let productsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){
productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any);
if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){
productsalesliteraturesData.forEach((item:any) => {
let competitorsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures'),'undefined')){
competitorsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures') as any);
if(competitorsalesliteraturesData && competitorsalesliteraturesData.length && competitorsalesliteraturesData.length > 0){
competitorsalesliteraturesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -177,12 +177,12 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData.productsalesliteratures = productsalesliteraturesData;
masterData.competitorsalesliteratures = competitorsalesliteraturesData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/salesliteratures/${context.salesliterature}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
return res;
}
......@@ -210,9 +210,9 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/salesliteratures/${context.salesliterature}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
return res;
}
......@@ -228,9 +228,9 @@ export default class SalesLiteratureServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/salesliteratures/getdraft`,isloading);
res.data.salesliterature = data.salesliterature;
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
return res;
}
......@@ -258,11 +258,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let competitorsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures'),'undefined')){
competitorsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures') as any);
if(competitorsalesliteraturesData && competitorsalesliteraturesData.length && competitorsalesliteraturesData.length > 0){
competitorsalesliteraturesData.forEach((item:any) => {
let productsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){
productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any);
if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){
productsalesliteraturesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -272,7 +272,7 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData.competitorsalesliteratures = competitorsalesliteraturesData;
masterData.productsalesliteratures = productsalesliteraturesData;
let salesliteratureitemsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems'),'undefined')){
salesliteratureitemsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems') as any);
......@@ -288,11 +288,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData.salesliteratureitems = salesliteratureitemsData;
let productsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){
productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any);
if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){
productsalesliteraturesData.forEach((item:any) => {
let competitorsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures'),'undefined')){
competitorsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures') as any);
if(competitorsalesliteraturesData && competitorsalesliteraturesData.length && competitorsalesliteraturesData.length > 0){
competitorsalesliteraturesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -302,12 +302,12 @@ export default class SalesLiteratureServiceBase extends EntityService {
});
}
}
masterData.productsalesliteratures = productsalesliteraturesData;
masterData.competitorsalesliteratures = competitorsalesliteraturesData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/salesliteratures/${context.salesliterature}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
return res;
}
......
......@@ -1142,6 +1142,7 @@ export const viewstate: any = {
'15d12c1173fcb6e742b6a6d92cbc53ed',
'0326a502bb574cddc41da4323786dcb5',
'90b48a107932f432e0dde42791a51887',
'9af073dea1ea05903d52e8bdc5a03dd5',
'45fdc8ee4d1401d2d625e80177395ddc',
'7FCD2E75-E34A-493C-922E-8AE47BCE08CA',
'd1c35f3c52010e1428d7dc1a6bc82f63',
......
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import BulkOperationService from '@/service/bulk-operation/bulk-operation-service';
/**
* 快速市场活动UI服务对象基类
*
* @export
* @class BulkOperationUIServiceBase
*/
export default class BulkOperationUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof BulkOperationUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof BulkOperationUIServiceBase
*/
public dataService:BulkOperationService = new BulkOperationService();
/**
* 所有关联视图
*
* @memberof BulkOperationUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof BulkOperationUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof BulkOperationUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof BulkOperationUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof BulkOperationUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* Creates an instance of BulkOperationUIServiceBase.
*
* @param {*} [opts={}]
* @memberof BulkOperationUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.initViewMap();
this.initDeMainStateMap();
}
/**
* 初始化视图Map
*
* @memberof BulkOperationUIServiceBase
*/
public initViewMap(){
}
/**
* 初始化主状态集合
*
* @memberof BulkOperationUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof BulkOperationUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({bulkoperation:srfkey});
const curData:any = result.data;
//判断当前数据模式,默认为true,todo
const iRealDEModel:boolean = true;
let bDataInWF:boolean = false;
let bWFMode:any = false;
// 计算数据模式
if (this.isEnableWorkflow) {
bDataInWF = await this.dataService.testDataInWF({stateValue:this.stateValue,stateField:this.stateField},curData);
if (bDataInWF) {
bDataInWF = true;
bWFMode = await this.dataService.testUserExistWorklist(null,curData);
}
}
let strPDTViewParam:string = await this.getDESDDEViewPDTParam(curData, bDataInWF, bWFMode);
//若不是当前数据模式,处理strPDTViewParam,todo
//查找视图
//返回视图
return this.allViewMap.get(strPDTViewParam);
}
/**
* 获取实际的数据类型
*
* @memberof BulkOperationUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof BulkOperationUIServiceBase
*/
public async getDESDDEViewPDTParam(curData:any, bDataInWF:boolean, bWFMode:boolean){
let strPDTParam:string = '';
if (bDataInWF) {
// 判断数据是否在流程中
}
//多表单,todo
const isEnableMultiForm:boolean = false;
const multiFormDEField:string|null =null;
if (isEnableMultiForm && multiFormDEField) {
const objFormValue:string = curData[multiFormDEField];
if(!Environment.isAppMode){
return 'MOBEDITVIEW'+objFormValue;
}
return 'EDITVIEW'+objFormValue;
}
if(!Environment.isAppMode){
if(this.getDEMainStateTag(curData)){
return `MOBEDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;
}
return 'MOBEDITVIEW:';
}
if(this.getDEMainStateTag(curData)){
return `EDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;
}
return 'EDITVIEW:';
}
/**
* 获取数据对象的主状态标识
*
* @param curData 当前数据
* @memberof BulkOperationUIServiceBase
*/
public async getDEMainStateTag(curData:any){
if(this.mainStateFields.length === 0) return null;
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
}
})
let strTag:String = "";
for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":"";
if (this.mainStateFields.length >= 2) {
for (let j = 0; j <= 1; j++) {
let strTag2:string = (curData[this.mainStateFields[1]])?`${strTag}__${(j == 0) ? curData[this.mainStateFields[1]] : ""}`:strTag;
if (this.mainStateFields.length >= 3) {
for (let k = 0; k <= 1; k++) {
let strTag3:string = (curData[this.mainStateFields[2]])?`${strTag2}__${(k == 0) ? curData[this.mainStateFields[2]] : ""}`:strTag2;
// 判断是否存在
return this.allDeMainStateMap.get(strTag3);
}
}else{
return this.allDeMainStateMap.get(strTag2);
}
}
}else{
return this.allDeMainStateMap.get(strTag);
}
}
return null;
}
}
\ No newline at end of file
import BulkOperationUIServiceBase from './bulk-operation-ui-service-base';
/**
* 快速市场活动UI服务对象
*
* @export
* @class BulkOperationUIService
*/
export default class BulkOperationUIService extends BulkOperationUIServiceBase {
/**
* Creates an instance of BulkOperationUIService.
*
* @param {*} [opts={}]
* @memberof BulkOperationUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import KnowledgeArticleService from '@/service/knowledge-article/knowledge-article-service';
/**
* 知识文章UI服务对象基类
*
* @export
* @class KnowledgeArticleUIServiceBase
*/
export default class KnowledgeArticleUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof KnowledgeArticleUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof KnowledgeArticleUIServiceBase
*/
public dataService:KnowledgeArticleService = new KnowledgeArticleService();
/**
* 所有关联视图
*
* @memberof KnowledgeArticleUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof KnowledgeArticleUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof KnowledgeArticleUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof KnowledgeArticleUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof KnowledgeArticleUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* Creates an instance of KnowledgeArticleUIServiceBase.
*
* @param {*} [opts={}]
* @memberof KnowledgeArticleUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.initViewMap();
this.initDeMainStateMap();
}
/**
* 初始化视图Map
*
* @memberof KnowledgeArticleUIServiceBase
*/
public initViewMap(){
}
/**
* 初始化主状态集合
*
* @memberof KnowledgeArticleUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof KnowledgeArticleUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({knowledgearticle:srfkey});
const curData:any = result.data;
//判断当前数据模式,默认为true,todo
const iRealDEModel:boolean = true;
let bDataInWF:boolean = false;
let bWFMode:any = false;
// 计算数据模式
if (this.isEnableWorkflow) {
bDataInWF = await this.dataService.testDataInWF({stateValue:this.stateValue,stateField:this.stateField},curData);
if (bDataInWF) {
bDataInWF = true;
bWFMode = await this.dataService.testUserExistWorklist(null,curData);
}
}
let strPDTViewParam:string = await this.getDESDDEViewPDTParam(curData, bDataInWF, bWFMode);
//若不是当前数据模式,处理strPDTViewParam,todo
//查找视图
//返回视图
return this.allViewMap.get(strPDTViewParam);
}
/**
* 获取实际的数据类型
*
* @memberof KnowledgeArticleUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof KnowledgeArticleUIServiceBase
*/
public async getDESDDEViewPDTParam(curData:any, bDataInWF:boolean, bWFMode:boolean){
let strPDTParam:string = '';
if (bDataInWF) {
// 判断数据是否在流程中
}
//多表单,todo
const isEnableMultiForm:boolean = false;
const multiFormDEField:string|null =null;
if (isEnableMultiForm && multiFormDEField) {
const objFormValue:string = curData[multiFormDEField];
if(!Environment.isAppMode){
return 'MOBEDITVIEW'+objFormValue;
}
return 'EDITVIEW'+objFormValue;
}
if(!Environment.isAppMode){
if(this.getDEMainStateTag(curData)){
return `MOBEDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;
}
return 'MOBEDITVIEW:';
}
if(this.getDEMainStateTag(curData)){
return `EDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;
}
return 'EDITVIEW:';
}
/**
* 获取数据对象的主状态标识
*
* @param curData 当前数据
* @memberof KnowledgeArticleUIServiceBase
*/
public async getDEMainStateTag(curData:any){
if(this.mainStateFields.length === 0) return null;
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
}
})
let strTag:String = "";
for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":"";
if (this.mainStateFields.length >= 2) {
for (let j = 0; j <= 1; j++) {
let strTag2:string = (curData[this.mainStateFields[1]])?`${strTag}__${(j == 0) ? curData[this.mainStateFields[1]] : ""}`:strTag;
if (this.mainStateFields.length >= 3) {
for (let k = 0; k <= 1; k++) {
let strTag3:string = (curData[this.mainStateFields[2]])?`${strTag2}__${(k == 0) ? curData[this.mainStateFields[2]] : ""}`:strTag2;
// 判断是否存在
return this.allDeMainStateMap.get(strTag3);
}
}else{
return this.allDeMainStateMap.get(strTag2);
}
}
}else{
return this.allDeMainStateMap.get(strTag);
}
}
return null;
}
}
\ No newline at end of file
import KnowledgeArticleUIServiceBase from './knowledge-article-ui-service-base';
/**
* 知识文章UI服务对象
*
* @export
* @class KnowledgeArticleUIService
*/
export default class KnowledgeArticleUIService extends KnowledgeArticleUIServiceBase {
/**
* Creates an instance of KnowledgeArticleUIService.
*
* @param {*} [opts={}]
* @memberof KnowledgeArticleUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -80,6 +80,8 @@ export default class MetricUIServiceBase extends UIService {
*/
public initViewMap(){
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'metrics'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'metrics'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'metrics'});
this.allViewMap.set('PICKUPVIEW:',{viewname:'pickupview',srfappde:'metrics'});
}
......
......@@ -62,6 +62,7 @@ export class UIServiceRegister {
this.allUIService.set('campaignresponse', () => import('@/uiservice/campaign-response/campaign-response-ui-service'));
this.allUIService.set('phonecall', () => import('@/uiservice/phone-call/phone-call-ui-service'));
this.allUIService.set('salesorderdetail', () => import('@/uiservice/sales-order-detail/sales-order-detail-ui-service'));
this.allUIService.set('bulkoperation', () => import('@/uiservice/bulk-operation/bulk-operation-ui-service'));
this.allUIService.set('listcontact', () => import('@/uiservice/list-contact/list-contact-ui-service'));
this.allUIService.set('appointment', () => import('@/uiservice/appointment/appointment-ui-service'));
this.allUIService.set('campaigncampaign', () => import('@/uiservice/campaign-campaign/campaign-campaign-ui-service'));
......@@ -77,6 +78,7 @@ export class UIServiceRegister {
this.allUIService.set('listlead', () => import('@/uiservice/list-lead/list-lead-ui-service'));
this.allUIService.set('opportunitycompetitor', () => import('@/uiservice/opportunity-competitor/opportunity-competitor-ui-service'));
this.allUIService.set('competitorsalesliterature', () => import('@/uiservice/competitor-sales-literature/competitor-sales-literature-ui-service'));
this.allUIService.set('knowledgearticle', () => import('@/uiservice/knowledge-article/knowledge-article-ui-service'));
this.allUIService.set('salesliteratureitem', () => import('@/uiservice/sales-literature-item/sales-literature-item-ui-service'));
this.allUIService.set('contact', () => import('@/uiservice/contact/contact-ui-service'));
this.allUIService.set('product', () => import('@/uiservice/product/product-ui-service'));
......
......@@ -36,6 +36,9 @@ export class CentralBase extends Vue {
case 'Auto6':
this.clickAuto6(item);
return;
case '_2':
this.click_2(item);
return;
case 'Auto15':
this.clickAuto15(item);
return;
......@@ -230,6 +233,29 @@ export class CentralBase extends Vue {
})
}
/**
* 目标度量
*
* @param {*} [item={}]
* @memberof Central
*/
public click_2(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'metrics', parameterName: 'metric' },
{ pathName: 'gridview', parameterName: 'gridview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
this.$router.push(path);
})
}
/**
* 市场活动
*
......
......@@ -623,6 +623,27 @@ export default class CentralModel {
viewname: 'goal-grid-view',
resourcetag: '',
}
,
{
id: 'C332BAD9-C1DC-44D2-A872-CD400C39C69F',
name: 'menuitem31',
text: '目标度量',
type: 'MENUITEM',
counterid: '',
tooltip: '目标度量',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-line-chart',
icon: '',
textcls: '',
appfunctag: '_2',
appfuncyype: 'APPVIEW',
viewname: 'metric-grid-view',
resourcetag: '',
}
,
{
id: '9014c07bd1da4beac8c7fc4f34c54eec',
......@@ -684,6 +705,25 @@ export default class CentralModel {
viewname: 'incident-grid-view',
resourcetag: '',
}
,
{
id: '4A58B77A-F97D-4B19-A757-75C0A110FB78',
name: 'menuitem32',
text: '知识文章',
type: 'MENUITEM',
counterid: '',
tooltip: '知识文章',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-files-o',
icon: '',
textcls: '',
appfunctag: '',
resourcetag: '',
}
,
],
}
......@@ -861,6 +901,18 @@ export default class CentralModel {
{ pathName: 'gridview', parameterName: 'gridview' },
],
},
{
appfunctag: '_2',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'metricgridview',
deResParameters: [],
routepath: '/central/:central?/metrics/:metric?/gridview/:gridview?',
parameters: [
{ pathName: 'metrics', parameterName: 'metric' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
},
{
appfunctag: 'Auto15',
appfuncyype: 'APPVIEW',
......
......@@ -99,6 +99,10 @@ zuul:
path: /salesorderdetails/**
serviceId: ibizbusinesscentral-centralapi
stripPrefix: false
bulkoperation:
path: /bulkoperations/**
serviceId: ibizbusinesscentral-centralapi
stripPrefix: false
listcontact:
path: /listcontacts/**
serviceId: ibizbusinesscentral-centralapi
......@@ -159,6 +163,10 @@ zuul:
path: /competitorsalesliteratures/**
serviceId: ibizbusinesscentral-centralapi
stripPrefix: false
knowledgearticle:
path: /knowledgearticles/**
serviceId: ibizbusinesscentral-centralapi
stripPrefix: false
salesliteratureitem:
path: /salesliteratureitems/**
serviceId: ibizbusinesscentral-centralapi
......
......@@ -2060,7 +2060,7 @@
<!--输出实体[KNOWLEDGEARTICLE]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-knowledgearticle-2-28">
<changeSet author="a_LAB01_e85d8801c" id="tab-knowledgearticle-4-28">
<createTable tableName="KNOWLEDGEARTICLE">
<column name="KNOWLEDGEARTICLEVIEWS_DATE" remarks="" type="DATETIME">
</column>
......@@ -6437,7 +6437,7 @@
<!--输出实体[METRIC]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-metric-4-74">
<changeSet author="a_LAB01_e85d8801c" id="tab-metric-9-74">
<createTable tableName="METRIC">
<column name="CREATEMAN" remarks="" type="VARCHAR(60)">
</column>
......@@ -9933,7 +9933,7 @@
<!--输出实体[LIST]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-list-76-114">
<changeSet author="a_LAB01_e85d8801c" id="tab-list-81-114">
<createTable tableName="LIST">
<column name="OWNERIDTYPE" remarks="" type="VARCHAR(100)">
</column>
......@@ -10093,7 +10093,7 @@
<!--输出实体[BULKOPERATION]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-bulkoperation-4-117">
<changeSet author="a_LAB01_e85d8801c" id="tab-bulkoperation-7-117">
<createTable tableName="BULKOPERATION">
<column name="PARAMETERS" remarks="" type="TEXT(1048576)">
</column>
......@@ -11004,16 +11004,16 @@
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="FAX" constraintName="DER1N_FAX__TRANSACTIONCURRENCY" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[KNOWLEDGEARTICLE]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-knowledgearticle-2-180">
<changeSet author="a_LAB01_e85d8801c" id="fk-knowledgearticle-4-180">
<addForeignKeyConstraint baseColumnNames="PARENTARTICLECONTENTID" baseTableName="KNOWLEDGEARTICLE" constraintName="DER1N_KNOWLEDGEARTICLE__KNOWLE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="KNOWLEDGEARTICLEID" referencedTableName="KNOWLEDGEARTICLE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-knowledgearticle-2-183">
<changeSet author="a_LAB01_e85d8801c" id="fk-knowledgearticle-4-183">
<addForeignKeyConstraint baseColumnNames="LANGUAGELOCALEID" baseTableName="KNOWLEDGEARTICLE" constraintName="DER1N_KNOWLEDGEARTICLE__LANGUA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="LANGUAGELOCALEID" referencedTableName="LANGUAGELOCALE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-knowledgearticle-2-184">
<changeSet author="a_LAB01_e85d8801c" id="fk-knowledgearticle-4-184">
<addForeignKeyConstraint baseColumnNames="SUBJECTID" baseTableName="KNOWLEDGEARTICLE" constraintName="DER1N_KNOWLEDGEARTICLE__SUBJEC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SUBJECTID" referencedTableName="SUBJECT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-knowledgearticle-2-185">
<changeSet author="a_LAB01_e85d8801c" id="fk-knowledgearticle-4-185">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="KNOWLEDGEARTICLE" constraintName="DER1N_KNOWLEDGEARTICLE__TRANSA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[CONSTRAINTBASEDGROUP]外键关系 -->
......@@ -11684,7 +11684,7 @@
<!--输出实体[POST]外键关系 -->
<!--输出实体[CONTRACTTEMPLATE]外键关系 -->
<!--输出实体[LIST]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-list-76-404">
<changeSet author="a_LAB01_e85d8801c" id="fk-list-81-404">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="LIST" constraintName="DER1N_LIST__TRANSACTIONCURRENC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[KNOWLEDGEBASERECORD]外键关系 -->
......@@ -11696,10 +11696,10 @@
<addForeignKeyConstraint baseColumnNames="DISCOUNTTYPEID" baseTableName="DISCOUNT" constraintName="DER1N_DISCOUNT__DISCOUNTTYPE__" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DISCOUNTTYPEID" referencedTableName="DISCOUNTTYPE" validate="true"/>
</changeSet>
<!--输出实体[BULKOPERATION]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-bulkoperation-4-407">
<changeSet author="a_LAB01_e85d8801c" id="fk-bulkoperation-7-407">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="BULKOPERATION" constraintName="DER1N_BULKOPERATION__SLA__SLAI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-bulkoperation-4-408">
<changeSet author="a_LAB01_e85d8801c" id="fk-bulkoperation-7-408">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="BULKOPERATION" constraintName="DER1N_BULKOPERATION__TRANSACTI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[ACTIVITYPARTY]外键关系 -->
......
......@@ -188,6 +188,14 @@
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"BulkOperation",
"delogicname":"快速市场活动",
"sysmoudle":{"id":"RUNTIME","name":"Runtime"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"ListContact",
"delogicname":"营销列表-联系人",
"sysmoudle":{"id":"MARKETING","name":"Marketing"},
......@@ -308,6 +316,14 @@
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"KnowledgeArticle",
"delogicname":"知识文章",
"sysmoudle":{"id":"BASE","name":"Base"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"SalesLiteratureItem",
"delogicname":"销售附件",
"sysmoudle":{"id":"SALES","name":"Sales"},
......@@ -401,7 +417,7 @@
{
"appid":"CRM",
"appname":"客户管理",
"appmenu":[{"menuid":"Central", "menuname":"Central", "menuitem":[{ "id":"user_menus" , "name":"用户菜单" , "items":[{ "id":"menuitem3" , "name":"设置" },{ "id":"menuitem4" , "name":"注销" }]},{ "id":"top_menus" , "name":"顶部菜单" },{ "id":"left_exp" , "name":"左侧菜单" , "items":[{ "id":"menuitem17" , "name":"主页" },{ "id":"menuitem18" , "name":"最近" },{ "id":"menuitem19" , "name":"固定" },{ "id":"menuitem16" , "name":"我的工作" , "items":[{ "id":"menuitem1" , "name":"仪表盘" },{ "id":"menuitem2" , "name":"活动" }]},{ "id":"menuitem20" , "name":"客户" , "items":[{ "id":"menuitem5" , "name":"客户" },{ "id":"menuitem7" , "name":"联系人" }]},{ "id":"menuitem21" , "name":"销售" , "items":[{ "id":"menuitem8" , "name":"潜在客户" },{ "id":"menuitem9" , "name":"商机" },{ "id":"menuitem10" , "name":"竞争对手" }]},{ "id":"menuitem22" , "name":"宣传资料" , "items":[{ "id":"menuitem11" , "name":"报价单" },{ "id":"menuitem12" , "name":"订单" },{ "id":"menuitem13" , "name":"发票" },{ "id":"menuitem6" , "name":"产品" },{ "id":"menuitem14" , "name":"销售宣传资料" }]},{ "id":"menuitem23" , "name":"市场营销" , "items":[{ "id":"menuitem30" , "name":"市场活动" },{ "id":"menuitem15" , "name":"市场营销列表" },{ "id":"menuitem29" , "name":"快速市场活动" }]},{ "id":"menuitem24" , "name":"绩效" , "items":[{ "id":"menuitem25" , "name":"目标" },{ "id":"menuitem26" , "name":"预测" }]},{ "id":"menuitem27" , "name":"服务" , "items":[{ "id":"menuitem28" , "name":"服务案例" }]}]},{ "id":"bottom_exp" , "name":"底部内容" },{ "id":"footer_left" , "name":"底部左侧" },{ "id":"footer_center" , "name":"底部中间" },{ "id":"footer_right" , "name":"底部右侧" }] }]
"appmenu":[{"menuid":"Central", "menuname":"Central", "menuitem":[{ "id":"user_menus" , "name":"用户菜单" , "items":[{ "id":"menuitem3" , "name":"设置" },{ "id":"menuitem4" , "name":"注销" }]},{ "id":"top_menus" , "name":"顶部菜单" },{ "id":"left_exp" , "name":"左侧菜单" , "items":[{ "id":"menuitem17" , "name":"主页" },{ "id":"menuitem18" , "name":"最近" },{ "id":"menuitem19" , "name":"固定" },{ "id":"menuitem16" , "name":"我的工作" , "items":[{ "id":"menuitem1" , "name":"仪表盘" },{ "id":"menuitem2" , "name":"活动" }]},{ "id":"menuitem20" , "name":"客户" , "items":[{ "id":"menuitem5" , "name":"客户" },{ "id":"menuitem7" , "name":"联系人" }]},{ "id":"menuitem21" , "name":"销售" , "items":[{ "id":"menuitem8" , "name":"潜在客户" },{ "id":"menuitem9" , "name":"商机" },{ "id":"menuitem10" , "name":"竞争对手" }]},{ "id":"menuitem22" , "name":"宣传资料" , "items":[{ "id":"menuitem11" , "name":"报价单" },{ "id":"menuitem12" , "name":"订单" },{ "id":"menuitem13" , "name":"发票" },{ "id":"menuitem6" , "name":"产品" },{ "id":"menuitem14" , "name":"销售宣传资料" }]},{ "id":"menuitem23" , "name":"市场营销" , "items":[{ "id":"menuitem30" , "name":"市场活动" },{ "id":"menuitem15" , "name":"市场营销列表" },{ "id":"menuitem29" , "name":"快速市场活动" }]},{ "id":"menuitem24" , "name":"绩效" , "items":[{ "id":"menuitem25" , "name":"目标" },{ "id":"menuitem31" , "name":"目标度量" },{ "id":"menuitem26" , "name":"预测" }]},{ "id":"menuitem27" , "name":"服务" , "items":[{ "id":"menuitem28" , "name":"服务案例" },{ "id":"menuitem32" , "name":"知识文章" }]}]},{ "id":"bottom_exp" , "name":"底部内容" },{ "id":"footer_left" , "name":"底部左侧" },{ "id":"footer_center" , "name":"底部中间" },{ "id":"footer_right" , "name":"底部右侧" }] }]
}
]
}
package cn.ibizlab.businesscentral.centralapi.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import cn.ibizlab.businesscentral.util.domain.DTOBase;
import lombok.Data;
/**
* 服务DTO对象[BulkOperationDTO]
*/
@Data
public class BulkOperationDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [PARAMETERS]
*
*/
@JSONField(name = "parameters")
@JsonProperty("parameters")
private String parameters;
/**
* 属性 [CUSTOMERS]
*
*/
@JSONField(name = "customers")
@JsonProperty("customers")
private String customers;
/**
* 属性 [TRAVERSEDPATH]
*
*/
@JSONField(name = "traversedpath")
@JsonProperty("traversedpath")
private String traversedpath;
/**
* 属性 [SCHEDULEDSTART]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "scheduledstart" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("scheduledstart")
private Timestamp scheduledstart;
/**
* 属性 [TARGETMEMBERSCOUNT]
*
*/
@JSONField(name = "targetmemberscount")
@JsonProperty("targetmemberscount")
private Integer targetmemberscount;
/**
* 属性 [BCC]
*
*/
@JSONField(name = "bcc")
@JsonProperty("bcc")
private String bcc;
/**
* 属性 [ACTUALDURATIONMINUTES]
*
*/
@JSONField(name = "actualdurationminutes")
@JsonProperty("actualdurationminutes")
private Integer actualdurationminutes;
/**
* 属性 [EXCHANGERATE]
*
*/
@JSONField(name = "exchangerate")
@JsonProperty("exchangerate")
private BigDecimal exchangerate;
/**
* 属性 [BULKOPERATIONNUMBER]
*
*/
@JSONField(name = "bulkoperationnumber")
@JsonProperty("bulkoperationnumber")
private String bulkoperationnumber;
/**
* 属性 [SCHEDULEDEND]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "scheduledend" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("scheduledend")
private Timestamp scheduledend;
/**
* 属性 [ONHOLDTIME]
*
*/
@JSONField(name = "onholdtime")
@JsonProperty("onholdtime")
private Integer onholdtime;
/**
* 属性 [LEFTVOICEMAIL]
*
*/
@JSONField(name = "leftvoicemail")
@JsonProperty("leftvoicemail")
private Integer leftvoicemail;
/**
* 属性 [TIMEZONERULEVERSIONNUMBER]
*
*/
@JSONField(name = "timezoneruleversionnumber")
@JsonProperty("timezoneruleversionnumber")
private Integer timezoneruleversionnumber;
/**
* 属性 [DESCRIPTION]
*
*/
@JSONField(name = "description")
@JsonProperty("description")
private String description;
/**
* 属性 [PARTNERS]
*
*/
@JSONField(name = "partners")
@JsonProperty("partners")
private String partners;
/**
* 属性 [WORKFLOWINFO]
*
*/
@JSONField(name = "workflowinfo")
@JsonProperty("workflowinfo")
private String workflowinfo;
/**
* 属性 [SERVICEID]
*
*/
@JSONField(name = "serviceid")
@JsonProperty("serviceid")
private String serviceid;
/**
* 属性 [COMMUNITY]
*
*/
@JSONField(name = "community")
@JsonProperty("community")
private String community;
/**
* 属性 [WORKFLOWCREATED]
*
*/
@JSONField(name = "workflowcreated")
@JsonProperty("workflowcreated")
private Integer workflowcreated;
/**
* 属性 [CREATEDRECORDTYPECODE]
*
*/
@JSONField(name = "createdrecordtypecode")
@JsonProperty("createdrecordtypecode")
private String createdrecordtypecode;
/**
* 属性 [ERRORNUMBER]
*
*/
@JSONField(name = "errornumber")
@JsonProperty("errornumber")
private Integer errornumber;
/**
* 属性 [OVERRIDDENCREATEDON]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "overriddencreatedon" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("overriddencreatedon")
private Timestamp overriddencreatedon;
/**
* 属性 [REGARDINGOBJECTID]
*
*/
@JSONField(name = "regardingobjectid")
@JsonProperty("regardingobjectid")
private String regardingobjectid;
/**
* 属性 [STATECODE]
*
*/
@JSONField(name = "statecode")
@JsonProperty("statecode")
private Integer statecode;
/**
* 属性 [OWNERIDTYPE]
*
*/
@JSONField(name = "owneridtype")
@JsonProperty("owneridtype")
private String owneridtype;
/**
* 属性 [DELIVERYLASTATTEMPTEDON]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "deliverylastattemptedon" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("deliverylastattemptedon")
private Timestamp deliverylastattemptedon;
/**
* 属性 [DELIVERYPRIORITYCODE]
*
*/
@JSONField(name = "deliveryprioritycode")
@JsonProperty("deliveryprioritycode")
private String deliveryprioritycode;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 属性 [ORGANIZER]
*
*/
@JSONField(name = "organizer")
@JsonProperty("organizer")
private String organizer;
/**
* 属性 [STAGEID]
*
*/
@JSONField(name = "stageid")
@JsonProperty("stageid")
private String stageid;
/**
* 属性 [TARGETEDRECORDTYPECODE]
*
*/
@JSONField(name = "targetedrecordtypecode")
@JsonProperty("targetedrecordtypecode")
private String targetedrecordtypecode;
/**
* 属性 [INSTANCETYPECODE]
*
*/
@JSONField(name = "instancetypecode")
@JsonProperty("instancetypecode")
private String instancetypecode;
/**
* 属性 [TO]
*
*/
@JSONField(name = "to")
@JsonProperty("to")
private String to;
/**
* 属性 [OWNERIDYOMINAME]
*
*/
@JSONField(name = "owneridyominame")
@JsonProperty("owneridyominame")
private String owneridyominame;
/**
* 属性 [SCHEDULEDDURATIONMINUTES]
*
*/
@JSONField(name = "scheduleddurationminutes")
@JsonProperty("scheduleddurationminutes")
private Integer scheduleddurationminutes;
/**
* 属性 [REGARDINGOBJECTIDYOMINAME]
*
*/
@JSONField(name = "regardingobjectidyominame")
@JsonProperty("regardingobjectidyominame")
private String regardingobjectidyominame;
/**
* 属性 [EXCHANGEITEMID]
*
*/
@JSONField(name = "exchangeitemid")
@JsonProperty("exchangeitemid")
private String exchangeitemid;
/**
* 属性 [ACTIVITYID]
*
*/
@JSONField(name = "activityid")
@JsonProperty("activityid")
private String activityid;
/**
* 属性 [FROM]
*
*/
@JSONField(name = "from")
@JsonProperty("from")
private String from;
/**
* 属性 [MAPIPRIVATE]
*
*/
@JSONField(name = "mapiprivate")
@JsonProperty("mapiprivate")
private Integer mapiprivate;
/**
* 属性 [OWNERID]
*
*/
@JSONField(name = "ownerid")
@JsonProperty("ownerid")
private String ownerid;
/**
* 属性 [STATUSCODE]
*
*/
@JSONField(name = "statuscode")
@JsonProperty("statuscode")
private Integer statuscode;
/**
* 属性 [OPERATIONTYPECODE]
*
*/
@JSONField(name = "operationtypecode")
@JsonProperty("operationtypecode")
private String operationtypecode;
/**
* 属性 [ACTIVITYADDITIONALPARAMS]
*
*/
@JSONField(name = "activityadditionalparams")
@JsonProperty("activityadditionalparams")
private String activityadditionalparams;
/**
* 属性 [UTCCONVERSIONTIMEZONECODE]
*
*/
@JSONField(name = "utcconversiontimezonecode")
@JsonProperty("utcconversiontimezonecode")
private Integer utcconversiontimezonecode;
/**
* 属性 [IMPORTSEQUENCENUMBER]
*
*/
@JSONField(name = "importsequencenumber")
@JsonProperty("importsequencenumber")
private Integer importsequencenumber;
/**
* 属性 [SERIESID]
*
*/
@JSONField(name = "seriesid")
@JsonProperty("seriesid")
private String seriesid;
/**
* 属性 [REGULARACTIVITY]
*
*/
@JSONField(name = "regularactivity")
@JsonProperty("regularactivity")
private Integer regularactivity;
/**
* 属性 [ACTUALEND]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "actualend" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("actualend")
private Timestamp actualend;
/**
* 属性 [PROCESSID]
*
*/
@JSONField(name = "processid")
@JsonProperty("processid")
private String processid;
/**
* 属性 [REQUIREDATTENDEES]
*
*/
@JSONField(name = "requiredattendees")
@JsonProperty("requiredattendees")
private String requiredattendees;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 属性 [LASTONHOLDTIME]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "lastonholdtime" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("lastonholdtime")
private Timestamp lastonholdtime;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 属性 [EXCHANGEWEBLINK]
*
*/
@JSONField(name = "exchangeweblink")
@JsonProperty("exchangeweblink")
private String exchangeweblink;
/**
* 属性 [SENTON]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "senton" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("senton")
private Timestamp senton;
/**
* 属性 [CREATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 属性 [FAILURECOUNT]
*
*/
@JSONField(name = "failurecount")
@JsonProperty("failurecount")
private Integer failurecount;
/**
* 属性 [SLANAME]
*
*/
@JSONField(name = "slaname")
@JsonProperty("slaname")
private String slaname;
/**
* 属性 [ACTIVITYTYPECODE]
*
*/
@JSONField(name = "activitytypecode")
@JsonProperty("activitytypecode")
private String activitytypecode;
/**
* 属性 [SUCCESSCOUNT]
*
*/
@JSONField(name = "successcount")
@JsonProperty("successcount")
private Integer successcount;
/**
* 属性 [CC]
*
*/
@JSONField(name = "cc")
@JsonProperty("cc")
private String cc;
/**
* 属性 [OPTIONALATTENDEES]
*
*/
@JSONField(name = "optionalattendees")
@JsonProperty("optionalattendees")
private String optionalattendees;
/**
* 属性 [ACTUALSTART]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "actualstart" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("actualstart")
private Timestamp actualstart;
/**
* 属性 [SORTDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "sortdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("sortdate")
private Timestamp sortdate;
/**
* 属性 [REGARDINGOBJECTTYPECODE]
*
*/
@JSONField(name = "regardingobjecttypecode")
@JsonProperty("regardingobjecttypecode")
private String regardingobjecttypecode;
/**
* 属性 [BILLED]
*
*/
@JSONField(name = "billed")
@JsonProperty("billed")
private Integer billed;
/**
* 属性 [PRIORITYCODE]
*
*/
@JSONField(name = "prioritycode")
@JsonProperty("prioritycode")
private String prioritycode;
/**
* 属性 [VERSIONNUMBER]
*
*/
@JSONField(name = "versionnumber")
@JsonProperty("versionnumber")
private BigInteger versionnumber;
/**
* 属性 [SUBJECT]
*
*/
@JSONField(name = "subject")
@JsonProperty("subject")
private String subject;
/**
* 属性 [RESOURCES]
*
*/
@JSONField(name = "resources")
@JsonProperty("resources")
private String resources;
/**
* 属性 [TRANSACTIONCURRENCYID]
*
*/
@JSONField(name = "transactioncurrencyid")
@JsonProperty("transactioncurrencyid")
private String transactioncurrencyid;
/**
* 属性 [SLAID]
*
*/
@JSONField(name = "slaid")
@JsonProperty("slaid")
private String slaid;
/**
* 设置 [PARAMETERS]
*/
public void setParameters(String parameters){
this.parameters = parameters ;
this.modify("parameters",parameters);
}
/**
* 设置 [CUSTOMERS]
*/
public void setCustomers(String customers){
this.customers = customers ;
this.modify("customers",customers);
}
/**
* 设置 [TRAVERSEDPATH]
*/
public void setTraversedpath(String traversedpath){
this.traversedpath = traversedpath ;
this.modify("traversedpath",traversedpath);
}
/**
* 设置 [SCHEDULEDSTART]
*/
public void setScheduledstart(Timestamp scheduledstart){
this.scheduledstart = scheduledstart ;
this.modify("scheduledstart",scheduledstart);
}
/**
* 设置 [TARGETMEMBERSCOUNT]
*/
public void setTargetmemberscount(Integer targetmemberscount){
this.targetmemberscount = targetmemberscount ;
this.modify("targetmemberscount",targetmemberscount);
}
/**
* 设置 [BCC]
*/
public void setBcc(String bcc){
this.bcc = bcc ;
this.modify("bcc",bcc);
}
/**
* 设置 [ACTUALDURATIONMINUTES]
*/
public void setActualdurationminutes(Integer actualdurationminutes){
this.actualdurationminutes = actualdurationminutes ;
this.modify("actualdurationminutes",actualdurationminutes);
}
/**
* 设置 [EXCHANGERATE]
*/
public void setExchangerate(BigDecimal exchangerate){
this.exchangerate = exchangerate ;
this.modify("exchangerate",exchangerate);
}
/**
* 设置 [BULKOPERATIONNUMBER]
*/
public void setBulkoperationnumber(String bulkoperationnumber){
this.bulkoperationnumber = bulkoperationnumber ;
this.modify("bulkoperationnumber",bulkoperationnumber);
}
/**
* 设置 [SCHEDULEDEND]
*/
public void setScheduledend(Timestamp scheduledend){
this.scheduledend = scheduledend ;
this.modify("scheduledend",scheduledend);
}
/**
* 设置 [ONHOLDTIME]
*/
public void setOnholdtime(Integer onholdtime){
this.onholdtime = onholdtime ;
this.modify("onholdtime",onholdtime);
}
/**
* 设置 [LEFTVOICEMAIL]
*/
public void setLeftvoicemail(Integer leftvoicemail){
this.leftvoicemail = leftvoicemail ;
this.modify("leftvoicemail",leftvoicemail);
}
/**
* 设置 [TIMEZONERULEVERSIONNUMBER]
*/
public void setTimezoneruleversionnumber(Integer timezoneruleversionnumber){
this.timezoneruleversionnumber = timezoneruleversionnumber ;
this.modify("timezoneruleversionnumber",timezoneruleversionnumber);
}
/**
* 设置 [DESCRIPTION]
*/
public void setDescription(String description){
this.description = description ;
this.modify("description",description);
}
/**
* 设置 [PARTNERS]
*/
public void setPartners(String partners){
this.partners = partners ;
this.modify("partners",partners);
}
/**
* 设置 [WORKFLOWINFO]
*/
public void setWorkflowinfo(String workflowinfo){
this.workflowinfo = workflowinfo ;
this.modify("workflowinfo",workflowinfo);
}
/**
* 设置 [SERVICEID]
*/
public void setServiceid(String serviceid){
this.serviceid = serviceid ;
this.modify("serviceid",serviceid);
}
/**
* 设置 [COMMUNITY]
*/
public void setCommunity(String community){
this.community = community ;
this.modify("community",community);
}
/**
* 设置 [WORKFLOWCREATED]
*/
public void setWorkflowcreated(Integer workflowcreated){
this.workflowcreated = workflowcreated ;
this.modify("workflowcreated",workflowcreated);
}
/**
* 设置 [CREATEDRECORDTYPECODE]
*/
public void setCreatedrecordtypecode(String createdrecordtypecode){
this.createdrecordtypecode = createdrecordtypecode ;
this.modify("createdrecordtypecode",createdrecordtypecode);
}
/**
* 设置 [ERRORNUMBER]
*/
public void setErrornumber(Integer errornumber){
this.errornumber = errornumber ;
this.modify("errornumber",errornumber);
}
/**
* 设置 [OVERRIDDENCREATEDON]
*/
public void setOverriddencreatedon(Timestamp overriddencreatedon){
this.overriddencreatedon = overriddencreatedon ;
this.modify("overriddencreatedon",overriddencreatedon);
}
/**
* 设置 [REGARDINGOBJECTID]
*/
public void setRegardingobjectid(String regardingobjectid){
this.regardingobjectid = regardingobjectid ;
this.modify("regardingobjectid",regardingobjectid);
}
/**
* 设置 [STATECODE]
*/
public void setStatecode(Integer statecode){
this.statecode = statecode ;
this.modify("statecode",statecode);
}
/**
* 设置 [OWNERIDTYPE]
*/
public void setOwneridtype(String owneridtype){
this.owneridtype = owneridtype ;
this.modify("owneridtype",owneridtype);
}
/**
* 设置 [DELIVERYLASTATTEMPTEDON]
*/
public void setDeliverylastattemptedon(Timestamp deliverylastattemptedon){
this.deliverylastattemptedon = deliverylastattemptedon ;
this.modify("deliverylastattemptedon",deliverylastattemptedon);
}
/**
* 设置 [DELIVERYPRIORITYCODE]
*/
public void setDeliveryprioritycode(String deliveryprioritycode){
this.deliveryprioritycode = deliveryprioritycode ;
this.modify("deliveryprioritycode",deliveryprioritycode);
}
/**
* 设置 [ORGANIZER]
*/
public void setOrganizer(String organizer){
this.organizer = organizer ;
this.modify("organizer",organizer);
}
/**
* 设置 [STAGEID]
*/
public void setStageid(String stageid){
this.stageid = stageid ;
this.modify("stageid",stageid);
}
/**
* 设置 [TARGETEDRECORDTYPECODE]
*/
public void setTargetedrecordtypecode(String targetedrecordtypecode){
this.targetedrecordtypecode = targetedrecordtypecode ;
this.modify("targetedrecordtypecode",targetedrecordtypecode);
}
/**
* 设置 [INSTANCETYPECODE]
*/
public void setInstancetypecode(String instancetypecode){
this.instancetypecode = instancetypecode ;
this.modify("instancetypecode",instancetypecode);
}
/**
* 设置 [TO]
*/
public void setTo(String to){
this.to = to ;
this.modify("to",to);
}
/**
* 设置 [OWNERIDYOMINAME]
*/
public void setOwneridyominame(String owneridyominame){
this.owneridyominame = owneridyominame ;
this.modify("owneridyominame",owneridyominame);
}
/**
* 设置 [SCHEDULEDDURATIONMINUTES]
*/
public void setScheduleddurationminutes(Integer scheduleddurationminutes){
this.scheduleddurationminutes = scheduleddurationminutes ;
this.modify("scheduleddurationminutes",scheduleddurationminutes);
}
/**
* 设置 [REGARDINGOBJECTIDYOMINAME]
*/
public void setRegardingobjectidyominame(String regardingobjectidyominame){
this.regardingobjectidyominame = regardingobjectidyominame ;
this.modify("regardingobjectidyominame",regardingobjectidyominame);
}
/**
* 设置 [EXCHANGEITEMID]
*/
public void setExchangeitemid(String exchangeitemid){
this.exchangeitemid = exchangeitemid ;
this.modify("exchangeitemid",exchangeitemid);
}
/**
* 设置 [FROM]
*/
public void setFrom(String from){
this.from = from ;
this.modify("from",from);
}
/**
* 设置 [MAPIPRIVATE]
*/
public void setMapiprivate(Integer mapiprivate){
this.mapiprivate = mapiprivate ;
this.modify("mapiprivate",mapiprivate);
}
/**
* 设置 [OWNERID]
*/
public void setOwnerid(String ownerid){
this.ownerid = ownerid ;
this.modify("ownerid",ownerid);
}
/**
* 设置 [STATUSCODE]
*/
public void setStatuscode(Integer statuscode){
this.statuscode = statuscode ;
this.modify("statuscode",statuscode);
}
/**
* 设置 [OPERATIONTYPECODE]
*/
public void setOperationtypecode(String operationtypecode){
this.operationtypecode = operationtypecode ;
this.modify("operationtypecode",operationtypecode);
}
/**
* 设置 [ACTIVITYADDITIONALPARAMS]
*/
public void setActivityadditionalparams(String activityadditionalparams){
this.activityadditionalparams = activityadditionalparams ;
this.modify("activityadditionalparams",activityadditionalparams);
}
/**
* 设置 [UTCCONVERSIONTIMEZONECODE]
*/
public void setUtcconversiontimezonecode(Integer utcconversiontimezonecode){
this.utcconversiontimezonecode = utcconversiontimezonecode ;
this.modify("utcconversiontimezonecode",utcconversiontimezonecode);
}
/**
* 设置 [IMPORTSEQUENCENUMBER]
*/
public void setImportsequencenumber(Integer importsequencenumber){
this.importsequencenumber = importsequencenumber ;
this.modify("importsequencenumber",importsequencenumber);
}
/**
* 设置 [SERIESID]
*/
public void setSeriesid(String seriesid){
this.seriesid = seriesid ;
this.modify("seriesid",seriesid);
}
/**
* 设置 [REGULARACTIVITY]
*/
public void setRegularactivity(Integer regularactivity){
this.regularactivity = regularactivity ;
this.modify("regularactivity",regularactivity);
}
/**
* 设置 [ACTUALEND]
*/
public void setActualend(Timestamp actualend){
this.actualend = actualend ;
this.modify("actualend",actualend);
}
/**
* 设置 [PROCESSID]
*/
public void setProcessid(String processid){
this.processid = processid ;
this.modify("processid",processid);
}
/**
* 设置 [REQUIREDATTENDEES]
*/
public void setRequiredattendees(String requiredattendees){
this.requiredattendees = requiredattendees ;
this.modify("requiredattendees",requiredattendees);
}
/**
* 设置 [LASTONHOLDTIME]
*/
public void setLastonholdtime(Timestamp lastonholdtime){
this.lastonholdtime = lastonholdtime ;
this.modify("lastonholdtime",lastonholdtime);
}
/**
* 设置 [EXCHANGEWEBLINK]
*/
public void setExchangeweblink(String exchangeweblink){
this.exchangeweblink = exchangeweblink ;
this.modify("exchangeweblink",exchangeweblink);
}
/**
* 设置 [SENTON]
*/
public void setSenton(Timestamp senton){
this.senton = senton ;
this.modify("senton",senton);
}
/**
* 设置 [FAILURECOUNT]
*/
public void setFailurecount(Integer failurecount){
this.failurecount = failurecount ;
this.modify("failurecount",failurecount);
}
/**
* 设置 [SLANAME]
*/
public void setSlaname(String slaname){
this.slaname = slaname ;
this.modify("slaname",slaname);
}
/**
* 设置 [ACTIVITYTYPECODE]
*/
public void setActivitytypecode(String activitytypecode){
this.activitytypecode = activitytypecode ;
this.modify("activitytypecode",activitytypecode);
}
/**
* 设置 [SUCCESSCOUNT]
*/
public void setSuccesscount(Integer successcount){
this.successcount = successcount ;
this.modify("successcount",successcount);
}
/**
* 设置 [CC]
*/
public void setCc(String cc){
this.cc = cc ;
this.modify("cc",cc);
}
/**
* 设置 [OPTIONALATTENDEES]
*/
public void setOptionalattendees(String optionalattendees){
this.optionalattendees = optionalattendees ;
this.modify("optionalattendees",optionalattendees);
}
/**
* 设置 [ACTUALSTART]
*/
public void setActualstart(Timestamp actualstart){
this.actualstart = actualstart ;
this.modify("actualstart",actualstart);
}
/**
* 设置 [SORTDATE]
*/
public void setSortdate(Timestamp sortdate){
this.sortdate = sortdate ;
this.modify("sortdate",sortdate);
}
/**
* 设置 [REGARDINGOBJECTTYPECODE]
*/
public void setRegardingobjecttypecode(String regardingobjecttypecode){
this.regardingobjecttypecode = regardingobjecttypecode ;
this.modify("regardingobjecttypecode",regardingobjecttypecode);
}
/**
* 设置 [BILLED]
*/
public void setBilled(Integer billed){
this.billed = billed ;
this.modify("billed",billed);
}
/**
* 设置 [PRIORITYCODE]
*/
public void setPrioritycode(String prioritycode){
this.prioritycode = prioritycode ;
this.modify("prioritycode",prioritycode);
}
/**
* 设置 [VERSIONNUMBER]
*/
public void setVersionnumber(BigInteger versionnumber){
this.versionnumber = versionnumber ;
this.modify("versionnumber",versionnumber);
}
/**
* 设置 [SUBJECT]
*/
public void setSubject(String subject){
this.subject = subject ;
this.modify("subject",subject);
}
/**
* 设置 [RESOURCES]
*/
public void setResources(String resources){
this.resources = resources ;
this.modify("resources",resources);
}
/**
* 设置 [TRANSACTIONCURRENCYID]
*/
public void setTransactioncurrencyid(String transactioncurrencyid){
this.transactioncurrencyid = transactioncurrencyid ;
this.modify("transactioncurrencyid",transactioncurrencyid);
}
/**
* 设置 [SLAID]
*/
public void setSlaid(String slaid){
this.slaid = slaid ;
this.modify("slaid",slaid);
}
}
package cn.ibizlab.businesscentral.centralapi.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import cn.ibizlab.businesscentral.util.domain.DTOBase;
import lombok.Data;
/**
* 服务DTO对象[KnowledgeArticleDTO]
*/
@Data
public class KnowledgeArticleDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [KNOWLEDGEARTICLEVIEWS_DATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "knowledgearticleviews_date" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("knowledgearticleviews_date")
private Timestamp knowledgearticleviewsDate;
/**
* 属性 [KEYWORDS]
*
*/
@JSONField(name = "keywords")
@JsonProperty("keywords")
private String keywords;
/**
* 属性 [STATUSCODE]
*
*/
@JSONField(name = "statuscode")
@JsonProperty("statuscode")
private Integer statuscode;
/**
* 属性 [PRIMARY]
*
*/
@JSONField(name = "primary")
@JsonProperty("primary")
private Integer primary;
/**
* 属性 [EXPIRATIONSTATEID]
*
*/
@JSONField(name = "expirationstateid")
@JsonProperty("expirationstateid")
private Integer expirationstateid;
/**
* 属性 [RATING_COUNT]
*
*/
@JSONField(name = "rating_count")
@JsonProperty("rating_count")
private Integer ratingCount;
/**
* 属性 [CONTENT]
*
*/
@JSONField(name = "content")
@JsonProperty("content")
private String content;
/**
* 属性 [OWNERID]
*
*/
@JSONField(name = "ownerid")
@JsonProperty("ownerid")
private String ownerid;
/**
* 属性 [ROOTARTICLE]
*
*/
@JSONField(name = "rootarticled")
@JsonProperty("rootarticled")
private Integer rootarticled;
/**
* 属性 [KNOWLEDGEARTICLEVIEWS_STATE]
*
*/
@JSONField(name = "knowledgearticleviews_state")
@JsonProperty("knowledgearticleviews_state")
private Integer knowledgearticleviewsState;
/**
* 属性 [RATING_SUM]
*
*/
@JSONField(name = "rating_sum")
@JsonProperty("rating_sum")
private BigDecimal ratingSum;
/**
* 属性 [STATECODE]
*
*/
@JSONField(name = "statecode")
@JsonProperty("statecode")
private Integer statecode;
/**
* 属性 [TRAVERSEDPATH]
*
*/
@JSONField(name = "traversedpath")
@JsonProperty("traversedpath")
private String traversedpath;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 属性 [PUBLISHSTATUSID]
*
*/
@JSONField(name = "publishstatusid")
@JsonProperty("publishstatusid")
private Integer publishstatusid;
/**
* 属性 [ARTICLEPUBLICNUMBER]
*
*/
@JSONField(name = "articlepublicnumber")
@JsonProperty("articlepublicnumber")
private String articlepublicnumber;
/**
* 属性 [PRIMARYAUTHORIDNAME]
*
*/
@JSONField(name = "primaryauthoridname")
@JsonProperty("primaryauthoridname")
private String primaryauthoridname;
/**
* 属性 [OVERRIDDENCREATEDON]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "overriddencreatedon" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("overriddencreatedon")
private Timestamp overriddencreatedon;
/**
* 属性 [OWNERIDYOMINAME]
*
*/
@JSONField(name = "owneridyominame")
@JsonProperty("owneridyominame")
private String owneridyominame;
/**
* 属性 [PRIMARYAUTHORID]
*
*/
@JSONField(name = "primaryauthorid")
@JsonProperty("primaryauthorid")
private String primaryauthorid;
/**
* 属性 [LATESTVERSION]
*
*/
@JSONField(name = "latestversion")
@JsonProperty("latestversion")
private Integer latestversion;
/**
* 属性 [RATING_STATE]
*
*/
@JSONField(name = "rating_state")
@JsonProperty("rating_state")
private Integer ratingState;
/**
* 属性 [CREATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 属性 [VERSIONNUMBER]
*
*/
@JSONField(name = "versionnumber")
@JsonProperty("versionnumber")
private BigInteger versionnumber;
/**
* 属性 [UTCCONVERSIONTIMEZONECODE]
*
*/
@JSONField(name = "utcconversiontimezonecode")
@JsonProperty("utcconversiontimezonecode")
private Integer utcconversiontimezonecode;
/**
* 属性 [EXPIRATIONSTATUSID]
*
*/
@JSONField(name = "expirationstatusid")
@JsonProperty("expirationstatusid")
private Integer expirationstatusid;
/**
* 属性 [KNOWLEDGEARTICLEID]
*
*/
@JSONField(name = "knowledgearticleid")
@JsonProperty("knowledgearticleid")
private String knowledgearticleid;
/**
* 属性 [SETCATEGORYASSOCIATIONS]
*
*/
@JSONField(name = "setcategoryassociations")
@JsonProperty("setcategoryassociations")
private Integer setcategoryassociations;
/**
* 属性 [DESCRIPTION]
*
*/
@JSONField(name = "description")
@JsonProperty("description")
private String description;
/**
* 属性 [SETPRODUCTASSOCIATIONS]
*
*/
@JSONField(name = "setproductassociations")
@JsonProperty("setproductassociations")
private Integer setproductassociations;
/**
* 属性 [MINORVERSIONNUMBER]
*
*/
@JSONField(name = "minorversionnumber")
@JsonProperty("minorversionnumber")
private Integer minorversionnumber;
/**
* 属性 [STAGEID]
*
*/
@JSONField(name = "stageid")
@JsonProperty("stageid")
private String stageid;
/**
* 属性 [PROCESSID]
*
*/
@JSONField(name = "processid")
@JsonProperty("processid")
private String processid;
/**
* 属性 [MAJORVERSIONNUMBER]
*
*/
@JSONField(name = "majorversionnumber")
@JsonProperty("majorversionnumber")
private Integer majorversionnumber;
/**
* 属性 [RATING]
*
*/
@JSONField(name = "rating")
@JsonProperty("rating")
private BigDecimal rating;
/**
* 属性 [OWNERIDTYPE]
*
*/
@JSONField(name = "owneridtype")
@JsonProperty("owneridtype")
private String owneridtype;
/**
* 属性 [PUBLISHON]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "publishon" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("publishon")
private Timestamp publishon;
/**
* 属性 [KNOWLEDGEARTICLEVIEWS]
*
*/
@JSONField(name = "knowledgearticleviews")
@JsonProperty("knowledgearticleviews")
private Integer knowledgearticleviews;
/**
* 属性 [RATING_DATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "rating_date" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("rating_date")
private Timestamp ratingDate;
/**
* 属性 [EXCHANGERATE]
*
*/
@JSONField(name = "exchangerate")
@JsonProperty("exchangerate")
private BigDecimal exchangerate;
/**
* 属性 [READYFORREVIEW]
*
*/
@JSONField(name = "readyforreview")
@JsonProperty("readyforreview")
private Integer readyforreview;
/**
* 属性 [IMPORTSEQUENCENUMBER]
*
*/
@JSONField(name = "importsequencenumber")
@JsonProperty("importsequencenumber")
private Integer importsequencenumber;
/**
* 属性 [SUBJECTIDDSC]
*
*/
@JSONField(name = "subjectiddsc")
@JsonProperty("subjectiddsc")
private Integer subjectiddsc;
/**
* 属性 [REVIEW]
*
*/
@JSONField(name = "review")
@JsonProperty("review")
private String review;
/**
* 属性 [LANGUAGELOCALEIDLOCALEID]
*
*/
@JSONField(name = "languagelocaleidlocaleid")
@JsonProperty("languagelocaleidlocaleid")
private Integer languagelocaleidlocaleid;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 属性 [SCHEDULEDSTATUSID]
*
*/
@JSONField(name = "scheduledstatusid")
@JsonProperty("scheduledstatusid")
private Integer scheduledstatusid;
/**
* 属性 [TIMEZONERULEVERSIONNUMBER]
*
*/
@JSONField(name = "timezoneruleversionnumber")
@JsonProperty("timezoneruleversionnumber")
private Integer timezoneruleversionnumber;
/**
* 属性 [INTERNAL]
*
*/
@JSONField(name = "internal")
@JsonProperty("internal")
private Integer internal;
/**
* 属性 [TITLE]
*
*/
@JSONField(name = "title")
@JsonProperty("title")
private String title;
/**
* 属性 [UPDATECONTENT]
*
*/
@JSONField(name = "updatecontent")
@JsonProperty("updatecontent")
private Integer updatecontent;
/**
* 属性 [EXPIRATIONDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "expirationdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("expirationdate")
private Timestamp expirationdate;
/**
* 属性 [EXPIREDREVIEWOPTIONS]
*
*/
@JSONField(name = "expiredreviewoptions")
@JsonProperty("expiredreviewoptions")
private String expiredreviewoptions;
/**
* 属性 [PARENTARTICLECONTENTID]
*
*/
@JSONField(name = "parentarticlecontentid")
@JsonProperty("parentarticlecontentid")
private String parentarticlecontentid;
/**
* 属性 [PREVIOUSARTICLECONTENTID]
*
*/
@JSONField(name = "previousarticlecontentid")
@JsonProperty("previousarticlecontentid")
private String previousarticlecontentid;
/**
* 属性 [TRANSACTIONCURRENCYID]
*
*/
@JSONField(name = "transactioncurrencyid")
@JsonProperty("transactioncurrencyid")
private String transactioncurrencyid;
/**
* 属性 [ROOTARTICLEID]
*
*/
@JSONField(name = "rootarticleid")
@JsonProperty("rootarticleid")
private String rootarticleid;
/**
* 属性 [SUBJECTID]
*
*/
@JSONField(name = "subjectid")
@JsonProperty("subjectid")
private String subjectid;
/**
* 属性 [LANGUAGELOCALEID]
*
*/
@JSONField(name = "languagelocaleid")
@JsonProperty("languagelocaleid")
private String languagelocaleid;
/**
* 设置 [KNOWLEDGEARTICLEVIEWS_DATE]
*/
public void setKnowledgearticleviewsDate(Timestamp knowledgearticleviewsDate){
this.knowledgearticleviewsDate = knowledgearticleviewsDate ;
this.modify("knowledgearticleviews_date",knowledgearticleviewsDate);
}
/**
* 设置 [KEYWORDS]
*/
public void setKeywords(String keywords){
this.keywords = keywords ;
this.modify("keywords",keywords);
}
/**
* 设置 [STATUSCODE]
*/
public void setStatuscode(Integer statuscode){
this.statuscode = statuscode ;
this.modify("statuscode",statuscode);
}
/**
* 设置 [PRIMARY]
*/
public void setPrimary(Integer primary){
this.primary = primary ;
this.modify("primary",primary);
}
/**
* 设置 [EXPIRATIONSTATEID]
*/
public void setExpirationstateid(Integer expirationstateid){
this.expirationstateid = expirationstateid ;
this.modify("expirationstateid",expirationstateid);
}
/**
* 设置 [RATING_COUNT]
*/
public void setRatingCount(Integer ratingCount){
this.ratingCount = ratingCount ;
this.modify("rating_count",ratingCount);
}
/**
* 设置 [CONTENT]
*/
public void setContent(String content){
this.content = content ;
this.modify("content",content);
}
/**
* 设置 [OWNERID]
*/
public void setOwnerid(String ownerid){
this.ownerid = ownerid ;
this.modify("ownerid",ownerid);
}
/**
* 设置 [ROOTARTICLE]
*/
public void setRootarticled(Integer rootarticled){
this.rootarticled = rootarticled ;
this.modify("rootarticle",rootarticled);
}
/**
* 设置 [KNOWLEDGEARTICLEVIEWS_STATE]
*/
public void setKnowledgearticleviewsState(Integer knowledgearticleviewsState){
this.knowledgearticleviewsState = knowledgearticleviewsState ;
this.modify("knowledgearticleviews_state",knowledgearticleviewsState);
}
/**
* 设置 [RATING_SUM]
*/
public void setRatingSum(BigDecimal ratingSum){
this.ratingSum = ratingSum ;
this.modify("rating_sum",ratingSum);
}
/**
* 设置 [STATECODE]
*/
public void setStatecode(Integer statecode){
this.statecode = statecode ;
this.modify("statecode",statecode);
}
/**
* 设置 [TRAVERSEDPATH]
*/
public void setTraversedpath(String traversedpath){
this.traversedpath = traversedpath ;
this.modify("traversedpath",traversedpath);
}
/**
* 设置 [PUBLISHSTATUSID]
*/
public void setPublishstatusid(Integer publishstatusid){
this.publishstatusid = publishstatusid ;
this.modify("publishstatusid",publishstatusid);
}
/**
* 设置 [ARTICLEPUBLICNUMBER]
*/
public void setArticlepublicnumber(String articlepublicnumber){
this.articlepublicnumber = articlepublicnumber ;
this.modify("articlepublicnumber",articlepublicnumber);
}
/**
* 设置 [PRIMARYAUTHORIDNAME]
*/
public void setPrimaryauthoridname(String primaryauthoridname){
this.primaryauthoridname = primaryauthoridname ;
this.modify("primaryauthoridname",primaryauthoridname);
}
/**
* 设置 [OVERRIDDENCREATEDON]
*/
public void setOverriddencreatedon(Timestamp overriddencreatedon){
this.overriddencreatedon = overriddencreatedon ;
this.modify("overriddencreatedon",overriddencreatedon);
}
/**
* 设置 [OWNERIDYOMINAME]
*/
public void setOwneridyominame(String owneridyominame){
this.owneridyominame = owneridyominame ;
this.modify("owneridyominame",owneridyominame);
}
/**
* 设置 [PRIMARYAUTHORID]
*/
public void setPrimaryauthorid(String primaryauthorid){
this.primaryauthorid = primaryauthorid ;
this.modify("primaryauthorid",primaryauthorid);
}
/**
* 设置 [LATESTVERSION]
*/
public void setLatestversion(Integer latestversion){
this.latestversion = latestversion ;
this.modify("latestversion",latestversion);
}
/**
* 设置 [RATING_STATE]
*/
public void setRatingState(Integer ratingState){
this.ratingState = ratingState ;
this.modify("rating_state",ratingState);
}
/**
* 设置 [VERSIONNUMBER]
*/
public void setVersionnumber(BigInteger versionnumber){
this.versionnumber = versionnumber ;
this.modify("versionnumber",versionnumber);
}
/**
* 设置 [UTCCONVERSIONTIMEZONECODE]
*/
public void setUtcconversiontimezonecode(Integer utcconversiontimezonecode){
this.utcconversiontimezonecode = utcconversiontimezonecode ;
this.modify("utcconversiontimezonecode",utcconversiontimezonecode);
}
/**
* 设置 [EXPIRATIONSTATUSID]
*/
public void setExpirationstatusid(Integer expirationstatusid){
this.expirationstatusid = expirationstatusid ;
this.modify("expirationstatusid",expirationstatusid);
}
/**
* 设置 [SETCATEGORYASSOCIATIONS]
*/
public void setSetcategoryassociations(Integer setcategoryassociations){
this.setcategoryassociations = setcategoryassociations ;
this.modify("setcategoryassociations",setcategoryassociations);
}
/**
* 设置 [DESCRIPTION]
*/
public void setDescription(String description){
this.description = description ;
this.modify("description",description);
}
/**
* 设置 [SETPRODUCTASSOCIATIONS]
*/
public void setSetproductassociations(Integer setproductassociations){
this.setproductassociations = setproductassociations ;
this.modify("setproductassociations",setproductassociations);
}
/**
* 设置 [MINORVERSIONNUMBER]
*/
public void setMinorversionnumber(Integer minorversionnumber){
this.minorversionnumber = minorversionnumber ;
this.modify("minorversionnumber",minorversionnumber);
}
/**
* 设置 [STAGEID]
*/
public void setStageid(String stageid){
this.stageid = stageid ;
this.modify("stageid",stageid);
}
/**
* 设置 [PROCESSID]
*/
public void setProcessid(String processid){
this.processid = processid ;
this.modify("processid",processid);
}
/**
* 设置 [MAJORVERSIONNUMBER]
*/
public void setMajorversionnumber(Integer majorversionnumber){
this.majorversionnumber = majorversionnumber ;
this.modify("majorversionnumber",majorversionnumber);
}
/**
* 设置 [RATING]
*/
public void setRating(BigDecimal rating){
this.rating = rating ;
this.modify("rating",rating);
}
/**
* 设置 [OWNERIDTYPE]
*/
public void setOwneridtype(String owneridtype){
this.owneridtype = owneridtype ;
this.modify("owneridtype",owneridtype);
}
/**
* 设置 [PUBLISHON]
*/
public void setPublishon(Timestamp publishon){
this.publishon = publishon ;
this.modify("publishon",publishon);
}
/**
* 设置 [KNOWLEDGEARTICLEVIEWS]
*/
public void setKnowledgearticleviews(Integer knowledgearticleviews){
this.knowledgearticleviews = knowledgearticleviews ;
this.modify("knowledgearticleviews",knowledgearticleviews);
}
/**
* 设置 [RATING_DATE]
*/
public void setRatingDate(Timestamp ratingDate){
this.ratingDate = ratingDate ;
this.modify("rating_date",ratingDate);
}
/**
* 设置 [EXCHANGERATE]
*/
public void setExchangerate(BigDecimal exchangerate){
this.exchangerate = exchangerate ;
this.modify("exchangerate",exchangerate);
}
/**
* 设置 [READYFORREVIEW]
*/
public void setReadyforreview(Integer readyforreview){
this.readyforreview = readyforreview ;
this.modify("readyforreview",readyforreview);
}
/**
* 设置 [IMPORTSEQUENCENUMBER]
*/
public void setImportsequencenumber(Integer importsequencenumber){
this.importsequencenumber = importsequencenumber ;
this.modify("importsequencenumber",importsequencenumber);
}
/**
* 设置 [SUBJECTIDDSC]
*/
public void setSubjectiddsc(Integer subjectiddsc){
this.subjectiddsc = subjectiddsc ;
this.modify("subjectiddsc",subjectiddsc);
}
/**
* 设置 [REVIEW]
*/
public void setReview(String review){
this.review = review ;
this.modify("review",review);
}
/**
* 设置 [LANGUAGELOCALEIDLOCALEID]
*/
public void setLanguagelocaleidlocaleid(Integer languagelocaleidlocaleid){
this.languagelocaleidlocaleid = languagelocaleidlocaleid ;
this.modify("languagelocaleidlocaleid",languagelocaleidlocaleid);
}
/**
* 设置 [SCHEDULEDSTATUSID]
*/
public void setScheduledstatusid(Integer scheduledstatusid){
this.scheduledstatusid = scheduledstatusid ;
this.modify("scheduledstatusid",scheduledstatusid);
}
/**
* 设置 [TIMEZONERULEVERSIONNUMBER]
*/
public void setTimezoneruleversionnumber(Integer timezoneruleversionnumber){
this.timezoneruleversionnumber = timezoneruleversionnumber ;
this.modify("timezoneruleversionnumber",timezoneruleversionnumber);
}
/**
* 设置 [INTERNAL]
*/
public void setInternal(Integer internal){
this.internal = internal ;
this.modify("internal",internal);
}
/**
* 设置 [TITLE]
*/
public void setTitle(String title){
this.title = title ;
this.modify("title",title);
}
/**
* 设置 [UPDATECONTENT]
*/
public void setUpdatecontent(Integer updatecontent){
this.updatecontent = updatecontent ;
this.modify("updatecontent",updatecontent);
}
/**
* 设置 [EXPIRATIONDATE]
*/
public void setExpirationdate(Timestamp expirationdate){
this.expirationdate = expirationdate ;
this.modify("expirationdate",expirationdate);
}
/**
* 设置 [EXPIREDREVIEWOPTIONS]
*/
public void setExpiredreviewoptions(String expiredreviewoptions){
this.expiredreviewoptions = expiredreviewoptions ;
this.modify("expiredreviewoptions",expiredreviewoptions);
}
/**
* 设置 [PARENTARTICLECONTENTID]
*/
public void setParentarticlecontentid(String parentarticlecontentid){
this.parentarticlecontentid = parentarticlecontentid ;
this.modify("parentarticlecontentid",parentarticlecontentid);
}
/**
* 设置 [PREVIOUSARTICLECONTENTID]
*/
public void setPreviousarticlecontentid(String previousarticlecontentid){
this.previousarticlecontentid = previousarticlecontentid ;
this.modify("previousarticlecontentid",previousarticlecontentid);
}
/**
* 设置 [TRANSACTIONCURRENCYID]
*/
public void setTransactioncurrencyid(String transactioncurrencyid){
this.transactioncurrencyid = transactioncurrencyid ;
this.modify("transactioncurrencyid",transactioncurrencyid);
}
/**
* 设置 [ROOTARTICLEID]
*/
public void setRootarticleid(String rootarticleid){
this.rootarticleid = rootarticleid ;
this.modify("rootarticleid",rootarticleid);
}
/**
* 设置 [SUBJECTID]
*/
public void setSubjectid(String subjectid){
this.subjectid = subjectid ;
this.modify("subjectid",subjectid);
}
/**
* 设置 [LANGUAGELOCALEID]
*/
public void setLanguagelocaleid(String languagelocaleid){
this.languagelocaleid = languagelocaleid ;
this.modify("languagelocaleid",languagelocaleid);
}
}
package cn.ibizlab.businesscentral.centralapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.businesscentral.core.runtime.domain.BulkOperation;
import cn.ibizlab.businesscentral.centralapi.dto.BulkOperationDTO;
import cn.ibizlab.businesscentral.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface BulkOperationMapping extends MappingBase<BulkOperationDTO, BulkOperation> {
}
package cn.ibizlab.businesscentral.centralapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.businesscentral.core.base.domain.KnowledgeArticle;
import cn.ibizlab.businesscentral.centralapi.dto.KnowledgeArticleDTO;
import cn.ibizlab.businesscentral.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface KnowledgeArticleMapping extends MappingBase<KnowledgeArticleDTO, KnowledgeArticle> {
}
package cn.ibizlab.businesscentral.centralapi.rest;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PostAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import cn.ibizlab.businesscentral.centralapi.dto.*;
import cn.ibizlab.businesscentral.centralapi.mapping.*;
import cn.ibizlab.businesscentral.core.runtime.domain.BulkOperation;
import cn.ibizlab.businesscentral.core.runtime.service.IBulkOperationService;
import cn.ibizlab.businesscentral.core.runtime.filter.BulkOperationSearchContext;
import cn.ibizlab.businesscentral.util.annotation.VersionCheck;
@Slf4j
@Api(tags = {"快速市场活动" })
@RestController("CentralApi-bulkoperation")
@RequestMapping("")
public class BulkOperationResource {
@Autowired
public IBulkOperationService bulkoperationService;
@Autowired
@Lazy
public BulkOperationMapping bulkoperationMapping;
@PreAuthorize("hasPermission(this.bulkoperationMapping.toDomain(#bulkoperationdto),'iBizBusinessCentral-BulkOperation-Create')")
@ApiOperation(value = "新建快速市场活动", tags = {"快速市场活动" }, notes = "新建快速市场活动")
@RequestMapping(method = RequestMethod.POST, value = "/bulkoperations")
@Transactional
public ResponseEntity<BulkOperationDTO> create(@RequestBody BulkOperationDTO bulkoperationdto) {
BulkOperation domain = bulkoperationMapping.toDomain(bulkoperationdto);
bulkoperationService.create(domain);
BulkOperationDTO dto = bulkoperationMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.bulkoperationMapping.toDomain(#bulkoperationdtos),'iBizBusinessCentral-BulkOperation-Create')")
@ApiOperation(value = "批量新建快速市场活动", tags = {"快速市场活动" }, notes = "批量新建快速市场活动")
@RequestMapping(method = RequestMethod.POST, value = "/bulkoperations/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<BulkOperationDTO> bulkoperationdtos) {
bulkoperationService.createBatch(bulkoperationMapping.toDomain(bulkoperationdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "bulkoperation" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.bulkoperationService.get(#bulkoperation_id),'iBizBusinessCentral-BulkOperation-Update')")
@ApiOperation(value = "更新快速市场活动", tags = {"快速市场活动" }, notes = "更新快速市场活动")
@RequestMapping(method = RequestMethod.PUT, value = "/bulkoperations/{bulkoperation_id}")
@Transactional
public ResponseEntity<BulkOperationDTO> update(@PathVariable("bulkoperation_id") String bulkoperation_id, @RequestBody BulkOperationDTO bulkoperationdto) {
BulkOperation domain = bulkoperationMapping.toDomain(bulkoperationdto);
domain .setActivityid(bulkoperation_id);
bulkoperationService.update(domain );
BulkOperationDTO dto = bulkoperationMapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.bulkoperationService.getBulkoperationByEntities(this.bulkoperationMapping.toDomain(#bulkoperationdtos)),'iBizBusinessCentral-BulkOperation-Update')")
@ApiOperation(value = "批量更新快速市场活动", tags = {"快速市场活动" }, notes = "批量更新快速市场活动")
@RequestMapping(method = RequestMethod.PUT, value = "/bulkoperations/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<BulkOperationDTO> bulkoperationdtos) {
bulkoperationService.updateBatch(bulkoperationMapping.toDomain(bulkoperationdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.bulkoperationService.get(#bulkoperation_id),'iBizBusinessCentral-BulkOperation-Remove')")
@ApiOperation(value = "删除快速市场活动", tags = {"快速市场活动" }, notes = "删除快速市场活动")
@RequestMapping(method = RequestMethod.DELETE, value = "/bulkoperations/{bulkoperation_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("bulkoperation_id") String bulkoperation_id) {
return ResponseEntity.status(HttpStatus.OK).body(bulkoperationService.remove(bulkoperation_id));
}
@PreAuthorize("hasPermission(this.bulkoperationService.getBulkoperationByIds(#ids),'iBizBusinessCentral-BulkOperation-Remove')")
@ApiOperation(value = "批量删除快速市场活动", tags = {"快速市场活动" }, notes = "批量删除快速市场活动")
@RequestMapping(method = RequestMethod.DELETE, value = "/bulkoperations/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
bulkoperationService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.bulkoperationMapping.toDomain(returnObject.body),'iBizBusinessCentral-BulkOperation-Get')")
@ApiOperation(value = "获取快速市场活动", tags = {"快速市场活动" }, notes = "获取快速市场活动")
@RequestMapping(method = RequestMethod.GET, value = "/bulkoperations/{bulkoperation_id}")
public ResponseEntity<BulkOperationDTO> get(@PathVariable("bulkoperation_id") String bulkoperation_id) {
BulkOperation domain = bulkoperationService.get(bulkoperation_id);
BulkOperationDTO dto = bulkoperationMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取快速市场活动草稿", tags = {"快速市场活动" }, notes = "获取快速市场活动草稿")
@RequestMapping(method = RequestMethod.GET, value = "/bulkoperations/getdraft")
public ResponseEntity<BulkOperationDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(bulkoperationMapping.toDto(bulkoperationService.getDraft(new BulkOperation())));
}
@ApiOperation(value = "检查快速市场活动", tags = {"快速市场活动" }, notes = "检查快速市场活动")
@RequestMapping(method = RequestMethod.POST, value = "/bulkoperations/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody BulkOperationDTO bulkoperationdto) {
return ResponseEntity.status(HttpStatus.OK).body(bulkoperationService.checkKey(bulkoperationMapping.toDomain(bulkoperationdto)));
}
@PreAuthorize("hasPermission(this.bulkoperationMapping.toDomain(#bulkoperationdto),'iBizBusinessCentral-BulkOperation-Save')")
@ApiOperation(value = "保存快速市场活动", tags = {"快速市场活动" }, notes = "保存快速市场活动")
@RequestMapping(method = RequestMethod.POST, value = "/bulkoperations/save")
public ResponseEntity<Boolean> save(@RequestBody BulkOperationDTO bulkoperationdto) {
return ResponseEntity.status(HttpStatus.OK).body(bulkoperationService.save(bulkoperationMapping.toDomain(bulkoperationdto)));
}
@PreAuthorize("hasPermission(this.bulkoperationMapping.toDomain(#bulkoperationdtos),'iBizBusinessCentral-BulkOperation-Save')")
@ApiOperation(value = "批量保存快速市场活动", tags = {"快速市场活动" }, notes = "批量保存快速市场活动")
@RequestMapping(method = RequestMethod.POST, value = "/bulkoperations/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<BulkOperationDTO> bulkoperationdtos) {
bulkoperationService.saveBatch(bulkoperationMapping.toDomain(bulkoperationdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-BulkOperation-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-BulkOperation-Get')")
@ApiOperation(value = "获取DEFAULT", tags = {"快速市场活动" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/bulkoperations/fetchdefault")
public ResponseEntity<List<BulkOperationDTO>> fetchDefault(BulkOperationSearchContext context) {
Page<BulkOperation> domains = bulkoperationService.searchDefault(context) ;
List<BulkOperationDTO> list = bulkoperationMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-BulkOperation-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-BulkOperation-Get')")
@ApiOperation(value = "查询DEFAULT", tags = {"快速市场活动" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/bulkoperations/searchdefault")
public ResponseEntity<Page<BulkOperationDTO>> searchDefault(@RequestBody BulkOperationSearchContext context) {
Page<BulkOperation> domains = bulkoperationService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(bulkoperationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
package cn.ibizlab.businesscentral.centralapi.rest;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PostAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import cn.ibizlab.businesscentral.centralapi.dto.*;
import cn.ibizlab.businesscentral.centralapi.mapping.*;
import cn.ibizlab.businesscentral.core.base.domain.KnowledgeArticle;
import cn.ibizlab.businesscentral.core.base.service.IKnowledgeArticleService;
import cn.ibizlab.businesscentral.core.base.filter.KnowledgeArticleSearchContext;
import cn.ibizlab.businesscentral.util.annotation.VersionCheck;
@Slf4j
@Api(tags = {"知识文章" })
@RestController("CentralApi-knowledgearticle")
@RequestMapping("")
public class KnowledgeArticleResource {
@Autowired
public IKnowledgeArticleService knowledgearticleService;
@Autowired
@Lazy
public KnowledgeArticleMapping knowledgearticleMapping;
@PreAuthorize("hasPermission(this.knowledgearticleMapping.toDomain(#knowledgearticledto),'iBizBusinessCentral-KnowledgeArticle-Create')")
@ApiOperation(value = "新建知识文章", tags = {"知识文章" }, notes = "新建知识文章")
@RequestMapping(method = RequestMethod.POST, value = "/knowledgearticles")
@Transactional
public ResponseEntity<KnowledgeArticleDTO> create(@RequestBody KnowledgeArticleDTO knowledgearticledto) {
KnowledgeArticle domain = knowledgearticleMapping.toDomain(knowledgearticledto);
knowledgearticleService.create(domain);
KnowledgeArticleDTO dto = knowledgearticleMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.knowledgearticleMapping.toDomain(#knowledgearticledtos),'iBizBusinessCentral-KnowledgeArticle-Create')")
@ApiOperation(value = "批量新建知识文章", tags = {"知识文章" }, notes = "批量新建知识文章")
@RequestMapping(method = RequestMethod.POST, value = "/knowledgearticles/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<KnowledgeArticleDTO> knowledgearticledtos) {
knowledgearticleService.createBatch(knowledgearticleMapping.toDomain(knowledgearticledtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "knowledgearticle" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.knowledgearticleService.get(#knowledgearticle_id),'iBizBusinessCentral-KnowledgeArticle-Update')")
@ApiOperation(value = "更新知识文章", tags = {"知识文章" }, notes = "更新知识文章")
@RequestMapping(method = RequestMethod.PUT, value = "/knowledgearticles/{knowledgearticle_id}")
@Transactional
public ResponseEntity<KnowledgeArticleDTO> update(@PathVariable("knowledgearticle_id") String knowledgearticle_id, @RequestBody KnowledgeArticleDTO knowledgearticledto) {
KnowledgeArticle domain = knowledgearticleMapping.toDomain(knowledgearticledto);
domain .setKnowledgearticleid(knowledgearticle_id);
knowledgearticleService.update(domain );
KnowledgeArticleDTO dto = knowledgearticleMapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.knowledgearticleService.getKnowledgearticleByEntities(this.knowledgearticleMapping.toDomain(#knowledgearticledtos)),'iBizBusinessCentral-KnowledgeArticle-Update')")
@ApiOperation(value = "批量更新知识文章", tags = {"知识文章" }, notes = "批量更新知识文章")
@RequestMapping(method = RequestMethod.PUT, value = "/knowledgearticles/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<KnowledgeArticleDTO> knowledgearticledtos) {
knowledgearticleService.updateBatch(knowledgearticleMapping.toDomain(knowledgearticledtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.knowledgearticleService.get(#knowledgearticle_id),'iBizBusinessCentral-KnowledgeArticle-Remove')")
@ApiOperation(value = "删除知识文章", tags = {"知识文章" }, notes = "删除知识文章")
@RequestMapping(method = RequestMethod.DELETE, value = "/knowledgearticles/{knowledgearticle_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("knowledgearticle_id") String knowledgearticle_id) {
return ResponseEntity.status(HttpStatus.OK).body(knowledgearticleService.remove(knowledgearticle_id));
}
@PreAuthorize("hasPermission(this.knowledgearticleService.getKnowledgearticleByIds(#ids),'iBizBusinessCentral-KnowledgeArticle-Remove')")
@ApiOperation(value = "批量删除知识文章", tags = {"知识文章" }, notes = "批量删除知识文章")
@RequestMapping(method = RequestMethod.DELETE, value = "/knowledgearticles/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
knowledgearticleService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.knowledgearticleMapping.toDomain(returnObject.body),'iBizBusinessCentral-KnowledgeArticle-Get')")
@ApiOperation(value = "获取知识文章", tags = {"知识文章" }, notes = "获取知识文章")
@RequestMapping(method = RequestMethod.GET, value = "/knowledgearticles/{knowledgearticle_id}")
public ResponseEntity<KnowledgeArticleDTO> get(@PathVariable("knowledgearticle_id") String knowledgearticle_id) {
KnowledgeArticle domain = knowledgearticleService.get(knowledgearticle_id);
KnowledgeArticleDTO dto = knowledgearticleMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取知识文章草稿", tags = {"知识文章" }, notes = "获取知识文章草稿")
@RequestMapping(method = RequestMethod.GET, value = "/knowledgearticles/getdraft")
public ResponseEntity<KnowledgeArticleDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(knowledgearticleMapping.toDto(knowledgearticleService.getDraft(new KnowledgeArticle())));
}
@ApiOperation(value = "检查知识文章", tags = {"知识文章" }, notes = "检查知识文章")
@RequestMapping(method = RequestMethod.POST, value = "/knowledgearticles/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody KnowledgeArticleDTO knowledgearticledto) {
return ResponseEntity.status(HttpStatus.OK).body(knowledgearticleService.checkKey(knowledgearticleMapping.toDomain(knowledgearticledto)));
}
@PreAuthorize("hasPermission(this.knowledgearticleMapping.toDomain(#knowledgearticledto),'iBizBusinessCentral-KnowledgeArticle-Save')")
@ApiOperation(value = "保存知识文章", tags = {"知识文章" }, notes = "保存知识文章")
@RequestMapping(method = RequestMethod.POST, value = "/knowledgearticles/save")
public ResponseEntity<Boolean> save(@RequestBody KnowledgeArticleDTO knowledgearticledto) {
return ResponseEntity.status(HttpStatus.OK).body(knowledgearticleService.save(knowledgearticleMapping.toDomain(knowledgearticledto)));
}
@PreAuthorize("hasPermission(this.knowledgearticleMapping.toDomain(#knowledgearticledtos),'iBizBusinessCentral-KnowledgeArticle-Save')")
@ApiOperation(value = "批量保存知识文章", tags = {"知识文章" }, notes = "批量保存知识文章")
@RequestMapping(method = RequestMethod.POST, value = "/knowledgearticles/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<KnowledgeArticleDTO> knowledgearticledtos) {
knowledgearticleService.saveBatch(knowledgearticleMapping.toDomain(knowledgearticledtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-KnowledgeArticle-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-KnowledgeArticle-Get')")
@ApiOperation(value = "获取DEFAULT", tags = {"知识文章" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/knowledgearticles/fetchdefault")
public ResponseEntity<List<KnowledgeArticleDTO>> fetchDefault(KnowledgeArticleSearchContext context) {
Page<KnowledgeArticle> domains = knowledgearticleService.searchDefault(context) ;
List<KnowledgeArticleDTO> list = knowledgearticleMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-KnowledgeArticle-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-KnowledgeArticle-Get')")
@ApiOperation(value = "查询DEFAULT", tags = {"知识文章" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/knowledgearticles/searchdefault")
public ResponseEntity<Page<KnowledgeArticleDTO>> searchDefault(@RequestBody KnowledgeArticleSearchContext context) {
Page<KnowledgeArticle> domains = knowledgearticleService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(knowledgearticleMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册