Commit 253165ea by 宋毅

tj

parent 77a8c04b
......@@ -27,6 +27,9 @@ class APIBase {
return system.getResultSuccess();
}
}
if (["updateTmStatus"].indexOf(methodname) >= 0) {
return system.getResultSuccess();
}
if (!pobj.appInfo) {
return system.getResult(null, "pobj.appInfo can not be empty !!");
}
......@@ -53,7 +56,7 @@ class APIBase {
agent: req.uagent,
opTitle: "api服务提供方appKey:" + settings.appKey,
});
rtn.requestId = req.requestId
rtn.requestId = req.requestId;
return rtn;
} catch (e) {
console.log(e.stack, "api调用出现异常,请联系管理员..........")
......
......@@ -8,7 +8,7 @@ class InternalCallsNotify extends APIBase {
this.orderinfoSve = system.getObject("service.dbcorder.orderinfoSve");
}
async updateTmStatus(pobj, qobj, req) {
return system.getResultSuccess();
return await this.orderinfoSve.updateTmStatus(pobj);
}
}
module.exports = InternalCallsNotify;
\ No newline at end of file
......@@ -658,7 +658,7 @@ class OrderInfoService extends ServiceBase {
if (!actionBody.additions) {
return system.getResult(null, "附加购买项目不能为空,20338");
}
}
} orderinfoSve
if (orderItem.orderStatus == 2) {
var dbNclList = itemResult.data.nclones;
if (dbNclList.length < tempNclList.length) {
......@@ -986,6 +986,7 @@ class OrderInfoService extends ServiceBase {
}
async updateTmStatus(actionBody) {
var self = this;
if (!actionBody.tbCode) {
return system.getResult(null, "处理失败,tbCode不能为空,30160");
}
......@@ -1003,17 +1004,18 @@ class OrderInfoService extends ServiceBase {
return system.getResult(null, "修改失败,修改的订单数据未未付款数据为空,30175");
}
actionBody.orderContact = 1;
var deliveryInfo = await this.getOrderDeliveryFlowInfo(null, actionBody);
if (!deliveryInfo) {
var deliveryInfoResult = await this.getOrderDeliveryInfo(null, actionBody);
if (deliveryInfoResult.status != 0 || !deliveryInfoResult.data) {
return system.getResult(null, "修改失败,订单对应的产品数据为空,30180");
}
var deliveryInfo = deliveryInfoResult.data;
var tbCodeIndex = deliveryInfo.nclones.findIndex(f => f.tbCode == actionBody.tbCode);
if (tbCodeIndex < 0) {
return system.getResult(null, "修改失败,订单对应的提报数据为空,30185");
}
deliveryInfo.nclones[tbCodeIndex].tmStatus = actionBody.tmStatus;
deliveryInfo.nclones[tbCodeIndex].tmStatusName = actionBody.tmStatusName;
var updateOrderFields = null;
var updateOrderFields = {};
var orderLog = {
uapp_id: orderItem.uapp_id,
sourceOrderNo: actionBody.orderNo,
......@@ -1026,15 +1028,23 @@ class OrderInfoService extends ServiceBase {
updateOrderFields.orderStatus = 4;
deliveryInfo.deliveryStatus = "ddj";
deliveryInfo.deliveryStatusName = "待递交";
deliveryInfo.nclones[tbCodeIndex].tmStatus = "ddj";
deliveryInfo.nclones[tbCodeIndex].tmStatusName = "待递交";
orderLog.opContent = "尊敬的用户,您的商标:“" + deliveryInfo.tm.tmName + "”第" + deliveryInfo.nclones[tbCodeIndex].code + "类,办理状态更新为【待递交】";
}//待提交
else if (actionBody.tmStatus == "RECVCOMMIT") {
updateOrderFields.orderStatus = 8;
else if (actionBody.tmStatus == "ROBOT") {
deliveryInfo.deliveryStatus = "ydj";
deliveryInfo.deliveryStatusName = "已递交";
deliveryInfo.nclones[tbCodeIndex].tmStatus = "ydj";
deliveryInfo.nclones[tbCodeIndex].tmStatusName = "已递交";
orderLog.opContent = "尊敬的用户,您的商标:“" + deliveryInfo.tm.tmName + "”第" + deliveryInfo.nclones[tbCodeIndex].code + "类,办理状态更新为【已递交】";
}//已提交
else if (actionBody.tmStatus == "RECVCOMMIT") {
updateOrderFields.orderStatus = 8;
deliveryInfo.deliveryStatus = "ywc";
deliveryInfo.deliveryStatusName = "已完成";
deliveryInfo.nclones[tbCodeIndex].tmStatusName = "商标局已收提交";
orderLog.opContent = "尊敬的用户,您的商标:“" + deliveryInfo.tm.tmName + "”第" + deliveryInfo.nclones[tbCodeIndex].code + "类,办理状态更新为【商标局已收提交】";
}//已收提交
if (deliveryInfo.deliveryStatus != oldDeliveryStatus) {
......@@ -1052,6 +1062,13 @@ class OrderInfoService extends ServiceBase {
}
}//增加流程状态列表数据
try {
await self.db.transaction(async function (t) {
if (Object.keys(updateOrderFields).length > 0) {
self.updateByWhere(updateOrderFields, { where: { orderNo: actionBody.orderNo } }, t);
}
await self.flowlogDao.create(orderLog, t);
});
if (actionBody.submitTime) {
deliveryInfo.nclones[tbCodeIndex].submitTime = actionBody.submitTime;
}//修改提报时间
......@@ -1061,14 +1078,20 @@ class OrderInfoService extends ServiceBase {
if (actionBody.officialInfo) {
this.updateTmOfficialInfo(actionBody);
}//更新商标官文
deliveryInfo.opNotes = actionBody.opNotes || "";
this.putOrderDelivery(deliveryInfo, actionBody.orderNo);
} catch (error) {
console.log("error------------------------", e.stack);
}
return system.getResultSuccess();
}
async updateTmOfficialInfo(actionBody) {//更新商标官文信息
var flowList = [];
actionBody.sourceOrderNo = actionBody.orderNo;
var deliveryFlowInfo = await this.getOrderDeliveryFlowInfo(actionBody);
actionBody.sourceOrderNo = actionBody.officialInfo.tmRegistNum;
var deliveryFlowInfo = await this.getOrderDeliveryFlowInfo(null, actionBody);
var addi = 0;
if (!deliveryFlowInfo.data) {
flowList.push({
......@@ -1095,12 +1118,11 @@ class OrderInfoService extends ServiceBase {
}
var sql = null;
if (addi > 0) {
await this.dao.updateByWhere({ orderStatus: 4 }, { where: { id: item.id } });
sql = "INSERT INTO `c_delivery_official_flow` (`sourceOrderNo`,`officialFlow`) VALUE('" +
actionBody.orderNo + "','" + JSON.stringify(flowList) + "')";
actionBody.officialInfo.tmRegistNum + "','" + JSON.stringify(flowList) + "')";
}
else {
sql = "UPDATE `c_delivery_official_flow` SET officialFlow ='" + JSON.stringify(flowList) + "' where sourceOrderNo='" + actionBody.orderNo + "'";
sql = "UPDATE `c_delivery_official_flow` SET officialFlow ='" + JSON.stringify(flowList) + "' where sourceOrderNo='" + actionBody.officialInfo.tmRegistNum + "'";
}
this.customQuery(sql);
return system.getResultSuccess();
......
1.更新注册号、状态、官文
1.更新注册号、状态、官文
......@@ -9,7 +9,7 @@
"tmStatusName": "已下发商标注册证",//官文状态名称
"submitTime": "",//提报时间
"registNumInfo":{//注册号信息
"tmRegistNum": "29471633",//商标申请号
"tmRegistNum": "29471633"//商标申请号
},
"officialInfo":{//官文信息
"tmRegistNum": "29471633",//商标申请号
......
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