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
a31625a1
Commit
a31625a1
authored
Oct 23, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 材料表结构变化
parent
7c536aaf
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
17 deletions
+13
-17
icp-deliver/app/base/controller/impl/delivery/deliverCtl.js
+1
-0
icp-deliver/app/base/db/impl/common/connection.js
+2
-2
icp-deliver/app/base/db/impl/delivery/deliverDao.js
+1
-1
icp-deliver/app/base/db/impl/delivery/newmaterialDao.js
+4
-5
icp-deliver/app/base/db/models/delivery/new_meterials_info.js
+3
-7
icp-deliver/app/base/service/impl/delivery/wangwenSve.js
+2
-2
No files found.
icp-deliver/app/base/controller/impl/delivery/deliverCtl.js
View file @
a31625a1
...
@@ -23,6 +23,7 @@ class DeliverCtl extends CtlBase {
...
@@ -23,6 +23,7 @@ class DeliverCtl extends CtlBase {
if
(
val
.
delivery_status
===
system
.
ANNUALREPORT
.
TAKEEFFECT
)
{
if
(
val
.
delivery_status
===
system
.
ANNUALREPORT
.
TAKEEFFECT
)
{
val
.
delivery_status
=
val
[
'annualreports.status'
]
||
system
.
ANNUALREPORT
.
WAITDECLARE
;
val
.
delivery_status
=
val
[
'annualreports.status'
]
||
system
.
ANNUALREPORT
.
WAITDECLARE
;
}
}
val
.
v_action_type
=
val
.
v_action_type
||
"新办"
val
.
source_name
=
system
.
SOURCENAME
[
val
.
source_name
]
||
val
.
source_name
;
val
.
source_name
=
system
.
SOURCENAME
[
val
.
source_name
]
||
val
.
source_name
;
val
.
salesman_name
=
val
.
salesman_opcode
?
val
.
salesman_name
:
val
.
salesman_phone
val
.
salesman_name
=
val
.
salesman_opcode
?
val
.
salesman_name
:
val
.
salesman_phone
val
.
selling_price
=
val
.
selling_price
/
100
val
.
selling_price
=
val
.
selling_price
/
100
...
...
icp-deliver/app/base/db/impl/common/connection.js
View file @
a31625a1
...
@@ -115,8 +115,8 @@ class DbFactory {
...
@@ -115,8 +115,8 @@ class DbFactory {
this
.
db
.
models
.
deliver
.
hasOne
(
this
.
db
.
models
.
material
,
{
constraints
:
false
,
});
this
.
db
.
models
.
deliver
.
hasOne
(
this
.
db
.
models
.
material
,
{
constraints
:
false
,
});
// 交付表 1:1 网文材料表
// 交付表 1:1 网文材料表
this
.
db
.
models
.
wangwen
material
.
belongsTo
(
this
.
db
.
models
.
deliver
,
{
constraints
:
false
,
});
this
.
db
.
models
.
new
material
.
belongsTo
(
this
.
db
.
models
.
deliver
,
{
constraints
:
false
,
});
this
.
db
.
models
.
deliver
.
hasOne
(
this
.
db
.
models
.
wangwen
material
,
{
constraints
:
false
,
});
this
.
db
.
models
.
deliver
.
hasOne
(
this
.
db
.
models
.
new
material
,
{
constraints
:
false
,
});
// 交付表 1:1 资质信息表
// 交付表 1:1 资质信息表
this
.
db
.
models
.
qualification
.
belongsTo
(
this
.
db
.
models
.
deliver
,
{
constraints
:
false
,
});
this
.
db
.
models
.
qualification
.
belongsTo
(
this
.
db
.
models
.
deliver
,
{
constraints
:
false
,
});
...
...
icp-deliver/app/base/db/impl/delivery/deliverDao.js
View file @
a31625a1
...
@@ -219,7 +219,7 @@ class DeliverDao extends Dao {
...
@@ -219,7 +219,7 @@ class DeliverDao extends Dao {
},
},
include
:
[
include
:
[
{
{
model
:
this
.
db
.
models
.
wangwen
material
,
model
:
this
.
db
.
models
.
new
material
,
raw
:
false
raw
:
false
}
}
],
],
...
...
icp-deliver/app/base/db/impl/delivery/
wangwen
materialDao.js
→
icp-deliver/app/base/db/impl/delivery/
new
materialDao.js
View file @
a31625a1
const
Dao
=
require
(
"../../dao.base"
);
const
Dao
=
require
(
"../../dao.base"
);
class
Wangwenm
aterialDao
extends
Dao
{
class
NewM
aterialDao
extends
Dao
{
constructor
()
{
constructor
()
{
super
(
Dao
.
getModelName
(
Wangwenm
aterialDao
));
super
(
Dao
.
getModelName
(
NewM
aterialDao
));
}
}
async
createOrUpdate
(
pobj
,
t
)
{
async
createOrUpdate
(
pobj
,
t
)
{
...
@@ -10,8 +10,7 @@ class WangwenmaterialDao extends Dao {
...
@@ -10,8 +10,7 @@ class WangwenmaterialDao extends Dao {
});
});
let
result
=
{};
let
result
=
{};
let
dataInfo
=
{
let
dataInfo
=
{
basicInfo
:
pobj
.
cache_info
.
basicInfo
,
materialInfo
:
pobj
.
cache_info
,
materialList
:
pobj
.
cache_info
.
materialList
,
deliver_id
:
pobj
.
deliver_id
,
deliver_id
:
pobj
.
deliver_id
,
}
}
if
(
materialData
)
{
if
(
materialData
)
{
...
@@ -29,4 +28,4 @@ class WangwenmaterialDao extends Dao {
...
@@ -29,4 +28,4 @@ class WangwenmaterialDao extends Dao {
}
}
}
}
module
.
exports
=
Wangwenm
aterialDao
;
module
.
exports
=
NewM
aterialDao
;
icp-deliver/app/base/db/models/delivery/
wangwen
_meterials_info.js
→
icp-deliver/app/base/db/models/delivery/
new
_meterials_info.js
View file @
a31625a1
...
@@ -5,15 +5,11 @@ const appconfig = system.getSysConfig();
...
@@ -5,15 +5,11 @@ const appconfig = system.getSysConfig();
* 材料表
* 材料表
*/
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"
wangwen
material"
,
{
return
db
.
define
(
"
new
material"
,
{
basic
Info
:
{
material
Info
:
{
allowNull
:
false
,
allowNull
:
false
,
type
:
DataTypes
.
JSON
type
:
DataTypes
.
JSON
},
},
materialList
:
{
allowNull
:
false
,
type
:
DataTypes
.
JSON
}
},
{
},
{
paranoid
:
false
,
//假的删除
paranoid
:
false
,
//假的删除
underscored
:
true
,
underscored
:
true
,
...
@@ -21,7 +17,7 @@ module.exports = (db, DataTypes) => {
...
@@ -21,7 +17,7 @@ module.exports = (db, DataTypes) => {
freezeTableName
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
//freezeTableName: true,
// define the table's name
// define the table's name
tableName
:
'
wangwen
_materials_info'
,
tableName
:
'
new
_materials_info'
,
validate
:
{
validate
:
{
},
},
...
...
icp-deliver/app/base/service/impl/delivery/wangwenSve.js
View file @
a31625a1
...
@@ -11,7 +11,7 @@ class WangwenService extends ServiceBase {
...
@@ -11,7 +11,7 @@ class WangwenService extends ServiceBase {
super
(
"delivery"
,
ServiceBase
.
getDaoName
(
WangwenService
));
super
(
"delivery"
,
ServiceBase
.
getDaoName
(
WangwenService
));
this
.
cacheinfoDao
=
system
.
getObject
(
"db.delivery.cacheinfoDao"
);
this
.
cacheinfoDao
=
system
.
getObject
(
"db.delivery.cacheinfoDao"
);
this
.
deliveryDao
=
system
.
getObject
(
"db.delivery.deliverDao"
);
this
.
deliveryDao
=
system
.
getObject
(
"db.delivery.deliverDao"
);
this
.
wangwenmaterialDao
=
system
.
getObject
(
"db.delivery.wangwen
materialDao"
);
this
.
newmaterialDao
=
system
.
getObject
(
"db.delivery.new
materialDao"
);
this
.
statuslogDao
=
system
.
getObject
(
"db.bizchance.statuslogDao"
);
this
.
statuslogDao
=
system
.
getObject
(
"db.bizchance.statuslogDao"
);
}
}
...
@@ -39,7 +39,7 @@ class WangwenService extends ServiceBase {
...
@@ -39,7 +39,7 @@ class WangwenService extends ServiceBase {
return
this
.
db
.
transaction
(
async
(
t
)
=>
{
return
this
.
db
.
transaction
(
async
(
t
)
=>
{
await
this
.
cacheinfoDao
.
createOrUpdate
(
pobj
,
t
);
await
this
.
cacheinfoDao
.
createOrUpdate
(
pobj
,
t
);
await
this
.
wangwen
materialDao
.
createOrUpdate
(
pobj
,
t
);
await
this
.
new
materialDao
.
createOrUpdate
(
pobj
,
t
);
if
([
system
.
SERVERSESTATUS
.
COLLECTING
,
system
.
SERVERSESTATUS
.
USERCONFIRMATIONREJECT
].
includes
(
deliverData
.
delivery_status
))
{
if
([
system
.
SERVERSESTATUS
.
COLLECTING
,
system
.
SERVERSESTATUS
.
USERCONFIRMATIONREJECT
].
includes
(
deliverData
.
delivery_status
))
{
await
this
.
deliveryDao
.
updateByWhere
({
await
this
.
deliveryDao
.
updateByWhere
({
delivery_status
:
system
.
SERVERSESTATUS
.
USERCONFIRMATIONWAIT
delivery_status
:
system
.
SERVERSESTATUS
.
USERCONFIRMATIONWAIT
...
...
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