Commit b7eb132f by 宋毅

tj

parent f7956abd
File mode changed from 100644 to 100755
...@@ -23,7 +23,9 @@ class APIBase { ...@@ -23,7 +23,9 @@ class APIBase {
"NeedDetail": "needDetail", "NeedDetail": "needDetail",
"GetOrderListByStatus": "getOrderListByStatus", "GetOrderListByStatus": "getOrderListByStatus",
"GetQualificationCertificateListByUserAndType": "getQualificationCertificateListByUserAndType", "GetQualificationCertificateListByUserAndType": "getQualificationCertificateListByUserAndType",
"GetQualificationCertificateDetail": "getQualificationCertificateDetail" "GetQualificationCertificateDetail": "getQualificationCertificateDetail",
"RefusalSolution": "refusalSolution",
}; };
} }
//-----------------------新的模式------------------开始 //-----------------------新的模式------------------开始
......
...@@ -37,14 +37,12 @@ class Order extends APIBase { ...@@ -37,14 +37,12 @@ class Order extends APIBase {
opResult = system.getResult(null, "contactsMoblie参数错误"); opResult = system.getResult(null, "contactsMoblie参数错误");
return opResult; return opResult;
} }
if (!pobj.actionBody.verificationCode) { if (pobj.actionBody.verificationCode) {
opResult = system.getResult(null, "verificationCode参数错误"); var v = await self.utilsMsgSendSve.getVerificationCode(pobj.actionBody.contactsMoblie);
return opResult; if (v != pobj.actionBody.verificationCode) {
} opResult = system.getResult(null, "验证码错误");
var v = await self.utilsMsgSendSve.getVerificationCode(pobj.actionBody.contactsMoblie); return opResult;
if (v != pobj.actionBody.verificationCode) { }
opResult = system.getResult(null, "验证码错误");
return opResult;
} }
} }
switch (action_type) { switch (action_type) {
......
...@@ -7,7 +7,7 @@ module.exports = (db, DataTypes) => { ...@@ -7,7 +7,7 @@ module.exports = (db, DataTypes) => {
user_id: DataTypes.STRING(100), //user_id 用户id user_id: DataTypes.STRING(100), //user_id 用户id
user_name: DataTypes.STRING(100), //user_name 用户名称 user_name: DataTypes.STRING(100), //user_name 用户名称
solution_content: DataTypes.JSON, //solution_content 方案内容 solution_content: DataTypes.JSON, //solution_content 方案内容
isRefusal: DataTypes.INTEGER, //isRefusal 是否驳回 is_refusal: DataTypes.INTEGER, //is_refusal 是否驳回
refusal_notes: DataTypes.INTEGER, //驳回原因 refusal_notes: DataTypes.INTEGER, //驳回原因
refusal_notes: DataTypes.STRING(255), //驳回/关闭原因 refusal_notes: DataTypes.STRING(255), //驳回/关闭原因
}, { }, {
......
...@@ -50,32 +50,29 @@ class NeedInfoService extends ServiceBase { ...@@ -50,32 +50,29 @@ class NeedInfoService extends ServiceBase {
*/ */
//创建需求 //创建需求
async needSubmit(actionBody) { async needSubmit(actionBody) {
if (!actionBody.contactsMoblie) { if (!actionBody.ContactsMoblie) {
return system.getResultFail(-102, "contactsMoblie cannot be empty"); return system.getResultFail(-102, "contactsMoblie cannot be empty");
} }
if (!actionBody.regionId) { if (!actionBody.RegionId) {
return system.getResultFail(-102, "regionId cannot be empty"); return system.getResultFail(-102, "regionId cannot be empty");
} }
if (!actionBody.regionName) { if (!actionBody.RegionName) {
return system.getResultFail(-102, "regionName cannot be empty"); return system.getResultFail(-102, "regionName cannot be empty");
} }
if (!actionBody.consultType) { if (!actionBody.ConsultType) {
return system.getResultFail(-102, "consultType cannot be empty"); return system.getResultFail(-102, "consultType cannot be empty");
} }
if (!actionBody.consultTypeName) { if (!actionBody.ConsultTypeName) {
return system.getResultFail(-102, "consultTypeName cannot be empty"); return system.getResultFail(-102, "consultTypeName cannot be empty");
} }
if (!actionBody.userId) { if (!actionBody.UserId) {
return system.getResultFail(-102, "userId cannot be empty"); return system.getResultFail(-102, "userId cannot be empty");
} }
if (!actionBody.verificationCode) {
return system.getResultFail(-102, "verificationCode cannot be empty");
}
try { try {
var scobj = { var scobj = {
"region_id": actionBody.regionId, "region_id": actionBody.RegionId,
"regionName": actionBody.regionName, "regionName": actionBody.RegionName,
"path_code": actionBody.consultType "path_code": actionBody.ConsultType
} }
var serviceinfo = await this.dao.findServiceByProductType(scobj); var serviceinfo = await this.dao.findServiceByProductType(scobj);
if (serviceinfo.status < 0) { if (serviceinfo.status < 0) {
...@@ -87,21 +84,21 @@ class NeedInfoService extends ServiceBase { ...@@ -87,21 +84,21 @@ class NeedInfoService extends ServiceBase {
var need_num = await this.getBusUid("n"); var need_num = await this.getBusUid("n");
var datavalue = { var datavalue = {
need_num: need_num, need_num: need_num,
user_id: actionBody.userId, user_id: actionBody.UserId,
contacts_moblie: actionBody.contactsMoblie, contacts_moblie: actionBody.ContactsMoblie,
contacts_name: actionBody.contactsName || "", contacts_name: actionBody.ContactsName || "",
region_id: actionBody.regionId, region_id: actionBody.RegionId,
region_name: actionBody.regionName, region_name: actionBody.RegionName,
consult_type: actionBody.consultType, consult_type: actionBody.ConsultType,
consult_type_name: actionBody.consultTypeName, consult_type_name: actionBody.ConsultTypeName,
notes: actionBody.notes, notes: actionBody.Notes,
servicer_code: actionBody.servicerCode, servicer_code: actionBody.servicerCode,
servicer_name: actionBody.servicerName, servicer_name: actionBody.servicerName,
status: 1 status: 1
} }
if (actionBody.companyName) { if (actionBody.CompanyName) {
datavalue.need_info = { datavalue.need_info = {
companyName: actionBody.companyName companyName: actionBody.CompanyName
}; };
} }
var newneedinfo = await this.create(datavalue); var newneedinfo = await this.create(datavalue);
...@@ -109,7 +106,7 @@ class NeedInfoService extends ServiceBase { ...@@ -109,7 +106,7 @@ class NeedInfoService extends ServiceBase {
return system.getResultFail(-310, "newneedinfo cannot be created"); return system.getResultFail(-310, "newneedinfo cannot be created");
} }
actionBody.needNum = need_num; actionBody.NeedNum = need_num;
//生产者------需求推送 //生产者------需求推送
var pushobj = { var pushobj = {
...@@ -122,7 +119,7 @@ class NeedInfoService extends ServiceBase { ...@@ -122,7 +119,7 @@ class NeedInfoService extends ServiceBase {
identifyCode: "needSubmit" identifyCode: "needSubmit"
} }
}; };
// this.execPostByTimeOut(pushobj, settings.apiconfig.opPushUrl()); this.execPostByTimeOut(pushobj, settings.apiconfig.opPushUrl());
return system.getResultSuccess(); return system.getResultSuccess();
...@@ -151,42 +148,43 @@ class NeedInfoService extends ServiceBase { ...@@ -151,42 +148,43 @@ class NeedInfoService extends ServiceBase {
} }
async needList(searchObj) { async needList(searchObj) {
if (!searchObj.userId) { if (!searchObj.UserId) {
return system.getResultFail(-102, "userId cannot be empty"); return system.getResultFail(-102, "userId cannot be empty");
} }
var sort = [["created_at", 'desc']]; var sort = [["created_at", 'desc']];
if (searchObj.sort) { if (searchObj.Sort) {
if (searchObj.sort.key == "createdAt") { searchObj.Sort=JSON.parse(searchObj.Sort);
searchObj.sort.key = "created_at"; if (searchObj.Sort.key == "createdAt") {
searchObj.Sort.key = "created_at";
} }
sort = [[searchObj.sort.key, searchObj.sort.value]] sort = [[searchObj.Sort.key, searchObj.Sort.value]]
} }
var sobj = { var sobj = {
search: { search: {
user_id: searchObj.userId user_id: searchObj.UserId
}, },
orderInfo: sort, orderInfo: sort,
pageInfo: { pageInfo: {
pageNo: Number(searchObj.pageNo) || 1, pageNo: Number(searchObj.PageNo) || 1,
pageSize: Number(searchObj.pageSize) || 10 pageSize: Number(searchObj.PageSize) || 10
} }
} }
if (searchObj.consultType) { if (searchObj.ConsultType) {
sobj.search.consult_type = searchObj.consultType; sobj.search.consult_type = searchObj.ConsultType;
} }
if (searchObj.status) { if (searchObj.Status) {
sobj.search.status = searchObj.status; sobj.search.status = searchObj.Status;
} }
var r = await this.dao.findAndCountAll(sobj); var r = await this.dao.findAndCountAll(sobj);
return system.getResultSuccess(r); return system.getResultSuccess(r);
} }
async needDetail(searchObj) { async needDetail(searchObj) {
if (!searchObj.needNum) { if (!searchObj.NeedNum) {
return system.getResultFail(-102, "needNum cannot be empty"); return system.getResultFail(-102, "needNum cannot be empty");
} }
var sobj = { var sobj = {
need_num: searchObj.needNum need_num: searchObj.NeedNum
} }
var needInfo = await this.findOne(sobj); var needInfo = await this.findOne(sobj);
if (!needInfo) { if (!needInfo) {
......
...@@ -44,15 +44,15 @@ class NeedSolutionService extends ServiceBase { ...@@ -44,15 +44,15 @@ class NeedSolutionService extends ServiceBase {
if (!needsolution || !needsolution.id) { if (!needsolution || !needsolution.id) {
return system.getResultFail(-301, "方案修改失败,未知方案信息"); return system.getResultFail(-301, "方案修改失败,未知方案信息");
} }
if (needsolution.isRefusal != 1) { if (needsolution.is_refusal != 1) {
return system.getResultFail(-303, "只能修改用户驳回方案"); return system.getResultFail(-303, "只能修改用户驳回方案");
} }
var new_solution_num = await this.getBusUid("NS_"); var new_solution_num = await this.getBusUid("NS_");
var updateObj = {id:needsolution.id,isRefusal:0,solution_num:new_solution_num,solution_content:ab.solutionContent}; var updateObj = { id: needsolution.id, is_refusal: 0, solution_num: new_solution_num, solution_content: ab.solutionContent };
var self = this; var self = this;
return await self.db.transaction(async function (t) { return await self.db.transaction(async function (t) {
await self.dao.update(updateObj,t); await self.dao.update(updateObj, t);
await self.needInfoDao.update({id:needinfo.id,status:"3"},t); await self.needInfoDao.update({ id: needinfo.id, status: "3" }, t);
return system.getResultSuccess(new_solution_num); return system.getResultSuccess(new_solution_num);
}); });
...@@ -66,11 +66,11 @@ class NeedSolutionService extends ServiceBase { ...@@ -66,11 +66,11 @@ class NeedSolutionService extends ServiceBase {
} }
var solution_num = await this.getBusUid("NS_"); var solution_num = await this.getBusUid("NS_");
var createObj = { var createObj = {
solution_num:solution_num, solution_num: solution_num,
need_num:ab.needNum, need_num: ab.needNum,
user_id:needinfo.user_id, user_id: needinfo.user_id,
user_name:needinfo.user_name, user_name: needinfo.user_name,
solution_content:ab.solutionContent solution_content: ab.solutionContent
}; };
var self = this; var self = this;
return await self.db.transaction(async function (t) { return await self.db.transaction(async function (t) {
...@@ -84,28 +84,29 @@ class NeedSolutionService extends ServiceBase { ...@@ -84,28 +84,29 @@ class NeedSolutionService extends ServiceBase {
//驳回方案 //驳回方案
async refusalSolution(actionBody, t) { async refusalSolution(actionBody, t) {
if (!actionBody.needNum) { if (!actionBody.NeedNum) {
return system.getResultFail(-102, "needNum cannot be empty"); return system.getResultFail(-102, "needNum cannot be empty");
} }
if (!actionBody.refusalContent) { if (!actionBody.SolutionNum) {
return system.getResultFail(-102, "refusalContent cannot be empty"); return system.getResultFail(-102, "SolutionNum cannot be empty");
} }
var self = this; var self = this;
return await self.db.transaction(async function (t) { return await self.db.transaction(async function (t) {
var sobj = { var sobj = {
need_num: actionBody.needNum need_num: actionBody.NeedNum
} }
var needInfo = await self.needInfoDao.findOne(sobj, t); var needInfo = await self.needInfoDao.findOne(sobj, t);
if (!needInfo) { if (!needInfo) {
return system.getResultFail(-102, "needInfo is empty"); return system.getResultFail(-102, "needInfo is empty");
} }
sobj.solution_num = actionBody.SolutionNum;
var solutionInfo = await self.dao.findOne(sobj, t); var solutionInfo = await self.dao.findOne(sobj, t);
if (!solutionInfo) { if (!solutionInfo) {
return system.getResultFail(-102, "solutionInfo is empty"); return system.getResultFail(-102, "solutionInfo is empty");
} }
needInfo.dataValues.status = 2; needInfo.dataValues.status = 2;
solutionInfo.dataValues.is_refusal = 0; solutionInfo.dataValues.is_refusal = 1;
solutionInfo.dataValues.solution_content.refusal_content = actionBody.refusalContent solutionInfo.dataValues.solution_content.refusal_content = actionBody.RefusalContent;
await self.needInfoDao.update(needInfo.dataValues, t); await self.needInfoDao.update(needInfo.dataValues, t);
await self.dao.update(solutionInfo.dataValues, t); await self.dao.update(solutionInfo.dataValues, t);
......
...@@ -83,86 +83,6 @@ class OrderInfoService extends ServiceBase { ...@@ -83,86 +83,6 @@ class OrderInfoService extends ServiceBase {
return result; return result;
} }
//订单提交
async orderSubmit(pobj) {
var actionBody = pobj.actionBody;
if (!actionBody.userId) {
return system.getResultFail(-101, "user is empty");
}
if (!actionBody.product) {
return system.getResultFail(-101, "user is empty");
}
if (!actionBody.productSnapshotlist) {
return system.getResultFail(-101, "txproduct is empty");
}
for (var i = 0; i < productSnapshot.length; i++) {
var i = productSnapshot[i];
}
var ordercreate = await this.orderCreate(pobj);
if (ordercreate.status < 0) {
return system.getResultFail(-101, "ordercreate is error");
}
var orderTXobj = {
}
var ordercreateTX = await this.post(txobj);
return system.getResultSuccess();
}
//订单创建
async orderCreate(pobj) {
var actionBody = pobj.actionBody.form;
if (!actionBody.userId) {
return system.getResultFail(-101, "user is empty");
}
return await self.db.transaction(async function (t) {
//创建订单
var orderobj = {
order_num: actionBody.orderNum,
need_num: actionBody.needNum || "",
user_id: actionBody.userId,
user_name: actionBody.userName || "",
quantity: actionBody.quantity,
total_sum: actionBody.totalSum || 0,
discount_amount: actionBody.discountAmount || 0,
pay_total_sum: actionBody.payTotalSum || 0,
refund_sum: actionBody.refundSum || 0,
order_status: 1,
order_status_name: "已支付",
}
var orderinfo = await self.create(orderobj, t);
//创建订单产品
var orderProductobj = {
order_num: pobj.actionBody.orderNum,
user_id: actionBody.userId,
user_name: actionBody.userName || "",
region_id: actionBody.regionId || 0,
region_name: actionBody.regionName || "",
product_icon: actionBody.product.productIcon || 0,
product_type: actionBody.product.productType || 0,
product_type_name: actionBody.product.productTypeName || "",
order_snapshot: actionBody.orderSnapshot || {},
product_snapshot: actionBody.productSnapshot || {},
servicer_code: actionBody.product.servicerCode || "",
servicer_name: actionBody.product.servicerName || "",
// tx_order_snapshot: actionBody.txOrderSnapshot || {}
}
var orderProductinfo = await self.orderProductDao.create(orderProductobj, t);
//创建订单交付单
var orderDeliveryobj = {
order_num: order_num,
user_id: actionBody.userId,
user_name: actionBody.userName || "",
delivery_status: 1,
delivery_status_name: "待接单"
}
var orderDeliveryinfo = await self.orderProductDao.create(orderDeliveryinfo, t);
return system.getResultSuccess();
});
}
async orderPayNotify(pobj) { async orderPayNotify(pobj) {
if (!pobj.actionBody.interface || !pobj.actionBody.interface.para) { if (!pobj.actionBody.interface || !pobj.actionBody.interface.para) {
return system.getResultFail(-101, "参数错误"); return system.getResultFail(-101, "参数错误");
...@@ -412,66 +332,66 @@ class OrderInfoService extends ServiceBase { ...@@ -412,66 +332,66 @@ class OrderInfoService extends ServiceBase {
var goodsSubType = ""; var goodsSubType = "";
var billingcode = ""; var billingcode = "";
if (!pobj.actionBody.regionId) { if (!pobj.actionBody.RegionId) {
return system.getResultFail(-101, "regionId is empty"); return system.getResultFail(-101, "regionId is empty");
} }
if (!pobj.actionBody.pathCode) { if (!pobj.actionBody.PathCode) {
return system.getResultFail(-101, "pathCode is empty"); return system.getResultFail(-101, "PathCode is empty");
} }
if (!pobj.actionBody.regionName) { if (!pobj.actionBody.RegionName) {
return system.getResultFail(-101, "regionName is empty"); return system.getResultFail(-101, "regionName is empty");
} }
var priceName = null; var priceName = null;
//公司注册 //公司注册
if (pobj.actionBody.pathCode == "/ic/gsreg/") { if (pobj.actionBody.PathCode == "/ic/gsreg/") {
if (!pobj.actionBody.companyProperties) { if (!pobj.actionBody.CompanyProperties) {
return system.getResultFail(-101, "companyProperties is empty"); return system.getResultFail(-101, "CompanyProperties is empty");
} }
priceName = pobj.actionBody.companyProperties; priceName = pobj.actionBody.CompanyProperties;
} }
//云上园区注册 //云上园区注册
if (pobj.actionBody.pathCode == "/ic/cpreg/") { if (pobj.actionBody.PathCode == "/ic/cpreg/") {
if (!pobj.actionBody.registeredType) { if (!pobj.actionBody.RegisteredType) {
return system.getResultFail(-101, "registeredType is empty"); return system.getResultFail(-101, "RegisteredType is empty");
} }
priceName = pobj.actionBody.registeredType; priceName = pobj.actionBody.RegisteredType;
} }
//刻章服务 //刻章服务
if (pobj.actionBody.pathCode == "/ic/kzfw/") { if (pobj.actionBody.PathCode == "/ic/kzfw/") {
if (!pobj.actionBody.whetherType) { if (!pobj.actionBody.WhetherType) {
return system.getResultFail(-101, "whetherType is empty"); return system.getResultFail(-101, "WhetherType is empty");
} }
priceName = pobj.actionBody.whetherType; priceName = pobj.actionBody.WhetherType;
} }
//银行开户 //银行开户
if (pobj.actionBody.pathCode == "/ic/bankopen/") { if (pobj.actionBody.PathCode == "/ic/bankopen/") {
if (!pobj.actionBody.registeredType) { if (!pobj.actionBody.RegisteredType) {
return system.getResultFail(-101, "registeredType is empty"); return system.getResultFail(-101, "RegisteredType is empty");
} }
priceName = pobj.actionBody.whetherType; priceName = pobj.actionBody.RegisteredType;
} }
//工商变更 //工商变更
if (pobj.actionBody.pathCode == "/ic/gschangs/") { if (pobj.actionBody.PathCode == "/ic/gschangs/") {
} }
// //
var productstr = "p_business_registration"; var productstr = "p_business_registration";
if (pobj.actionBody.pathCode == "/ic/sksq/") { if (pobj.actionBody.PathCode == "/ic/sksq/") {
productstr = "p_agent" productstr = "p_agent"
if (!pobj.actionBody.taxpayerType) { if (!pobj.actionBody.TaxpayerType) {
return system.getResultFail(-101, "taxpayerType is empty"); return system.getResultFail(-101, "TaxpayerType is empty");
} }
priceName = pobj.actionBody.taxpayerType; priceName = pobj.actionBody.TaxpayerType;
} }
if (pobj.actionBody.pathCode.indexOf("/qcfw/") > -1) { if (pobj.actionBody.PathCode.indexOf("/qcfw/") > -1) {
productstr = "p_vat"; productstr = "p_vat";
if (pobj.actionBody.period) { if (pobj.actionBody.Period) {
priceName = pobj.actionBody.period; priceName = pobj.actionBody.Period;
} }
} }
// if (pobj.actionBody.pathCode == "/ic/dljz/") { // if (pobj.actionBody.PathCode == "/ic/dljz/") {
// if (!pobj.actionBody.subjectType) { // if (!pobj.actionBody.subjectType) {
// return system.getResultFail(-101, "subjectType is empty"); // return system.getResultFail(-101, "subjectType is empty");
// } // }
...@@ -482,7 +402,7 @@ class OrderInfoService extends ServiceBase { ...@@ -482,7 +402,7 @@ class OrderInfoService extends ServiceBase {
// priceName = pobj.actionBody.subjectType + pobj.actionBody.taxpayerType; // priceName = pobj.actionBody.subjectType + pobj.actionBody.taxpayerType;
// } // }
var sqlobj = { var sqlobj = {
pathCode: pobj.actionBody.pathCode pathCode: pobj.actionBody.PathCode
} }
var sql = "select product_code goodsSubType,pid,price_code billingcode from tx_product_price where product_name=:pathCode"; var sql = "select product_code goodsSubType,pid,price_code billingcode from tx_product_price where product_name=:pathCode";
if (priceName) { if (priceName) {
...@@ -497,11 +417,8 @@ class OrderInfoService extends ServiceBase { ...@@ -497,11 +417,8 @@ class OrderInfoService extends ServiceBase {
return system.getResultFail(-203, "txprice is empty"); return system.getResultFail(-203, "txprice is empty");
} }
var productobj = { var productobj = {
region_id: pobj.actionBody.regionId, region_id: pobj.actionBody.RegionId,
path_code: pobj.actionBody.pathCode path_code: pobj.actionBody.PathCode
}
if (pobj.actionBody.priceName) {
productobj.price_name = pobj.actionBody.priceName;
} }
var txproductinfo = await this.dao.selPrice2TX(productobj); var txproductinfo = await this.dao.selPrice2TX(productobj);
if (txproductinfo.status < 0) { if (txproductinfo.status < 0) {
...@@ -516,8 +433,8 @@ class OrderInfoService extends ServiceBase { ...@@ -516,8 +433,8 @@ class OrderInfoService extends ServiceBase {
"interface": { "interface": {
"interfaceName": "qcloud.price.getPrice", "interfaceName": "qcloud.price.getPrice",
"para": { "para": {
"uin": pobj.actionBody.userId, "uin": pobj.actionBody.UserId,
"ownerUin": pobj.actionBody.userId, "ownerUin": pobj.actionBody.UserId,
"resInfo": [ "resInfo": [
{ {
"goodsCategoryId": goodsCategoryId, "goodsCategoryId": goodsCategoryId,
...@@ -536,26 +453,26 @@ class OrderInfoService extends ServiceBase { ...@@ -536,26 +453,26 @@ class OrderInfoService extends ServiceBase {
"productCode": productstr, "productCode": productstr,
"goodsSubType": goodsSubType, "goodsSubType": goodsSubType,
"subProductCode": goodsSubType, "subProductCode": goodsSubType,
"qifuzidingyi": pobj.actionBody.regionName "qifuzidingyi": pobj.actionBody.RegionName
} }
} }
] ]
} }
} }
} }
if (pobj.actionBody.userId) { if (pobj.actionBody.UserId) {
txobj.interface.para.uin = pobj.actionBody.userId; txobj.interface.para.uin = pobj.actionBody.UserId;
txobj.interface.para.ownerUin = pobj.actionBody.userId; txobj.interface.para.ownerUin = pobj.actionBody.UserId;
} }
if (billingcode) { if (billingcode) {
txobj.interface.para.resInfo[0].goodsDetail[billingcode] = "1"; txobj.interface.para.resInfo[0].goodsDetail[billingcode] = "1";
} }
if (pobj.actionBody.regionName) { if (pobj.actionBody.RegionName) {
txobj.interface.para.resInfo[0].goodsDetail.qifuzidingyi = pobj.actionBody.regionName; txobj.interface.para.resInfo[0].goodsDetail.qifuzidingyi = pobj.actionBody.RegionName;
} }
if (pobj.actionBody.timeSpan) { if (pobj.actionBody.TimeSpan) {
txobj.interface.para.resInfo[0].goodsDetail.timeSpan = pobj.actionBody.timeSpan; txobj.interface.para.resInfo[0].goodsDetail.timeSpan = pobj.actionBody.TimeSpan;
txobj.interface.para.resInfo[0].goodsDetail.timeUnit = pobj.actionBody.timeUnit; txobj.interface.para.resInfo[0].goodsDetail.timeUnit = pobj.actionBody.TimeUnit;
} }
var rtn = await this.execPostByTimeOut(txobj, "http://trade.sandbox.com/interfaces/interface.php"); var rtn = await this.execPostByTimeOut(txobj, "http://trade.sandbox.com/interfaces/interface.php");
if (rtn.status < 0) { if (rtn.status < 0) {
...@@ -569,7 +486,7 @@ class OrderInfoService extends ServiceBase { ...@@ -569,7 +486,7 @@ class OrderInfoService extends ServiceBase {
realTotalCost: rtn.data.data[0].realTotalCost, realTotalCost: rtn.data.data[0].realTotalCost,
product: { product: {
productIcon: txproductinfo.data.product_icon, productIcon: txproductinfo.data.product_icon,
productType: pobj.actionBody.pathCode, productType: pobj.actionBody.PathCode,
productTypeName: txproductinfo.data.product_type_name, productTypeName: txproductinfo.data.product_type_name,
servicerCode: txproductinfo.data.servicer_code, servicerCode: txproductinfo.data.servicer_code,
servicerName: txproductinfo.data.servicer_name servicerName: txproductinfo.data.servicer_name
...@@ -580,20 +497,24 @@ class OrderInfoService extends ServiceBase { ...@@ -580,20 +497,24 @@ class OrderInfoService extends ServiceBase {
} }
async submitGoodsinfo(pobj) { async submitGoodsinfo(pobj) {
if (pobj.actionBody.info.length < 1) { if (!pobj.actionBody.Info) {
return system.getResultFail(-101, "Info is empty");
}
pobj.actionBody.Info=JSON.parse(pobj.actionBody.Info);
if (pobj.actionBody.Info.length < 1) {
return system.getResultFail(-101, "info is empty"); return system.getResultFail(-101, "info is empty");
} }
if (!pobj.actionBody.info[0].productSnapshot) { if (!pobj.actionBody.Info[0].productSnapshot) {
return system.getResultFail(-101, "productSnapshot is empty"); return system.getResultFail(-101, "productSnapshot is empty");
} }
if (!pobj.actionBody.info[0].product) { if (!pobj.actionBody.Info[0].product) {
return system.getResultFail(-101, "product is empty"); return system.getResultFail(-101, "product is empty");
} }
if (!pobj.actionBody.info[0].showInfo) { if (!pobj.actionBody.Info[0].showInfo) {
return system.getResultFail(-101, "showInfo is empty"); return system.getResultFail(-101, "showInfo is empty");
} }
var goodsCategoryId = 100114; var goodsCategoryId = 100114;
if (pobj.actionBody.info[0].product.productType.indexOf("/ic/") < 0) { if (pobj.actionBody.Info[0].product.productType.indexOf("/ic/") < 0) {
goodsCategoryId = 100114; goodsCategoryId = 100114;
} }
var so = { var so = {
...@@ -618,19 +539,27 @@ class OrderInfoService extends ServiceBase { ...@@ -618,19 +539,27 @@ class OrderInfoService extends ServiceBase {
} }
}; };
goodsinfo.goodsDetail = pobj.actionBody.info[0].productSnapshot; goodsinfo.goodsDetail = pobj.actionBody.Info[0].productSnapshot;
goodsinfo.goodsDetail.product = pobj.actionBody.info[0].product; goodsinfo.goodsDetail.product = pobj.actionBody.Info[0].product;
goodsinfo.goodsDetail.productInfo = pobj.actionBody.info[0].showInfo; goodsinfo.goodsDetail.productInfo = pobj.actionBody.Info[0].showInfo;
goodsinfo.goodsDetail.formInfo = pobj.actionBody.info[0].formInfo; goodsinfo.goodsDetail.formInfo = pobj.actionBody.Info[0].formInfo;
so.itemDetails.raw_goodsData.push(goodsinfo); so.itemDetails.raw_goodsData.push(goodsinfo);
if (pobj.actionBody.info.length == 2) { if (pobj.actionBody.Info.length >= 2) {
var newgoodsinfo = JSON.parse(JSON.stringify(goodsinfo)); var newgoodsinfo = JSON.parse(JSON.stringify(goodsinfo));
newgoodsinfo.goodsDetail.product = pobj.actionBody.info[1].product; newgoodsinfo.goodsDetail.product = pobj.actionBody.Info[1].product;
newgoodsinfo.goodsDetail = pobj.actionBody.info[1].productSnapshot; newgoodsinfo.goodsDetail = pobj.actionBody.Info[1].productSnapshot;
newgoodsinfo.goodsDetail.productInfo = pobj.actionBody.info[1].showInfo; newgoodsinfo.goodsDetail.productInfo = pobj.actionBody.Info[1].showInfo;
newgoodsinfo.goodsDetail.formInfo = pobj.actionBody.info[1].formInfo; newgoodsinfo.goodsDetail.formInfo = pobj.actionBody.Info[1].formInfo;
so.itemDetails.raw_goodsData.push(newgoodsinfo); so.itemDetails.raw_goodsData.push(newgoodsinfo);
} }
if (pobj.actionBody.Info.length == 3) {
var newgoodsinfo1 = JSON.parse(JSON.stringify(goodsinfo));
newgoodsinfo1.goodsDetail.product = pobj.actionBody.Info[2].product;
newgoodsinfo1.goodsDetail = pobj.actionBody.Info[2].productSnapshot;
newgoodsinfo1.goodsDetail.productInfo = pobj.actionBody.Info[2].showInfo;
newgoodsinfo1.goodsDetail.formInfo = pobj.actionBody.Info[2].formInfo;
so.itemDetails.raw_goodsData.push(newgoodsinfo1);
}
var robj = { var robj = {
"url": "https://buy.cloud.tencent.com/order/check", "url": "https://buy.cloud.tencent.com/order/check",
"param": so "param": so
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
1. [用户查看订单详情](#GetOrderDetail) 1. [用户查看订单详情](#GetOrderDetail)
1. [用户获取业务主体信息列表](#GetApplyListByUserAndType) 1. [用户获取业务主体信息列表](#GetApplyListByUserAndType)
1. [用户获取业务主体详情](#GetApplyAndSolutionInfo) 1. [用户获取业务主体详情](#GetApplyAndSolutionInfo)
1. [商城询价接口](#selPrice2TX) 1. [商城询价接口](#SelPrice2TX)
1. [用户获取概览数据](#GetOverviewInfoByUser) 1. [用户获取概览数据](#GetOverviewInfoByUser)
1. [立即购买](#submitGoodsinfo) 1. [立即购买](#SubmitGoodsinfo)
1. [需求提交](#needSubmit) 1. [需求提交](#NeedSubmit)
1. [需求列表](#needList) 1. [需求列表](#NeedList)
1. [需求详情](#needDetail) 1. [需求详情](#NeedDetail)
1. [根据交付状态获取订单列表](#GetOrderListByStatus) 1. [根据交付状态获取订单列表](#GetOrderListByStatus)
1. [关闭需求](#refusalSolution) 1. [关闭需求](#RefusalSolution)
1. [我的资质证照列表](#GetQualificationCertificateListByUserAndType) 1. [我的资质证照列表](#GetQualificationCertificateListByUserAndType)
1. [我的资质证照详情](#GetQualificationCertificateDetail) 1. [我的资质证照详情](#GetQualificationCertificateDetail)
...@@ -329,43 +329,43 @@ ...@@ -329,43 +329,43 @@
} }
``` ```
## **<a name="selPrice2TX"> 商城询价接口</a>** ## **<a name="SelPrice2TX"> 商城询价接口</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/api/action/order/springBoard] [/api/action/order/springBoard]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
#### 功能模块 Action:selPrice2TX #### 功能模块 Action:SelPrice2TX
#### 参数说明 #### 参数说明
1、公司注册: /ic/gsreg/ 1、公司注册: /ic/gsreg/
| 参数名 | 必填 | 类型 | 描述 | | 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- |
| userId | 否 | string | 用户id | | UserId | 否 | string | 用户id |
| regionId | 是 | string | 地区代码 | | RegionId | 是 | string | 地区代码 |
| regionName | 是 | string | 地区拼音 | | RegionName | 是 | string | 地区拼音 |
| pathCode | 是 | string | 产品类型 | | PathCode | 是 | string | 产品类型 |
| companyProperties | 是 | string | 公司类型 | | CompanyProperties | 是 | string | 公司类型 |
2.云上公司注册 /ic/cpreg/ 2.云上公司注册 /ic/cpreg/
| 参数名 | 必填 | 类型 | 描述 | | 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- |
| userId | 否 | string | 用户id | | UserId | 否 | string | 用户id |
| regionId | 是 | string | 地区代码 | | RegionId | 是 | string | 地区代码 |
| regionName | 是 | string | 地区拼音 | | RegionName | 是 | string | 地区拼音 |
| pathCode | 是 | string | 产品类型 | | PathCode | 是 | string | 产品类型 |
| registeredType | 是 | string | 注册类型 | | RegisteredType | 是 | string | 注册类型 |
3.刻章服务 /ic/kzfw/ 3.刻章服务 /ic/kzfw/
| 参数名 | 必填 | 类型 | 描述 | | 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- |
| userId | 否 | string | 用户id | | UserId | 否 | string | 用户id |
| regionId | 是 | string | 地区代码 | | RegionId | 是 | string | 地区代码 |
| regionName | 是 | string | 地区拼音 | | RegionName | 是 | string | 地区拼音 |
| pathCode | 是 | string | 产品类型 | | PathCode | 是 | string | 产品类型 |
| whetherType | 是 | string | 刻章类型 | | WhetherType | 是 | string | 刻章类型 |
<!-- 4.银行开户 /ic/bankopen/ <!-- 4.银行开户 /ic/bankopen/
...@@ -380,60 +380,60 @@ ...@@ -380,60 +380,60 @@
| 参数名 | 必填 | 类型 | 描述 | | 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- |
| userId | 否 | string | 用户id | | UserId | 否 | string | 用户id |
| regionId | 是 | string | 地区代码 | | RegionId | 是 | string | 地区代码 |
| regionName | 是 | string | 地区拼音 | | RegionName | 是 | string | 地区拼音 |
| pathCode | 是 | string | 产品类型 | | PathCode | 是 | string | 产品类型 |
5.税控申请  /ic/sksq/ 5.税控申请  /ic/sksq/
|   参数名   | 必填  |  类型   | 描述  | |   参数名   | 必填  |  类型   | 描述  |
|  ----  | ----  |  ----  | ----  | |  ----  | ----  |  ----  | ----  |
| userId  | 否 |  string   | 用户id  | || UserId | 否 | string | 用户id |
| regionId  | 是 |  string   | 地区代码  | | RegionId | 是 | string | 地区代码 |
| regionName  | 是 |  string   | 地区拼音  | | RegionName | 是 | string | 地区拼音 |
| pathCode  | 是 |  string   | 产品类型  | | PathCode | 是 | string | 产品类型 |
taxpayerType  | 是 |  string   | 纳税人类型  | TaxpayerType  | 是 |  string   | 纳税人类型  |
timeSpan  | 是 |  string   | 计费数量  | TimeSpan  | 是 |  string   | 计费数量  |
timeUnit  | 是 |  string   | 计费周期  | TimeUnit  | 是 |  string   | 计费周期  |
6.icp /qcfw/icp/ 6.icp /qcfw/icp/
| 参数名 | 必填 | 类型 | 描述 | | 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- |
| userId | 否 | string | 用户id | | UserId | 否 | string | 用户id |
| regionId | 是 | string | 地区代码 | | RegionId | 是 | string | 地区代码 |
| regionName | 是 | string | 地区拼音 | | RegionName | 是 | string | 地区拼音 |
| pathCode | 是 | string | 产品类型 | | PathCode | 是 | string | 产品类型 |
| period | 是 | string | 办理周期 | | Period | 是 | string | 办理周期 |
7.edi /qcfw/edi/ 7.edi /qcfw/edi/
| 参数名 | 必填 | 类型 | 描述 | | 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- |
| userId | 否 | string | 用户id | | UserId | 否 | string | 用户id |
| regionId | 是 | string | 地区代码 | | RegionId | 是 | string | 地区代码 |
| regionName | 是 | string | 地区拼音 | | RegionName | 是 | string | 地区拼音 |
| pathCode | 是 | string | 产品类型 | | PathCode | 是 | string | 产品类型 |
| period | 是 | string | 办理周期 | | Period | 是 | string | 办理周期 |
8.icp年报 /qcfw/icpannals/ 8.icp年报 /qcfw/icpannals/
| 参数名 | 必填 | 类型 | 描述 | | 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- |
| userId | 否 | string | 用户id | | UserId | 否 | string | 用户id |
| regionId | 是 | string | 地区代码 | | RegionId | 是 | string | 地区代码 |
| regionName | 是 | string | 地区拼音 | | RegionName | 是 | string | 地区拼音 |
| pathCode | 是 | string | 产品类型 | | PathCode | 是 | string | 产品类型 |
9.edi年报 /qcfw/ediannals/ 9.edi年报 /qcfw/ediannals/
| 参数名 | 必填 | 类型 | 描述 | | 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- |
| userId | 否 | string | 用户id | | UserId | 否 | string | 用户id |
| regionId | 是 | string | 地区代码 | | RegionId | 是 | string | 地区代码 |
| regionName | 是 | string | 地区拼音 | | RegionName | 是 | string | 地区拼音 |
| pathCode | 是 | string | 产品类型 | | PathCode | 是 | string | 产品类型 |
...@@ -441,13 +441,13 @@ ...@@ -441,13 +441,13 @@
#### 参数示例 #### 参数示例
``` javascript ``` javascript
{ {
"Action": "selPrice2TX", "Action": "SelPrice2TX",
"actionBody": { "ActionBody": {
"userId": "10628520", "UserId": "10628520",
"regionId":"1", "RegionId":"1",
"pathCode":"/ic/gsreg/", "PathCode":"/ic/gsreg/",
"whetherType":"公司章", "WhetherType":"公司章",
"regionName":"shanghai" "RegionName":"shanghai"
} }
} }
``` ```
...@@ -455,172 +455,49 @@ ...@@ -455,172 +455,49 @@
#### 返回结果 #### 返回结果
```javascript ```javascript
{ {
"status": 1, "Response": {
"message": "success", "Status": 1,
"data": { "InstanceSet": {
"totalCost": 69800, //标价 "TotalCost": 58000,
"realTotalCost": 45370, //优惠后价格 "RealTotalCost": 37700,
"product": { //产品信息 "Product": "{\"productIcon\":null,\"productType\":\"/ic/kzfw/\",\"productTypeName\":\"/工商服务/刻章服务/\",\"servicerCode\":null,\"servicerName\":null}",
"productIcon": null, "ProductSnapshot": "{\"timeSpan\":\"1\",\"timeUnit\":\"p\",\"pid\":\"1003952\",\"productCode\":\"p_business_registration\",\"goodsSubType\":\"sp_business_registration_chapter\",\"subProductCode\":\"sp_business_registration_chapter\",\"qifuzidingyi\":\"shanghai\",\"sv_business_registration_type_fivechapter\":\"1\"}"
"productType": "/ic/gsreg/",
"productTypeName": "/工商服务/公司注册/",
"servicerCode": "测试服务商"
}, },
"productSnapshot": { //订单快照 "RequestId": "c994bb40-b2d4-11ea-b81b-89b08281dc19"
"price": 69800, }
"partDetail": {
"sv_business_registration_category_group1": {
"pid": "1003963",
"price": 0,
"value": 0,
"priceModel": "linear",
"priceDetail": [
{
"singlePrice": 0,
"usedAmount": 0,
"cost": 0
}
],
"billingItemCode": "v_business_registration_category",
"subBillingItemCode": "sv_business_registration_category_group1",
"totalCost": 0
},
"sv_business_registration_category_limited1": {
"pid": "1003948",
"price": 69800,
"value": 1,
"priceModel": "linear",
"priceDetail": [
{
"singlePrice": 698,
"usedAmount": 1,
"cost": 698
}
],
"billingItemCode": "v_business_registration_category",
"subBillingItemCode": "sv_business_registration_category_limited1",
"totalCost": 69800,
"realTotalCost": 45370,
"policy": 65,
"policyDetail": {
"total": 65,
"user": 65,
"common": 100,
"activity": 100,
"discountType": "user",
"discountId": 151203,
"preferentialType": 0,
"discountSpecifiedPid": 0
}
},
"sv_business_registration_category_stock1": {
"pid": "1003950",
"price": 0,
"value": 0,
"priceModel": "linear",
"priceDetail": [
{
"singlePrice": 0,
"usedAmount": 0,
"cost": 0
}
],
"billingItemCode": "v_business_registration_category",
"subBillingItemCode": "sv_business_registration_category_stock1",
"totalCost": 0
}
},
"hasUserPrice": false,
"totalCost": 69800,
"currency": "CNY",
"timeUnit": "p",
"timeSpan": 1,
"goodsNum": 1,
"fromType": 1,
"productCode": "p_business_registration",
"subProductCode": "sp_business_registration_company_registration",
"pid": 1003949,
"realTotalCost": 45370,
"highPrecisionPrice": {
"priceHigh": "69800",
"totalCostHigh": "69800",
"realTotalCostHigh": "45370"
},
"policy": 65,
"policyDetail": {
"total": 65,
"user": 65,
"common": 100,
"activity": 100,
"combine": 65,
"discountId": 0,
"preferentialType": 0,
"discountSpecifiedPid": 0
},
"unitPrice": 69800
}
},
"requestId": ""
} }
``` ```
## **<a name="submitGoodsinfo"> 立即购买</a>** ## **<a name="SubmitGoodsinfo"> 立即购买</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/api/action/order/springBoard] [/api/action/order/springBoard]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
#### 功能模块 Action:submitGoodsinfo #### 功能模块 Action:SubmitGoodsinfo
#### 参数说明 #### 参数说明
| 参数名 | 必填 | 类型 | 描述 | | 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- |
| userId | 是 | string | 用户id | | UserId | 是 | string | 用户id |
| verificationCode | 是 | string | 验证码 | | VerificationCode | 否 | string | 验证码 |
| info | 是 | string | 产品信息 支持多个产品提交 数组格式 | | Info | 是 | string | 产品信息 支持多个产品提交 数组格式 |
| info[0].productSnapshot | 是 | string | tx产品快照 | | Info[0].productSnapshot | 是 | string | tx产品快照 |
| info[0].product | 是 | string | 产品快照 | | Info[0].product | 是 | string | 产品快照 |
| info[0].showInfo | 是 | string | 核对页展示信息 | | Info[0].showInfo | 是 | string | 核对页展示信息 |
| info[0].formInfo | 是 | string | 表单信息 | | Info[0].formInfo | 是 | string | 表单信息 |
#### 参数示例 #### 参数示例
``` javascript ``` javascript
{ {
"Action": "submitGoodsinfo", "Action": "SubmitGoodsinfo",
"actionBody": { "ActionBody": {
"userId": "011", "UserId": "011",
"verificationCode": "564264", "VerificationCode": "564264",
"info": [{ "Info":"[{\"product\":{\"productIcon\":null,\"productType\":\"/ic/kzfw/\",\"productTypeName\":\"/工商服务/刻章服务/\",\"servicerCode\":\"测试服务商\"},\"productSnapshot\":{\"timeSpan\":\"1\",\"timeUnit\":\"p\",\"pid\":1003952,\"productCode\":\"p_business_registration\",\"goodsSubType\":\"sp_business_registration_chapter\",\"subProductCode\":\"sp_business_registration_chapter\",\"qifuzidingyi\":\"beijing\",\"sv_business_registration_type_fivechapter\":\"1\"},\"showInfo\":[{\"name\":\"公司名称\",\"value\":\"公司宝\"},{\"name\":\"公司名称\",\"value\":\"公司宝\"}],\"formInfo\":{}}]"
"product": {
"productIcon": null,
"productType": "/ic/kzfw/",
"productTypeName": "/工商服务/刻章服务/",
"servicerCode": "测试服务商"
},
"productSnapshot": {
"timeSpan": "1",
"timeUnit": "p",
"pid": 1003952,
"productCode": "p_business_registration",
"goodsSubType": "sp_business_registration_chapter",
"subProductCode": "sp_business_registration_chapter",
"qifuzidingyi": "beijing",
"sv_business_registration_type_fivechapter": "1"
},
"showInfo": [
[{
"name": "公司名称",
"value": "公司宝"
}, {
"name": "公司名称",
"value": "公司宝"
}]
],
"formInfo": {}
}]
} }
} }
``` ```
...@@ -628,187 +505,117 @@ ...@@ -628,187 +505,117 @@
#### 返回结果 #### 返回结果
```javascript ```javascript
{ {
"status": 1, "Response": {
"message": "success", "Status": 1,
"data": { "InstanceSet": {
"url": "https://buy.cloud.tencent.com/order/check", "Url": "https://buy.cloud.tencent.com/order/check",
"param": { "Param": "{\"itemDetails\":{\"raw_goodsData\":[{\"goodsCategoryId\":100114,\"regionId\":1,\"projectId\":0,\"zoneId\":100001,\"goodsNum\":1,\"payMode\":1,\"goodsDetail\":{\"timeSpan\":\"1\",\"timeUnit\":\"p\",\"pid\":1003952,\"productCode\":\"p_business_registration\",\"goodsSubType\":\"sp_business_registration_chapter\",\"subProductCode\":\"sp_business_registration_chapter\",\"qifuzidingyi\":\"beijing\",\"sv_business_registration_type_fivechapter\":\"1\",\"product\":{\"productIcon\":null,\"productType\":\"/ic/kzfw/\",\"productTypeName\":\"/工商服务/刻章服务/\",\"servicerCode\":\"测试服务商\"},\"productInfo\":[{\"name\":\"公司名称\",\"value\":\"公司宝\"},{\"name\":\"公司名称\",\"value\":\"公司宝\"}],\"formInfo\":{}}}]}}"
"itemDetails": { },
"raw_goodsData": [ "RequestId": "a4f61720-b2d9-11ea-bcc3-65805920fb58"
{ }
"goodsCategoryId": 100114,
"regionId": 1,
"projectId": 0,
"zoneId": 100001,
"goodsNum": 1,
"payMode": 1,
"goodsDetail": {
"timeSpan": "1",
"timeUnit": "p",
"pid": 1003952,
"productCode": "p_business_registration",
"goodsSubType": "sp_business_registration_chapter",
"subProductCode": "sp_business_registration_chapter",
"qifuzidingyi": "beijing",
"sv_business_registration_type_fivechapter": "1",
"productInfo": [
{
"name": "公司名称",
"value": "公司宝"
},
{
"name": "公司名称",
"value": "公司宝"
}
],
"formInfo": {}
}
}
]
}
}
},
"requestId": ""
} }
``` ```
## **<a name="needSubmit"> 创建需求</a>** ## **<a name="NeedSubmit"> 创建需求</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/api/action/need/springBoard] [/api/action/need/springBoard]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
#### 功能模块 Action:needSubmit #### 功能模块 Action:NeedSubmit
#### 参数说明 #### 参数说明
| 参数名 | 必填 | 类型 | 描述 | | 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- |
| userId | 是 | string | 用户id | | UserId | 是 | string | 用户id |
| contactsMoblie | 是 | string | 联系人电话 | | ContactsMoblie | 是 | string | 联系人电话 |
| contactsName | 否 | string | 联系人名称 | | ContactsName | 否 | string | 联系人名称 |
| regionId | 是 | string | 地区id | | RegionId | 是 | string | 地区id |
| regionName | 是 | string | 地区名称 | | RegionName | 是 | string | 地区名称 |
| verificationCode | 是 | string | 验证码 | | VerificationCode | 是 | string | 验证码 |
| notes | 否 | string | 备注 | | Notes | 否 | string | 备注 |
| consultType | 是 | string | 产品类型 | | ConsultType | 是 | string | 产品类型 |
| consultTypeName | 是 | string | 产品类型名称 | | ConsultTypeName | 是 | string | 产品类型名称 |
| companyName | 否 | string | 公司名称 | | CompanyName | 否 | string | 公司名称 |
#### 参数示例 #### 参数示例
``` javascript ``` javascript
{ {
"Action": "needSubmit", "Action": "needSubmit",
"actionBody": { "ActionBody": {
"userId": "011", "UserId": "011",
"contactsMoblie":"17610163852", "ContactsMoblie":"17610163852",
"contactsName":"wdy", "ContactsName":"wdy",
"regionId":"110100", "RegionId":"110100",
"regionName":"北京", "RegionName":"北京",
"consultType":"/ic/gsreg/", "ConsultType":"/ic/gsreg/",
"consultTypeName":"/工商服务/公司注册/", "ConsultTypeName":"/工商服务/公司注册/",
} }
} }
``` ```
#### 返回结果 #### 返回结果
```javascript ```javascript
{"status":1, {
"message":"success", "Response": {
"requestId":"" "Status": 1,
} "InstanceSet": "",
"RequestId": "ee2b7450-b2c8-11ea-8e5e-ed12303f5d17"
}
}
``` ```
## **<a name="needList"> 需求列表</a>** ## **<a name="NeedList"> 需求列表</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/api/action/need/springBoard] [/api/action/need/springBoard]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
#### 功能模块 Action:needList #### 功能模块 Action:NeedList
#### 参数说明 #### 参数说明
| 参数名 | 必填 | 类型 | 描述 | | 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- |
| userId | 是 | string | 用户id | | UserId | 是 | string | 用户id |
| pageNo | 否 | string | 页码 | | PageNo | 否 | string | 页码 |
| pageSize | 否 | string | 页面大小 | | PageSize | 否 | string | 页面大小 |
| status | 否 | string | 状态 | | Status | 否 | string | 状态 |
| consultType | 是 | string | 需求类型 | | ConsultType | 是 | string | 需求类型 |
| sort | 否 | string | 排序 | | Sort | 否 | string | 排序 |
| sort.key | 是 | string | 字段名称 | | Sort.key | 是 | string | 字段名称 |
| sort.value | 是 | string | 排序方式 desc asc | | Sort.value | 是 | string | 排序方式 desc asc |
#### 参数示例 #### 参数示例
``` javascript ``` javascript
{ {
"Action": "needList", "Action": "NeedList",
"actionBody": { "ActionBody": {
"userId": "011", "UserId": "011",
"pageNo":"1", "PageNo":"1",
"pageSize":"10", "PageSize":"10",
"status":"1", "Status":"1",
"consultType":"/ic/gsreg/", "RegionName":"北京",
"sort":{ "ConsultType":"/ic/",
"key":"created_at", "Sort":"{\"key\":\"created_at\",\"value\":\"desc\"}"
"value":"desc"
}
} }
} }
``` ```
#### 返回结果 #### 返回结果
```javascript ```javascript
{ {
"count": 4, "Response": {
"rows": [ "Status": 1,
{ "InstanceSet": {
"id": 34, "Count": 8,
"need_num": "N202006121647F0ecG5w", "Rows": "[{\"id\":103,\"need_num\":\"N202006201537aL6MrDE\",\"user_id\":\"011\",\"user_name\":null,\"contacts_name\":\"wdy\",\"contacts_moblie\":\"17610163852\",\"region_id\":\"320100\",\"region_name\":\"南京\",\"consult_type\":\"/ic/gsreg/\",\"consult_type_name\":\"/工商服务/公司注册/\",\"status\":1,\"status_name\":\"已提交\",\"notes\":\"svlhusghsjhvseiluhuvuivfhi\",\"need_info\":null,\"servicer_code\":\"GSB\",\"servicer_name\":null,\"created_at\":\"2020-06-20T07:37:44.000Z\",\"updated_at\":\"2020-06-20T07:37:44.000Z\",\"deleted_at\":null,\"version\":0},{\"id\":102,\"need_num\":\"N202006201142FJdqXPC\",\"user_id\":\"011\",\"user_name\":null,\"contacts_name\":\"wdy\",\"contacts_moblie\":\"17610163852\",\"region_id\":\"110100\",\"region_name\":\"北京\",\"consult_type\":\"/ic/gsreg/\",\"consult_type_name\":\"/工商服务/公司注册/\",\"status\":1,\"status_name\":\"已提交\",\"notes\":\"svlhusghsjhvseiluhuvuivfhi\",\"need_info\":null,\"servicer_code\":\"S_202006201007FI8tuF\",\"servicer_name\":\"网易云\",\"created_at\":\"2020-06-20T03:42:37.000Z\",\"updated_at\":\"2020-06-20T03:42:37.000Z\",\"deleted_at\":null,\"version\":0},{\"id\":100,\"need_num\":\"N202006201129Qba19e2\",\"user_id\":\"011\",\"user_name\":null,\"contacts_name\":\"wdy\",\"contacts_moblie\":\"17610163852\",\"region_id\":\"110100\",\"region_name\":\"北京\",\"consult_type\":\"/ic/gsreg/\",\"consult_type_name\":\"/工商服务/公司注册/\",\"status\":1,\"status_name\":\"已提交\",\"notes\":\"svlhusghsjhvseiluhuvuivfhi\",\"need_info\":null,\"servicer_code\":\"S_202006201007FI8tuF\",\"servicer_name\":\"网易云\",\"created_at\":\"2020-06-20T03:29:33.000Z\",\"updated_at\":\"2020-06-20T03:29:33.000Z\",\"deleted_at\":null,\"version\":0},{\"id\":67,\"need_num\":\"N202006161642ODMRsRW\",\"user_id\":\"011\",\"user_name\":null,\"contacts_name\":\"\",\"contacts_moblie\":\"18735397229\",\"region_id\":\"110100\",\"region_name\":\"北京\",\"consult_type\":\"/ic/gsreg/\",\"consult_type_name\":\"/工商服务/公司注册/\",\"status\":1,\"status_name\":\"已提交\",\"notes\":\"\",\"need_info\":null,\"servicer_code\":\"gsb\",\"servicer_name\":null,\"created_at\":\"2020-06-16T08:42:14.000Z\",\"updated_at\":\"2020-06-16T08:42:14.000Z\",\"deleted_at\":null,\"version\":0},{\"id\":68,\"need_num\":\"N202006161642nBRBToJ\",\"user_id\":\"011\",\"user_name\":null,\"contacts_name\":\"\",\"contacts_moblie\":\"18735397229\",\"region_id\":\"110100\",\"region_name\":\"北京\",\"consult_type\":\"/ic/gsreg/\",\"consult_type_name\":\"/工商服务/公司注册/\",\"status\":1,\"status_name\":\"已提交\",\"notes\":\"\",\"need_info\":null,\"servicer_code\":\"gsb\",\"servicer_name\":null,\"created_at\":\"2020-06-16T08:42:14.000Z\",\"updated_at\":\"2020-06-16T08:42:14.000Z\",\"deleted_at\":null,\"version\":0},{\"id\":69,\"need_num\":\"N202006161642dtAo81x\",\"user_id\":\"011\",\"user_name\":null,\"contacts_name\":\"\",\"contacts_moblie\":\"18735397229\",\"region_id\":\"110100\",\"region_name\":\"北京\",\"consult_type\":\"/ic/gsreg/\",\"consult_type_name\":\"/工商服务/公司注册/\",\"status\":1,\"status_name\":\"已提交\",\"notes\":\"\",\"need_info\":null,\"servicer_code\":\"gsb\",\"servicer_name\":null,\"created_at\":\"2020-06-16T08:42:14.000Z\",\"updated_at\":\"2020-06-16T08:42:14.000Z\",\"deleted_at\":null,\"version\":0},{\"id\":70,\"need_num\":\"N202006161642AjjLIsr\",\"user_id\":\"011\",\"user_name\":null,\"contacts_name\":\"\",\"contacts_moblie\":\"18735397229\",\"region_id\":\"110100\",\"region_name\":\"北京\",\"consult_type\":\"/ic/gsreg/\",\"consult_type_name\":\"/工商服务/公司注册/\",\"status\":1,\"status_name\":\"已提交\",\"notes\":\"\",\"need_info\":null,\"servicer_code\":\"gsb\",\"servicer_name\":null,\"created_at\":\"2020-06-16T08:42:14.000Z\",\"updated_at\":\"2020-06-16T08:42:14.000Z\",\"deleted_at\":null,\"version\":0},{\"id\":61,\"need_num\":\"N202006141134GQ7HV3a\",\"user_id\":\"011\",\"user_name\":null,\"contacts_name\":\"北京\",\"contacts_moblie\":\"18262855372\",\"region_id\":\"110100\",\"region_name\":\"北京\",\"consult_type\":\"/ic/gsreg/\",\"consult_type_name\":\"/工商服务/公司注册/\",\"status\":1,\"status_name\":\"已提交\",\"notes\":\"00000000000000000\",\"need_info\":null,\"servicer_code\":\"S_202006051002UE4Lse\",\"servicer_name\":\"测试服务商\",\"created_at\":\"2020-06-14T03:34:50.000Z\",\"updated_at\":\"2020-06-14T03:34:50.000Z\",\"deleted_at\":null,\"version\":0}]"
"user_id": "011",
"user_name": null,
"contacts_name": "wdy",
"contacts_moblie": "17610163852",
"region_id": "110100",
"region_name": "北京",
"consult_type": "/ic/gsreg/",
"consult_type_name": "/工商服务/公司注册/",
"status": 1,
"status_name": "已提交",
"notes": null,
"need_info": null,
"servicer_code": "S_202006051002UE4Lse",
"servicer_name": "测试服务商",
"created_at": "2020-06-12T08:47:28.000Z",
"updated_at": "2020-06-12T08:47:28.000Z",
"version": 0
}, },
{ "RequestId": "af0cf310-b2ce-11ea-9dd5-03e6b499c7e6"
"id": 33, }
"need_num": "N2020061216025sB16rc",
"user_id": "011",
"user_name": null,
"contacts_name": "wdy",
"contacts_moblie": "17610163852",
"region_id": "110100",
"region_name": "北京",
"consult_type": "/ic/gsreg/",
"consult_type_name": "/工商服务/公司注册/",
"status": 1,
"status_name": "已提交",
"notes": null,
"need_info": null,
"servicer_code": "S_202006051002UE4Lse",
"servicer_name": "测试服务商",
"created_at": "2020-06-12T08:02:41.000Z",
"updated_at": "2020-06-12T08:02:41.000Z",
"version": 0
}
],
"requestId": ""
} }
``` ```
...@@ -818,21 +625,21 @@ ...@@ -818,21 +625,21 @@
[/api/action/need/springBoard] [/api/action/need/springBoard]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
#### 功能模块 Action:needDetail #### 功能模块 Action:NeedDetail
#### 参数说明 #### 参数说明
| 参数名 | 必填 | 类型 | 描述 | | 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- |
| needNum | 是 | string | 需求号 | | NeedNum | 是 | string | 需求号 |
#### 参数示例 #### 参数示例
``` javascript ``` javascript
{ {
"Action": "needDetail", "Action": "NeedDetail",
"actionBody": { "ActionBody": {
"needNum": "202006100003" "NeedNum": "202006100003"
} }
} }
``` ```
...@@ -840,70 +647,14 @@ ...@@ -840,70 +647,14 @@
#### 返回结果 #### 返回结果
```javascript ```javascript
{ {
"status": 1, "Response": {
"message": "success", "Status": 1,
"data": { "InstanceSet": {
"needInfo": { "NeedInfo": "{\"id\":20,\"need_num\":\"N202006130012\",\"user_id\":\"1\",\"user_name\":\"张三\",\"contacts_name\":\"张三\",\"contacts_moblie\":\"13075556693\",\"region_id\":\"1\",\"region_name\":\"北京\",\"consult_type\":\"/qcfw/icp/\",\"consult_type_name\":\"/资质证照/icp/\",\"status\":2,\"status_name\":\"待用户确认\",\"notes\":\"测试数据勿删\",\"need_info\":null,\"servicer_code\":\"gsb\",\"servicer_name\":\"公司宝\",\"created_at\":\"2020-06-03T16:04:45.000Z\",\"updated_at\":\"2020-06-20T08:58:06.000Z\",\"deleted_at\":null,\"version\":null}",
"id": 9, "SolutionInfo": "{\"id\":17,\"need_num\":\"N202006130012\",\"solution_num\":\"NS_202006130920sregN\",\"user_id\":\"1\",\"user_name\":\"张三\",\"solution_content\":{\"id\":26,\"bizopt_id\":32,\"clerkName\":\"小三\",\"clerkPhone\":\"4567800\",\"updated_at\":\"2020-06-02 20:32:14\",\"remark_info\":\"77777777777777777777777\",\"scheme_info\":{\"address\":\"hangzhou\",\"company\":\"77777777777777\",\"annual_report\":true},\"businessType\":\"/qcfw/icp/\",\"servicerCode\":\"1\",\"servicerName\":\"公司宝\",\"salesman_name\":\"小三\",\"facilitator_id\":\"test\",\"salesman_phone\":\"199299949424\",\"refusal_content\":\"\",\"facilitator_name\":\"测试服务商\"},\"is_refusal\":1,\"refusal_notes\":\"测试修改方案\",\"created_at\":\"2020-06-13T01:20:30.000Z\",\"deleted_at\":null,\"version\":0}"
"need_num": "202006100003",
"user_id": "1",
"user_name": "张三",
"contacts_name": "张三",
"contacts_moblie": "13075556693",
"region_id": "1",
"region_name": "北京",
"consult_type": "/ic/gsreg/",
"consult_type_name": "公司注册",
"status": 1,
"status_name": "已提交",
"notes": "测试数据勿删",
"need_info": null,
"servicer_code": "gsb",
"servicer_name": "公司宝",
"created_at": "2020-06-03T16:04:45.000Z",
"updated_at": "2020-06-03T16:04:52.000Z",
"version": null
}, },
"solutionInfo": { "RequestId": "626a5c90-b2d4-11ea-b81b-89b08281dc19"
"id": 7, }
"need_num": "202006100003",
"solution_num": "NS_202006102204dgGry",
"user_id": "1",
"user_name": "张三",
"solution_content": {
"buyTime": "2020-06-10",
"clerkId": "1",
"isRenew": "no",
"memoInfo": "sfdsff",
"clerkName": "小三",
"businessId": 46,
"clerkPhone": "4567800",
"creditCode": "1223345455",
"buyDuration": "1年",
"clerkOpcode": null,
"companyName": "三个五",
"companyType": "有限公司",
"subjectType": "company",
"businessMode": "202006100003",
"businessTerm": "500",
"businessType": "agentCase",
"servicerCode": "1",
"servicerName": "公司宝",
"statusReason": null,
"taxpayerType": "generalTaxpayer",
"businessScope": "sgrgdrgghhh",
"currentStatus": "beforeSubmission",
"establishedTime": "2010-5-6",
"shareholderName": "2B",
"residenceAddress": "北京市",
"registeredCapital": "5万元"
},
"isRefusal": 0,
"created_at": "2020-06-10T14:04:15.000Z",
"version": 0
}
},
"requestId": ""
} }
``` ```
...@@ -991,27 +742,29 @@ ...@@ -991,27 +742,29 @@
``` ```
## **<a name="refusalSolution"> 关闭需求推送到服务商</a>** ## **<a name="RefusalSolution"> 关闭需求推送到服务商</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/api/receive/needApi/springBoard] [/api/receive/needApi/springBoard]
#### 参数格式 `JSON`人 #### 参数格式 `JSON`人
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
#### 渠道执行的类型 Action:refusalSolution #### 渠道执行的类型 Action:RefusalSolution
参数名 | 必须 | 字段类型 | 长度限制 | 说明 参数名 | 必须 | 字段类型 | 长度限制 | 说明
-|-|-|-|- -|-|-|-|-
needNum | Y | string | 100 | 需求号 NeedNum | Y | string | 100 | 需求号
refusalContent | Y | string | 100 | 备注信息 SolutionNum | Y | string | 100 | 方案号
RefusalContent | Y | string | 100 | 备注信息
#### 参数示例 #### 参数示例
``` javascript ``` javascript
{ {
"Action": "refusalSolution", "Action": "RefusalSolution",
"actionBody": { "ActionBody": {
"needNum":"", "NeedNum":"",
"refusalContent":"" //描述 "SolutionNum":"",
"RefusalContent":"" //描述
} }
} }
...@@ -1019,7 +772,7 @@ refusalContent | Y | string | 100 | 备注信息 ...@@ -1019,7 +772,7 @@ refusalContent | Y | string | 100 | 备注信息
#### 返回结果 #### 返回结果
```javascript ```javascript
{"status":1,"message":"success","requestId":"SCZ2020061909582JFC6"} {"Response":{"Status":1,"InstanceSet":"","RequestId":"27f65f50-b2d4-11ea-b81b-89b08281dc19"}}
``` ```
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
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