Commit dc4afa22 by 钟占达

notifyServiceStatusChange

parents 75c160a2 444217d3
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
...@@ -7,8 +7,8 @@ class AppAPI extends APIBase { ...@@ -7,8 +7,8 @@ class AppAPI extends APIBase {
this.appS = system.getObject("service.common.appSve"); this.appS = system.getObject("service.common.appSve");
} }
async create(pobj,q,req){ async create(pobj,q,req){
// console.log("oooooooooooooooooooooooooooooooooooooooooooooooo") console.log("oooooooooooooooooooooooooooooooooooooooooooooooo")
// console.log(req.xctx) console.log(req.xctx)
let rtn=this.appS.create(pobj,q,req); let rtn=this.appS.create(pobj,q,req);
return system.getResult(rtn); return system.getResult(rtn);
} }
......
...@@ -5,6 +5,7 @@ var settings = require("../../../../config/settings"); ...@@ -5,6 +5,7 @@ var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base"); const CtlBase = require("../../ctl.base");
const moment = require('moment'); const moment = require('moment');
const appconfig = system.getSysConfig(); const appconfig = system.getSysConfig();
const sha235 = require("sha256");
class BizOptCtl extends CtlBase { class BizOptCtl extends CtlBase {
constructor() { constructor() {
super("bizchance", CtlBase.getServiceName(BizOptCtl)); super("bizchance", CtlBase.getServiceName(BizOptCtl));
...@@ -12,7 +13,7 @@ class BizOptCtl extends CtlBase { ...@@ -12,7 +13,7 @@ class BizOptCtl extends CtlBase {
this.schemeSve = system.getObject("service.bizchance.fitaxschemeSve"); //财税-方案信息 this.schemeSve = system.getObject("service.bizchance.fitaxschemeSve"); //财税-方案信息
this.fitaxcompanySve = system.getObject("service.bizchance.fitaxcompanySve"); //财税-企业信息 this.fitaxcompanySve = system.getObject("service.bizchance.fitaxcompanySve"); //财税-企业信息
this.operationrecordSve = system.getObject("service.bizchance.operationrecordSve"); //财税-需求分配记录 this.operationrecordSve = system.getObject("service.bizchance.operationrecordSve"); //财税-需求分配记录
this.deliverbillSve = system.getObject("service.bizchance.deliverybillSve");//财税-需求分配 this.deliverbillSve = system.getObject("service.bizchance.deliverybillSve"); //财税-需求分配
this.logService = system.getObject("service.bizchance.statuslogSve"); this.logService = system.getObject("service.bizchance.statuslogSve");
this.shisService = system.getObject("service.bizchance.salesmanhisSve"); this.shisService = system.getObject("service.bizchance.salesmanhisSve");
this.receiveUrl = settings.receiveUrl(); this.receiveUrl = settings.receiveUrl();
...@@ -122,7 +123,7 @@ class BizOptCtl extends CtlBase { ...@@ -122,7 +123,7 @@ class BizOptCtl extends CtlBase {
//根据需求编号去更新该条需求的状态为已关闭 //根据需求编号去更新该条需求的状态为已关闭
try { try {
let res = await this.service.updateStatusByDemandCode(pobj); let res = await this.service.updateStatusByDemandCode(pobj);
//TODO 同步该需求关闭信息到其他系统 //TODO 同步该需求关闭信息到其他系统(走队列,直接扔到队列里面)
//添加到记录表 //添加到记录表
pobj.operator = { pobj.operator = {
...@@ -340,17 +341,31 @@ class BizOptCtl extends CtlBase { ...@@ -340,17 +341,31 @@ class BizOptCtl extends CtlBase {
/*插入数据信息 */ /*插入数据信息 */
async insertInfo(nobj, qobj, req) { async insertInfo(nobj, qobj, req) {
var pobj = nobj.d; var pobj = nobj.actionBody.messageBody;
if (pobj.businessMode && pobj.businessMode != 'undefined' && pobj.businessType && pobj.businessType != 'undefined') { if (pobj.intentionBizId && pobj.intentionBizId != 'undefined') {
try { try {
//pobj.currentStatus = "beforeSubmission";//加上当前状态为待提交方案 var  cachestr  =  sha235(JSON.stringify(nobj));      
// pobj.channelSource = "tencentCloud";//目前渠道只有腾讯 var  cacheInfo  =  await  this.cacheManager["TxCache"].getCache(cachestr); 
// pobj.sourceNumber = "1111111"; if  (cacheInfo  &&  cacheInfo  !=  'undefined')  {        
// pobj.businessType = appconfig.pdict.dyDict[pobj.businessType]; return  {          
var buInfo = await this.service.insertInfo(pobj); "status":  1,
  //1代表成功,否则失败
"msg": "已处理成功!",
"data": cachestr ,
"requestId": nobj.requestId
}      
} else {
pobj.businessStatus = 'received';
pobj.sourceNumber = 'tx';
pobj.facilitatorId = '10';
pobj.facilitatorName = '公司宝';
pobj.sourceName = 'tencentCloud';
//插入操作
var buInfo = await this.service.insertInfo(pobj);
if (buInfo) {
await this.cacheManager["TxCache"].cache(cachestr, JSON.stringify({ cachestr: cachestr }), 180);
//日志
var logInfo = { var logInfo = {
"flowType": "BIZ", "flowType": "BIZ",
"flowId": buInfo.id, "flowId": buInfo.id,
...@@ -362,15 +377,20 @@ class BizOptCtl extends CtlBase { ...@@ -362,15 +377,20 @@ class BizOptCtl extends CtlBase {
return { return {
"status": 1, //1代表成功,否则失败 "status": 1, //1代表成功,否则失败
"message": "操作成功", "message": "操作成功",
"data": "", "data": buInfo,
"requestId": "" "requestId": nobj.requestId
}; };
}
}
} catch (error) { } catch (error) {
//异常处理
console.log("TTTTTTTTTTTTTTTTTTTTTTT"); console.log("TTTTTTTTTTTTTTTTTTTTTTT");
console.log(error); console.log(error);
return system.getResultError(error); return system.getResultError(error);
} }
} else { } else {
//字段错误处理
return system.getResultError("参数错误!"); return system.getResultError("参数错误!");
} }
} }
...@@ -381,16 +401,16 @@ class BizOptCtl extends CtlBase { ...@@ -381,16 +401,16 @@ class BizOptCtl extends CtlBase {
return localTime; return localTime;
} }
//根据bizId查询商机表中的所有信息 //根据bizId查询商机表中的所有信息
async getInfo(pobj,qobj,req){ async getInfo(pobj, qobj, req) {
try{ try {
if(!pobj.bizId){ if (!pobj.bizId) {
throw new Error("bizId 不能为空"); throw new Error("bizId 不能为空");
} }
const rs=await this.service.getInfo(pobj); const rs = await this.service.getInfo(pobj);
//console.log("got message"); //console.log("got message");
return system.getResult(rs); return system.getResult(rs);
}catch(err){ } catch (err) {
return system.getResult(null,err.message) return system.getResult(null, err.message)
} }
} }
} }
......
var system = require("../../../system"); var system = require("../../../system");
const http = require("http"); const http = require("http");
const querystring = require('querystring'); const querystring = require('querystring');
const sha235 = require("sha256");
var settings = require("../../../../config/settings"); var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base"); const CtlBase = require("../../ctl.base");
const moment = require('moment'); const moment = require('moment');
...@@ -12,10 +13,15 @@ class DeliverybillCtl extends CtlBase { ...@@ -12,10 +13,15 @@ class DeliverybillCtl extends CtlBase {
constructor() { constructor() {
super("bizchance", CtlBase.getServiceName(DeliverybillCtl)); super("bizchance", CtlBase.getServiceName(DeliverybillCtl));
this.logService = system.getObject("service.bizchance.statuslogSve"); this.logService = system.getObject("service.bizchance.statuslogSve");
<<<<<<< HEAD
// this.icUrl = setting.icUrl() + "/web/bizchance"; // this.icUrl = setting.icUrl() + "/web/bizchance";
this.userService = system.getObject("service.auth.userService"); this.userService = system.getObject("service.auth.userService");
this.msgService = system.getObject("service.msg.msgSve"); this.msgService = system.getObject("service.msg.msgSve");
this.cacheManager = system.getObject("db.common.cacheManager"); this.cacheManager = system.getObject("db.common.cacheManager");
=======
this.cacheManager = system.getObject("db.common.cacheManager");
this.fitaxschemeService = system.getObject("service.bizchance.fitaxschemeSve");
>>>>>>> 444217d31a9c45ccb0a1dea9f50b3197ab480970
} }
/** /**
...@@ -147,80 +153,146 @@ class DeliverybillCtl extends CtlBase { ...@@ -147,80 +153,146 @@ class DeliverybillCtl extends CtlBase {
} }
} }
// 创建服务实例 // 创建融易算服务实例
async insertInfo(pobj, qobj, req) { async insertInfo(mobj, qobj, req) {
// 检验各项必传参数 console.log('mobj--------------------------------',mobj);
if (pobj.requestId && pobj.requestId != 'undefined' &&
pobj.bizId && pobj.bizId != 'undefined' &&
pobj.contactsPhone && pobj.contactsPhone != 'undefined' &&
pobj.userId && pobj.userId != 'undefined' &&
pobj.orderId && pobj.orderId != 'undefined' &&
pobj.areaType && pobj.areaType != 'undefined' &&
pobj.area && pobj.area != 'undefined' &&
pobj.topOrgCode && pobj.topOrgCode != 'undefined' &&
pobj.taxpayerType && pobj.taxpayerType != 'undefined' &&
pobj.product_code && pobj.product_code != 'undefined' &&
pobj.product_name && pobj.product_name != 'undefined' &&
pobj.service_address && pobj.service_address != 'undefined' &&
pobj.delivery_status && pobj.delivery_status != 'undefined' &&
pobj.facilitator_id && pobj.facilitator_id != 'undefined') {
try { try {
var buInfo = await this.service.insertInfo(pobj); var pobj = mobj.actionBody;
return system.getResult(buInfo); var cachestr = sha235(JSON.stringify(pobj));
} catch (error) { var cacheInfo = await this.cacheManager["TxCache"].getCache(cachestr);
return system.getResultError(error); if (cacheInfo && cacheInfo != 'undefined') {
return {
"status": 1, //1代表成功,否则失败
"msg": "已处理成功!",
"data": "",
"requestId": ""
}
}
else {
var obj = {};
obj.delivery_code = pobj.orderId + "_book";
obj.source_number = "tx";
if (pobj.solutionBizId) {
obj.scheme_number = pobj.solutionBizId;
var scheme = await this.fitaxschemeService.findInfoByBizid({ "bizId": pobj.solutionBizId });
if (scheme) {
pobj.demand_code = scheme.demand_code;
}
}
obj.product_code = "bookkeeping";
obj.product_name = "代帐服务";
obj.service_address = pobj.area;
obj.delivery_status = "received";
obj.facilitator_id = "10";
obj.facilitator_name = "公司宝";
obj.source_name = "tencentCloud";
pobj.contactsPhone = pobj.contactMobile;
delete pobj.contactMobile;
if (pobj.taxpayerType == 1) {
pobj.taxpayerType = "generalTaxpayer";
pobj.taxpayerName = "一般纳税人";
}
else if (pobj.taxpayerType == 2) {
pobj.taxpayerType = "smallScaleTaxpayer";
pobj.taxpayerName = "小规模纳税人";
}
obj.delivery_info = pobj;
obj.biz_id = pobj.bizId;
var buInfo = await this.service.insertInfo(obj);
if (buInfo) {
await this.cacheManager["TxCache"].cache(cachestr, JSON.stringify({ cachestr: cachestr }), 180);//插入redis缓存
return {
"status": 1, //1代表成功,否则失败
"msg": "处理成功!",
"data": buInfo,
"requestId": ""
}
}
else {
return system.getResultFail(buInfo);
} }
} else { }
return system.getResultError("参数错误!"); }
catch (err) {
return system.getResult(null, err.message)
} }
} }
async updateServer(pobj, qobj, req) { //更新融易算服务实例
async updateServer(mobj, qobj, req) {
try { try {
if (!pobj.requestId || pobj.requestId == 'undefined') { var pobj = mobj.actionBody;
throw new Error("requestId 不能为空"); var cachestr = sha235(JSON.stringify(pobj));
} var cacheInfo = await this.cacheManager["TxCache"].getCache(cachestr);
if (!pobj.bizId || pobj.bizId == 'undefined') { if (cacheInfo && cacheInfo != 'undefined') {
throw new Error("bizId 不能为空"); return {
"status": 1, //1代表成功,否则失败
"msg": "已处理成功!",
"data": "",
"requestId": ""
} }
if (!pobj.orderId || pobj.orderId == 'undefined') { } else {
throw new Error("orderId 不能为空"); if (pobj.contactMobile && pobj.contactMobile != 'undefined') {
pobj.contactsPhone = pobj.contactMobile;
delete pobj.contactMobile;
}
pobj.contactsName = pobj.contactName;
delete pobj.contactName;
pobj.companyType = pobj.companyBizType;
delete pobj.companyBizType;
pobj.creditCode = pobj.uscc;
delete pobj.uscc;
if (pobj.taxpayerType == 1) {
pobj.taxpayerType = "generalTaxpayer";
pobj.taxpayerName = "一般纳税人";
} }
if (!pobj.topOrgCode || pobj.topOrgCode == 'undefined') { else if (pobj.taxpayerType == 2) {
throw new Error("topOrgCode 不能为空"); pobj.taxpayerType = "smallScaleTaxpayer";
pobj.taxpayerName = "小规模纳税人";
} }
if (!pobj.companyName || pobj.companyName == 'undefined') { obj = {
throw new Error("companyName 不能为空"); "delivery_code": pobj.orderId + "_book",
"delivery_info": pobj,
"biz_id": pobj.bizId
};
const rs = await this.service.updateServer(obj);
if (rs) {
await this.cacheManager["TxCache"].cache(cachestr, JSON.stringify({ cachestr: cachestr }), 180);//插入redis缓存
return {
"status": 1, //1代表成功,否则失败
"msg": "处理成功!",
"data": rs,
"requestId": ""
} }
if (!pobj.contactName || pobj.contactName == 'undefined') { } else {
throw new Error("contactName 不能为空"); return system.getResultFail(rs);
} }
if (!pobj.companyBizType || pobj.companyBizType == 'undefined') {
throw new Error("companyBizType 不能为空");
} }
if (!pobj.uscc || pobj.uscc == 'undefined') {
throw new Error("uscc 不能为空");
} }
const rs = await this.service.updateServer(pobj); catch (err) {
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message) return system.getResult(null, err.message)
} }
} }
//根据bizId查询deliverybill表中的所有信息 //根据bizId查询deliverybill表中的所有信息
async getInfo(pobj,qobj,req){ async getInfo(pobj, qobj, req) {
try{ try {
if(!pobj.bizId){ if (!pobj.bizId) {
throw new Error("bizId 不能为空"); throw new Error("bizId 不能为空");
} }
const rs=await this.service.getInfo(pobj); const rs = await this.service.getInfo(pobj);
//console.log("got message"); //console.log("got message");
return system.getResult(rs); return system.getResult(rs);
}catch(err){ } catch (err) {
return system.getResult(null,err.message) return system.getResult(null, err.message)
} }
} }
<<<<<<< HEAD
async notifyServiceStatusChange (pobj, qobj, req) { async notifyServiceStatusChange (pobj, qobj, req) {
let ab = pobj.actionBody; let ab = pobj.actionBody;
...@@ -297,10 +369,16 @@ class DeliverybillCtl extends CtlBase { ...@@ -297,10 +369,16 @@ class DeliverybillCtl extends CtlBase {
} }
=======
async portog(){
console.log(settings.port);
}
>>>>>>> 444217d31a9c45ccb0a1dea9f50b3197ab480970
} }
module.exports = DeliverybillCtl; module.exports = DeliverybillCtl;
var task = new DeliverybillCtl(); var task = new DeliverybillCtl();
<<<<<<< HEAD
var obj={ var obj={
"requestId":"1111111", "requestId":"1111111",
"bizId": 2592748677, "bizId": 2592748677,
...@@ -324,3 +402,50 @@ task.notifyServiceStatusChange({actionBody: obj},{},{}).then(d=>{ ...@@ -324,3 +402,50 @@ task.notifyServiceStatusChange({actionBody: obj},{},{}).then(d=>{
// var d = await task.deliverInfo(obj,{},{}) // var d = await task.deliverInfo(obj,{},{})
// console.log("dddddd---------" + JSON.stringify(d)); // console.log("dddddd---------" + JSON.stringify(d));
// })() // })()
=======
var obj = {
"actionType": "produceData",
"actionBody": {
"pushUrl": "http://ic.com:8000/web/bizchance/deliverybillCtl",
"actionType": "insertInfo",
"identifyCode": "book-manage",
"messageBody": {
"requestId": "825da0a74432-738f-4bed-468d-d51aa880",
"bizId": "2292748809",
"userId": "24173452443103825",
"orderId": "235184456620496",
"areatype": "city",
"area": "100010",
"topOrgCode": "rong_yi_suan",
"taxpayerType": 1,
"contactMobile": "18510669321"
}
}
}
task.portog().then(d => {
console.log(JSON.stringify(d));
})
// var obj = {
// "actionType": "produceData",
// "actionBody": {
// "pushUrl": "http://ic.com:8000/web/bizchance/deliverybillCtl",
// "actionType": "insertInfo",
// "identifyCode": "book-manage",
// "messageBody": {
// "requestId": "825da0a74432-738f-4bed-468d-d51aa880",
// "bizId": "2292748809",
// "orderId": "235184456620496",
// "companyName": "北京融易算",
// "contactName": "JAMES7",
// "taxpayerType": 5,
// "contactMobile": "18510669367",
// "companyBizType": 1,
// "uscc": "911101053516460817K"
// }
// }
// }
// task.updateServer(obj, {}, {}).then(d => {
// console.log(JSON.stringify(d));
// })
>>>>>>> 444217d31a9c45ccb0a1dea9f50b3197ab480970
...@@ -23,6 +23,21 @@ class FitaxschemeCtl extends CtlBase { ...@@ -23,6 +23,21 @@ class FitaxschemeCtl extends CtlBase {
return system.getResultError("fitaxschemeCtl/insertInfo 新建方案出错!"); return system.getResultError("fitaxschemeCtl/insertInfo 新建方案出错!");
} }
} }
async findInfoByBizid(pobj,qobj,req){//方案
try{
if (pobj.bizId){
var res = await this.service.findInfoByBizid(pobj);
return system.getResult(res);
}
else{
return system.getResultError("缺少方案编号");
}
}
catch(error){
return system.getResultError(error);
}
}
} }
module.exports = FitaxschemeCtl; module.exports = FitaxschemeCtl;
......
...@@ -16,7 +16,7 @@ class Dao { ...@@ -16,7 +16,7 @@ class Dao {
var u2 = this.preCreate(u); var u2 = this.preCreate(u);
if (t) { if (t) {
console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
//console.log( this.model); console.log( this.model);
return this.model.create(u2, { transaction: t }).then(u => { return this.model.create(u2, { transaction: t }).then(u => {
return u; return u;
}); });
......
...@@ -5,7 +5,7 @@ class BizoptDao extends Dao { ...@@ -5,7 +5,7 @@ class BizoptDao extends Dao {
super(Dao.getModelName(BizoptDao)); super(Dao.getModelName(BizoptDao));
} }
extraWhere(qobj, qw, qc) {//根据业务员id获取商机信息的组装条件 extraWhere(qobj, qw, qc) { //根据业务员id获取商机信息的组装条件
qc.raw = true; qc.raw = true;
//检查查询的用户所属公司是否是平台运营公司-1,如果是则不需要添加公司查询条件添加公司查询条件, 不添加路径条件,返回所有数据 //检查查询的用户所属公司是否是平台运营公司-1,如果是则不需要添加公司查询条件添加公司查询条件, 不添加路径条件,返回所有数据
if (qobj.company_id == 1) { if (qobj.company_id == 1) {
...@@ -19,15 +19,13 @@ class BizoptDao extends Dao { ...@@ -19,15 +19,13 @@ class BizoptDao extends Dao {
*/ */
if (!qobj.opath) { // 管理员 不做处理 if (!qobj.opath) { // 管理员 不做处理
} else if (qobj.isPrincipal) { // 销售主管 查询为空和自己组织结构下的 } else if (qobj.isPrincipal) { // 销售主管 查询为空和自己组织结构下的
qw["$or"] = [ qw["$or"] = [{
{
salesman_opcode: { salesman_opcode: {
$eq: null $eq: null
} }
}, { }, {
salesman_opcode: { $like: `%${qobj.opath}%` } salesman_opcode: { $like: `%${qobj.opath}%` }
} }]
]
} else { // 销售 查询自己的 } else { // 销售 查询自己的
qw["salesman_opcode"] = { $like: `%${qobj.opath}%` } qw["salesman_opcode"] = { $like: `%${qobj.opath}%` }
} }
...@@ -38,12 +36,12 @@ class BizoptDao extends Dao { ...@@ -38,12 +36,12 @@ class BizoptDao extends Dao {
[this.db.Op.eq]: "bookkeeping" [this.db.Op.eq]: "bookkeeping"
} }
if (qobj.bizpath && qobj.bizpath != "") { if (qobj.bizpath && qobj.bizpath != "") {
if (qobj.bizpath.indexOf("demandAllocation") > 0) {//从需求分配列表过来的 if (qobj.bizpath.indexOf("demandAllocation") > 0) { //从需求分配列表过来的
qw["business_status"] = { qw["business_status"] = {
[this.db.Op.eq]: "received" [this.db.Op.eq]: "received"
}; };
} }
if (qobj.bizpath.indexOf("demandfollow") > 0 || qobj.bizpath.indexOf("distributionManagement") > 0) {//从需求跟进列表或分配记录列表过来的 if (qobj.bizpath.indexOf("demandfollow") > 0 || qobj.bizpath.indexOf("distributionManagement") > 0) { //从需求跟进列表或分配记录列表过来的
qw["business_status"] = { qw["business_status"] = {
[this.db.Op.ne]: "received" [this.db.Op.ne]: "received"
}; };
...@@ -101,13 +99,13 @@ class BizoptDao extends Dao { ...@@ -101,13 +99,13 @@ class BizoptDao extends Dao {
/*插入商机信息*/ /*插入商机信息*/
async insertInfo(qobj, t) { async insertInfo(qobj, t) {
var obj = { var obj = {
"demand_code": qobj.businessMode, "demand_code": qobj.intentionBizId,
"business_type": qobj.businessType, "business_type": qobj.type,
"business_status": qobj.bussinessStatus, "business_status": qobj.bussinessStatus,
"business_info": {}, "business_info": {},
"source_number": qobj.sourceNumber, "source_number": qobj.sourceNumber,
"service_address": qobj.serviceAddress, "service_address": qobj.area,
"facilitator_id": qobj.favilitatorID, "facilitator_id": qobj.favilitatorId,
"facilitator_name": qobj.favilitatorName, "facilitator_name": qobj.favilitatorName,
"source_name": qobj.sourceName, "source_name": qobj.sourceName,
}; };
...@@ -115,19 +113,12 @@ class BizoptDao extends Dao { ...@@ -115,19 +113,12 @@ class BizoptDao extends Dao {
if (qobj.topOrgCode && qobj.topOrgCode != 'undefined') { if (qobj.topOrgCode && qobj.topOrgCode != 'undefined') {
obj.business_info.topOrgCode = qobj.topOrgCode obj.business_info.topOrgCode = qobj.topOrgCode
} }
if (qobj.intentionBizId && qobj.intentionBizId != 'undefined') { if (qobj.requestId && qobj.requestId != 'undefined') {
obj.business_info.intentionBizId = qobj.intentionBizId; obj.business_info.requestId = qobj.requestId;
}
if (qobj.contactsPhone && qobj.contactsPhone != 'undefined') {
obj.business_info.contactsPhone = qobj.contactsPhone; //已经加密
} }
if (qobj.contactsName && qobj.contactsName != 'undefined') { if (qobj.mobile && qobj.mobile != 'undefined') {
obj.business_info.contactsName = qobj.contactsName; obj.business_info.contactsPhone = qobj.mobile; //已经加密
} }
if (qobj.serviceName && qobj.serviceName != 'undefined') {
obj.business_info.serviceName = qobj.serviceName;
}
//bussiness_info END //bussiness_info END
//other //other
if (qobj.closeReason && qobj.closeReason != 'undefined') { if (qobj.closeReason && qobj.closeReason != 'undefined') {
...@@ -152,9 +143,9 @@ class BizoptDao extends Dao { ...@@ -152,9 +143,9 @@ class BizoptDao extends Dao {
/** /**
* 根据服务实例id查找服务所有信息 * 根据服务实例id查找服务所有信息
*/ */
async findByBizId(pobj){ async findByBizId(pobj) {
var oid=pobj.bizId; var oid = pobj.bizId;
return await this.findOne({biz_id:oid}); return await this.findOne({ biz_id: oid });
} }
} }
......
...@@ -40,7 +40,7 @@ class DeliverybillDao extends Dao { ...@@ -40,7 +40,7 @@ class DeliverybillDao extends Dao {
}) })
// 根据 页面 过滤 交付状态 // 根据 页面 过滤 交付状态
switch (qobj.bizpath) { switch (qobj.bizpath) {
case "/configManageMent/deliveryRecord": // 交付单记录 case "/deliveryManage/deliveryRecord": // 交付单记录
filters.push({ filters.push({
delivery_status: { delivery_status: {
$in: [ $in: [
...@@ -49,7 +49,7 @@ class DeliverybillDao extends Dao { ...@@ -49,7 +49,7 @@ class DeliverybillDao extends Dao {
} }
}); });
break break
case "/configManageMent/deliveryManage": //交付单处理 case "/deliveryManage/deliveryDealWith": //交付单处理
filters.push({ filters.push({
delivery_status: { delivery_status: {
$in: [ $in: [
...@@ -90,139 +90,60 @@ class DeliverybillDao extends Dao { ...@@ -90,139 +90,60 @@ class DeliverybillDao extends Dao {
delete qc.where.deliveryNumber; delete qc.where.deliveryNumber;
} }
if (qc.where.deliveryStatus) {
filters.push({
delivery_status: qc.where.deliveryStatus
});
delete qc.where.deliveryStatus;
}
if (qc.where.setupStatus) {
if (qobj && qobj.search && qobj.search.setupStatus && qobj.search.setupStatus === system.SERVERSESTATUS.SETUP) {
filters.push({
v_setup_status: qc.where.setupStatus
});
} else {
filters.push({
$or: [
{
v_setup_status: qc.where.setupStatus
},
{
v_setup_status: {
$eq: null
}
}
]
});
}
delete qc.where.setupStatus;
}
qc.where["$and"] = filters; qc.where["$and"] = filters;
return qw; return qw;
} }
async insertInfo(qobj, t) { async insertInfo(qobj, t) {
var obj = { return await this.create(qobj, t);
"delivery_code": qobj.orderId,
"product_code": qobj.product_code,
"product_name": qobj.product_name,
"service_address": qobj.service_address,
"delivery_status": qobj.delivery_status,
"facilitator_id": qobj.facilitator_id,
"biz_id": qobj.bizId
};
// source_number
if (qobj.source_number && qobj.source_number != 'undefined') {
obj.source_number = qobj.source_number;
delete qobj.source_number;
}
// demand_code
if (qobj.demand_code && qobj.demand_code != 'undefined') {
obj.demand_code = qobj.demand_code;
delete qobj.demand_code;
}
// sku_code
if (qobj.sku_code && qobj.sku_code != 'undefined') {
obj.sku_code = qobj.sku_code;
delete qobj.sku_code;
}
// scheme_number
if (qobj.solutionBizId && qobj.solutionBizId != 'undefined') {
obj.scheme_number = qobj.solutionBizId;
delete qobj.solutionBizId;
}
// selling_price
if (qobj.selling_price && qobj.selling_price != 'undefined') {
obj.selling_price = qobj.selling_price;
delete qobj.selling_price;
}
// cost_price
if (qobj.cost_price && qobj.cost_price != 'undefined') {
obj.cost_price = qobj.cost_price;
delete qobj.cost_price;
}
// close_reason
if (qobj.close_reason && qobj.close_reason != 'undefined') {
obj.close_reason = qobj.close_reason;
delete qobj.close_reason;
}
// facilitator_name
if (qobj.facilitator_name && qobj.facilitator_name != 'undefined') {
obj.facilitator_name = qobj.facilitator_name;
delete qobj.facilitator_name;
}
// salesman_opcode
if (qobj.salesman_opcode && qobj.salesman_opcode != 'undefined') {
obj.salesman_opcode = qobj.salesman_opcode;
delete qobj.salesman_opcode;
}
// salesman_id
if (qobj.salesman_id && qobj.salesman_id != 'undefined') {
obj.salesman_id = qobj.salesman_id;
delete qobj.salesman_id;
}
// salesman_name
if (qobj.salesman_name && qobj.salesman_name != 'undefined') {
obj.salesman_name = qobj.salesman_name;
delete qobj.salesman_name;
}
// salesman_phone
if (qobj.salesman_phone && qobj.salesman_phone != 'undefined') {
obj.salesman_phone = qobj.salesman_phone;
delete qobj.salesman_phone;
}
// source_name
if (qobj.source_name && qobj.source_name != 'undefined') {
obj.source_name = qobj.source_name;
delete qobj.source_name;
}
// master_source_number
if (qobj.master_source_number && qobj.master_source_number != 'undefined') {
obj.master_source_number = qobj.master_source_number;
delete qobj.master_source_number;
}
// settle_status
if (qobj.settle_status && qobj.settle_status != 'undefined') {
obj.settle_status = qobj.settle_status;
delete qobj.settle_status;
}
// settlebill_id
if (qobj.settlebill_id && qobj.settlebill_id != 'undefined') {
obj.settlebill_id = qobj.settlebill_id;
delete qobj.settlebill_id;
}
// delivery_man_id
if (qobj.delivery_man_id && qobj.delivery_man_id != 'undefined') {
obj.delivery_man_id = qobj.delivery_man_id;
delete qobj.delivery_man_id;
}
// delivery_man_name
if (qobj.delivery_man_name && qobj.delivery_man_name != 'undefined') {
obj.delivery_man_name = qobj.delivery_man_name;
delete qobj.delivery_man_name;
}
// delivery_man_opcode
if (qobj.delivery_man_opcode && qobj.delivery_man_opcode != 'undefined') {
obj.delivery_man_opcode = qobj.delivery_man_opcode;
delete qobj.delivery_man_opcode;
}
delete qobj.orderId;
delete qobj.product_code;
delete qobj.product_name;
delete qobj.service_address;
delete qobj.delivery_status;
delete qobj.facilitator_id;
obj.delivery_info = qobj;
return await this.create(obj, t);
} }
async updateServer(qobj, whereobj, t) { async updateServer(qobj, t) {
return await this.updateByWhere(qobj, whereobj, t); var setobj = { "delivery_info": qobj.delivery_info };
var whereobj = { "delivery_code": qobj.delivery_code, "biz_id": qobj.biz_id };
return await this.updateByWhere(setobj, whereobj, t);
} }
async findOneByDeliveryCodeAndBizId(qobj) { async findOneByDeliveryCodeAndBizId(qobj) {
var qcwhere = { "delivery_code": qobj.orderId, "biz_id": qobj.bizId }; var qcwhere = { "delivery_code": qobj.delivery_code, "biz_id": qobj.biz_id };
return await this.findOne(qcwhere); return await this.findOne(qcwhere);
} }
/** /**
* 根据服务实例id查找服务所有信息 * 根据服务实例id查找服务所有信息
*/ */
async findByBizId(pobj){ async findByBizId(pobj) {
var oid=pobj.bizId; var oid = pobj.bizId;
return await this.findOne({biz_id:oid}); return await this.findOne({ biz_id: oid });
} }
} }
module.exports = DeliverybillDao; module.exports = DeliverybillDao;
...@@ -18,6 +18,7 @@ class FitaxschemeDao extends Dao { ...@@ -18,6 +18,7 @@ class FitaxschemeDao extends Dao {
/** /**
* 插入方案信息 * 插入方案信息
* TODO 同步方案信息,获取方案编号(走队列,再写一个接收队列方案编号的方法,将方案编号更新到数据库)
* @param {*} qobj * @param {*} qobj
* @param {*} t * @param {*} t
*/ */
...@@ -67,5 +68,12 @@ class FitaxschemeDao extends Dao { ...@@ -67,5 +68,12 @@ class FitaxschemeDao extends Dao {
} }
return obj; return obj;
} }
async findInfoByBizid(qobj){
let obj = {
"solution_bizid": qobj.bizId
}
return await this.findOne(obj);
}
} }
module.exports = FitaxschemeDao; module.exports = FitaxschemeDao;
...@@ -160,6 +160,33 @@ module.exports = { ...@@ -160,6 +160,33 @@ module.exports = {
"inservice": "已交付", "inservice": "已交付",
"expired": "已到期" "expired": "已到期"
}, },
"bookAreaDict":{//代帐服务地区
"620100":"兰州市" ,
"510100":"成都市" ,
"350100":"福州市" ,
"430100":"长沙市" ,
"130100":"石家庄市" ,
"500100":"重庆市" ,
"330100":"杭州市" ,
"350200":"厦门市" ,
"330300":"温州市" ,
"440100":"广州市" ,
"440300":"深圳市" ,
"410100":"郑州市" ,
"420100":"武汉市" ,
"610100":"西安市" ,
"320100":"南京市" ,
"340100":"合肥市" ,
"330200":"宁波市" ,
"370100":"济南市" ,
"370200":"青岛市" ,
"320500":"苏州市" ,
"120100":"天津市" ,
"210200":"大连市" ,
"520100":"贵阳市" ,
"110100":"北京市" ,
"310100":"上海市" ,
},
"registeredAreaDict": {//注册地区 "registeredAreaDict": {//注册地区
"110100": "北京", "110100": "北京",
......
...@@ -22,6 +22,10 @@ module.exports = (db, DataTypes) => { ...@@ -22,6 +22,10 @@ module.exports = (db, DataTypes) => {
allowNull: true, allowNull: true,
type: DataTypes.STRING type: DataTypes.STRING
}, },
company_name: { // 公司名称-虚拟字段
allowNull: true,
type: DataTypes.STRING
},
v_coname: { // 联系人-虚拟字段 v_coname: { // 联系人-虚拟字段
allowNull: true, allowNull: true,
type: DataTypes.STRING type: DataTypes.STRING
...@@ -30,6 +34,10 @@ module.exports = (db, DataTypes) => { ...@@ -30,6 +34,10 @@ module.exports = (db, DataTypes) => {
allowNull: true, allowNull: true,
type: DataTypes.STRING type: DataTypes.STRING
}, },
v_setup_status: {// 公司名称-建账状态
allowNull: true,
type: DataTypes.STRING
},
demand_code: {// 商机编号 demand_code: {// 商机编号
allowNull: true, allowNull: true,
type: DataTypes.STRING type: DataTypes.STRING
...@@ -62,14 +70,14 @@ module.exports = (db, DataTypes) => { ...@@ -62,14 +70,14 @@ module.exports = (db, DataTypes) => {
allowNull: false, allowNull: false,
type: DataTypes.STRING type: DataTypes.STRING
}, },
master_source_number:{//主订单号 master_source_number: {//主订单号
allowNull: true, allowNull: true,
type: DataTypes.STRING type: DataTypes.STRING
}, },
settle_status: {// 服务单流转状态 settle_status: {// 服务单流转状态
allowNull: false, allowNull: false,
type: DataTypes.STRING, type: DataTypes.STRING,
defaultValue:'waittosettle' defaultValue: 'waittosettle'
}, },
selling_price: {//售价 selling_price: {//售价
allowNull: true, allowNull: true,
......
...@@ -62,6 +62,9 @@ class DeliverybillService extends ServiceBase { ...@@ -62,6 +62,9 @@ class DeliverybillService extends ServiceBase {
if (deliverData.delivery_status !== system.SERVERSESTATUS.INSERVICE) { if (deliverData.delivery_status !== system.SERVERSESTATUS.INSERVICE) {
throw new Error("该状态下不可建账"); throw new Error("该状态下不可建账");
} }
if (deliverData.delivery_info.setupStatus && deliverData.delivery_info.setupStatus === system.SERVERSESTATUS.SETUP) {
throw new Error("已建账");
}
await this.dao.updateByWhere({ await this.dao.updateByWhere({
delivery_info: { delivery_info: {
...delivery_info, ...delivery_info,
...@@ -92,19 +95,19 @@ class DeliverybillService extends ServiceBase { ...@@ -92,19 +95,19 @@ class DeliverybillService extends ServiceBase {
deliveryId: deliverData.id, // id deliveryId: deliverData.id, // id
deliveryNumber: deliverData.delivery_code, // 交付单编号 deliveryNumber: deliverData.delivery_code, // 交付单编号
companyName: deliverData.delivery_info.companyName,// 企业名称 companyName: deliverData.delivery_info.companyName,// 企业名称
uscc: deliverData.delivery_info.uscc, //统一信用代码 uscc: deliverData.delivery_info.creditCode, //统一信用代码
taxpayerType: delivery_info.taxpayerType, //纳税人类型 1 一般;2 小规模 taxpayerType: deliverData.delivery_info.taxpayerType, //纳税人类型 1 一般;2 小规模
//会计准侧 //会计准侧
companyBizType: delivery_info.companyBizType,// 公司类型 1-商贸型;2-服务型;3-特殊行业;4-其他 companyBizType: deliverData.delivery_info.companyBizType,// 公司类型 1-商贸型;2-服务型;3-特殊行业;4-其他
areaType: delivery_info.areaType, //区域类型 city-城市 areaType: deliverData.delivery_info.areaType, //区域类型 city-城市
area: service_address, // 服务 地区 编码 area: deliverData.service_address, // 服务 地区 编码
contactsName: delivery_info.contactsName,// 联系人 contactsName: deliverData.delivery_info.contactsName,// 联系人
contactsPhone: delivery_info.contactsPhone,// 联系电话 contactsPhone: deliverData.delivery_info.contactsPhone,// 联系电话
owner: salesman_name,//所属人 owner: deliverData.salesman_name,//所属人
deliveryStatus: delivery_status, // 交付单状态 deliveryStatus: deliverData.delivery_status, // 交付单状态
setupStatus: delivery_info.setupStatus || System.SERVERSESTATUS.NOTSETUP,//建账状态 notsetup | setup setupStatus: deliverData.delivery_info.setupStatus || System.SERVERSESTATUS.NOTSETUP,//建账状态 notsetup | setup
createdAt: created_at, createdAt: deliverData.created_at,
updatedAt: updated_at, updatedAt: deliverData.updated_at,
} }
if (deliverData.scheme_number) { if (deliverData.scheme_number) {
let schemeData = await this.fitaxschemeDao.findOne({ let schemeData = await this.fitaxschemeDao.findOne({
...@@ -245,180 +248,55 @@ class DeliverybillService extends ServiceBase { ...@@ -245,180 +248,55 @@ class DeliverybillService extends ServiceBase {
async updateServer(qobj) { async updateServer(qobj) {
var self = this; var self = this;
var bill = await self.dao.findOneByDeliveryCodeAndBizId(qobj); var bill = await self.dao.findOneByDeliveryCodeAndBizId(qobj);
var obj = {}; qobj.delivery_info = JSON.parse((JSON.stringify(bill.delivery_info) + JSON.stringify(qobj.delivery_info)).replace(/}{/, ','));
var whereobj = {
"delivery_code": qobj.orderId,
"biz_id": qobj.bizId
};
// source_number
if (qobj.source_number && qobj.source_number != 'undefined') {
obj.source_number = qobj.source_number;
delete qobj.source_number;
}
// demand_code
if (qobj.demand_code && qobj.demand_code != 'undefined') {
obj.demand_code = qobj.demand_code;
delete qobj.demand_code;
}
// sku_code
if (qobj.sku_code && qobj.sku_code != 'undefined') {
obj.sku_code = qobj.sku_code;
delete qobj.sku_code;
}
// scheme_number
if (qobj.solutionBizId && qobj.solutionBizId != 'undefined') {
obj.scheme_number = qobj.solutionBizId;
delete qobj.solutionBizId;
}
// product_code
if (qobj.product_code && qobj.product_code != 'undefined') {
obj.product_code = qobj.product_code;
delete qobj.product_code;
}
// product_name
if (qobj.product_name && qobj.product_name != 'undefined') {
obj.product_name = qobj.product_name;
delete qobj.product_name;
}
// service_address
if (qobj.service_address && qobj.service_address != 'undefined') {
obj.service_address = qobj.service_address;
delete qobj.service_address;
}
// delivery_status
if (qobj.delivery_status && qobj.delivery_status != 'undefined') {
obj.delivery_status = qobj.delivery_status;
delete qobj.delivery_status;
}
// selling_price
if (qobj.selling_price && qobj.selling_price != 'undefined') {
obj.selling_price = qobj.selling_price;
delete qobj.selling_price;
}
// cost_price
if (qobj.cost_price && qobj.cost_price != 'undefined') {
obj.cost_price = qobj.cost_price;
delete qobj.cost_price;
}
// close_reason
if (qobj.close_reason && qobj.close_reason != 'undefined') {
obj.close_reason = qobj.close_reason;
delete qobj.close_reason;
}
// facilitator_id
if (qobj.facilitator_id && qobj.facilitator_id != 'undefined') {
obj.facilitator_id = qobj.facilitator_id;
delete qobj.facilitator_id;
}
// facilitator_name
if (qobj.facilitator_name && qobj.facilitator_name != 'undefined') {
obj.facilitator_name = qobj.facilitator_name;
delete qobj.facilitator_name;
}
// salesman_opcode
if (qobj.salesman_opcode && qobj.salesman_opcode != 'undefined') {
obj.salesman_opcode = qobj.salesman_opcode;
delete qobj.salesman_opcode;
}
// salesman_id
if (qobj.salesman_id && qobj.salesman_id != 'undefined') {
obj.salesman_id = qobj.salesman_id;
delete qobj.salesman_id;
}
// salesman_name
if (qobj.salesman_name && qobj.salesman_name != 'undefined') {
obj.salesman_name = qobj.salesman_name;
delete qobj.salesman_name;
}
// salesman_phone
if (qobj.salesman_phone && qobj.salesman_phone != 'undefined') {
obj.salesman_phone = qobj.salesman_phone;
delete qobj.salesman_phone;
}
// source_name
if (qobj.source_name && qobj.source_name != 'undefined') {
obj.source_name = qobj.source_name;
delete qobj.source_name;
}
// master_source_number
if (qobj.master_source_number && qobj.master_source_number != 'undefined') {
obj.master_source_number = qobj.master_source_number;
delete qobj.master_source_number;
}
// settle_status
if (qobj.settle_status && qobj.settle_status != 'undefined') {
obj.settle_status = qobj.settle_status;
delete qobj.settle_status;
}
// settlebill_id
if (qobj.settlebill_id && qobj.settlebill_id != 'undefined') {
obj.settlebill_id = qobj.settlebill_id;
delete qobj.settlebill_id;
}
// delivery_man_id
if (qobj.delivery_man_id && qobj.delivery_man_id != 'undefined') {
obj.delivery_man_id = qobj.delivery_man_id;
delete qobj.delivery_man_id;
}
// delivery_man_name
if (qobj.delivery_man_name && qobj.delivery_man_name != 'undefined') {
obj.delivery_man_name = qobj.delivery_man_name;
delete qobj.delivery_man_name;
}
// delivery_man_opcode
if (qobj.delivery_man_opcode && qobj.delivery_man_opcode != 'undefined') {
obj.delivery_man_opcode = qobj.delivery_man_opcode;
delete qobj.delivery_man_opcode;
}
delete qobj.orderId;
obj.delivery_info = JSON.parse((JSON.stringify(bill.delivery_info) + JSON.stringify(qobj)).replace(/}{/, ','));
return self.db.transaction(async function (t) { return self.db.transaction(async function (t) {
return await self.dao.updateServer(obj, whereobj, t); return await self.dao.updateServer(qobj, t);
}); });
} }
//根据bizId查询deliverybill表中的所有信息 //根据bizId查询deliverybill表中的所有信息
async getInfo(pobj){ async getInfo(pobj) {
let result={}; let result = {};
let deliveryBillInfo = await this.dao.findByBizId(pobj); let deliveryBillInfo = await this.dao.findByBizId(pobj);
//console.log("gggg"+deliveryBillInfo+pobj.bizId) // console.log("gggg"+deliveryBillInfo+pobj.bizId)
if(!deliveryBillInfo){ if (!deliveryBillInfo) {
throw new Error("没有服务信息"); throw new Error("没有服务信息");
} }
//封装deliverybill表数据 //封装deliverybill表数据
result.deliveryBillInfo={ result.deliveryBillInfo = {
deliveryCode:deliveryBillInfo.delivery_code,//交付单编号 deliveryCode: deliveryBillInfo.delivery_code,//交付单编号
sourceNumber:deliveryBillInfo.source_number,//渠道来源编号 sourceNumber: deliveryBillInfo.source_number,//渠道来源编号
demandCode:deliveryBillInfo.demand_code,//商机编号 demandCode: deliveryBillInfo.demand_code,//商机编号
skuCode:deliveryBillInfo.sku_code,//sku编号 skuCode: deliveryBillInfo.sku_code,//sku编号
schemeNumber:deliveryBillInfo.scheme_number,//方案编号 schemeNumber: deliveryBillInfo.scheme_number,//方案编号
productCode:deliveryBillInfo.product_code,//产品编码 productCode: deliveryBillInfo.product_code,//产品编码
productName:deliveryBillInfo.product_name,//产品名称 productName: deliveryBillInfo.product_name,//产品名称
serviceAddress:deliveryBillInfo.service_address,//服务地区 serviceAddress: deliveryBillInfo.service_address,//服务地区
deliveryInfo:deliveryBillInfo.delivery_info,//交付单详情 deliveryInfo: deliveryBillInfo.delivery_info,//交付单详情
payStatus:deliveryBillInfo.pay_status,//交付状态-虚拟字段 payStatus: deliveryBillInfo.pay_status,//交付状态-虚拟字段
vConame:deliveryBillInfo.v_coname,//联系人-虚拟字段 vConame: deliveryBillInfo.v_coname,//联系人-虚拟字段
vCophone:deliveryBillInfo.v_cophone,//联系电话-虚拟字段 vCophone: deliveryBillInfo.v_cophone,//联系电话-虚拟字段
delivery_status:deliveryBillInfo.delivery_status,//交付单状态 delivery_status: deliveryBillInfo.delivery_status,//交付单状态
sellingPrice:deliveryBillInfo.selling_price,//交付单价格 sellingPrice: deliveryBillInfo.selling_price,//交付单价格
costPrice:deliveryBillInfo.cost_price,//成本价 costPrice: deliveryBillInfo.cost_price,//成本价
closeReason:deliveryBillInfo.close_reason,//状态为关闭原因 closeReason: deliveryBillInfo.close_reason,//状态为关闭原因
facilitatorId:deliveryBillInfo.facilitator_id,//服务商id facilitatorId: deliveryBillInfo.facilitator_id,//服务商id
facilitatorName:deliveryBillInfo.facilitator_name,//服务商名称 facilitatorName: deliveryBillInfo.facilitator_name,//服务商名称
salesmanOpcode:deliveryBillInfo.salesman_opcode,//业务员opcode salesmanOpcode: deliveryBillInfo.salesman_opcode,//业务员opcode
salesmanId:deliveryBillInfo.salesman_id,//业务员id salesmanId: deliveryBillInfo.salesman_id,//业务员id
salesmanName:deliveryBillInfo.salesman_name,//业务员名称 salesmanName: deliveryBillInfo.salesman_name,//业务员名称
salesmanPhone:deliveryBillInfo.salesman_phone,//业务员联系方式 salesmanPhone: deliveryBillInfo.salesman_phone,//业务员联系方式
sourceName:deliveryBillInfo.source_name,//渠道名称 sourceName: deliveryBillInfo.source_name,//渠道名称
createdAt:deliveryBillInfo.created_at,//创建时间 createdAt: deliveryBillInfo.created_at,//创建时间
updatedAt:deliveryBillInfo.updated_at,//更新时间 updatedAt: deliveryBillInfo.updated_at,//更新时间
version:deliveryBillInfo.version,//o version: deliveryBillInfo.version,//o
masterSourceNumber:deliveryBillInfo.master_source_number,//主来源单 masterSourceNumber: deliveryBillInfo.master_source_number,//主来源单
settleStatus:deliveryBillInfo.settle_status,//结算状态 settleStatus: deliveryBillInfo.settle_status,//结算状态
settlebillId:deliveryBillInfo.settlebill_id,//结算单id settlebillId: deliveryBillInfo.settlebill_id,//结算单id
deliveryManId:deliveryBillInfo.delivery_man_id,//销售员id deliveryManId: deliveryBillInfo.delivery_man_id,//销售员id
deliveryManName:deliveryBillInfo.delivery_man_name,//销售员姓名 deliveryManName: deliveryBillInfo.delivery_man_name,//销售员姓名
deliveryManOpcode:deliveryBillInfo.delivery_man_opcode,//销售员opcode deliveryManOpcode: deliveryBillInfo.delivery_man_opcode,//销售员opcode
bizId:pobj.bizId//融易算-服务实例id bizId: pobj.bizId//融易算-服务实例id
} }
return result; return result;
} }
......
...@@ -18,5 +18,9 @@ class FitaxschemeService extends ServiceBase { ...@@ -18,5 +18,9 @@ class FitaxschemeService extends ServiceBase {
var self = this; var self = this;
return await self.dao.findInfo(qobj); return await self.dao.findInfo(qobj);
} }
async findInfoByBizid(qobj){
return await this.dao.findInfoByBizid(qobj);
}
} }
module.exports = FitaxschemeService; module.exports = FitaxschemeService;
\ No newline at end of file
...@@ -220,7 +220,8 @@ class System { ...@@ -220,7 +220,8 @@ class System {
try { try {
ClassObj = require(objabspath); ClassObj = require(objabspath);
} catch (e) { } catch (e) {
// console.log(e) console.log("eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
console.log(e);
let fname = objsettings[packageName + "base"]; let fname = objsettings[packageName + "base"];
ClassObj = require(fname); ClassObj = require(fname);
} }
...@@ -353,23 +354,71 @@ class System { ...@@ -353,23 +354,71 @@ class System {
for (var i in arr) { for (var i in arr) {
if (arr[i] != "sign" && arr[i] != "ip" && if (arr[i] != "sign" && arr[i] != "ip" &&
(!(Object.prototype.toString.call(obj[arr[i]]) == '[object Object]' || Object.prototype.toString.call(obj[arr[i]]) == '[object Array]') (!(Object.prototype.toString.call(obj[arr[i]]) == '[object Object]' || Object.prototype.toString.call(obj[arr[i]]) == '[object Array]')
&& (obj[arr[i]] && obj[arr[i]] != 'undefined'))) { && ((obj[arr[i]] || obj[arr[i]] === 0 || obj[arr[i]] === false) && obj[arr[i]] != 'undefined'))) {
str += arr[i] + "=" + obj[arr[i]] + "&"; str += arr[i] + "=" + obj[arr[i]] + "&";
} }
} }
var toSignStr = str.substr(0, str.length - 1); var toSignStr = str.substr(0, str.length - 1);
var sb = toSignStr + secret; var sb = toSignStr + secret;
console.log("cmd=ApiSignUtils:toSign msg=original Sign:" + sb.toString() + " req param:" + obj); console.log("cmd=ApiSignUtils:toSign msg=original Sign:" + sb.toString());
// 对sb进行md5加密后得到svrSign // 对sb进行md5加密后得到svrSign
svrSign = md5(sb); svrSign = md5(sb);
console.log("svrSign===>" + svrSign); console.log("svrSign===>" + svrSign);
} }
if (svrSign.toLowerCase() == obj["sign"].toLowerCase()) { return svrSign;
console.log("cmd=ApiSignUtils:SignValid msg=original Sign:" + svrSign) }
return true; /**
* 队列操作
* @param {json}
pushUrl string 推送URL地址
actionType string 推送地址接收时的功能名称
notifyUrl string 推送成功后通知的Url
messageBody json 推送的业务消息,必须有一项对象属性值
headData json 请求头信息
requestId string 请求id
*/
static queueOper(obj) {
if (obj.pushUrl && obj.actionType && obj.messageBody) {
try {
var exec = this.getObject("util.execClient");
var reqUrl = settings.queueUrl;
var param = {
actionType: "produceData",
actionBody: {
pushUrl: obj.pushUrl,
actionType: obj.actionType,
identifyCode: "book-manage",
messageBody: obj.messageBody
}
}
if (obj.notifyUrl) {
param.actionBody.notifyUrl = obj.notifyUrl;
}
if (obj.headData) {
param.actionBody.headData;
}
if (obj.requestId) {
param.requestId = obj.requestId;
}
var result = await exec.execPost(param, reqUrl);
var j = JSON.parse(result.stdout);
if (j.status == 1){
return this.getResult(j);
}
else{
return this.getResultError("队列返回失败");
}
}
catch (error) {
return this.getResultError(error);
}
}
else {
return this.getResultError("参数错误");
} }
console.error("cmd=ApiSignUtils:SignValid msg=Sign validtate fail! svrSign:" + svrSign + " reqSign:" + obj["sign"]);
return false;
} }
} }
...@@ -402,7 +451,7 @@ System.FLOWCODE = { ...@@ -402,7 +451,7 @@ System.FLOWCODE = {
SCHEME: "SCHEME",//方案表 SCHEME: "SCHEME",//方案表
DELIVERY: "DELIVERY",//服务单表 DELIVERY: "DELIVERY",//服务单表
} }
// 服务名称 // 服务名称c
System.SERVICECODE = { System.SERVICECODE = {
FT: 'bookkeeping' // 财税项目 FT: 'bookkeeping' // 财税项目
} }
...@@ -414,7 +463,7 @@ System.SERVERSESTATUS = { ...@@ -414,7 +463,7 @@ System.SERVERSESTATUS = {
INSERVICE: "inservice",//服务中 INSERVICE: "inservice",//服务中
CLOSED: "closed",//已关闭 、已终止 CLOSED: "closed",//已关闭 、已终止
NOTSETUP: "notsetup",//未建账 NOTSETUP: "notsetup",//未建账
SETUP: "setup"//建账 SETUP: "setup"//建账
} }
/* /*
......
...@@ -30,7 +30,7 @@ class ExecClient { ...@@ -30,7 +30,7 @@ class ExecClient {
async execPost(subData, url) { async execPost(subData, url) {
let cmd = this.FetchPostCmd(subData, url); let cmd = this.FetchPostCmd(subData, url);
//console.log("__________________" + cmd); console.log("__________________" + cmd);
var result = await this.exec(cmd); var result = await this.exec(cmd);
return result; return result;
} }
......
const axios = require("axios");
const settings = require("../../config/settings");
const system = require("../system");
const ftConfig = settings.ftConfig();
let ftTenantInfo; // 财税中心 缓存
/**
* 发送 post 请求
* @param {*} url
* @param {*} data
* @param {*} headers
*/
const postRequest = async (url, data, headers = {}) => {
try {
console.log(`${url} : 推送财税中心数据 ------- `);
console.log(JSON.stringify(data))
let result = await axios.post(url, data, {
headers: {
'Content-Type': 'application/json',
...headers
},
timeout: 5000,
});
result = result.data;
console.log("推送财税中心返回数据 ------- ");
console.log(JSON.stringify(result));
if (result.code == 1) {
return result.data
} else {
throw new Error(result.errMsg);
}
} catch (err) {
console.log("------ 财税中心err -----");
console.log(err)
throw (err)
}
}
/**
* 向财税 项目 发送消息 (不带签名)
* @param {*} url
* @param {*} data
* @param {*} headers
*/
const postToFt = (url, data, headers = {}) => {
return postRequest(`${ftConfig.url}${url}`, data, headers = {})
}
/**
* 租户 向财税 项目 发送消息 带签名
* @param {*} url
* @param {*} data
* @param {*} headers
*/
const postToFtBySign = async (url, data, headers = {}) => {
let tenantInfo = await getChannelCompany();
data.companyId = tenantInfo.id;
let sign = system.signValid(data, tenantInfo.signSecret);
return postRequest(`${ftConfig.url}${url}`, { ...data, sign }, headers = {})
}
/**
* 财税 获取 租户信息
*/
const getChannelCompany = async () => {
// 内存 缓存
if (ftTenantInfo) {
return ftTenantInfo
}
let reqData = {
channelCode: ftConfig.channelCode,
}
let sign = system.signValid(reqData, ftConfig.secret);
const companyData = await postToFt("/company/getChannelCompany", {
...reqData,
sign
});
if (companyData.datas && companyData.datas.length > 0) {
ftTenantInfo = companyData.datas[0]
return ftTenantInfo;
} else {
throw ("渠道码信息获取错误");
}
}
/**
* 建账
*/
const addCusAccApplyInfo = async () => {
let reqData = {
accountStandard: 1,
applyDate: "2020-09-10",
contact: "JAMES7",
creditCode: "911101053516460817K",
customerName: "北京融易算",
phoneNumber: "18510669367",
valueAddedTax: 1,
serviceTime: "5",
initPeriod: 202009,
}
const data = await postToFtBySign('/cusAccApplyInfo/addCusAccApplyInfo', reqData);
console.log(data);
}
module.exports = {
postToFtBySign,
addCusAccApplyInfo
}
...@@ -40,7 +40,7 @@ var settings = { ...@@ -40,7 +40,7 @@ var settings = {
}, },
queueUrl: function () { queueUrl: function () {
if (this.env == "localhost") { if (this.env == "localhost") {
return "http://192.168.1.128:4018/api/queueAction/producer/springBoard"; return "http://192.168.1.9:4018/api/queueAction/producer/springBoard";
} else { } else {
return "http://sytxpublic-msgq-service/api/queueAction/producer/springBoard"; return "http://sytxpublic-msgq-service/api/queueAction/producer/springBoard";
} }
...@@ -59,6 +59,21 @@ var settings = { ...@@ -59,6 +59,21 @@ var settings = {
return "http://logs-sytxpublic-msgq-service/api/queueAction/producer/springBoard"; return "http://logs-sytxpublic-msgq-service/api/queueAction/producer/springBoard";
} }
}, },
ftConfig: function () {
if (this.env == "localhost") {
return {
channelCode: "e0kj8ehs",
secret: "92a15b9b4c5a9ea708bb5583408e1441",
url: "https://nt-api.gongsibao.com/nga-api"
};
} else {
return {
channelCode: "e0kj8ehs",
secret: "92a15b9b4c5a9ea708bb5583408e1441",
url: "https://nt-api.gongsibao.com/nga-api"
};
}
},
pmappid: 1, pmappid: 1,
pmcompanyid: 1, pmcompanyid: 1,
pmroleid: { "ta": 1, "pr": 2 }, pmroleid: { "ta": 1, "pr": 2 },
......
...@@ -307,6 +307,7 @@ ...@@ -307,6 +307,7 @@
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npm.taobao.org/aproba/download/aproba-1.2.0.tgz", "resolved": "https://registry.npm.taobao.org/aproba/download/aproba-1.2.0.tgz",
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
"optional": true "optional": true
}, },
"arch": { "arch": {
...@@ -381,6 +382,7 @@ ...@@ -381,6 +382,7 @@
"are-we-there-yet": { "are-we-there-yet": {
"version": "1.1.5", "version": "1.1.5",
"resolved": "https://registry.npm.taobao.org/are-we-there-yet/download/are-we-there-yet-1.1.5.tgz", "resolved": "https://registry.npm.taobao.org/are-we-there-yet/download/are-we-there-yet-1.1.5.tgz",
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
"optional": true, "optional": true,
"requires": { "requires": {
"delegates": "^1.0.0", "delegates": "^1.0.0",
...@@ -1620,7 +1622,8 @@ ...@@ -1620,7 +1622,8 @@
}, },
"connect-history-api-fallback": { "connect-history-api-fallback": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npm.taobao.org/connect-history-api-fallback/download/connect-history-api-fallback-1.6.0.tgz" "resolved": "https://registry.npm.taobao.org/connect-history-api-fallback/download/connect-history-api-fallback-1.6.0.tgz",
"integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg=="
}, },
"connect-redis": { "connect-redis": {
"version": "3.4.2", "version": "3.4.2",
...@@ -1644,6 +1647,7 @@ ...@@ -1644,6 +1647,7 @@
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/console-control-strings/download/console-control-strings-1.1.0.tgz", "resolved": "https://registry.npm.taobao.org/console-control-strings/download/console-control-strings-1.1.0.tgz",
"integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==",
"optional": true "optional": true
}, },
"console-stream": { "console-stream": {
...@@ -1675,6 +1679,16 @@ ...@@ -1675,6 +1679,16 @@
"emitter-listener": "^1.1.1" "emitter-listener": "^1.1.1"
} }
}, },
"convert-hex": {
"version": "0.1.0",
"resolved": "https://registry.npm.taobao.org/convert-hex/download/convert-hex-0.1.0.tgz",
"integrity": "sha1-CMBFaJIsJ3drii6BqV05M2LqC2U="
},
"convert-string": {
"version": "0.1.0",
"resolved": "https://registry.npm.taobao.org/convert-string/download/convert-string-0.1.0.tgz",
"integrity": "sha1-ec5BqbsNA7z3LNxqjzxW+7xkQQo="
},
"cookie": { "cookie": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
...@@ -2109,6 +2123,7 @@ ...@@ -2109,6 +2123,7 @@
"deep-extend": { "deep-extend": {
"version": "0.6.0", "version": "0.6.0",
"resolved": "https://registry.npm.taobao.org/deep-extend/download/deep-extend-0.6.0.tgz", "resolved": "https://registry.npm.taobao.org/deep-extend/download/deep-extend-0.6.0.tgz",
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
"optional": true "optional": true
}, },
"deep-is": { "deep-is": {
...@@ -2200,6 +2215,7 @@ ...@@ -2200,6 +2215,7 @@
"detect-libc": { "detect-libc": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npm.taobao.org/detect-libc/download/detect-libc-1.0.3.tgz", "resolved": "https://registry.npm.taobao.org/detect-libc/download/detect-libc-1.0.3.tgz",
"integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==",
"optional": true "optional": true
}, },
"dicer": { "dicer": {
...@@ -3447,6 +3463,7 @@ ...@@ -3447,6 +3463,7 @@
"gifsicle": { "gifsicle": {
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://registry.npm.taobao.org/gifsicle/download/gifsicle-4.0.1.tgz", "resolved": "https://registry.npm.taobao.org/gifsicle/download/gifsicle-4.0.1.tgz",
"integrity": "sha512-A/kiCLfDdV+ERV/UB+2O41mifd+RxH8jlRG8DMxZO84Bma/Fw0htqZ+hY2iaalLRNyUu7tYZQslqUBJxBggxbg==",
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
...@@ -3882,6 +3899,7 @@ ...@@ -3882,6 +3899,7 @@
"has-unicode": { "has-unicode": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/has-unicode/download/has-unicode-2.0.1.tgz", "resolved": "https://registry.npm.taobao.org/has-unicode/download/has-unicode-2.0.1.tgz",
"integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",
"optional": true "optional": true
}, },
"hawk": { "hawk": {
...@@ -4052,6 +4070,7 @@ ...@@ -4052,6 +4070,7 @@
"ignore-walk": { "ignore-walk": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://registry.npm.taobao.org/ignore-walk/download/ignore-walk-3.0.3.tgz", "resolved": "https://registry.npm.taobao.org/ignore-walk/download/ignore-walk-3.0.3.tgz",
"integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==",
"optional": true, "optional": true,
"requires": { "requires": {
"minimatch": "^3.0.4" "minimatch": "^3.0.4"
...@@ -4075,6 +4094,7 @@ ...@@ -4075,6 +4094,7 @@
"imagemin-gifsicle": { "imagemin-gifsicle": {
"version": "6.0.1", "version": "6.0.1",
"resolved": "https://registry.npm.taobao.org/imagemin-gifsicle/download/imagemin-gifsicle-6.0.1.tgz", "resolved": "https://registry.npm.taobao.org/imagemin-gifsicle/download/imagemin-gifsicle-6.0.1.tgz",
"integrity": "sha512-kuu47c6iKDQ6R9J10xCwL0lgs0+sMz3LRHqRcJ2CRBWdcNmo3T5hUaM8hSZfksptZXJLGKk8heSAvwtSdB1Fng==",
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
...@@ -5558,6 +5578,7 @@ ...@@ -5558,6 +5578,7 @@
"minizlib": { "minizlib": {
"version": "1.3.3", "version": "1.3.3",
"resolved": "https://registry.npm.taobao.org/minizlib/download/minizlib-1.3.3.tgz", "resolved": "https://registry.npm.taobao.org/minizlib/download/minizlib-1.3.3.tgz",
"integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==",
"optional": true, "optional": true,
"requires": { "requires": {
"minipass": "^2.9.0" "minipass": "^2.9.0"
...@@ -5742,6 +5763,7 @@ ...@@ -5742,6 +5763,7 @@
"nan": { "nan": {
"version": "2.14.1", "version": "2.14.1",
"resolved": "https://registry.npm.taobao.org/nan/download/nan-2.14.1.tgz", "resolved": "https://registry.npm.taobao.org/nan/download/nan-2.14.1.tgz",
"integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==",
"optional": true "optional": true
}, },
"nanoid": { "nanoid": {
...@@ -5817,6 +5839,7 @@ ...@@ -5817,6 +5839,7 @@
"nodejieba": { "nodejieba": {
"version": "2.4.1", "version": "2.4.1",
"resolved": "https://registry.npm.taobao.org/nodejieba/download/nodejieba-2.4.1.tgz", "resolved": "https://registry.npm.taobao.org/nodejieba/download/nodejieba-2.4.1.tgz",
"integrity": "sha512-fxlVloaO5baDBmpnQ2egDCe6FT9SJdfbFak7tK7dKH16d7SxA5bLdv47EdTwtKS9DRbnXnMlyX5Wc33XAnaQuA==",
"optional": true, "optional": true,
"requires": { "requires": {
"nan": "^2.14.0", "nan": "^2.14.0",
...@@ -5968,6 +5991,7 @@ ...@@ -5968,6 +5991,7 @@
"npm-bundled": { "npm-bundled": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/npm-bundled/download/npm-bundled-1.1.1.tgz", "resolved": "https://registry.npm.taobao.org/npm-bundled/download/npm-bundled-1.1.1.tgz",
"integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==",
"optional": true, "optional": true,
"requires": { "requires": {
"npm-normalize-package-bin": "^1.0.1" "npm-normalize-package-bin": "^1.0.1"
...@@ -6021,6 +6045,7 @@ ...@@ -6021,6 +6045,7 @@
"npmlog": { "npmlog": {
"version": "4.1.2", "version": "4.1.2",
"resolved": "https://registry.npm.taobao.org/npmlog/download/npmlog-4.1.2.tgz", "resolved": "https://registry.npm.taobao.org/npmlog/download/npmlog-4.1.2.tgz",
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
"optional": true, "optional": true,
"requires": { "requires": {
"are-we-there-yet": "~1.1.2", "are-we-there-yet": "~1.1.2",
...@@ -6739,6 +6764,7 @@ ...@@ -6739,6 +6764,7 @@
"rc": { "rc": {
"version": "1.2.8", "version": "1.2.8",
"resolved": "https://registry.npm.taobao.org/rc/download/rc-1.2.8.tgz", "resolved": "https://registry.npm.taobao.org/rc/download/rc-1.2.8.tgz",
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
"optional": true, "optional": true,
"requires": { "requires": {
"deep-extend": "^0.6.0", "deep-extend": "^0.6.0",
...@@ -7193,6 +7219,15 @@ ...@@ -7193,6 +7219,15 @@
"crypt": ">= 0.0.1" "crypt": ">= 0.0.1"
} }
}, },
"sha256": {
"version": "0.2.0",
"resolved": "https://registry.npm.taobao.org/sha256/download/sha256-0.2.0.tgz",
"integrity": "sha1-c6C0GNqrcDW/+G6EkeNjQS/CqwU=",
"requires": {
"convert-hex": "~0.1.0",
"convert-string": "~0.1.0"
}
},
"shebang-command": { "shebang-command": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
...@@ -8347,6 +8382,7 @@ ...@@ -8347,6 +8382,7 @@
"wide-align": { "wide-align": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npm.taobao.org/wide-align/download/wide-align-1.1.3.tgz", "resolved": "https://registry.npm.taobao.org/wide-align/download/wide-align-1.1.3.tgz",
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
"optional": true, "optional": true,
"requires": { "requires": {
"string-width": "^1.0.2 || 2" "string-width": "^1.0.2 || 2"
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
"sequelize-cli": "^4.1.1", "sequelize-cli": "^4.1.1",
"serve-favicon": "^2.4.5", "serve-favicon": "^2.4.5",
"sha1": "^1.1.1", "sha1": "^1.1.1",
"sha256": "^0.2.0",
"socket.io": "^2.1.1", "socket.io": "^2.1.1",
"uuid": "^3.2.1", "uuid": "^3.2.1",
"xml2js": "^0.4.19" "xml2js": "^0.4.19"
......
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