Commit 4ff1a5e8 by 宋毅

tj

parent 1708712b
const system = require("../../../system"); const system = require("../../../system");
const Dao = require("../../dao.base"); const Dao = require("../../dao.base");
class RefundVoucherDao extends Dao { class ChildOrdersDao extends Dao {
constructor() { constructor() {
super(Dao.getModelName(RefundVoucherDao)); super(Dao.getModelName(ChildOrdersDao));
} }
} }
module.exports = RefundVoucherDao; module.exports = ChildOrdersDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class FlowLogDao extends Dao {
constructor() {
super(Dao.getModelName(FlowLogDao));
}
}
module.exports = FlowLogDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderContactsDao extends Dao {
constructor() {
super(Dao.getModelName(OrderContactsDao));
}
}
module.exports = OrderContactsDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderInfoDao extends Dao {
constructor() {
super(Dao.getModelName(OrderInfoDao));
}
}
module.exports = OrderInfoDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderProductDao extends Dao {
constructor() {
super(Dao.getModelName(OrderProductDao));
}
}
module.exports = OrderProductDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderReceiptVoucherDao extends Dao {
constructor() {
super(Dao.getModelName(OrderReceiptVoucherDao));
}
}
module.exports = OrderReceiptVoucherDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderRefundVoucherDao extends Dao {
constructor() {
super(Dao.getModelName(OrderRefundVoucherDao));
}
}
module.exports = OrderRefundVoucherDao;
const system=require("../../../system");
const Dao=require("../../dao.base");
class TmStuffDao extends Dao{
constructor(){
super(Dao.getModelName(TmStuffDao));
}
async getListBySourceOrderNo(sourceOrderNo){
return this.model.findAll({
where: {
sourceOrderNo: sourceOrderNo
},
raw: true
});
}
}
module.exports=TmStuffDao;
...@@ -24,7 +24,7 @@ module.exports = (db, DataTypes) => {//费用单: ...@@ -24,7 +24,7 @@ module.exports = (db, DataTypes) => {//费用单:
freezeTableName: true, freezeTableName: true,
//freezeTableName: true, //freezeTableName: true,
// define the table's name // define the table's name
tableName: 'biz_expensevoucher', tableName: 'c_expensevoucher',
validate: { validate: {
} }
}); });
......
...@@ -45,7 +45,7 @@ module.exports = (db, DataTypes) => { ...@@ -45,7 +45,7 @@ module.exports = (db, DataTypes) => {
freezeTableName: true, freezeTableName: true,
//freezeTableName: true, //freezeTableName: true,
// define the table's name // define the table's name
tableName: 'biz_moneyjourney', tableName: 'c_moneyjourney',
validate: { validate: {
} }
}); });
......
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {//费用单:
var base = require("../../basemodel/voucherbase")(db, DataTypes);
return db.define("expensevoucher", Object.assign({
//基类 code: 费用单号(自动生成)
//基类 creator: 创建者
//基类 updator:/更新者
//基类 auditor: 审核者
//基类 opNotes: 操作备注
//基类 auditStatusName: //审核状态名称
//基类 auditStatus: //审核状态:ENUM=audit_status,"dsh": "待审核", "btg": "不通过", "tg": "通过"
//基类 sourceTypeName: //来源类型名称
//基类 sourceType: //来源类型:ENUM=source_type,"order": "订单","expensevoucher": "费用单","receiptvoucher": "收款单","refundvoucher": "退款单", "trademark": "商标单"
//基类 sourceOrderNo: DataTypes.STRING,//来源单号(如:订单号等)
//基类 channelServiceNo //渠道服务单号
busPayOrderCode: DataTypes.STRING(100),//业务支付订单号
payOrderNo: DataTypes.STRING, //支付凭证流水单号,如:微信支付凭证单号
certifyFileUrl: DataTypes.STRING(500), //证明文件Url
expenseTypeName: DataTypes.STRING,
expenseType: {//费用类型,gf: 官费, sxf: 手续费, tax: 税金, salary: 薪酬, sale: 销售费用, mag: 管理费用, channelSettleProfit: 订单渠道分润结算
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.expense_type),
set: function (val) {
this.setDataValue("expenseType", val);
this.setDataValue("expenseTypeName", uiconfig.config.pdict.expense_type[val]);
}
},
totalSum: DataTypes.DECIMAL(12, 3),//总额
notes: DataTypes.STRING,//备注
}, base), {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'b_expensevoucher',
validate: {
}
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("moneyjourney", {
code: DataTypes.STRING(100),//账单号(自动生成)
creator_id: DataTypes.INTEGER,//
moneyaccount_id: DataTypes.INTEGER,//
createapp_id: DataTypes.INTEGER,//
app_id: DataTypes.INTEGER,//
accountType: {
//帐户类型:"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.pay_account_type),
set: function (val) {
this.setDataValue("accountType", val);
this.setDataValue("accountTypeName", uiconfig.config.pdict.pay_account_type[val]);
},
defaultValue: "wx",
},
accountTypeName: {//帐户类型名称
type: DataTypes.STRING,
defaultValue: "微信",
},
directionTypeName: DataTypes.STRING,
directionType: {//凭单类型,"sr": "收","zc": "支"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.direction_type),
set: function (val) {
this.setDataValue("directionType", val);
this.setDataValue("directionTypeName", uiconfig.config.pdict.direction_type[val]);
}
},
voucherDate: DataTypes.DATE,//凭单时间
recvAmount: DataTypes.DECIMAL(12, 3),//收总额
payAmount: DataTypes.DECIMAL(12, 3),//支总额
sourceTypeName: DataTypes.STRING,
sourceType: {//来源类型 "order": "订单","expensevoucher": "费用单","receiptvoucher": "收款单","refundvoucher": "退款单", "trademark": "商标单"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.source_type),
set: function (val) {
this.setDataValue("sourceType", val);
this.setDataValue("sourceTypeName", uiconfig.config.pdict.source_type[val]);
}
},
sourceOrderNo: DataTypes.STRING,//来源单号
channelServiceNo: DataTypes.STRING(100),//渠道服务单号
auditStatusName: {
type: DataTypes.STRING(50),
defaultValue: "待审核",
},
auditStatus: {//审核状态"dsh": "待审核", "btg": "不通过", "tg": "通过"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.audit_status),
set: function (val) {
this.setDataValue("auditStatus", val);
this.setDataValue("auditStatusName", uiconfig.config.pdict.audit_status[val]);
},
defaultValue: "dsh",
},
notes: DataTypes.STRING,//备注
opNotes: DataTypes.STRING,//操作备注
payOrderNo: DataTypes.STRING,//支付凭证流水单号,如:微信支付凭证单号
busPayOrderCode: DataTypes.STRING(100),//业务支付订单号
buyerOpenId: DataTypes.STRING,//用户在商户appid下的唯一标识或买家在支付宝的用户id
passTradeNo: DataTypes.STRING,//通道的统一订单号
buyerAliLogonId: DataTypes.STRING,//买家支付宝账号
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_order',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
var base = require("../../basemodel/voucherbase")(db, DataTypes);
return db.define("refundvoucher", Object.assign({//退款单:
//基类 code: 退款单号(自动生成)
//基类 creator: 创建者
//基类 updator:/更新者
//基类 auditor: 审核者
//基类 opNotes: 操作备注
//基类 auditStatusName: //审核状态名称
//基类 auditStatus: //审核状态:ENUM=audit_status,"dsh": "待审核", "btg": "不通过", "tg": "通过"
//基类 sourceTypeName: //来源类型名称
//基类 sourceType: //来源类型:ENUM=source_type,"order": "订单","expensevoucher": "费用单","receiptvoucher": "收款单","refundvoucher": "退款单", "trademark": "商标单"
//基类 sourceOrderNo: DataTypes.STRING,//来源单号(如:订单号等)
//基类 channelServiceNo //渠道服务单号
payuser_id: DataTypes.INTEGER,//
busPayOrderCode: DataTypes.STRING(100),//业务支付订单号
payOrderNo: DataTypes.STRING, //支付凭证流水单号,如:微信支付凭证单号
refundTypeName: DataTypes.STRING,
refundType: {//退款类型,"tk": "退款" ,"ptdtk": "平台代退款"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.refund_type),
set: function (val) {
this.setDataValue("receiptType", val);
this.setDataValue("receiptTypeName", uiconfig.config.pdict.refund_type[val]);
}
},
accountType: {
//帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.pay_account_type),
set: function (val) {
this.setDataValue("accountType", val);
this.setDataValue("accountTypeName", uiconfig.config.pdict.pay_account_type[val]);
},
defaultValue: "other",
},
accountTypeName: {//帐户类型名称
type: DataTypes.STRING,
defaultValue: "其它",
},
payDate: DataTypes.DATE,//支付时间
totalSum: DataTypes.DECIMAL(12, 3),//订单总额(平台费用+服务费+官费+发票税费+个人利润+平台利润)
certifyFileUrl: DataTypes.STRING(500), //证明文件Url
notes: DataTypes.STRING,//备注
itemCode: DataTypes.STRING(100),//项目操作码
itemName: DataTypes.STRING(100),//项目名称
buyerOpenId: DataTypes.STRING,//用户在商户appid下的唯一标识或买家在支付宝的用户id
passTradeNo: DataTypes.STRING,//通道的统一订单号
buyerAliLogonId: DataTypes.STRING,//买家支付宝账号
}, base), {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'b_refundvoucher',
validate: {
}
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("tmstuff", {
stuffTypeName:DataTypes.STRING(50), //
stuffType : {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.stuff_type),
set: function (val) {
this.setDataValue("stuffType", val);
this.setDataValue("stuffTypeName", uiconfig.config.pdict.stuff_type[val]);
},
defaultValue: "0",
}, //附件类型:csty: 彩色图样, wts: 委托书, gzwts: 盖章委托书, ty: 图样 , sywj: 声音文件 , smwj: 说明文件
// 注:彩色商标图样:商标类型形式为7则有此值
stuffUrl :DataTypes.STRING(500), // 附件地址
notes :DataTypes.STRING, // 备注
name :DataTypes.STRING(1000),// 附件名称
code :DataTypes.STRING(100), // 附件code编码
sourceOrderNo:DataTypes.STRING(64), //来源单号
app_id :DataTypes.INTEGER, //
createuser_id:DataTypes.INTEGER, //
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_tmstuff',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const Dao = require("../../dao.base");
class ChildOrdersService extends ServiceBase {
constructor() {
super("dbcorder", ServiceBase.getDaoName(ChildOrdersService));
}
}
module.exports = ChildOrdersService;
const system = require("../../../system");
const Dao = require("../../dao.base");
class FlowLogService extends ServiceBase {
constructor() {
super("dbcorder", ServiceBase.getDaoName(FlowLogService));
}
}
module.exports = FlowLogService;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderContactsService extends ServiceBase {
constructor() {
super("dbcorder", ServiceBase.getDaoName(OrderContactsService));
}
}
module.exports = OrderContactsService;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderInfoService extends ServiceBase {
constructor() {
super("dbcorder", ServiceBase.getDaoName(OrderInfoService));
}
}
module.exports = OrderInfoService;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderProductService extends ServiceBase {
constructor() {
super("dbcorder", ServiceBase.getDaoName(OrderProductService));
}
}
module.exports = OrderProductService;
const system = require("../../../system"); const system = require("../../../system");
const ServiceBase = require("../../sve.base"); const Dao = require("../../dao.base");
const settings = require("../../../../config/settings");
class ExpenseVoucherService extends ServiceBase { class ExpenseVoucherService extends ServiceBase {
constructor() { constructor() {
super("dborder", ServiceBase.getDaoName(ExpenseVoucherService)); super("dbcpay", ServiceBase.getDaoName(ExpenseVoucherService));
} }
} }
module.exports = ExpenseVoucherService; module.exports = ExpenseVoucherService;
const system = require("../../../system"); const system=require("../../../system");
const ServiceBase = require("../../sve.base"); const Dao=require("../../dao.base");
const settings = require("../../../../config/settings");
class MoneyJourneyService extends ServiceBase { class MoneyJourneyService extends ServiceBase {
constructor() { constructor() {
super("dborder", ServiceBase.getDaoName(MoneyJourneyService)); super("dbcpay", ServiceBase.getDaoName(MoneyJourneyService));
} }
} }
module.exports=MoneyJourneyService; module.exports=MoneyJourneyService;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderReceiptVoucherService extends ServiceBase {
constructor() {
super("dbcpay", ServiceBase.getDaoName(OrderReceiptVoucherService));
}
}
module.exports = OrderReceiptVoucherService;
const system = require("../../../system");
const Dao = require("../../dao.base");
class OrderRefundVoucherService extends ServiceBase {
constructor() {
super("dbcpay", ServiceBase.getDaoName(OrderRefundVoucherService));
}
}
module.exports = OrderRefundVoucherService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class RefundVoucherService extends ServiceBase {
constructor() {
super("dborder", ServiceBase.getDaoName(RefundVoucherService));
}
}
module.exports=RefundVoucherService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class TmStuffService extends ServiceBase {
constructor() {
super("dbtrademark", ServiceBase.getDaoName(TmStuffService));
}
}
module.exports=TmStuffService;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment