Commit ae5df8dc by 王悦

专家辅助注册

parent 4f9149f5
...@@ -6,6 +6,8 @@ class tmreview extends APIBase{ ...@@ -6,6 +6,8 @@ class tmreview extends APIBase{
constructor() { constructor() {
super(); super();
this.orderDeliverSve = system.getObject("service.dbcorder.orderdeliverSve"); this.orderDeliverSve = system.getObject("service.dbcorder.orderdeliverSve");
this.orderinfoSve = system.getObject("service.dbcorder.orderinfoSve");
this.needsolutionSve = system.getObject("service.dbneed.needsolutionSve");
} }
async springBoard(pobj, qobj, req) { async springBoard(pobj, qobj, req) {
...@@ -31,6 +33,9 @@ class tmreview extends APIBase{ ...@@ -31,6 +33,9 @@ class tmreview extends APIBase{
case "getOfficalList": case "getOfficalList":
opResult = await this.orderDeliverSve.getOfficialList(pobj,pobj.actionBody) opResult = await this.orderDeliverSve.getOfficialList(pobj,pobj.actionBody)
break; break;
case "addOrderDelivery":
opResult = await this.needsolutionSve.addOrderDelivery(pobj)
break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
break; break;
......
...@@ -54,6 +54,7 @@ class OrderInfoDao extends Dao { ...@@ -54,6 +54,7 @@ class OrderInfoDao extends Dao {
const sql = "INSERT INTO `c_order_delivery` (`sourceOrderNo`,`deliveryContent`) VALUE('" + const sql = "INSERT INTO `c_order_delivery` (`sourceOrderNo`,`deliveryContent`) VALUE('" +
orderNo + "','" + JSON.stringify(data) + "')"; orderNo + "','" + JSON.stringify(data) + "')";
await this.customInsert(sql, null, t); await this.customInsert(sql, null, t);
return system.getResultSuccess()
} }
} }
module.exports = OrderInfoDao; module.exports = OrderInfoDao;
...@@ -207,7 +207,7 @@ class OrderInfoService extends ServiceBase { ...@@ -207,7 +207,7 @@ class OrderInfoService extends ServiceBase {
* @param data * @param data
* @param orderNo * @param orderNo
*/ */
addOrderDelivery(data, orderNo, t) { async addOrderDelivery(data, orderNo, t) {
try { try {
var sql = "INSERT INTO `c_order_delivery` (`sourceOrderNo`,`deliveryContent`) VALUE('" + var sql = "INSERT INTO `c_order_delivery` (`sourceOrderNo`,`deliveryContent`) VALUE('" +
orderNo + "','" + JSON.stringify(data) + "')"; orderNo + "','" + JSON.stringify(data) + "')";
......
...@@ -188,10 +188,12 @@ class NeedinfoService extends ServiceBase { ...@@ -188,10 +188,12 @@ class NeedinfoService extends ServiceBase {
return system.getResult(null, "需求数据为空,30210"); return system.getResult(null, "需求数据为空,30210");
} }
// fixme 阿里直购需要更改 // fixme 阿里直购需要更改
item.solutionProvince = solutionitem.solutionContent.solution.Area || solutionitem.solutionContent.solution.area ; if (!pobj.actionBody.bizId.startsWith("TM_")) {//商标不需要
item.solutionProvince = solutionitem.solutionContent.solution.Area || solutionitem.solutionContent.solution.area;
//item.solutionProvince = solutionitem.solutionContent.solution.Area + `(${solutionitem.solutionContent.solution.actionType})`//北京(新办); //item.solutionProvince = solutionitem.solutionContent.solution.Area + `(${solutionitem.solutionContent.solution.actionType})`//北京(新办);
item.solutionContent = solutionitem.solutionContent item.solutionContent = solutionitem.solutionContent
item.channelSolutionNo = solutionitem.channelSolutionNo item.channelSolutionNo = solutionitem.channelSolutionNo
}
return system.getResultSuccess(item); return system.getResultSuccess(item);
} }
......
...@@ -1334,6 +1334,33 @@ class NeedsolutionService extends ServiceBase { ...@@ -1334,6 +1334,33 @@ class NeedsolutionService extends ServiceBase {
let ns = await this.dao.create(newNsObj); let ns = await this.dao.create(newNsObj);
return system.getResultSuccess(ns) return system.getResultSuccess(ns)
} }
async addOrderDelivery(pobj){
let ab = pobj.actionBody;
let app = pobj.appInfo;
if (!app || !app.uapp_id) {
return system.getResultFail(-100, "未知渠道");
}
if (!ab.BizId) {
return system.getResultFail(-101, "渠道方案编号不能为空");
}
var needinfo = await this.needinfoDao.model.findOne({
where: { channelNeedNo: ab.bizId }, raw: true
});
if (!needinfo || !needinfo.id) {
return system.getResultFail(-102, "未知需求信息");
}
let newNsObj={
orderNo:ab.serviceOrderNo,
channelSolutionNo:ab.BizId,
solutionNo:ab.BizId,
needNo:needinfo.needNo,
channelNeedNo:ab.IntentionBizId,
status:"ywc"
};
newNsObj.solutionContent = JSON.stringify(ab);
let ns = await this.dao.create(newNsObj);
return system.getResultSuccess(ns)
}
} }
module.exports = NeedsolutionService; module.exports = NeedsolutionService;
// var task = new NeedsolutionService(); // var task = new NeedsolutionService();
......
...@@ -680,6 +680,7 @@ class AliyunQcService { ...@@ -680,6 +680,7 @@ class AliyunQcService {
// return system.getResultFail(-103, "该方案状态为" + ns.statusName + ",不能执行此操作"); // return system.getResultFail(-103, "该方案状态为" + ns.statusName + ",不能执行此操作");
// } // }
var solutionContent = ns.solutionContent; var solutionContent = ns.solutionContent;
if (!ab.bizId.startsWith("TM_")) {//非商标
var checkStatus = { var checkStatus = {
ACCOUNT_REGISTERED: "完成账户注册", MATERIAL_SUBMITTED: "完成资料递交", ACCOUNT_REGISTERED: "完成账户注册", MATERIAL_SUBMITTED: "完成资料递交",
GXB_ACCEPT: "⼯信部已受理", GXB_REFUSE: "⼯信部不予受理", GXB_FAIL: "⼯信部未通过", GXB_SUCCESS: "工信部通过" GXB_ACCEPT: "⼯信部已受理", GXB_REFUSE: "⼯信部不予受理", GXB_FAIL: "⼯信部未通过", GXB_SUCCESS: "工信部通过"
...@@ -691,11 +692,11 @@ class AliyunQcService { ...@@ -691,11 +692,11 @@ class AliyunQcService {
//方案流程列表 //方案流程列表
var solutionFlowList = solutionContent.solutionFlowList || []; var solutionFlowList = solutionContent.solutionFlowList || [];
if (ab.status == "1") {//⽤户已支付 if (ab.status == "1") {//⽤户已支付
var afterStatusList=[//用户支付后的流程状态 var afterStatusList = [//用户支付后的流程状态
"USER_UPLOADED", "MATERIAL_UNCONFIRM", "USER_CONFIRMED", "ACCOUNT_REGISTERED", "USER_UPLOADED", "MATERIAL_UNCONFIRM", "USER_CONFIRMED", "ACCOUNT_REGISTERED",
"MATERIAL_SUBMITTED","GXB_ACCEPT","GXB_REFUSE","GXB_FAIL","GXB_SUCCESS","CLOSE" "MATERIAL_SUBMITTED", "GXB_ACCEPT", "GXB_REFUSE", "GXB_FAIL", "GXB_SUCCESS", "CLOSE"
]; ];
if(!solutionContent.status || afterStatusList.indexOf(solutionContent.status)<0){ if (!solutionContent.status || afterStatusList.indexOf(solutionContent.status) < 0) {
solutionFlowList.push({ solutionFlowList.push({
status: "PAID", statusName: this.icpSolutionStatusReference.PAID, updated_at: new Date() status: "PAID", statusName: this.icpSolutionStatusReference.PAID, updated_at: new Date()
}); });
...@@ -766,6 +767,9 @@ class AliyunQcService { ...@@ -766,6 +767,9 @@ class AliyunQcService {
} }
solutionContent.customerMaterial = material; solutionContent.customerMaterial = material;
solutionContent = JSON.stringify(solutionContent); solutionContent = JSON.stringify(solutionContent);
}else {
solutionContent.status = ab.status
}
var updateObj = { var updateObj = {
id: ns.id, solutionContent: solutionContent id: ns.id, solutionContent: solutionContent
}; };
...@@ -836,7 +840,7 @@ class AliyunQcService { ...@@ -836,7 +840,7 @@ class AliyunQcService {
solutionContent = JSON.stringify(solutionContent); solutionContent = JSON.stringify(solutionContent);
updateObj["solutionContent"] = solutionContent; updateObj["solutionContent"] = solutionContent;
await this.needsolutionDao.update(updateObj);//方案状态修改 await this.needsolutionDao.update(updateObj);//方案状态修改
return system.getResultSuccess(); return system.getResultSuccess(needinfo);
} }
//接收方案编号(方案推送至阿里后,接收保存方案信息) //接收方案编号(方案推送至阿里后,接收保存方案信息)
async receiveProgrammeNo(pobj) { async receiveProgrammeNo(pobj) {
......
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