Commit c57e19ab by 宋毅

tj

parent fece029b
var APIBase = require("../../api.base");
var system = require("../../../system");
class NeedOrderAPI extends APIBase {
constructor() {
super();
this.needinfoSve = system.getObject("service.dbneed.needinfoSve");
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
if (!pobj.actionProcess) {
return system.getResult(null, "actionProcess参数不能为空");
}
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
}
var result = null;
pobj.actionBody["user"]=req.user;
pobj.actionBody["app"]=req.app;
switch (pobj.actionProcess) {
case "jd"://京东
result = await this.jdOpActionProcess(pobj.actionProcess, pobj.actionType, pobj.actionBody);
break;
default:
result = system.getResult(null, "actionProcess参数错误");
break;
}
return result;
}
async jdOpActionProcess(action_process, action_type, action_body) {
var opResult = null;
switch (action_type) {
// sy
case "test"://测试
opResult = system.getResultSuccess(null, "测试成功");
break;
case "subNeed"://提交需求
opResult = await this.needinfoSve.subNeed(action_body);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = NeedOrderAPI;
\ No newline at end of file
var APIBase = require("../../api.base");
var system = require("../../../system");
class PushBusinessAPI extends APIBase {
constructor() {
super();
this.toolSve = system.getObject("service.trademark.toolSve");
this.toolApi = system.getObject("api.tool.toolApi");
this.appSourceList = {
"tm_ali": "阿里云应用", "ic_ali": "阿里云应用", "icp_ali": "阿里云应用",
"tm_jdyun": "京东云应用", "ic_jdyun": "京东云应用", "icp_jdyun": "京东云应用",
"tm_1688": "1688应用", "ic_1688": "1688应用", "icp_1688": "1688应用",
};
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
var self = this;
if (!req.app) {
return system.getResult(null, "app is not empty");
}
if (!pobj.actionProcess) {
return system.getResult(null, "actionProcess参数不能为空");
}
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
}
var result = null;
switch (pobj.actionProcess) {
case "tm_1688":
opResult = await self.opActionProcess(pobj.actionProcess);
break;
case "ic_1688":
opResult = await this.toolSve.getNclByLikeNameAndNcl(action_body);
break;
case "icp_1688":
opResult = await this.toolSve.word2pic(action_body);
break;
case "tm_ali":
opResult = await this.toolSve.getNcl(action_body);
break;
case "ic_ali":
opResult = await this.toolSve.getNclByLikeNameAndNcl(action_body);
break;
case "icp_ali":
opResult = await this.toolSve.word2pic(action_body);
break;
default:
result = system.getResult(null, "actionProcess参数错误");
break;
}
return result;
}
async opActionProcess(pushBusinessSource, action_type, action_body) {
if (!pobj.actionBody.idempotentId) {
return system.getResult(null, "idempotentId is not empty");
}//接入方业务产品 ID
if (!pobj.actionBody.idempotentSource) {
return system.getResult(null, "idempotentSource is not empty");
}//业务来源(ali、jdyun、1688)
if (!pobj.actionBody.idempotentSourceName) {
return system.getResult(null, "idempotentSourceName is not empty");
}//业务来源名称 京东云应用、阿里云应用、1688应用
if (!pobj.actionBody.phone) {
return system.getResult(null, "phone is not empty");
}//手机号
if (!pobj.actionBody.orderPrice) {
return system.getResult(null, "orderPrice is not empty");
}//订单金额 double
if (!pobj.actionBody.productId) {
return system.getResult(null, "productId is not empty");
}//订单金额 string
if (!pobj.actionBody.productQuantity) {
return system.getResult(null, "productQuantity is not empty");
}//产品数量 int
// city、companyName
var opResult = null;
switch (action_type) {
case "fqdev"://dev
result = await this.opActionProcess(pushBusinessSource, reqEnv, action_body);
break;
case "fqProd"://prod
result = await this.opActionProcess(pobj.actionProcess, pobj.actionType, pobj.actionBody);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = PushBusinessAPI;
\ No newline at end of file
var APIBase = require("../../api.base");
var system = require("../../../system");
class TmOrderAPI extends APIBase {
constructor() {
super();
this.opPlatformUtils = system.getObject("util.businessManager.opPlatformUtils");
this.ordertmproductSve = system.getObject("service.dborder.ordertmproductSve");
this.customerinfoSve = system.getObject("service.dborder.customerinfoSve");
this.customercontactsSve = system.getObject("service.dborder.customercontactsSve");
this.trademarkSve = system.getObject("service.dbtrademark.trademarkSve");
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
if (!pobj.actionProcess) {
return system.getResult(null, "actionProcess参数不能为空");
}
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
}
var result = null;
switch (pobj.actionProcess) {
case "jd"://京东
result = await this.jdOpActionProcess(pobj.actionProcess, pobj.actionType, pobj.actionBody);
break;
default:
result = system.getResult(null, "actionProcess参数错误");
break;
}
return result;
}
async jdOpActionProcess(action_process, action_type, action_body) {
action_body.app = { id: 1, appPayType: "00", appDataOpType: "00" };
action_body.user = { id: 1, app_id: 1, nickname: "测试用户" };
var opResult = null;
switch (action_type) {
// sy
case "test"://测试
opResult = system.getResultSuccess(null, "测试成功");
break;
case "addOrder"://商标提报
opResult = await this.ordertmproductSve.addTmOrder(action_body);
break;
case "getTmOrderList"://商标交付列表
opResult = await this.ordertmproductSve.getTmOrderList(action_body);
break;
case "getTmOrderInfo"://商标交付信息
opResult = await this.ordertmproductSve.getTmOrder(action_body);
break;
case "getTmApplyInfo"://商标订单-申请信息
opResult = await this.ordertmproductSve.getTmApply(action_body);
break;
case "getTmNclList"://商标订单-商标尼斯信息
opResult = await this.ordertmproductSve.getTmNclList(action_body);
break;
case "updateTmInfo"://修改商标订单-商标信息修改
opResult = await this.trademarkSve.updateTmInfo(action_body);
break;
case "updateNclInfo"://修改商标订单-商标尼斯信息修改
opResult = await this.trademarkSve.updateNclInfo(action_body);
break;
case "updateContacts"://修改商标订单-修改商标交付单联系人
opResult = await this.customercontactsSve.updateContacts(action_body);
break;
case "updateCustomerInfo"://修改商标订单-修改申请人信息
opResult = await this.customerinfoSve.updateCustomerInfo(action_body);
break;
case "updateOfficial"://修改商标订单-修改交官文件
opResult = await this.customerinfoSve.updateOfficial(action_body);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = TmOrderAPI;
\ No newline at end of file
var APIBase = require("../../api.base");
var system = require("../../../system");
class TmTransactionAPI extends APIBase {
constructor() {
super();
}
/**
* 接口跳转-POST请求
* actionProcess 执行的流程
* actionType 执行的类型
* actionBody 执行的参数
*/
async springboard(pobj, qobj, req) {
if (!pobj.actionProcess) {
return system.getResult(null, "actionProcess参数不能为空");
}
if (!pobj.action_type) {
return system.getResult(null, "actionType参数不能为空");
}
var result = null;
switch (pobj.actionProcess) {
case "jd"://京东
result = await this.jdOpActionProcess(pobj.actionProcess, pobj.actionType, pobj.actionBody);
break;
default:
result = system.getResult(null, "actionProcess参数错误");
break;
}
return result;
}
async jdOpActionProcess(action_process, action_type, action_body) {
var opResult = null;
switch (action_type) {
// sy
case "test"://测试
opResult = system.getResultSuccess(null, "测试成功");
break;
case "addOrder"://添加订单
// opResult = await this.orderSve.addOrder(action_body);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = TmTransactionAPI;
\ No newline at end of file
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class ActionAPI extends APIBase {
constructor() {
super();
this.merchantSve = system.getObject("service.merchant.merchantSve");
this.orderSve = system.getObject("service.order.orderSve");
this.businessmenSve = system.getObject("service.order.businessmenSve");
// wk
this.merchantrechargeSve = system.getObject("service.merchant.merchantrechargeSve");
this.invoiceSve = system.getObject("service.invoice.invoiceSve");
// wk
}
/**
* 接口跳转
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springboard(pobj, qobj, req) {
if (!pobj.action_process) {
return system.getResult(null, "action_process参数不能为空");
}
if (!pobj.action_type) {
return system.getResult(null, "action_type参数不能为空");
}
var result = null;
switch (pobj.action_process) {
case "sjb"://司机宝
result = await this.sjbOpActionProcess(pobj.action_process, pobj.action_type, pobj.action_body);
break;
default:
result = system.getResult(null, "action_process参数错误");
break;
}
return result;
}
async sjbOpActionProcess(action_process, action_type, action_body) {
var opResult = null;
switch (action_type) {
// sy
case "queryMerchant"://查询商户
opResult = await this.merchantSve.queryMerchant(action_body);
break;
case "addOrder"://添加订单
opResult = await this.orderSve.addOrder(action_body);
break;
case "putOrder"://修改订单
opResult = await this.orderSve.putOrder(action_body);
break;
case "queryOrder"://订单查询
opResult = await this.orderSve.queryOrder(action_body);
break;
case "putContract"://个体工商户合同接收接口
opResult = await this.businessmenSve.putContract(action_body);
break;
case "queryBusinessmen"://个体工商户信息查询接口
opResult = await this.businessmenSve.queryBusinessmen(action_body);
break;
// sy
// wk
case "rechargeApplication":// 商户充值申请
opResult = await this.merchantrechargeSve.apiSave(action_body);
break;
case "calcInvoice": // 发票试算接口
opResult = await this.invoiceSve.apiCalcInvoice(action_body);
break;
case "saveInvoice": // 发票提交接口
opResult = await this.invoiceSve.apiSaveInvoice(action_body);
break;
case "cancelInvoice": // 发票提交接口
opResult = await this.invoiceSve.apiCancelInvoice(action_body);
break;
// 以下接口为推送测试
case "testRechargeAudit":// 发票信息查询接口
opResult = await this.merchantrechargeSve.apiAudit(action_body);
break;
case "testInvoiceAudit": // 发票审核
opResult = await this.invoiceSve.testInvoiceAudit(action_body);
break;
case "testKaipiao": // 发票状态已开具
opResult = await this.invoiceSve.testKaipiao(action_body);
break;
case "testToemail": // 发票已邮寄
opResult = await this.invoiceSve.testToemail(action_body);
break;
case "testTaxCertificate": // 发票已邮寄
opResult = await this.invoiceSve.testToemail(action_body);
break;
// wk
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
exam() {
return `<pre>
1.queryMerchant:查询商户
请求参数:
{
"action_process": "sjb",
"action_type": "queryMerchant",
"action_body": {
"sign":"CBCE83769118A4D8906F097ECA558ACF",
"times_tamp": 1568713248
}
}
请求参数说明:
sign :签名
times_tamp:时间戳
返回值:
{
"status": 0,
"msg": "success",
"data": {
"contactEmail": "qjyang@gongsibao.com",
"taxNo": "xxxx2222xxxx",
"invoiceAddr": "北京市朝阳区来广营",
"invoiceMobile": "18810277728",
"accountName": "公司宝",
"contactName": "杨庆菊",
"accountPublic": "22222222",
"mailAddr": "qjyang@gongsibao.com",
"taxType": 0,
"mailTo": "杨庆菊",
"mailMobile": "18810277728",
"status": 0,
"name": "司机宝",
"contactMobile": "18810277728"
},
"requestid": "8cbd498f9d1441b1812ecaa2653933f4"
}
返回值说明:
name :商户名称
taxType :纳税人类型 0一般纳税人 1小规模纳税人
contactName :联系人姓名
contactMobile:联系人手机
contactEmail :联系人邮箱
taxNo :纳税人识别号
invoiceAddr :开票地址
invoiceMobile:开票电话
accountName :开户名称
accountPublic:对公账户
mailAddr :邮寄地址
mailTo :收件人
mailMobile :收件电话
status :订单状态 0待审核 1待签约 2签约完成
2.addOrder/putOrder:添加订单/修改订单
请求参数:
{
"action_process": "sjb",
"action_type": "addOrder",
"action_body": {
"sign": "CBCE83769118A4D8906F097ECA558ACF",
"times_tamp": 1568713248,
"channelOrderNo": "test0002",
"legalName": "测试法人修改",
"legalMobile": "15010929368",
"legalImg": "http://sss1.jpg",
"idcard": 341221198808328543,
"idcardFront": "http://sss2.jpg",
"idcardBack": "http://sss3.jpg",
"bankNo": "33333990209874819",
"bank": "北京市地球村",
"names": "名称1,名称2,名称3",
"businessScope": "科技服务行业",
"capital": "1000万"
}
}
请求参数说明:
sign :签名
times_tamp :时间戳
channelOrderNo:渠道单号
legalName :法人姓名
legalMobile :法人电话
legalImg :法人证件照
idcard :法人身份证
idcardFront :身份证正面照片
idcardBack :身份证反面照片
bankNo :银行卡号
bank :开户行
names :个体户名称,多个格式为:name1,name2,name3
businessScope :经营范围
capital :注册资本
返回值:
添加返回值:
{
"status": 0,
"msg": "success",
"data": {
"id": 8,
"orderNo": "SJB201909191148sJXGu",
"status": "00"
},
"requestid": "9952e339512740ebb6e5df72a4c09895"
}
修改返回值:
{
"status": 0,
"msg": "success",
"data": null,
"requestid": "e8f31dacc07c4764b8fd4f9955622385"
}
返回值说明:
orderNo :订单号
status :订单状态 00待处理 05执照办理中 10已出执照 15刻章办理中 20已刻章 25银行开户中 30银行已开户 35税务报到中 40已税务报到 50已邮寄
3.queryOrder:订单查询
请求参数:
{
"action_process": "sjb",
"action_type": "queryOrder",
"action_body": {
"sign": "CBCE83769118A4D8906F097ECA558ACF",
"times_tamp": 1568713248,
"channelOrderNo": "test0001"
}
}
请求参数说明:
sign :签名
times_tamp :时间戳
channelOrderNo :渠道订单号
返回值:
{
"status": 0,
"msg": "success",
"data": {
"orderNo": "SJB2019091816016FXaj",
"channelOrderNo": "test0001",
"legalName": "测试法人修改",
"legalMobile": "15010929368",
"legalImg": "http://sss1.jpg",
"idcard": "341221198808328500",
"idcardFront": "http://sss2.jpg",
"idcardBack": "http://sss3.jpg",
"bankNo": "33333990209874819",
"bank": "北京市地球村",
"names": "名称1,名称2,名称3",
"businessScope": "科技服务行业",
"capital": "1000万",
"status": "10",
"opNotes": null
},
"requestid": "d108d7fa93984886a3a659114e188a75"
}
返回值说明:
orderNo :订单号
channelOrderNo:渠道单号
legalName :法人姓名
legalMobile :法人电话
legalImg :法人证件照
idcard :法人身份证
idcardFront :身份证正面照片
idcardBack :身份证反面照片
bankNo :银行卡号
bank :开户行
names :个体户名称
businessScope :经营范围
capital :注册资本
status :订单状态 00待处理 05执照办理中 10已出执照 15刻章办理中 20已刻章 25银行开户中 30银行已开户 35税务报到中 40已税务报到 50已邮寄
opNotes :操作备注
4.putContract:个体工商户合同接收接口
请求参数:
{
"action_process": "sjb",
"action_type": "putContract",
"action_body": {
"sign": "CBCE83769118A4D8906F097ECA558ACF",
"times_tamp": 1568713248,
"channelOrderNo": "test0001",
"contract": "http://ttt.jpg",
"contractStartData": "2019-01-10",
"contractEndData": "2020-01-10"
}
}
请求参数说明:
sign :签名
times_tamp :时间戳
channelOrderNo :渠道订单号
contract :合同地址
contractStartData :合同开始时间
contractEndData :合同结束时间
返回值:
{
"status": 0,
"msg": "success",
"data": null,
"requestid": "b14a73f9d6d84fc7be1e62feaf8316a0"
}
5.queryMerchantAccount: 商户账户查询
请求参数:
{
"action_process": "sjb",
"action_type": "queryMerchantAccount",
"action_body": {
"sign": "CBCE83769118A4D8906F097ECA558ACF",
"times_tamp": 1568713248
}
}
返回值:
{
"status": 0,
"msg": "success",
"data": {
"merchant_id": "SJB2019091816016FXaj", // 商户ID
"frozen_amt": 11111111, // 冻结余额
"available_amt": 2222222 // 可用余额
},
"requestid": "305bcbe9b7f444e38c6155033e6cb66c"
}
6.queryMerchantTrade: 商户交易流水查询
请求参数:
{
"action_process": "sjb",
"action_type": "queryMerchantTrade",
"action_body": {
"sign": "CBCE83769118A4D8906F097ECA558ACF",
"times_tamp": 1568713248,
"outTradeNo": "", // 充值流水号(选填)
"applyNo": "", // 发票申请号(选填)
"currentPage": 1, // 页码 从1开始, 默认为1
"pageSize": 10 // 每页条数 默认10
}
}
返回值:
{
"status": 0,
"msg": "success",
"data": [
merchant_id: "SJB2019091816016FXaj", // 商户ID
outTradeNo: "", // 充值流水号
applyNo: "", // 发票申请号
amt: "", // 交易金额
type: "", // 收支类型 1充值 2支出
businessType: "", // 业务类型 00服务费扣款 10个税扣款 20增值费扣款 30附加费扣款 90充值入账
},
"requestid": "305bcbe9b7f444e38c6155033e6cb66c"
}
7.queryBusinessmen:个体工商户信息查询接口
请求参数:
{
"action_process": "sjb",
"action_type": "queryBusinessmen",
"action_body": {
"sign": "CBCE83769118A4D8906F097ECA558ACF",
"times_tamp": 1568713248,
"channelOrderNo": "test0001"
}
}
请求参数说明:
sign :签名
times_tamp :时间戳
channelOrderNo :渠道订单号
返回值:
{
"status": 0,
"msg": "success",
"data": {
"orderNo": "SJB2019091816016FXaj",
"channelOrderNo": "test0001",
"status": "60",
"legalName": "测试法人修改",
"legalMobile": "15010929368",
"name": "",
"creditCode": "",
"businessPlace": "",
"businessScope": "",
"regDate": null,
"businessImg": "",
"gongzhang": "",
"caiwuzhang": "",
"fapiaozhang": "",
"hetongzhang": "",
"farenzhang": "",
"isBank": false,
"bankName": "",
"bankNo": "",
"bank": "",
"bankImg": "",
"caImg": "",
"taxRegDay": null,
"taxOrg": "",
"courierNo": "",
"courierImg": "",
"addedValueRate": 0,
"supertaxRate": 0,
"commonTaxLadder": "",
"commonOtherLadder": "",
"specialTaxLadder": "",
"specialOtherLadder": "",
"contractStartData": "2019-01-10T00:00:00.000Z",
"contractEndData": "2020-01-10T00:00:00.000Z",
"contract": "http://ttt.jpg",
"opNotes": null
},
"requestid": "305bcbe9b7f444e38c6155033e6cb66c"
}
返回值说明:
orderNo :订单号
channelOrderNo :渠道订单号
status :状态 00待处理 05执照办理中 10已出执照 15刻章办理中 20已刻章 25银行开户中 30银行已开户 35税务报到中 40已税务报到 50已邮寄 60 合同待审核 70 合同审核不通过 80 合同审核通过 90已签约
legalName :法人姓名
legalMobile :法人电话
name :个体工商户名称
creditCode :统一社会信用代码
businessPlace :经营场所
businessScope :经营范围
regDate :注册日期
businessImg :执照照片
gongzhang :公章
caiwuzhang :财务章
fapiaozhang :发票章
hetongzhang :合同章
farenzhang :法人章
isBank :是否开户
bankName :账户名称
bankNo :账户号
bank :开户行
bankImg :账户信息
caImg :CA照片
taxRegDay :税务登记日
taxOrg :税务机构名称
courierNo :快递单号
courierImg :快递交接单图片
addedValueRate :增值税率
supertaxRate :附加税率
commonTaxLadder :普票个税阶梯
commonOtherLadder :普票增值税、附加税阶梯
specialTaxLadder :专票个税阶梯
specialOtherLadder:专票增值税、附加税阶梯
contract :个体户合同
contractStartData :合同开始时间
contractEndData :合同结束时间
opNotes :操作备注
8.rechargeApplication:商户充值申请接口
请求参数:
{
"action_process": "sjb",
"action_type": "rechargeApplication",
"action_body": {
"amt": 100000,
"outTradeNo":"1",
"times_tamp": 1568713248,
"sign": "D4393F17C96CDA582C1EE5FF0053671E",
"voucher":"https://www.xxx.com/1.png"
}
}
请求参数说明:
sign :签名
times_tamp :时间戳
amt :充值金额(分为单位)
outTradeNo :充值流水号(商户下不能重复)
voucher :充值凭证图片地址
返回值:
{
"status": 0,
"msg": "success",
"requestid": "305bcbe9b7f444e38c6155033e6cb66c"
}
9.calcInvoice:发票试算接口
请求参数:
{
"action_process": "sjb",
"action_type": "calcInvoice",
"action_body": {
"invoiceList": [
{
"businessmenCreditCode":"1111",
"invoiceTime": "2019-09-19",
"invoiceAmt":440000000,
"type": 1
}
],
"times_tamp": 1568713248,
"sign": "D4393F17C96CDA582C1EE5FF0053671E"
}
}
请求参数说明:
sign :签名
times_tamp :时间戳
invoiceList :发票试算列表,最多不超过10个,不参与签名
businessmenCreditCode :个体工商户统一社会信用代码
invoiceTime :开票时间
invoiceAmt :开票金额(分)
type :开票类型 0普票 1专票
返回值:
{
"status": 0,
"msg": "success",
"data": {
"1": {
"code": 1,
"msg": "success",
"incomeTax": "20042494",
"addedValueTax": "28042996",
"specialTax": "2720171",
"serviceTax": "9372000",
"warning": "年度总开票金额已达到4400000",
"monthAmt": 440000
}
},
"requestid": "363e0391a43c4dedb5656623d1bcd540"
}
返回值说明:
data : 发票处理结果,Map格式,key为个体工商户统一社会信用代码
"1" : 统一社会信用代码
"code" : 该个体工商户试算状态 1成功 -1失败
"msg" : 试算结果提示,错误时返回错误信息
"incomeTax" : 试算个税结果(分)
"addedValueTax" : 试算增值税结果(分)
"specialTax" : 试算附加费结果(分)
"serviceTax" : 试算服务费结果(分)
"warning" : 警告信息,该字段不为空时,在前端显示,
"monthAmt" : 该个体工商户在开票时间的月分中,已经申请开票的总金额
10.saveInvoice:申请开票接口
请求参数:
{
"action_process": "sjb",
"action_type": "saveInvoice",
"action_body": {
"invoiceList": [
{
"businessmenCreditCode":"1111",
"invoiceTime": "2019-09-19",
"applyNo": "100001",
"invoiceAmt":330000,
"settleImg": "https://bpohhr.gongsibao.com",
"type": 1
},
{
"businessmenCreditCode":"2222",
"applyNo": "100002",
"invoiceTime": "2019-09-19",
"invoiceAmt":200000,
"settleImg": "https://bpohhr.gongsibao.com",
"type": 1
}
],
"times_tamp": 1568713248,
"sign": "D4393F17C96CDA582C1EE5FF0053671E"
}
}
请求参数说明:
sign :签名
times_tamp :时间戳
invoiceList :开票申请列表,最多不超过10个,不参与签名
businessmenCreditCode :个体工商户统一社会信用代码
applyNo :开票申请编码(商户内唯一)
invoiceTime :开票时间
invoiceAmt :开票金额(分)
settleImg :结算单图片地址
type :开票类型 0普票 1专票
返回值:
{
"status": 0,
"msg": "success",
"data": {
"1111": {
"code": 1,
"msg": "success"
},
"2222": {
"code": 1,
"msg": "success"
}
},
"requestid": "a39a364d83c14664b8e3399387fa847d"
}
返回值说明:
data : 发票处理结果,Map格式,key为个体工商户统一社会信用代码
"1" : 个体工商户统一社会信用代码
"code" : 该个体工商户试算状态 1成功 -1失败
"msg" : 试算结果提示,错误时返回错误信息
11.cancelInvoice:发票申请撤回接口
请求参数:
{
"action_process": "sjb",
"action_type": "cancelInvoice",
"action_body": {
"applyNo": "100001"
}
}
请求参数说明:
sign :签名
times_tamp :时间戳
applyNo :开票申请编号
返回值:
{
"status": 0,
"msg": "success",
"data": "success",
"requestid": "090bde8c5bb74b9d8c6b97beabf39161"
}
12.queryInvoice:发票查询接口
请求参数:
{
"action_process": "sjb",
"action_type": "queryInvoice",
"action_body": {
"applyNo": "100001"
}
}
请求参数说明:
sign :签名
times_tamp :时间戳
applyNo :开票申请编号
返回值:
{
merchant_id // 商户id
applyNo // 发票申请编号
status // 发票状态 00开票申请 10已撤回 20审核驳回 30审核通过 40已开票 50已邮寄
auditRemark // 审核备注
invoiceNo // 发票编号
invoiceTime // 开票时间
invoiceImg // 发票照片
payVoucher // 支付凭证
courierNo // 快递单号
courierImg // 快递交接单图片
taxNo // 完税批号
taxTime // 完税时间
taxVoucher // 完税证明(图片地址)
}
13.queryTaxInvoice:完税证明查询
请求参数:
{
"action_process": "sjb",
"action_type": "queryTaxInvoice",
"action_body": {
"applyNo": "100001"
}
}
请求参数说明:
sign :签名
times_tamp :时间戳
applyNo :开票申请编号
返回值:
{
merchant_id // 商户id
applyNo // 发票申请编号
complateTax // 是否完税 0否 1是
taxNo // 完税批号
taxTime // 完税时间
taxVoucher // 完税证明(图片地址)
}
14: queryCourierTrace:查询邮寄进度
请求参数:
{
"action_process": "sjb",
"action_type": "queryTaxInvoice",
"action_body": {
"applyNo": "100001"
}
}
请求参数说明:
sign :签名
times_tamp :时间戳
applyNo :开票申请编号
返回值:
{
merchant_id // 商户id
applyNo // 发票申请编号
courierNo // 快递单号
courierStatus // 邮寄状态
courierTime // 时间
desc // 描述信息
}
------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------
通知回调商户接口:需要商户提供以下接收的回调地址,回调方式:POST
1. 充值审核
2. 商户修改接口
3. 订单修改接口
4. 订单状态变更推送
5. 发票状态变更推送
6. 发票完税证明推送
1.充值审核
{
merchant_id // 商户id
outTradeNo // 充值流水号,
status // 充值状态 1已认证 2审核失败
remark // 审核备注
}
4. 订单状态变更推送
{
merchant_id,// 商户id
status, // 00待处理 05执照办理中 10已出执照 15刻章办理中 20已刻章 25银行开户中 30银行已开户 35税务报到中 40已税务报到 50已邮寄
channelOrderNo,// 渠道订单号
// ----- 出执照推送数据 -----
name ,// 个体工商户名称
creditCode,// 统一社会信用代码
businessPlace,// 经营场所
businessScope,// 经营范围
regDate,// 注册日期
businessImg,// 执照照片
orderNo,// 订单号
legalName,// 法人姓名
legalMobile,// 法人电话
// ----- 刻章推送数据 -----
gongzhang, // 公章
caiwuzhang, // 财务章
businessImg, // 执照照片
fapiaozhang, // 发票章
hetongzhang, // 合同章
farenzhang // 法人章
// ----- 开户推送数据 -----
isBank,// 是否开户
bankName,// 账户名称
bankNo,// 账户号
bank,// 开户行
bankImg // 账户信息
// ----- 税务报到推送数据 -----
caImg,// CA照片
taxRegDay,// 税务登记日
taxOrg// 税务机构名称
// ----- 邮寄推送数据 -----
courierNo, // 快递单号
courierImg // 快递交接单图片
// ----- 已完成推送数据 -----
completeTime // 快递交接单图片
}
5.发票状态变更推送
{
merchant_id // 商户id
applyNo // 发票申请编号
status // 发票状态 00开票申请 10已撤回 20审核驳回 30审核通过 40已开票 50已邮寄
// ----- 发票审核数据字段 -----
auditRemark // 审核备注
// ----- 发票开具数据字段 -----
invoiceNo // 发票编号
invoiceTime // 开票时间
invoiceImg // 发票照片
payVoucher // 支付凭证
// ----- 发票邮件数据字段 -----
courierNo // 快递单号
courierImg // 快递交接单图片
}
6.发票完税证明推送
{
merchant_id // 商户id
applyNo // 发票申请编号
complateTax // 是否完税 0否 1是
taxNo // 完税批号
taxTime // 完税时间
taxVoucher // 完税证明(图片地址)
}
<pre/>`;
}
classDesc() {
return {
groupName: "op",
groupDesc: "元数据服务包",
name: "ActionAPI",
desc: "此类是对外提供接口服务",
exam: "",
};
}
methodDescs() {
return [
{
methodDesc: `<pre>请求地址:http://sj.app.com:3002/api/op/action/springboard
请求时需要在请求头中增加app_id参数信息,app_id由平台提供给调用方
方法中的签名只有action_body中的参数参与,按照参数的首字母进行ASCII码进行正序排列后进行签名,action_body中的参数为空或参数为list或为json的不参与签名
签名字符串示例:times_tamp=1568713248&key=XXXX,key为平台提供的密钥,对字符串进行
后进行大写转换
方法中需要传递的action_type列表有:
queryMerchant:查询商户
addOrder:添加订单
putOrder:修改订单
queryOrder:订单查询
putContract:个体工商户合同接收接口
queryBusinessmen:个体工商户信息查询接口
<pre/>`,
methodName: "springboard",
paramdescs: [
{
paramDesc: "请求的行为,传递如:sjb",
paramName: "action_process",
paramType: "string",
defaultValue: null,
},
{
paramDesc: "业务操作类型,详情见方法中的描述",
paramName: "action_type",
paramType: "string",
defaultValue: null,
},
{
paramDesc: "业务操作类型的参数,action_body必须传递的参数有,times_tamp(时间戳,类型int)、sign(签名,类型string),其余的为业务需要的参数",
paramName: "action_body",
paramType: "json",
defaultValue: null,
}
],
rtnTypeDesc: `<pre>
status: 返回状态,
msg: 返回信息描述,验证有误则为错误提示,
data: 返回数据信息,
requestid: 返回的处理此次请求的凭证
status状态码如下:
0 业务请求处理成功
-1 请求参数验证失败
1200 访问appid失效
1300 签名验证失败
<pre/>`,
rtnType: `<pre>
{
"status": 0,
"msg": "success",
"data": {},
"requestid": "8cbd498f9d1441b1812ecaa2653933f4"
}
<pre/>`
}
];
}
}
module.exports = ActionAPI;
\ No newline at end of file
......@@ -30,7 +30,7 @@ module.exports = (db, DataTypes) => {
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'zc_op_log',
tableName: 'zcapi_op_log',
validate: {
},
......
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("app", {
name: DataTypes.STRING(100), // 应用名称
appDataOpType: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.app_data_op_type),
}, // 应用数据操作类型:00独立,10全委托,20部分委托
appPayType: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.app_pay_type),
}, // 支付类型:00第三方支付,10平台代收款
contactName : DataTypes.STRING(30), // 联系人姓名
contactMobile: DataTypes.STRING(30), // 联系人手机
contactEmail : DataTypes.STRING(30), // 联系人邮箱
uappKey : DataTypes.STRING(64), // 平台应用key
appSecret : DataTypes.STRING(64), // 密钥信息,用于进行签名请求接口
status : DataTypes.INTEGER, // 状态 0禁用 1启用
channelAppId : DataTypes.STRING(64), // 渠道appID
channelAppKey: DataTypes.STRING(64), // 渠道appKey
notes : DataTypes.STRING, // 备注
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'c_app',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("appproduct", {
app_id :DataTypes.STRING(50),// 应用id
itemCode :DataTypes.STRING(100),// 产品编码
itemName :DataTypes.STRING(100),// 产品名称
picUrl :DataTypes.STRING(500),// 产品图片地址
channelItemCode :DataTypes.STRING(100),// 渠道产品编码
channelItemName :DataTypes.STRING(100),// 渠道产品名称
status :DataTypes.BOOLEAN,// 状态 0禁用 1启用
verifyPrice :DataTypes.BOOLEAN,// 是否验证价格 0不验证 1验证
proPrice :DataTypes.DOUBLE,// 产品价格
serviceCharge :DataTypes.DOUBLE,// 服务费
publicExpense :DataTypes.DOUBLE,// 官费
rateConfig :DataTypes.DECIMAL(12, 2),// 税率
discountsRateConfig :DataTypes.DECIMAL(12, 2),// 优惠税率
channelProfitRate :DataTypes.DECIMAL(12, 2),// 渠道利润分成比率(只分订单中毛利润总额的分成)
sort :DataTypes.INTEGER,// 排序
productType_id :DataTypes.INTEGER,// 产品类型Id
productOneType_id :DataTypes.INTEGER,// 产品大类Id
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'c_app_product',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("appuser", {
app_id : DataTypes.INTEGER, // 应用id
channelUserId : DataTypes.STRING(64), // 渠道用户ID
channelUserName : DataTypes.STRING(64), // 渠道用户登录名
userMoblie : DataTypes.STRING(20), // 用户手机号
nickname : DataTypes.STRING(50), // 昵称
orgName : DataTypes.STRING(255), // 组织结构名称
orgPath : DataTypes.STRING(255), // 组织结构路径
isEnabled : DataTypes.INTEGER, // 是否启用
lastLoginTime : DataTypes.DATE, // 上次登录时间
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'c_app_user',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("needinfo", {
app_id :DataTypes.INTEGER, //
needNo :DataTypes.STRING(64), //需求单号
needDesc :DataTypes.STRING(255), //
needUserMoblie :DataTypes.STRING(20), //
notes :DataTypes.STRING(255), //
opNotes :DataTypes.STRING(500), //
channelUserName :DataTypes.STRING(50), // 渠道用户登录名
auditStatus :DataTypes.STRING(10), //确认状态:00待确认,10确认通过,20确认不通过
createuser_id :DataTypes.INTEGER, //
updateuser_id :DataTypes.INTEGER, //
owner_id :DataTypes.INTEGER, //
creator :DataTypes.STRING(50), //
updator :DataTypes.STRING(50), //
owner :DataTypes.STRING(50), //
ownerMoblie :DataTypes.STRING(20), //
itemCode :DataTypes.STRING(80), //产品码
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_needinfo',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("customercontacts", {
app_id :DataTypes.INTEGER, //
customerinfo_id :DataTypes.INTEGER, //
deliveryOrderNo :DataTypes.STRING(64), // 交付订单号
mobile :DataTypes.STRING(20), //
email :DataTypes.STRING(50), //
tel :DataTypes.STRING(20), //
fax :DataTypes.STRING(50), //
name :DataTypes.STRING(1000), // 联系人
code :DataTypes.STRING(100), // 暂时没有用
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_customercontacts',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("customerinfo", {
customerTypeName :DataTypes.STRING(50), //
customerType : {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.customer_type),
set: function (val) {
this.setDataValue("customerType", val);
this.setDataValue("customerTypeName", uiconfig.config.pdict.customer_type[val]);
},
defaultValue: "0",
}, //申请企业类型: ent:企业,person:个人
identityCardPic :DataTypes.STRING(500), // 身份证图片
identityCardPdf :DataTypes.STRING(500), // 身份证pdf
businessLicensePic :DataTypes.STRING(500), // 营业执照图片
businessLicensePdf :DataTypes.STRING(500), // 营业执照pdf
name :DataTypes.STRING(1000), // 公司名称或个人名称
code :DataTypes.STRING(100), // 公司统一社会代码
app_id :DataTypes.INTEGER, //
deliveryOrderNo :DataTypes.STRING(64), // 交付订单号
applyAddr :DataTypes.STRING, // 申请地址
applyArea :DataTypes.STRING(50), // 存储省市编码
province :DataTypes.STRING(50), // 省
city :DataTypes.STRING(50), // 市
identityCardNo :DataTypes.STRING(50), // 身份证号
notes :DataTypes.STRING, // 备注
createuser_id :DataTypes.INTEGER, //
updateuser_id :DataTypes.INTEGER, //
owner_id :DataTypes.INTEGER, // 拥有者
zipCode :DataTypes.STRING(20), //
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_customerinfo',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("order", {
app_id :DataTypes.INTEGER,//
orderNo :DataTypes.STRING(64),// 订单号
channelServiceNo :DataTypes.STRING(64),// 渠道服务单号
channelOrderNo :DataTypes.STRING(1024),// 渠道订单号列表,多个以,隔开
itemCode :DataTypes.STRING(64),//
itemName :DataTypes.STRING(100),//
channelItemCode :DataTypes.STRING(64),// 渠道产品编码
channelItemName :DataTypes.STRING,// 渠道产品名称
payTime :DataTypes.DATE,// 渠道有支付时间则用渠道的支付时间
salesNum :DataTypes.INTEGER,// 项目订单数量(即服务项目的倍数,默认值为1)
salesDiliverNum :DataTypes.INTEGER,// 项目订单交付数量(即与项目订单数量相对应)
minitermNum :DataTypes.INTEGER,// 订单小项数量
minitermDiliverNum :DataTypes.INTEGER,// 订单小项交付数量
orderType :{
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.order_type),
},// 订单类型,zzdd: 自主订单,dkxd: 代客下单
orderPayStatusName: DataTypes.STRING(50),//
orderPayStatus :{
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.order_pay_status),
set: function (val) {
this.setDataValue("orderPayStatus", val);
this.setDataValue("orderPayStatusName", uiconfig.config.pdict.order_pay_status[val]);
}
},// 订单付款状态dfk: 待付款, zfpz: 已上传支付凭证, yfk: 已付款, ddqx: 订单取消, tkclz: 退款处理中, bfytk: 部分已退款, ytk: 已退款,zfshbtg:支付审核不通过
totalServiceCharge :DataTypes.DECIMAL(12, 2),// 服务费总额(产品配置的服务费*订单件数)
totalPublicExpense :DataTypes.DECIMAL(12, 2),// 官费总额(产品配置的官费*订单件数)
totalDiscounts :DataTypes.DECIMAL(12, 2),// 优惠总额((服务费总额+官费总额)-订单总额(产品价格×优惠费率×订单件数)>0则有优惠额度)
totalTaxes :DataTypes.DECIMAL(12, 2),// 税费总额(订单总额-(订单总额/(1+产品费率)))
totalSum :DataTypes.DECIMAL(12, 2),// 订单总额(产品价格×优惠费率×订单件数)
refundSum :DataTypes.DECIMAL(12, 2),// 退款金额
totalProfitSum :DataTypes.DECIMAL(12, 2),// 订单毛利润总额(订单总额-官费总额)
pfProfitSum :DataTypes.DECIMAL(12, 2),// 订单平台毛利润总额(订单毛利润总额-订单渠道分成毛利润总额)
channelProfitSum :DataTypes.DECIMAL(12, 2),// 订单渠道分成毛利润总额((订单总额-官费总额)*渠道利润分成比率)
pfSettleProfit :DataTypes.DECIMAL(12, 2),// 平台结算渠道利润,0否,1是
opNotes :DataTypes.STRING,// 备注
appPayType :{
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.app_pay_type),
},// 支付类型:00第三方支付,10平台代收款
createuser_id :DataTypes.INTEGER,//
updateuser_id :DataTypes.INTEGER,//
owner_id :DataTypes.INTEGER,//
creator :DataTypes.STRING(100),//
updator :DataTypes.STRING(100),//
owner :DataTypes.STRING(100),//
ownerMoblie :DataTypes.STRING(20),//
invoiceApplyStatus :DataTypes.STRING(10),// 发票状态:00: 未申请, 10: 已申请,20:已开票
channelUserId :DataTypes.STRING(64), // 渠道用户ID
needNo :DataTypes.STRING(64), // 需求单号
picUrl :DataTypes.STRING(500),// 产品图片地址
productType_id :DataTypes.INTEGER, //产品类型Id
productOneType_id :DataTypes.INTEGER, //产品大类Id
serviceItemSnapshot :DataTypes.TEXT, //产品快照
}, {
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) => {
return db.define("orderflow", {
sourceOrderNo: DataTypes.STRING(64), // 来源单号
opContent: DataTypes.STRING(1024), // 操作描述
app_id: DataTypes.INTEGER, //
notes: DataTypes.STRING, // 备注
createuser_id: DataTypes.INTEGER, //
isShow: {//是否显示
type: DataTypes.BOOLEAN,
defaultValue: false,
},
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_orderflow',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("ordertmproduct", {
app_id: DataTypes.INTEGER,//
productType_id: DataTypes.INTEGER,//产品类型Id
productOneType_id: DataTypes.INTEGER,//产品大类Id
itemCode: DataTypes.STRING(64),//产品编码
itemName: DataTypes.STRING(100),//产品名称
tmName: DataTypes.STRING(1000),//商标名称
tmType: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.tm_type),
},//p:普通商标,j:集体商标,z:证明商标,t:特殊商标
tmFormTypeName: DataTypes.STRING(50),//
tmFormType: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.tm_form_type),
set: function (val) {
this.setDataValue("tmFormType", val);
this.setDataValue("tmFormTypeName", uiconfig.config.pdict.tm_form_type[val]);
}
},//商标类型形式:1:立体,3:字,4:图,5:字图,6:颜色,7:彩色
nclOneCodes: DataTypes.STRING,//尼斯大类列表:格式以,隔开
payStatusName: DataTypes.STRING(50),//
payStatus: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.order_service_pay_status),
set: function (val) {
this.setDataValue("payStatus", val);
this.setDataValue("payStatusName", uiconfig.config.pdict.order_service_pay_status[val]);
}
},//支付状态:dfk:待付款,yzf:已支付
deliveryStatusName: DataTypes.STRING(50),//
deliveryStatus: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.delivery_status),
set: function (val) {
this.setDataValue("deliveryStatus", val);
this.setDataValue("deliveryStatusName", uiconfig.config.pdict.delivery_status[val]);
}
},//商标交付状态:dsccl:待上传材料,dsh:待审核,ddj:待递交, ydj: 已递交,ywc:已完成
appDataOpType: {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.app_data_op_type),
},//应用数据操作类型:00独立,10全委托,20部分委托
deliveryOrderNo: DataTypes.STRING(64),//交付订单号
channelServiceNo: DataTypes.STRING(64),//渠道服务单号
channelOrderNo: DataTypes.STRING(1024),//渠道订单号列表,多个以,隔开
needNo: DataTypes.STRING(64),//需求单号
sourceType: DataTypes.STRING(10),//来源类型:00订单,10需求,20服务商
picUrl: DataTypes.STRING(500), //商标图样
colorizedPicUrl: DataTypes.STRING(500),//商标彩色图样
gzwtsUrl: DataTypes.STRING(500), //盖章委托书
sywjUrl: DataTypes.STRING(500), //声音文件
smwjUrl: DataTypes.STRING(500), //说明文件
channelUserId: DataTypes.STRING(64),//渠道用户ID
notes: DataTypes.STRING(255),//备注
createuser_id: DataTypes.INTEGER,//
updateuser_id: DataTypes.INTEGER,//
auditor_id: DataTypes.INTEGER,//
createuser: DataTypes.STRING(100),//
updateuser: DataTypes.STRING(100),//
auditor: DataTypes.STRING(100),//
nclOneCount: DataTypes.INTEGER, // 尼斯大类数量
nclCount: DataTypes.INTEGER, // 尼斯数量
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_order_tm_product',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("pushbusiness", {
sourceCode: DataTypes.STRING(100), // 业务来源
sourceName: DataTypes.STRING(100), // 业务来源名称
uappKey: DataTypes.STRING(64), // 平台应用key
aliAppkey: DataTypes.STRING(64), // 阿里网关appkey
aliSecret: DataTypes.STRING(255), // 阿里网关密钥
status: DataTypes.INTEGER, // 状态 0禁用 1启用
pushSveUrl: DataTypes.STRING(500), // 推送服务url
pushProductId: DataTypes.STRING(255), // 推送方产品ID
sveProductId: DataTypes.STRING(255), // 服务方产品ID
notes: DataTypes.STRING(255), // 备注
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'c_push_business',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("tmofficial", {
tmRegistNum :DataTypes.STRING(50), //注册号
officialTypeName :DataTypes.STRING(50), //
officialType : {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.official_type),
set: function (val) {
this.setDataValue("officialType", val);
this.setDataValue("officialTypeName", uiconfig.config.pdict.official_type[val]);
}
}, //商标官文类型:1: 商标注册申请书, 2: 商标注册申请补正通知书, 3: 商标注册申请受理通知书, 4: 商标注册申请不予受理通知书,
//5: 商标注册同日申请补送使用证据通知书,6: 商标注册同日申请协商通知书商标注册同日申请抽签通知书,
//7: 商标驳回通知书, 8: 商标部分驳回通知书, 9: 商标注册申请初步审定公告通知书,
//10: 商标异议答辩通知书, 11: 异议裁定书, 12: 纸质版商标注册证, 13: 电子版商标注册证
officialFileName :DataTypes.STRING(200), // 官文文件名称
officialFileUrl :DataTypes.STRING(255), // 官文文件地址
notes :DataTypes.STRING , //
name :DataTypes.STRING(1000), //暂时没有用
code :DataTypes.STRING(64), //官文单号(自动生成)
app_id :DataTypes.INTEGER, //
createuser_id :DataTypes.INTEGER, //
updateuser_id :DataTypes.INTEGER, //
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_tmofficial',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("trademark", {
tbCode :DataTypes.STRING(50), //提报号(自动生成)
nclOneCodes :DataTypes.STRING(10), //尼斯大类
nclSmallCodes :DataTypes.TEXT('long'), //尼斯小类
submitTime :DataTypes.DATE, //提报时间
tmRegistNum :DataTypes.STRING(50), //注册号
officialTypeName :DataTypes.STRING(50), //
officialType : {
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.official_type),
set: function (val) {
this.setDataValue("officialType", val);
this.setDataValue("officialTypeName", uiconfig.config.pdict.official_type[val]);
}
}, //商标官文类型:1: 商标注册申请书, 2: 商标注册申请补正通知书, 3: 商标注册申请受理通知书, 4: 商标注册申请不予受理通知书,
//5: 商标注册同日申请补送使用证据通知书,6: 商标注册同日申请协商通知书商标注册同日申请抽签通知书,
//7: 商标驳回通知书, 8: 商标部分驳回通知书, 9: 商标注册申请初步审定公告通知书,
//10: 商标异议答辩通知书, 11: 异议裁定书, 12: 纸质版商标注册证, 13: 电子版商标注册证
// "dsccl": "待上传材料", "dsh": "待审核", "shbtg": "审核不通过", "ddj": "待递交", "ydj": "已递交", "djyc": "递交异常" //
tbKey :DataTypes.STRING(50), //
tbErrorCount :DataTypes.INTEGER, //
deliveryOrderNo :DataTypes.STRING(64), //交付订单号
bizNo :DataTypes.STRING(64), //业务单号,用于对接第三方业务单号
app_id :DataTypes.INTEGER, //
createuser_id :DataTypes.INTEGER, //
updateuser_id :DataTypes.INTEGER, //
owner_id :DataTypes.INTEGER, //
creator :DataTypes.STRING(50), //
updator :DataTypes.STRING(50), //
owner :DataTypes.STRING(50), //
ownerMoblie :DataTypes.STRING(20), //
opNotes :DataTypes.STRING(500), //
subErrorMsg :DataTypes.STRING(4000), // 提报错误信息
payPublicExpense :DataTypes.INTEGER, // 支付官费,0否,1是
nclCount :DataTypes.INTEGER, // 尼斯数量
nclPublicExpense :DataTypes.DECIMAL(12, 2), // 尼斯官费总额
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
timestamps: true,
updatedAt: false,
//freezeTableName: true,
// define the table's name
tableName: 'b_trademark',
validate: {
},
indexes: [
]
});
}
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class AapService extends ServiceBase {
constructor() {
super("dbapp", ServiceBase.getDaoName(AapService));
}
}
module.exports=AapService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class AppProductService extends ServiceBase {
constructor() {
super("dbapp", ServiceBase.getDaoName(AppProductService));
}
}
module.exports = AppProductService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class AapUserService extends ServiceBase {
constructor() {
super("dbapp", ServiceBase.getDaoName(AapUserService));
this.opPlatformUtils = system.getObject("util.businessManager.opPlatformUtils");
}
async loginUser(channelUserId, channelUserName, userMoblie, nickname, orgName, orgPath) {
if (!channelUserId) {
return system.getResult(null, "channelUserId不能为空");
}
var params = {
channelUserId: channelUserId,
channelUserName: channelUserName,
userMoblie: userMoblie,
nickname: nickname,
orgName: orgName,
orgPath: orgPath
}
var userItem = await this.cacheManager["ApiUserCache"].cache(channelUserId, { status: true }, 3000, params);
if (!userItem) {
return system.getResult(null, "用户注册失败");
}
return system.getResultSuccess(userItem);
}
}
module.exports = AapUserService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class NeedInfoService extends ServiceBase {
constructor() {
super("dbneed", ServiceBase.getDaoName(NeedInfoService));
}
async subNeed(obj){
var user = obj.user;
var app = obj.app;
if(!user){
return system.getResultFail(-100, "未知用户");
}
if(!app){
return system.getResultFail(-101, "未知渠道");
}
var needNo=await this.getBusUid("ni");
var needObj={
app_id :app.id,
needNo :needNo,
needDesc :obj.needDesc,
needUserMoblie :obj.needUserMoblie,
notes :obj.notes,
channelUserName :user.channelUserName,
auditStatus :"00",
createuser_id :user.id,
itemCode:obj.itemCode
};
var need = await this.dao.create(needObj);
return system.getResultSuccess(need);
}
}
module.exports=NeedInfoService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class CustomerContactsService extends ServiceBase {
constructor() {
super("dborder", ServiceBase.getDaoName(CustomerContactsService));
this.ordertmproductSve = system.getObject("service.dborder.ordertmproductSve");
}
/**
* 修改商标交付单联系人(订单详情页面)
* @param {*} obj
* obj.deliveryOrderNo 交付订单号,
* obj.name 联系人,obj.mobile 联系电话,obj.email 电子邮箱,obj.tel 座机电话
* obj.user 用户数据
*/
async updateContacts(obj){
var user = obj.user;
if(!user || !user.id){
return system.getResultFail(-100, "未知用户");
}
var deliveryOrderNo = obj.deliveryOrderNo;
if(!deliveryOrderNo){
return system.getResultFail(-101, "deliveryOrderNo参数错误");
}
// 1.获取交付单信息
var ordertmproduct = await this.ordertmproductSve.dao.model.findOne({
where:{deliveryOrderNo:deliveryOrderNo},
raw:true
});
if(!ordertmproduct || !ordertmproduct.id){
return system.getResultFail(-102, "商标交付单不存在");
}
// 2.获取交付单状态,判断是否可修改
if(ordertmproduct.deliveryStatus=='ddj' || ordertmproduct.deliveryStatus=='ywc'){
var deliveryStatusName = "待递交";
if(ordertmproduct.deliveryStatus=='ywc'){
deliveryStatusName="已完成";
}
return system.getResultFail(-103, "该商标交付单状态为"+deliveryStatusName+",不能进行修改");
}
var self = this;
return await self.db.transaction(async function (t) {
var contactsObj={deliveryOrderNo:deliveryOrderNo};
if(obj.name){
contactsObj["name"]=obj.name;
}
if(obj.mobile){
contactsObj["mobile"]=obj.mobile;
}
if(obj.email){
contactsObj["email"]=obj.email;
}
if(obj.tel){
contactsObj["tel"]=obj.tel;
}
//修改联系人信息
await self.dao.model.update(contactsObj, { where: { deliveryOrderNo:deliveryOrderNo }, transaction: t });
return system.getResultSuccess();
})
}
}
module.exports=CustomerContactsService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class CustomerInfoService extends ServiceBase {
constructor() {
super("dborder", ServiceBase.getDaoName(CustomerInfoService));
this.ordertmproductSve = system.getObject("service.dborder.ordertmproductSve");
}
/**
* 修改申请人信息(订单详情页面使用)
* @param {*} obj
* obj.deliveryOrderNo 交付订单号,
* obj.customerType 申请人类型,
* obj.name 公司名称或个人名称,
* obj.code 社会统一信用代码,
* obj.applyAddr 公司地址,
* obj.zipCode 邮编
* obj.identityCardPic 身份证图片,
* obj.businessLicensePic 营业执照图片,
* obj.identityCardPdf 身份证pdf,
* obj.businessLicensePdf 营业执照pdf,
* obj.user 用户数据
*/
async updateCustomerInfo(obj){
var user = obj.user;
if(!user || !user.id){
return system.getResultFail(-100, "未知用户");
}
var deliveryOrderNo = obj.deliveryOrderNo;
if(!deliveryOrderNo){
return system.getResultFail(-101, "deliveryOrderNo参数错误");
}
// 1.获取交付单信息
var ordertmproduct = await this.ordertmproductSve.dao.model.findOne({
where:{deliveryOrderNo:deliveryOrderNo},
raw:true
});
if(!ordertmproduct || !ordertmproduct.id){
return system.getResultFail(-102, "商标交付单不存在");
}
// 2.获取交付单状态,判断是否可修改
if(ordertmproduct.deliveryStatus=='ddj' || ordertmproduct.deliveryStatus=='ywc'){
var deliveryStatusName = "待递交";
if(ordertmproduct.deliveryStatus=='ywc'){
deliveryStatusName="已完成";
}
return system.getResultFail(-103, "该商标交付单状态为"+deliveryStatusName+",不能进行修改");
}
var customerinfo = await this.dao.model.findOne({
where:{
deliveryOrderNo:deliveryOrderNo
},
raw:true
});
if(!customerinfo || !customerinfo.id){
return system.getResultFail(-104, "未知申请人");
}
var self = this;
return await self.db.transaction(async function (t) {
var ciObj={ id:customerinfo.id,updateuser_id:user.id };
if(obj.customerType){
ciObj["customerType"]=obj.customerType;
}
if(obj.name){
ciObj["name"]=obj.name;
}
if(obj.code){
ciObj["code"]=obj.code;
}
if(obj.applyAddr){
ciObj["applyAddr"]=obj.applyAddr;
}
if(obj.zipCode){
ciObj["zipCode"]=obj.zipCode;
}
if(obj.businessLicensePic){
ciObj["businessLicensePic"]=obj.businessLicensePic;
}
if(obj.identityCardPic){
ciObj["identityCardPic"]=obj.identityCardPic;
}
if(obj.businessLicensePdf){
ciObj["businessLicensePdf"]=obj.businessLicensePdf;
}
if(obj.identityCardPdf){
ciObj["identityCardPdf"]=obj.identityCardPdf;
}
await self.dao.update(ciObj,t);//修改申请人信息
return system.getResultSuccess();
})
}
/**
* 修改交官文件
* @param {*} obj
* obj.deliveryOrderNo 交付单号,
* obj.gzwtsUrl 盖章委托书,
* obj.smwjUrl 说明文件,
* obj.identityCardPic 身份证图片,
* obj.businessLicensePic 营业执照图片,
* obj.identityCardPdf 身份证pdf,
* obj.businessLicensePdf 营业执照pdf,
* obj.user 用户数据
*/
async updateOfficial(obj){
var user = obj.user;
if(!user || !user.id){
return system.getResultFail(-100, "未知用户");
}
var deliveryOrderNo = obj.deliveryOrderNo;
if(!deliveryOrderNo){
return system.getResultFail(-101, "deliveryOrderNo参数错误");
}
// 1.获取交付单信息
var ordertmproduct = await this.ordertmproductSve.dao.model.findOne({
where:{deliveryOrderNo:deliveryOrderNo},
raw:true
});
if(!ordertmproduct || !ordertmproduct.id){
return system.getResultFail(-102, "商标交付单不存在");
}
// 2.获取交付单状态,判断是否可修改
if(ordertmproduct.deliveryStatus=='ddj' || ordertmproduct.deliveryStatus=='ywc'){
var deliveryStatusName = "待递交";
if(ordertmproduct.deliveryStatus=='ywc'){
deliveryStatusName="已完成";
}
return system.getResultFail(-103, "该商标交付单状态为"+deliveryStatusName+",不能进行修改");
}
var customerinfo = await this.dao.model.findOne({
where:{
deliveryOrderNo:deliveryOrderNo
},
raw:true
});
if(!customerinfo || !customerinfo.id){
return system.getResultFail(-104, "未知申请人");
}
var self = this;
return await self.db.transaction(async function (t) {
var ciObj={ id:customerinfo.id,updateuser_id:user.id };
if(obj.businessLicensePic){
ciObj["businessLicensePic"]=obj.businessLicensePic;
}
if(obj.identityCardPic){
ciObj["identityCardPic"]=obj.identityCardPic;
}
if(obj.businessLicensePdf){
ciObj["businessLicensePdf"]=obj.businessLicensePdf;
}
if(obj.identityCardPdf){
ciObj["identityCardPdf"]=obj.identityCardPdf;
}
await self.dao.update(ciObj,t);//申请人信息 修改营业执照、身份证文件
var otpObj={
id:ordertmproduct.id,
updateuser_id:user.id,
updateuser:user.nickname
};
if(obj.gzwtsUrl){
otpObj["gzwtsUrl"]=obj.gzwtsUrl;
}
if(obj.smwjUrl){
otpObj["smwjUrl"]=obj.smwjUrl;
}
await self.ordertmproductSve.update(otpObj,t);//商标交付单 修改盖章委托书、说明文件
return system.getResultSuccess();
})
}
}
module.exports=CustomerInfoService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class OrderService extends ServiceBase {
constructor() {
super("dborder", ServiceBase.getDaoName(OrderService));
}
}
module.exports = OrderService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class OrderFlowService extends ServiceBase {
constructor() {
super("dborder", ServiceBase.getDaoName(OrderFlowService));
}
}
module.exports=OrderFlowService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class OrderTmProductService extends ServiceBase {
constructor() {
super("dborder", ServiceBase.getDaoName(OrderTmProductService));
this.appproductDao = system.getObject("db.dbapp.appproductDao");
this.ordertmproductDao = system.getObject("db.dborder.ordertmproductDao");
// this.orderDao = system.getObject("db.dborder.orderDao");
this.customerinfoDao = system.getObject("db.dborder.customerinfoDao");
this.customercontactsDao = system.getObject("db.dborder.customercontactsDao");
this.orderflowDao = system.getObject("db.dborder.orderflowDao");
this.trademarkDao = system.getObject("db.dbtrademark.trademarkDao");
this.receiptvoucherDao = null;
this.tmofficialDao = system.getObject("db.dbtrademark.tmofficialDao");
}
//------------------------------------------创建订单-------------------开始-------------------------
async addTmOrder(params) {//创建商标订单信息
var self = this;
var deliveryOrderNo = params.deliveryOrderNo;//交付单号
var itemCode = params.itemCode;//产品编码
var tm = params.tm;//增加sourceType || "00";//来源类型:00订单,10需求,20服务商
var apply = params.apply;
var app = params.app;
var user = params.user;
var nclones = params.nclones || null;
var channelUser = params.channelUser || null;
var channelOrder = params.channelOrder || null;
var orderType = params.orderType || "dkxd";//订单类型,zzdd: 自主订单,dkxd: 代客下单
if (!nclones || nclones.length < 1) {
return system.getResult(null, "尼斯大类不能为空");
}
if (!itemCode) {
return system.getResult(null, "itemCode参数错误");
}
var productItem = await this.appproductDao.findOneByCode(itemCode, user.app_id);//获取产品
if (!productItem) {
return system.getResult(null, "未知的产品");
}
if (productItem.status != 1) {
return system.getResult(null, "产品已禁用");
}
if (productItem && productItem.verifyPrice == 1) {
var verifyResult = await self.isOrderVerify(user, 1, tm, productItem, nclones, null);
if (verifyResult) {
return verifyResult;
}
} else {
tm.nclOneCodes = [];
tm.nclCount = 0;
for (var i = 0; i < nclones.length; i++) {
var tbcode = await self.getBusUid("tb");
var nclone = nclones[i];
var nclthreeobj = nclone.nclThree;
if (nclone) {
tm.nclOneCodes.push(nclone.code);
tm.nclCount = tm.nclCount + nclthreeobj.length;
}
}
}
if (tm.tmFormType == "4") {//图形商标
tm["name"] = "图形";
}
return await self.db.transaction(async function (t) {
//创建订单
var ordercode = await self.getBusUid("tm");
var orderAmount = tm;
orderAmount.salesNum = tm.nclOneCodes.length;
orderAmount.minitermNum = tm.nclCount;
// var orderResult = await self.orderDao.addOrder(ordercode, orderType, user, app, productItem, channelOrder, channelUser, apply, orderAmount, t);
// if (orderResult.status != 0) {
// return orderResult;
// }
// var order = orderResult.data;
var orderProductObj = {
app_id: user.app_id,//
productType_id: productItem.picUrl,//产品类型Id
productOneType_id: productItem.picUrl,//产品大类Id
itemCode: productItem.itemCode,//
itemName: productItem.itemName,//
tmName: tm.tmName,//商标名称
tmType: "p",//"p": "普通商标", "j": "集体商标", "z": "证明商标", "t": "特殊商标"
tmFormType: tm.tmFormType,//商标类型形式:"1": "立体", "3": "字", "4": "图", "5": "字图", "6": "颜色", "7": "彩色"
nclOneCodes: tm.nclOneCodes ? tm.nclOneCodes.join(",") : null,//尼斯大类列表:格式以,隔开
orderServicePayStatus: channelOrder.payStatus,//支付状态:dfk: 待付款, yfk: 已支付
deliveryStatus: "dsccl",//商标交付状态:dsccl: 待上传材料, dsh: 待审核, ddj: 待递交, ywc: 已完成
appDataOpType: app.appDataOpType,// 应用数据操作类型:00独立,10全委托,20部分委托
// sourceOrderNo: ordercode,//来源单号
deliveryOrderNo: deliveryOrderNo,
channelServiceNo: channelOrder.channelServiceNo,// 渠道服务单号
channelOrderNo: channelOrder.channelOrderNo,//渠道订单号列表,多个以,隔开
needNo: channelOrder.needNo || null,//需求单号
sourceType: tm.sourceType || "00",
picUrl: tm.picUrl || null,//商标图样
colorizedPicUrl: tm.colorizedPicUrl || null,//商标彩色图样
sywjUrl: tm.sywjUrl || null,//声音文件
gzwtsUrl: tm.gzwtsUrl || null,//盖章委托书
smwjUrl: tm.smwjUrl || null,//说明文件
channelUserId: channelUser.channelUserId,// 渠道用户id
createuser_id: user.id,//
createuser: user.nickname,//
notes: tm.notes || "", // 备注信息
nclOneCount: tm.nclOneCodes.length,
nclCount: tm.nclCount,
};
var flowContent = "";
if (apply.customerType == "person") {
if (!apply.businessLicensePic || !apply.identityCardPic || !tm.gzwtsUrl) {
orderProductObj["deliveryStatus"] = "dsccl";
flowContent = channelOrder.payStatus == "yfk" ? "订单已付款待上传材料" : "订单已创建待付款";
} else {
orderProductObj["deliveryStatus"] = "dsh";
flowContent = channelOrder.payStatus == "yfk" ? "订单已付款待审核" : "订单已创建待付款";
}
}
if (apply.customerType == "ent") {
if (!apply.businessLicensePic || !tm.gzwtsUrl) {
orderProductObj["deliveryStatus"] = "dsccl";
flowContent = channelOrder.payStatus == "yfk" ? "订单已付款待上传材料" : "订单已创建待付款";
} else {
orderProductObj["deliveryStatus"] = "dsh";
flowContent = channelOrder.payStatus == "yfk" ? "订单已付款待审核" : "订单已创建待付款";
}
}
//订单客户档案添加和修改
await self.opCustomerInfo(user, apply, orderProductObj, t);
//创建服务单
var orderTm = await self.dao.create(orderProductObj, t);//创建商标订单
var flowObj = {
app_id: user.app_id,
createuser_id: user.id,
sourceOrderNo: ordercode,
opContent: flowContent
};
await self.orderflowDao.create(flowObj, t);//创建订单流程
flowObj.sourceOrderNo = orderProductObj.deliveryOrderNo;
await self.orderflowDao.create(flowObj, t);//创建交付流程
orderTm.needNo = channelOrder.needNo || null;//需求单号
await self.opTmInfo(user, tm, apply, nclones, orderTm, JSON.stringify(productItem), t);
return system.getResultSuccess({
deliveryOrderNo: orderProductObj.deliveryOrderNo,
channelServiceNo: channelOrder.channelServiceNo,
channelParams: params.channelParams
});
})
}
async isOrderVerify(user, verifyType, tm, serviceitem, nclones, buyProductCount) { //订单验证
/*
verifyType==1为商标注册验证,2为其他订单验证
*/
tm.nclOneCodes = [];
var sveItemRateConfig = serviceitem.rateConfig ? Number(serviceitem.rateConfig) : 0;//产品费率
var fwf = serviceitem.serviceCharge ? Number(serviceitem.serviceCharge) : 0;//服务费
var yhfl = serviceitem.discountsRateConfig ? Number(serviceitem.discountsRateConfig) : 0;//最大优惠费率
var gf = serviceitem.publicExpense ? Number(serviceitem.publicExpense) : 0;//产品官费
var nclSmallPrice = gf / 10;//单个小类官费
nclSmallPrice = Number(nclSmallPrice.toFixed(2));
var productCount = 1;//产品数量
var gfze = 0;//官费总额
if (verifyType == 1) {
tm.nclOneCodes = [];
tm.nclCount = 0;
productCount = nclones.length;
for (var a = 0; a < nclones.length; a++) {
var nclone = nclones[a];
tm.nclOneCodes.push(nclone.code);
tm.nclCount = tm.nclCount + nclthreeobj.length;
var nclthreeobj = nclone.nclThree;
gfze = gfze + gf;
if (nclthreeobj.length > 10) {
gfze = gfze + (nclthreeobj.length - 10) * nclSmallPrice;
}
}
}
else if (verifyType == 2) {
productCount = buyProductCount;
gfze = gf * Number(productCount);
}
var fwfze = Number(fwf) * Number(productCount);//服务费总额
var sfze = Number(tm.totalSum) / (sveItemRateConfig + 100) * sveItemRateConfig; //totalTaxes 税费总额
sfze = sfze.toFixed(2);
sfze = Number(sfze);
var zdyhe = (gfze + fwfze) * yhfl / 100;//最大优惠额
zdyhe = zdyhe.toFixed(2);
zdyhe = Number(zdyhe);
//毛利总额=应付总额-官费总额
var mlze = Number(tm.totalSum) - gfze;//totalProfitSum 毛利总额
mlze = mlze.toFixed(2);
mlze = Number(mlze);
//优惠金额=服务费+官费总额-应付总额(服务费、官费之和小于等于应付总额时,优惠金额为零)
var yhje = fwfze + gfze - Number(tm.totalSum);
if (yhje < 0) {
yhje = 0;
}
yhje = yhje.toFixed(2);
yhje = Number(yhje);
if (fwfze != Number(tm.totalServiceCharge)) {
return { code: -201, msg: "服务费总额有误" };
}
if (gfze != Number(tm.totalPublicExpense)) {
return { code: -202, msg: "官费总额有误" };
}
if (sfze != Number(tm.totalTaxes)) {
return { code: -203, msg: "税费总额有误" };
}
if (mlze != Number(tm.totalProfitSum)) {
return { code: -204, msg: "毛利总额有误" };
}
if (yhje != Number(tm.totalDiscounts) || yhje > zdyhe) {
return { code: -205, msg: "优惠总额有误" };
}
// var channelProfitSum = 0;//订单渠道分成毛利润总额
// var pfProfitSum = 0;//订单平台毛利润总额
// var totalProfitSum = Number(tm.totalProfitSum);//订单毛利润总额
// if (totalProfitSum > 0) {
// var tmpChannelProfitRate = Number(serviceitem.channelProfitRate);
// if (tmpChannelProfitRate > 0) {
// var channelProfitRate = tmpChannelProfitRate / 100;
// channelProfitSum = totalProfitSum * channelProfitRate;
// pfProfitSum = totalProfitSum - channelProfitSum;
// channelProfitSum = channelProfitSum.toFixed(2);
// pfProfitSum = pfProfitSum.toFixed(2);
// if (channelProfitSum < 0 || pfProfitSum < 0) {
// return { code: -206, msg: "利润计算有误" };
// }
// tm["channelProfitSum"] = channelProfitSum;
// tm["pfProfitSum"] = pfProfitSum;
// } else if (tmpChannelProfitRate == 0) {
// pfProfitSum = mlze;//毛利总额
// }
// }//渠道利润分成比率(只分订单中毛利润总额的分成)
return "";
}
async opCustomerInfo(user, apply, orderObj, t) {//订单客户档案添加和修改
var customerInfoObj = {
deliveryOrderNo: orderObj.deliveryOrderNo,//交付订单号
app_id: user.app_id,
code: apply.code,
name: apply.name,
applyAddr: apply.applyAddr,//申请地址
applyArea: apply.applyArea,//申请区域
customerType: apply.customerType,//申请人类型 ent person
businessLicensePic: apply.businessLicensePic || "", //营业执照图片
businessLicensePdf: apply.businessLicensePdf || "", //营业执pdf
owner_id: user.id,
createuser_id: user.id,
zipCode: apply.zipCode,//邮政编码
};
if (apply.customerType == "person") {
customerInfoObj["identityCardNo"] = apply.identityCardNo;
customerInfoObj["identityCardPic"] = apply.identityCardPic || "";
customerInfoObj["identityCardPdf"] = apply.identityCardPdf || "";
//身份证号、身份证图片
if (!apply.identityCardNo || !apply.identityCardPic) {
orderObj.deliveryStatus = "dsccl";
}
else {
orderObj.deliveryStatus = "dsh";
}
}
var customer = await this.customerinfoDao.findOneByCodeAndUserId(apply.code, user.id);//查询客户档案
if (customer && customer.id) {//客户已存在 则更新
customerInfoObj["id"] = customer.id;
await this.customerinfoDao.update(customerInfoObj, t);
} else {//客户不存在 则创建
customer = await this.customerinfoDao.create(customerInfoObj, t);
}
var customerContactObj = {
deliveryOrderNo: orderObj.deliveryOrderNo,//交付订单号
app_id: user.app_id,
customerinfo_id: customer.id,
name: apply.contacts,//联系人
mobile: apply.mobile,//手机号
email: apply.email,//邮箱
tel: apply.tel,//座机
fax: apply.fax//传真
};
var customercontacts = await this.customercontactsDao.findOneByMobile(apply.mobile, customer.id);
if (!customercontacts) {//客户联系人不存在 则创建
customercontacts = await this.customercontactsDao.create(customerContactObj, t);//创建订单联系人
}
}
async opTmInfo(user, tm, apply, nclones, orderTm, serviceItemSnapshot, t, ) {//商标(商标注册)添加操作
//获取产品快照
var productItem = serviceItemSnapshot;
if (productItem) {
productItem = JSON.parse(productItem);
}
var gf = productItem.publicExpense ? Number(productItem.publicExpense) : 0;//产品官费
var nclSmallPrice = gf / 10;//单个小类官费
nclSmallPrice = Number(nclSmallPrice.toFixed(2));
var self = this;
await this.trademarkDao.bulkDeleteByWhere({ where: { deliveryOrderNo: orderTm.deliveryOrderNo, nclOneCodes: { [self.db.Op.in]: tm.nclOneCodes } } }, t);
for (var i = 0; i < nclones.length; i++) {
var tbcode = nclones[i].tbCode;//await self.getBusUid("tb");
var nclone = nclones[i];
var nclthreeobj = nclone.nclThree;
var nclthreeobjCount = nclone.nclThree.length;
//计算尼斯小类官方总额
var nclgfze = 300;
if (nclthreeobj.length > 10) {
nclgfze = nclgfze + (nclthreeobj.length - 10) * nclSmallPrice;
}
nclthreeobj = JSON.stringify(nclthreeobj);
var trademarkobj = {
tbCode: tbcode,//提报号(自动生成)
deliveryOrderNo: orderTm.deliveryOrderNo,
needNo: orderTm.needNo,//需求单号
officialType: orderTm.deliveryStatus,//"dsccl": "待上传材料", "dsh": "待审核"
app_id: user.app_id,
createuser_id: user.id,
owner_id: user.id,
owner: user.nickname,
ownerMoblie: user.userMoblie,
creator: user.nickname,
nclOneCodes: nclone.code,//尼斯大类
nclSmallCodes: nclthreeobj,//尼斯小类
nclCount: nclthreeobjCount,//尼斯数量
nclPublicExpense: nclgfze,
itemCode: productItem.itemCode,//
itemName: productItem.itemName,//
channelUserId: user.channelUserId
};
var trademark = await self.trademarkDao.create(trademarkobj, t);//创建商标
}
}
//------------------------------------------创建订单--------------------结束------------------------
/**
* 商标交付列表
* @param {*} params 格式:{channelServiceNo:XX, app:{ appId:XX}}
*/
async getTmOrderList(params) {//商标交付列表
var pageSize = Number(params.pageSize || 10);
var pageInde = Number(params.pageInde || 1);
var from = pageInde == 1 ? 0 : Number((pageInde - 1) * pageSize);
if (pageSize > 50) {
pageSize = 50;
}
var sql = "SELECT tm.`channelServiceNo`,tm.`deliveryOrderNo`,tm.`tmName`,tm.`nclOneCount`,tm.`nclOneCodes`,tm.itemCode,tm.itemName," +
"o.`totalSum`,c.`name`,tm.`deliveryStatus`,tm.`deliveryStatusName`,tm.payStatus,tm.payStatusName,o.created_at AS CreateDate,tm.submitTime" +
" FROM `b_order_tm_product` AS tm LEFT JOIN `b_order` AS o ON tm.`sourceOrderNo`=o.`orderNo` LEFT JOIN" +
" `b_customerinfo` AS c ON tm.`deliveryOrderNo`=c.`deliveryOrderNo` where tm.deleted_at is null ";
var paramWhere = {};
if (params.channelServiceNo) {
sql += " and tm.channelServiceNo like :channelServiceNo";
paramWhere.channelServiceNo = "%" + params.channelServiceNo.trim() + "%";
}
if (params.deliveryOrderNo) {
sql += " and tm.deliveryOrderNo like :deliveryOrderNo";
paramWhere.deliveryOrderNo = "%" + params.deliveryOrderNo.trim() + "%";
}
if (params.itemCode) {
sql += " and tm.itemCode=:itemCode";
paramWhere.itemCode = params.itemCode;
}
if (params.deliveryStatus) {
sql += " and tm.deliveryStatus=:deliveryStatus";
paramWhere.deliveryStatus = params.deliveryStatus;
}
if (params.payStatus) {
sql += " and tm.payStatus=:payStatus";
paramWhere.payStatus = params.payStatus;
}
if (params.tmName) {
sql += " and tm.tmName like :tmName";
paramWhere.tmName = +"%" + params.tmName.trim() + "%";
}
if (params.name) {
sql += " and c.name like :name";
paramWhere.name = "%" + params.name.trim() + "%";
}
if (params.startTime && params.entTime) {
var startTime = params.startTime.trim() + " 00:00:00";
var entTime = params.entTime + " 23:59:59";
sql += " and o.created_at >=:startTime and o.created_at<=:entTime";
paramWhere.startTime = startTime;
paramWhere.entTime = entTime;
}
sql += " LIMIT " + pageSize + " OFFSET " + from;
var tmpResult = await this.customQuery(sql, paramWhere);
if (!tmpResult || tmpResult.length == 0) {
return system.getResultSuccess(null, "暂无数据");
}
return system.getResultSuccess(tmpResult);
}
/**
* 商标交付信息
* @param {*} params 格式:{deliveryOrderNo:XX}
*/
async getTmOrder(params) {//商标交付信息
var deliveryOrderNo = params.deliveryOrderNo;
var item = await this.ordertmproductDao.getTmItemByDeliveryOrderNo(deliveryOrderNo);
if (!item) {
return system.getResultSuccess(null, "暂无数据");
}
var resultData = {
tm: {
itemCode: item.itemCode,
itemName: item.itemName,
tmName: item.tmName,
picUrl: item.picUrl,
colorizedPicUrl: item.colorizedPicUrl,
tmType: item.tmType,
tmFormType: item.tmFormType,
nclOneCodes: item.nclOneCodes,
gzwtsUrl: item.gzwtsUrl,
smwjUrl: item.smwjUrl,
deliveryStatus: item.deliveryStatus,
notes: item.notes
}, orderFlow: [], receiptVoucher: []
};
var flowList = await this.orderflowDao.getListBySourceOrderNo(deliveryOrderNo);
if (flowList && flowList.length > 0) {
for (let index = 0; index < flowList.length; index++) {
const element = flowList[index];
if (element) {
resultData.orderFlow.push({
opContent: element.opContent,
createDate: element.created_at
});
}
}
}
var rItem = await this.receiptvoucherDao.getItemSourceOrderNo(item.sourceOrderNo);
if (rItem && rItem.length > 0) {
for (let j = 0; j < flowList.length; j++) {
const rItem = flowList[j];
if (rItem) {
resultData.receiptVoucher.push({
payAccountType: rItem.payAccountType,
payDate: rItem.payDate,
wxPayOrderCode: rItem.wxPayOrderCode,
aliPayOrderCode: rItem.aliPayOrderCode,
busPayOrderCode: rItem.busPayOrderCode,
certifyFileUrl: rItem.certifyFileUrl,
totalSum: rItem.totalSum
});
}
}
}
return system.getResultSuccess(resultData);
}
/**
* 商标订单-申请信息
* @param {*} params 格式:{deliveryOrderNo:XX}
*/
async getTmApply(params) {//商标订单-申请信息
var deliveryOrderNo = params.deliveryOrderNo;
var item = await this.customerinfoDao.findOneByDeliveryOrderNo(deliveryOrderNo);
if (!item) {
return system.getResultSuccess(null, "暂无数据");
}
var resultData = {
applyAddr: item.applyAddr,
applyArea: item.applyArea,
businessLicensePic: item.businessLicensePic,
businessLicensePdf: item.businessLicensePdf,
code: item.code,
customerType: item.customerType,
identityCardNo: item.identityCardNo,
identityCardPic: item.identityCardPic,
identityCardPdf: item.identityCardPdf,
name: item.name,
zipCode: item.zipCode,
notes: item.notes
};
var contactsItem = await this.customercontactsDao.findOneByCustomerinfoId(item.id);
if (contactsItem) {
resultData.contacts = contactsItem.name;
resultData.mobile = contactsItem.mobile;
resultData.email = contactsItem.email;
resultData.fax = contactsItem.fax;
}
return system.getResultSuccess(resultData);
}
/**
* 商标订单-商标尼斯信息
* @param {*} params 格式:{deliveryOrderNo:XX}
*/
async getTmNclList(params) {//商标订单-商标尼斯信息
var deliveryOrderNo = params.deliveryOrderNo;
var self = this;
var tmList = await this.trademarkDao.getListByDeliveryOrderNo(deliveryOrderNo);
if (!tmList || tmList.length == 0) {
return system.getResultSuccess(null, "暂无数据");
}
var resultData = [];
for (let index = 0; index < tmList.length; index++) {
const item = tmList[index];
if (item) {
var tm = {
tbCode: item.tbCode,
nclOneCodes: item.nclOneCodes,
nclOneCodesName: item.nclOneCodesName,
nclSmallCodes: item.nclSmallCodes,
officialType: item.officialType,
officialTypeName: item.officialTypeName,
tmRegistNum: item.tmRegistNum,
submitTime: item.submitTime,
tmOfficials: []
};
if (item.tmRegistNum) {
var tmOfficialsList = await self.tmofficialDao.getListByTmRegistNum(item.tmRegistNum);
if (tmOfficialsList && tmOfficialsList.length > 0) {
for (let i = 0; i < tmOfficialsList.length; i++) {
const element = tmOfficialsList[i];
if (element) {
tm.push({
officialType: element.officialType,
officialTypeName: element.officialTypeName,
officialFileUrl: element.officialFileUrl,
createDate: element.created_at
});
}
}
}
}
resultData.push(tm);
}
}
return system.getResultSuccess(resultData);
}
}
module.exports = OrderTmProductService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class PushBusinessService extends ServiceBase {
constructor() {
super("dbpush", ServiceBase.getDaoName(PushBusinessService));
this.pushbusinessDao = system.getObject("db.dbpush.pushbusinessDao");
}
async opFqPushBusiness(pushBusinessSource, reqEnv, action_body) {
var item = await this.pushbusinessDao.getItemByUappKey(action_body.app.uappKey, reqEnv);
if (!item) {
return system.getResult(null, "push_business item is not empty");
}
var body = {
idempotentId: item.pushProductId,// 是 接入方业务产品 ID
productId: item.sveProductId,// 是 产品 ID
idempotentSource: item.sourceCode || "tm_1688",// 是 业务来源(ali、jd)
idempotentSourceName: item.sourceName || "1688应用",// 是 阿里,京东
city: action_body.city || "",// 否 所属城市
phone: action_body.phone || "15010929366",// 是 手机号
userId: action_body.userId || "channelUserIdtest01",// 否 用户 ID
companyName: action_body.companyName || "",// 否 公司名称
orderPrice: action_body.phoneaction_body.orderPrice || 899,// 是 订单金额
productQuantity: action_body.productQuantity || 1,// 是 产品数量
};
if (!body.idempotentId) {
return system.getResult(null, "idempotentId is not empty");
}//接入方业务产品 ID
if (!body.idempotentSource) {
return system.getResult(null, "idempotentSource is not empty");
}//业务来源(ali、jdyun、1688)
if (!body.idempotentSourceName) {
return system.getResult(null, "idempotentSourceName is not empty");
}//业务来源名称 京东云应用、阿里云应用、1688应用
if (!body.phone) {
return system.getResult(null, "phone is not empty");
}//手机号
if (!body.orderPrice) {
return system.getResult(null, "orderPrice is not empty");
}//订单金额 double
if (!body.productId) {
return system.getResult(null, "productId is not empty");
}//订单金额 string
if (!body.productQuantity) {
return system.getResult(null, "productQuantity is not empty");
}//产品数量 int
// city、companyName
var aliGateway = system.getObject("util.aliyunClient");
var result = await aliGateway.post(item.aliAppkey, item.aliSecret, item.pushSveUrl, body);
return result;
// if (reqEnv == "fqdev") {
// aliGateway=system.getObject("util.aliyunFqDevClient");
// }
// else if (reqEnv == "fqProd") {
// aliGateway=system.getObject("util.aliyunFqProdClient");
// }
}
}
module.exports = PushBusinessService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class TmOfficialService extends ServiceBase {
constructor() {
super("dbtrademark", ServiceBase.getDaoName(TmOfficialService));
}
}
module.exports=TmOfficialService;
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;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
class TradeMarkService extends ServiceBase {
constructor() {
super("dbtrademark", ServiceBase.getDaoName(TradeMarkService));
this.ordertmproductSve = system.getObject("service.dborder.ordertmproductSve");
}
/**
* 修改商标信息 (订单详情页面使用)
* @param {*} obj
* obj.deliveryOrderNo 交付订单号,
* obj.tmName 商标名称,
* obj.tmFormType 商标类型,
* obj.notes 商标说明,
* obj.picUrl 商标图样,
* obj.colorizedPicUrl 商标彩色图样,
* obj.user 用户数据
*/
async updateTmInfo(obj){
var user = obj.user;
if(!user || !user.id){
return system.getResultFail(-100, "未知用户");
}
var deliveryOrderNo = obj.deliveryOrderNo;
if(!deliveryOrderNo){
return system.getResultFail(-101, "deliveryOrderNo参数错误");
}
// 1.获取交付单信息
var ordertmproduct = await this.ordertmproductSve.dao.model.findOne({
where:{deliveryOrderNo:deliveryOrderNo},
raw:true
});
if(!ordertmproduct || !ordertmproduct.id){
return system.getResultFail(-102, "商标交付单不存在");
}
// 2.获取交付单状态,判断是否可修改
if(ordertmproduct.deliveryStatus=='ddj' || ordertmproduct.deliveryStatus=='ywc'){
var deliveryStatusName = "待递交";
if(ordertmproduct.deliveryStatus=='ywc'){
deliveryStatusName="已完成";
}
return system.getResultFail(-103, "该商标交付单状态为"+deliveryStatusName+",不能进行修改");
}
var self = this;
return await self.db.transaction(async function (t) {
var otpObj={
id:ordertmproduct.id,
deliveryOrderNo:deliveryOrderNo,
updateuser_id:user.id,
updateuser:user.nickname
};
if(obj.picUrl){//商标图样 黑白
otpObj["picUrl"]=obj.picUrl;
}
if(obj.colorizedPicUrl){//彩色商标图样
otpObj["colorizedPicUrl"]=obj.colorizedPicUrl;
}
if(obj.tmName){//商标名称
otpObj["tmName"]=obj.tmName;
}
if(obj.tmFormType){//商标类型
otpObj["tmFormType"]=obj.tmFormType;
}
if(obj.notes){//商标说明
otpObj["notes"]=obj.notes;
}
await self.ordertmproductSve.dao.update(otpObj,t);//商标交付单 修改商标图样
return system.getResultSuccess();
})
}
/**
* 修改商标尼斯信息 (订单详情页面使用)
* @param {*} obj
* obj.tbCode 商标提报号,
* obj.deliveryOrderNo 交付订单号,
* obj.nclOneCodes 商标尼斯大类,
* obj.nclSmallCodes 商标尼斯小类数组
* obj.user 用户数据
*/
async updateNclInfo(obj){
var user = obj.user;
var self = this;
if(!user || !user.id){
return system.getResultFail(-100, "未知用户");
}
var deliveryOrderNo = obj.deliveryOrderNo;
if(!deliveryOrderNo){
return system.getResultFail(-101, "deliveryOrderNo参数错误");
}
// 1.获取交付单信息
var ordertmproduct = await this.ordertmproductSve.dao.model.findOne({
where:{deliveryOrderNo:deliveryOrderNo},
raw:true
});
if(!ordertmproduct || !ordertmproduct.id){
return system.getResultFail(-102, "商标交付单不存在");
}
// 2.获取交付单状态,判断是否可修改
if(ordertmproduct.deliveryStatus=='ddj' || ordertmproduct.deliveryStatus=='ywc'){
var deliveryStatusName = "待递交";
if(ordertmproduct.deliveryStatus=='ywc'){
deliveryStatusName="已完成";
}
return system.getResultFail(-103, "该商标交付单状态为"+deliveryStatusName+",不能进行修改");
}
var tbCode = obj.tbCode;
if(!tbCode){
return system.getResultFail(-104, "tbCode参数错误");
}
//获取商标尼斯信息
var tm = await this.dao.model.findOne({
where:{tbCode:tbCode},
raw:true
});
if(!tm || !tm.id){
return system.getResultFail(-105, "尼斯信息不存在");
}
//获取交付单下其它商标尼斯信息
var othertm = await this.dao.model.findAll({
where:{
deliveryOrderNo:deliveryOrderNo,
tbCode: { [self.db.Op.ne]: tbCode }
},
raw:true
});
if(!obj.nclOneCodes){
return system.getResultFail(-106, "nclOneCodes参数错误");
}
if(!obj.nclSmallCodes || obj.nclSmallCodes.length<1){
return system.getResultFail(-107, "nclSmallCodes参数错误");
}
if(obj.nclSmallCodes.length>10){
return system.getResultFail(-108, "尼斯小类不能超过10项");
}
var nclOneCodes2 = obj.nclOneCodes;
for(var i=0;i<othertm.length;i++){//判断重复大类
var other = othertm[i];
if(other.nclOneCodes==obj.nclOneCodes){
return system.getResultFail(-109, "该商标存在重复的尼斯大类");
}else{
nclOneCodes2=nclOneCodes2+","+other.nclOneCodes;
}
}
return await self.db.transaction(async function (t) {
var tmObj={
id:tm.id,
nclOneCodes:obj.nclOneCodes,
nclSmallCodes: JSON.stringify(obj.nclSmallCodes),
updateuser_id:user.id,
updateuser:user.nickname
};
await self.dao.update(tmObj,t);//修改商标尼斯信息
var otpObj={
id:ordertmproduct.id,
nclOneCodes:nclOneCodes2,
updateuser_id:user.id,
updateuser:user.nickname
};
await self.ordertmproductSve.dao.update(otpObj,t);//商标交付单 修改大类列表
return system.getResultSuccess();
})
}
}
module.exports=TradeMarkService;
......@@ -6,7 +6,7 @@ var settings={
db:10,
},
database:{
dbname : "igirl_zcapi",
dbname : "igirl_channel",
user: "write",
password: "write",
config: {
......
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