Commit 948f0918 by 高宇强

gyq

parent a8a1f456
......@@ -128,7 +128,7 @@ class BizOptCtl extends CtlBase {
async insertInfo(pobj,qobj,req){
if (pobj.businessMode && pobj.businessMode != 'undefined' && pobj.businessType && pobj.businessType != 'undefined'){
try{
pobj.currentStatus = "beforeSubmission";//加上当前状态
pobj.currentStatus = "beforeSubmission";//加上当前状态为待提交方案
await this.service.insertInfo(pobj);
return system.getResult("插入成功!");
......
var system = require("../../../system");
const http = require("http");
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
const moment = require('moment');
class StatusLogCtl extends CtlBase {
constructor() {
super("bizchance", CtlBase.getServiceName(StatusLogCtl));
}
/*插入缓存信息 */
async insertInfo(pobj,qobj,req){
if (pobj.flowType && pobj.flowType != 'undefined' && pobj.flowId && pobj.flowId != 'undefined'
&& pobj.statusCode && pobj.statusCode != 'undefined'){
try{
var res = await this.service.insertInfo(pobj);
return system.getResult("插入成功!");
}
catch (error){
return system.getResultError(error);
}
}
else{
return system.getResultError("参数错误!");
}
}
timeFormat(date) {
let localTime = moment.utc(date).toDate();
localTime = moment(localTime).format("YYYY-MM-DD");
return localTime;
}
}
module.exports = StatusLogCtl;
// var task = new CacheInfoCtl();
// var obj={"demand_code":"30030302992","business_status":"isFinished"};
// task.updateStatusByDemandCode(obj,{},{}).then(d=>{
// console.log(d);
// //console.log(d[0].analyse);
// })
const system = require("../../../system");
const Dao = require("../../dao.base");
class StatuslogDao extends Dao {
constructor() {
super(Dao.getModelName(StatuslogDao));
}
/*插入状态信息信息*/
async insertInfo(qobj,t){
var obj = {
"flow_type":qobj.flowType,
"flow_id":qobj.flowId,
"status_code":qobj.statusCode,
};
if (qobj.statusDate && qobj.statusDate != 'undefined'){
obj["status_date"] = qobj.statusDate
}
return await this.create(obj,t);
}
}
module.exports = StatuslogDao;
......@@ -199,6 +199,11 @@ module.exports = {
"completed":170,
"expired":180,
"closed":190
},
"flowType":{
"BIZ": "BIZ",//商机表
"SCHEME": "SCHEME",//方案表
"DELIVERY": "DELIVERY"//服务单表
}
}
}
......
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
class StatusLogService extends ServiceBase {
constructor() {
super("bizchance", ServiceBase.getDaoName(StatusLogService));
}
/*插入状态信息*/
async insertInfo(qobj){
var self=this;
return self.db.transaction(async function (t) {
return await self.dao.insertInfo(qobj,t);
});
}
}
module.exports = StatusLogService;
\ No newline at end of file
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