Commit ac993f44 by 胡悦

导入列表添加套餐名称、期限

1 parent 98b66587
...@@ -30,6 +30,15 @@ module.exports = app => { ...@@ -30,6 +30,15 @@ module.exports = app => {
type: DataTypes.STRING(50), type: DataTypes.STRING(50),
allowNull: true allowNull: true
}, },
package_name: {
type: DataTypes.STRING(50),
allowNull: true
},
package_period: {
type: DataTypes.INTEGER(11),
allowNull: false,
defaultValue: '36'
},
device_active_time: { device_active_time: {
type: DataTypes.DATE, type: DataTypes.DATE,
allowNull: true allowNull: true
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2020-11-23 16:45:21 * @Date: 2020-11-23 16:45:21
* @Last Modified by: huyue * @Last Modified by: huyue
* @Last Modified time: 2021-01-06 18:06:45 * @Last Modified time: 2021-01-12 14:05:08
*/ */
const moment = require("moment"); const moment = require("moment");
const Service = require("egg").Service; const Service = require("egg").Service;
...@@ -85,7 +85,7 @@ class ShiplistService extends Service { ...@@ -85,7 +85,7 @@ class ShiplistService extends Service {
} }
}) })
// const attr = ['sim_no', 'device_sn', 'settle_merchant', 'device_time', col('dj_device_info.device_type')] // const attr = ['sim_no', 'device_sn', 'settle_merchant', 'device_time', col('dj_device_info.device_type')]
const attr = ['sim_no', 'device_sn', 'settle_merchant', 'device_delivery_time', 'device_type'] const attr = ['sim_no', 'device_sn', 'settle_merchant', 'device_delivery_time', 'package_name', 'package_period', 'device_type']
return await this.MDAD.findAndCountAll({ return await this.MDAD.findAndCountAll({
offset, offset,
attributes: attr, attributes: attr,
...@@ -127,6 +127,8 @@ class ShiplistService extends Service { ...@@ -127,6 +127,8 @@ class ShiplistService extends Service {
device_sn: params[i]['设备号SN'], device_sn: params[i]['设备号SN'],
sim_no: params[i]['卡号'], sim_no: params[i]['卡号'],
device_type: params[i]['设备类型'], device_type: params[i]['设备类型'],
package_name: params[i]['套餐名称'],
package_period: params[i]['套餐期限'],
device_delivery_time: moment().format('YYYYMM') device_delivery_time: moment().format('YYYYMM')
} }
valueArr.push(value) valueArr.push(value)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!