Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
a59ddef7
Commit
a59ddef7
authored
Jul 28, 2020
by
wkliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init model
parent
15b50124
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
614 additions
and
3 deletions
+614
-3
rej-reex/app/base/api/api.base.js
+2
-2
rej-reex/app/base/controller/impl/rejreex/trademarkcaseCtl.js
+2
-0
rej-reex/app/base/db/models/rejreex/delivery_bill.js
+155
-0
rej-reex/app/base/db/models/rejreex/material.js
+94
-0
rej-reex/app/base/db/models/rejreex/salesman_his.js
+70
-0
rej-reex/app/base/db/models/rejreex/scheme.js
+107
-0
rej-reex/app/base/db/models/rejreex/settlebill.js
+105
-0
rej-reex/app/base/db/models/rejreex/status_log.js
+77
-0
rej-reex/app/base/db/models/rejreex/trademarkcase.js
+2
-1
No files found.
rej-reex/app/base/api/api.base.js
View file @
a59ddef7
...
@@ -9,13 +9,13 @@ class APIBase {
...
@@ -9,13 +9,13 @@ class APIBase {
let
custtags
=
req
.
headers
[
"x-consumetag"
]
?
req
.
headers
[
"x-consumetag"
].
split
(
"|"
)
:
null
;
let
custtags
=
req
.
headers
[
"x-consumetag"
]
?
req
.
headers
[
"x-consumetag"
].
split
(
"|"
)
:
null
;
//当自由用户注册时,需要根据前端传来的companykey,查询出公司,给companyid赋值
//当自由用户注册时,需要根据前端传来的companykey,查询出公司,给companyid赋值
req
.
xctx
=
{
req
.
xctx
=
{
appkey
:
req
.
headers
[
"xappkey"
],
//
用于系统管理区分应用,比如角色
appkey
:
req
.
headers
[
"xappkey"
],
//
用于系统管理区分应用,比如角色
companyid
:
custtags
?
custtags
[
0
].
split
(
"_"
)[
1
]
:
null
,
companyid
:
custtags
?
custtags
[
0
].
split
(
"_"
)[
1
]
:
null
,
password
:
custtags
?
custtags
[
1
].
split
(
"_"
)[
1
]
:
null
,
password
:
custtags
?
custtags
[
1
].
split
(
"_"
)[
1
]
:
null
,
username
:
req
.
headers
[
"x-consumer-username"
],
username
:
req
.
headers
[
"x-consumer-username"
],
userid
:
req
.
headers
[
"x-consumer-custom-id"
],
userid
:
req
.
headers
[
"x-consumer-custom-id"
],
credid
:
req
.
headers
[
"x-credential-identifier"
],
credid
:
req
.
headers
[
"x-credential-identifier"
],
companykey
:
req
.
headers
[
"x-company-key"
],
//
专用于自由用户注册,自由用户用于一定属于某个存在的公司
companykey
:
req
.
headers
[
"x-company-key"
],
//
专用于自由用户注册,自由用户用于一定属于某个存在的公司
opath
:
req
.
headers
[
'xopath'
],
opath
:
req
.
headers
[
'xopath'
],
ptags
:
req
.
headers
[
'xptags'
],
ptags
:
req
.
headers
[
'xptags'
],
}
}
...
...
rej-reex/app/base/controller/impl/rejreex/trademarkcaseCtl.js
View file @
a59ddef7
...
@@ -23,6 +23,7 @@ class TrademarkcaseCtl extends CtlBase {
...
@@ -23,6 +23,7 @@ class TrademarkcaseCtl extends CtlBase {
async
getCase
(
pobj
,
qobj
,
req
)
{
async
getCase
(
pobj
,
qobj
,
req
)
{
try
{
try
{
console
.
log
(
pobj
)
let
caseId
=
pobj
.
caseId
let
caseId
=
pobj
.
caseId
let
result
=
await
this
.
service
.
getCase
(
caseId
)
let
result
=
await
this
.
service
.
getCase
(
caseId
)
return
system
.
getResultSuccess
(
result
)
return
system
.
getResultSuccess
(
result
)
...
@@ -33,6 +34,7 @@ class TrademarkcaseCtl extends CtlBase {
...
@@ -33,6 +34,7 @@ class TrademarkcaseCtl extends CtlBase {
}
}
async
findAndCountAll
(
pobj
,
qobj
,
req
)
{
async
findAndCountAll
(
pobj
,
qobj
,
req
)
{
console
.
log
(
'data -----'
,
pobj
,
qobj
)
try
{
try
{
let
result
=
await
this
.
service
.
getCaseList
(
pobj
)
let
result
=
await
this
.
service
.
getCaseList
(
pobj
)
return
system
.
getResultSuccess
(
result
)
return
system
.
getResultSuccess
(
result
)
...
...
rej-reex/app/base/db/models/rejreex/delivery_bill.js
0 → 100644
View file @
a59ddef7
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
/**
* 交付单表
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"deliverybill"
,
{
delivery_code
:
{
//交付单编号
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
source_number
:
{
// 来源单号
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
source_name
:
{
// 渠道名称
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
pay_status
:
{
// 交付状态-虚拟字段
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
v_coname
:
{
// 联系人-虚拟字段
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
v_cophone
:
{
// 联系电话-虚拟字段
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
demand_code
:
{
// 商机编号
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
sku_code
:
{
// sku编码
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
scheme_number
:
{
// 方案编号
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
product_code
:
{
// 产品编码
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
product_name
:
{
// 产品名称
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
service_address
:
{
// 区域地址
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
delivery_info
:
{
//服务概况
allowNull
:
false
,
type
:
DataTypes
.
JSON
},
delivery_status
:
{
// 服务单流转状态
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
master_source_number
:{
//主订单号
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
settle_status
:
{
// 服务单流转状态
allowNull
:
false
,
type
:
DataTypes
.
STRING
,
defaultValue
:
'waittosettle'
},
selling_price
:
{
//售价
allowNull
:
false
,
type
:
DataTypes
.
INTEGER
},
cost_price
:
{
//成本价
allowNull
:
true
,
type
:
DataTypes
.
INTEGER
},
close_reason
:
{
//关闭理由
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
facilitator_id
:
{
// 服务商id
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
facilitator_name
:
{
// 服务商名称
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
salesman_opcode
:
{
// 组织架构路径
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
salesman_id
:
{
// 业务员id
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
salesman_name
:
{
// 业务员姓名
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
salesman_phone
:
{
// 业务员联系方式
allowNull
:
true
,
type
:
DataTypes
.
STRING
}
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'delivery_bill'
,
validate
:
{
},
indexes
:
[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
rej-reex/app/base/db/models/rejreex/material.js
0 → 100644
View file @
a59ddef7
const
system
=
require
(
"../../../system"
);
const
moment
=
require
(
'moment'
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
/**
* 材料信息表
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"material"
,
{
delivery_id
:
{
// 交付单id
allowNull
:
true
,
type
:
DataTypes
.
INTEGER
},
delivery_code
:
{
// 交付单编号
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
company_info
:
{
// 企业信息
allowNull
:
true
,
type
:
DataTypes
.
JSON
},
registered_info
:
{
// 注册资本信息
allowNull
:
true
,
type
:
DataTypes
.
JSON
},
contribution_info
:
{
// 出资比例信息
allowNull
:
true
,
type
:
DataTypes
.
JSON
},
position_info
:
{
// 任职信息
allowNull
:
true
,
type
:
DataTypes
.
JSON
},
file_info
:
{
// 注册文件信息
allowNull
:
true
,
type
:
DataTypes
.
JSON
},
express_info
:
{
// 邮寄信息
allowNull
:
true
,
type
:
DataTypes
.
JSON
},
is_download
:
{
// 是否已有压缩文件的路径
allowNull
:
true
,
type
:
DataTypes
.
INTEGER
},
download_url
:
{
// 压缩文件的路径
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'material_information'
,
validate
:
{
},
indexes
:
[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
\ No newline at end of file
rej-reex/app/base/db/models/rejreex/salesman_his.js
0 → 100644
View file @
a59ddef7
const
system
=
require
(
"../../../system"
);
const
moment
=
require
(
'moment'
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
/**
* 方案表
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"salesmanhis"
,
{
flow_type
:
{
// 流程类型(商机、方案、交付单)
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
flow_id
:
{
//流程对应id(各种表里对应的id)
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
flow_code
:
{
//类型的编号
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
salesman_info
:
{
//业务员信息
allowNull
:
false
,
type
:
DataTypes
.
JSON
}
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'salesman_his'
,
validate
:
{
},
indexes
:
[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
rej-reex/app/base/db/models/rejreex/scheme.js
0 → 100644
View file @
a59ddef7
const
system
=
require
(
"../../../system"
);
const
moment
=
require
(
'moment'
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
/**
* 方案表
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"scheme"
,
{
demand_code
:
{
// 需求编码
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
scheme_number
:
{
//方案编号
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
scheme_info
:
{
//方案详情
allowNull
:
false
,
type
:
DataTypes
.
JSON
},
scheme_status
:
{
//方案状态
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
reject_reason
:
{
//驳回理由
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
remark_info
:
{
//备注
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
bizopt_id
:
{
//商机id
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
facilitator_id
:
{
//服务商id
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
facilitator_name
:
{
//服务商名称
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
salesman_opcode
:
{
//组织架构路径
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
salesman_id
:
{
//业务员id
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
salesman_name
:
{
//业务员名称
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
salesman_phone
:
{
//业务员联系方式
allowNull
:
true
,
type
:
DataTypes
.
STRING
}
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'scheme_information'
,
validate
:
{
},
indexes
:
[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
rej-reex/app/base/db/models/rejreex/settlebill.js
0 → 100644
View file @
a59ddef7
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
/**
* 交付单表
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"settlebill"
,
{
code
:
{
//交付单编号
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
auditedStatus
:
{
// 审核状态
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
false
},
settle_amount
:
{
//结算金额
allowNull
:
true
,
type
:
DataTypes
.
INTEGER
},
isPayedStatus
:{
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
false
},
memo
:{
//结算建议
allowNull
:
true
,
type
:
DataTypes
.
STRING
,
},
creator_id
:{
//申请人
allowNull
:
true
,
type
:
DataTypes
.
INTEGER
},
creator
:{
allowNull
:
true
,
type
:
DataTypes
.
STRING
,
},
auditor_id
:{
//审核人
allowNull
:
true
,
type
:
DataTypes
.
INTEGER
},
auditor
:{
//审核人
allowNull
:
true
,
type
:
DataTypes
.
STRING
,
},
payer_id
:{
//付款人
allowNull
:
true
,
type
:
DataTypes
.
INTEGER
},
payer
:{
allowNull
:
true
,
type
:
DataTypes
.
STRING
,
},
facilitator_id
:{
allowNull
:
true
,
type
:
DataTypes
.
INTEGER
,
},
facilitator_name
:{
allowNull
:
true
,
type
:
DataTypes
.
STRING
,
},
},
{
paranoid
:
true
,
//真的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'fi_settlebill'
,
validate
:
{
},
indexes
:
[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
rej-reex/app/base/db/models/rejreex/status_log.js
0 → 100644
View file @
a59ddef7
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
/**
* 状态流转记录表
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"statuslog"
,
{
flow_type
:
{
// 流程类型 (商机、方案、交付单)
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
flow_id
:
{
// 流程对应id
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
status_reason
:
{
// 状态原因
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
status_code
:
{
// 流转状态
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
salesman_id
:
{
// 业务员id
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
salesman_name
:
{
// 业务员姓名
allowNull
:
true
,
type
:
DataTypes
.
STRING
}
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'status_log'
,
validate
:
{
},
indexes
:
[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
rej-reex/app/base/db/models/rejreex/
models/
trademarkcase.js
→
rej-reex/app/base/db/models/rejreex/trademarkcase.js
View file @
a59ddef7
...
@@ -26,6 +26,6 @@ module.exports = function (sequelize, DataTypes) {
...
@@ -26,6 +26,6 @@ module.exports = function (sequelize, DataTypes) {
timestamps
:
true
,
timestamps
:
true
,
version
:
true
,
version
:
true
,
freezeTableName
:
true
,
freezeTableName
:
true
,
tableName
:
't
rademarkcase
'
tableName
:
't
mrejask_info
'
});
});
};
};
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment