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
3e2ea648
Commit
3e2ea648
authored
Feb 16, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
policyQuery
parent
ebcf149a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
center-order/app/base/service/impl/dbpolicy/policyinfoSve.js
+9
-6
No files found.
center-order/app/base/service/impl/dbpolicy/policyinfoSve.js
View file @
3e2ea648
...
...
@@ -12,7 +12,7 @@ class PolicyinfoService extends ServiceBase {
var
obj
=
pobj
.
actionBody
;
var
app
=
pobj
.
appInfo
;
var
paramObj
=
{
uapp_id
:
app
.
uapp_id
};
var
attributes
=
[
"id"
,
"policyType"
,
"policyTypeName"
,
"policyDate"
,
"policyC
ontent"
,
"policyC
ity"
,
"policyProvince"
,
var
attributes
=
[
"id"
,
"policyType"
,
"policyTypeName"
,
"policyDate"
,
"policyCity"
,
"policyProvince"
,
"policyLinkUrl"
,
"policySource"
,
"policyName"
,
"policyNo"
];
if
(
obj
){
if
(
obj
.
policyProvince
){
...
...
@@ -22,7 +22,10 @@ class PolicyinfoService extends ServiceBase {
}
}
if
(
obj
.
policyName
){
paramObj
[
"policyName"
]
=
{
[
this
.
db
.
Op
.
like
]:
"%"
+
obj
.
policyName
+
"%"
};
paramObj
[
this
.
db
.
Op
.
or
]
=
[
{
policyName
:{
[
this
.
db
.
Op
.
like
]:
"%"
+
obj
.
policyName
+
"%"
}},
{
policyContent
:{
[
this
.
db
.
Op
.
like
]:
"%"
+
obj
.
policyName
+
"%"
}}
];
}
console
.
log
(
paramObj
);
}
...
...
@@ -44,7 +47,7 @@ class PolicyinfoService extends ServiceBase {
}
async
addPolicyByExcel
(){
var
workbook
=
xl
.
readFile
(
"policy
2
.xls"
)
var
workbook
=
xl
.
readFile
(
"policy
4
.xls"
)
const
sheetNames
=
workbook
.
SheetNames
;
// 返回 ['sheet1', 'sheet2']
const
worksheet
=
workbook
.
Sheets
[
sheetNames
[
0
]];
var
dataa
=
xl
.
utils
.
sheet_to_json
(
worksheet
);
...
...
@@ -58,9 +61,9 @@ class PolicyinfoService extends ServiceBase {
uapp_id
:
26
,
policyNo
:
data
[
'政策编号'
],
policyName
:
data
[
'政策名称'
],
policySource
:
data
[
'政策出处'
],
policyLinkUrl
:
data
[
'政策链接'
],
policyProvince
:
data
[
'所属省份'
],
policyCity
:
data
[
'所属城市'
],
policyTypeName
:
data
[
'政策类型'
]};
policyTypeName
:
data
[
'政策类型'
]
,
policyContent
:
data
[
'内容'
]
};
if
(
data
[
'政策类型'
]){
var
policy_type
=
{
'租金减免'
:
'fzbt'
,
'金融贷款'
:
'jrdk'
,
'
扶持
措施'
:
'zdfc'
,
'税收优惠'
:
'ssjm'
,
'人力资源'
:
'rlzy'
};
var
policy_type
=
{
'租金减免'
:
'fzbt'
,
'金融贷款'
:
'jrdk'
,
'
行政
措施'
:
'zdfc'
,
'税收优惠'
:
'ssjm'
,
'人力资源'
:
'rlzy'
};
var
typename
=
data
[
'政策类型'
];
if
(
policy_type
[
typename
]){
pobj
[
"policyType"
]
=
policy_type
[
typename
];
...
...
@@ -72,7 +75,7 @@ class PolicyinfoService extends ServiceBase {
}
}
})
console
.
log
(
arr
[
0
],
"###################################"
);
console
.
log
(
arr
.
length
,
"###################################"
);
}
}
...
...
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