Commit 241cf685 by cwq0219

出货统计

1 parent 886f5a0a
...@@ -18,8 +18,16 @@ module.exports = app => { ...@@ -18,8 +18,16 @@ module.exports = app => {
type: DataTypes.INTEGER(11), type: DataTypes.INTEGER(11),
allowNull: false allowNull: false
}, },
shop_merchant_name: {
type: DataTypes.STRING(100),
allowNull: false
},
merchant_id: { merchant_id: {
type: DataTypes.INTEGER(11), type: DataTypes.INTEGER(11),
allowNull: true
},
merchant_name: {
type: DataTypes.STRING(100),
allowNull: false allowNull: false
}, },
biz_type: { biz_type: {
...@@ -39,13 +47,21 @@ module.exports = app => { ...@@ -39,13 +47,21 @@ module.exports = app => {
type: DataTypes.INTEGER(11), type: DataTypes.INTEGER(11),
allowNull: true, allowNull: true,
defaultValue: '0' defaultValue: '0'
},
create_time: {
type: DataTypes.DATE,
allowNull: true
},
update_time: {
type: DataTypes.DATE,
allowNull: true
} }
}, { }, {
tableName: 'glsx_biz_delivery' tableName: 'glsx_biz_delivery'
}); });
Model.associate = function() { Model.associate = function() {
} }
return Model; return Model;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: chenwq * @Author: chenwq
* @Date: 2020-06-16 10:02:28 * @Date: 2020-06-16 10:02:28
* @Last Modified by: chenwq * @Last Modified by: chenwq
* @Last Modified time: 2020-06-19 13:51:21 * @Last Modified time: 2020-06-19 17:26:03
* 出货统计 * 出货统计
*/ */
const Service = require("egg").Service; const Service = require("egg").Service;
...@@ -64,7 +64,7 @@ class deliveryServices extends Service { ...@@ -64,7 +64,7 @@ class deliveryServices extends Service {
sqlName: 'merchant_name' sqlName: 'merchant_name'
}, { }, {
name: 'shopMerchantName', name: 'shopMerchantName',
sqlName: 'merchant_name' sqlName: 'shop_merchant_name'
}] }]
let equalArr = [{ let equalArr = [{
name: 'deviceType', name: 'deviceType',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: chenwq * @Author: chenwq
* @Date: 2020-06-16 10:02:39 * @Date: 2020-06-16 10:02:39
* @Last Modified by: chenwq * @Last Modified by: chenwq
* @Last Modified time: 2020-06-18 17:52:25 * @Last Modified time: 2020-06-19 16:14:30
* 设备信息 * 设备信息
*/ */
...@@ -95,7 +95,7 @@ class DevicesService extends Service { ...@@ -95,7 +95,7 @@ class DevicesService extends Service {
where[item.sqlName] = searcher[item.name] where[item.sqlName] = searcher[item.name]
} }
}) })
return await this.GBDE.findAndCountAll({ let date = await this.GBDE.findAndCountAll({
attributes: { attributes: {
include: [ include: [
[col('dj_system_merchant.merchant_name'), 'shop_merchant_name'] [col('dj_system_merchant.merchant_name'), 'shop_merchant_name']
...@@ -115,6 +115,10 @@ class DevicesService extends Service { ...@@ -115,6 +115,10 @@ class DevicesService extends Service {
}) })
}] }]
}) })
date.rows && date.rows.forEach(item => {
item.address = ''
})
return date
} }
} }
module.exports = DevicesService; module.exports = DevicesService;
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!