Commit 8211cb3c by 蒋勇

Merge branch 'ic-deliver' of gitlab.gongsibao.com:jiangyong/zhichan into ic-deliver

parents e58bab2c c7b5a9c1
...@@ -84,6 +84,12 @@ class BizOptCtl extends CtlBase { ...@@ -84,6 +84,12 @@ class BizOptCtl extends CtlBase {
var planInfo = ms.scheme_info; var planInfo = ms.scheme_info;
planInfo.schemeNumber = ms.scheme_number; planInfo.schemeNumber = ms.scheme_number;
planInfo.currentStatus = ms.scheme_status; planInfo.currentStatus = ms.scheme_status;
if ( ms.scheme_status && ms.scheme_status == "isReject"){
planInfo.currentStatus = "已退回";
}
else{
planInfo.currentStatus = ms.scheme_status;
}
planInfo.statusReason = ms.reject_reason; planInfo.statusReason = ms.reject_reason;
rarr.planInfo = planInfo; rarr.planInfo = planInfo;
} }
...@@ -155,8 +161,8 @@ class BizOptCtl extends CtlBase { ...@@ -155,8 +161,8 @@ class BizOptCtl extends CtlBase {
} }
/*插入数据信息 */ /*插入数据信息 */
async insertInfo(mobj,qobj,req){ async insertInfo(nobj,qobj,req){
var pobj = mobj.d; var pobj = nobj.d;
if (pobj.businessMode && pobj.businessMode != 'undefined' && pobj.businessType && pobj.businessType != 'undefined'){ if (pobj.businessMode && pobj.businessMode != 'undefined' && pobj.businessType && pobj.businessType != 'undefined'){
try{ try{
pobj.currentStatus = "beforeSubmission";//加上当前状态为待提交方案 pobj.currentStatus = "beforeSubmission";//加上当前状态为待提交方案
......
...@@ -7,6 +7,7 @@ const moment = require('moment'); ...@@ -7,6 +7,7 @@ const moment = require('moment');
class CacheInfoCtl extends CtlBase { class CacheInfoCtl extends CtlBase {
constructor() { constructor() {
super("bizchance", CtlBase.getServiceName(CacheInfoCtl)); super("bizchance", CtlBase.getServiceName(CacheInfoCtl));
this.deliverService = system.getObject("service.bizchance.deliverybillSve");
} }
/*根据交付单id获取缓存详情*/ /*根据交付单id获取缓存详情*/
...@@ -16,11 +17,20 @@ class CacheInfoCtl extends CtlBase { ...@@ -16,11 +17,20 @@ class CacheInfoCtl extends CtlBase {
{ {
try{ try{
var rs = await this.service.findInfoByDeliverId(pobj); var rs = await this.service.findInfoByDeliverId(pobj);
var divInfo = await this.deliverService.findInfoByDeliverCode(pobj);
var rarr = {}; var rarr = {};
if (rs){ if (rs && rs != 'undefined'){
rarr.deliverNumber = rs.deliver_id; rarr.deliverNumber = rs.deliver_id;
rarr.cacheInfo = rs.cache_info; rarr.cacheInfo = rs.cache_info;
rarr.statusInfo = {};
if (divInfo && divInfo != 'undefined'){
rarr.statusInfo.deliverStatus = divInfo.delivery_status;//状态
rarr.statusInfo.statusReason = divInfo.close_reason;//状态原因
rarr.statusInfo.createdTime = this.timeFormat(divInfo.created_at);
rarr.statusInfo.updateTime = this.timeFormat(divInfo.updated_at)
}
} }
return system.getResult(rarr); return system.getResult(rarr);
} }
catch(error){ catch(error){
......
...@@ -144,7 +144,7 @@ class SchemeCtl extends CtlBase { ...@@ -144,7 +144,7 @@ class SchemeCtl extends CtlBase {
if (pobj.businessMode && pobj.businessMode != 'undefined' && pobj.currentStatus && pobj.currentStatus != 'undefined'){ if (pobj.businessMode && pobj.businessMode != 'undefined' && pobj.currentStatus && pobj.currentStatus != 'undefined'){
try{ try{
await this.service.updateStatusByDemandCode(pobj); await this.service.updateStatusByDemandCode(pobj);
var res= thsi.service.findInfoByDemandCode(pobj); var res= await this.service.findInfoByDemandCode(pobj);
if (res){ if (res){
var logInfo = { var logInfo = {
"flowType":"SCHEME", "flowType":"SCHEME",
...@@ -157,7 +157,7 @@ class SchemeCtl extends CtlBase { ...@@ -157,7 +157,7 @@ class SchemeCtl extends CtlBase {
await this.logService.insertInfo(logInfo);//插入状态日至表 await this.logService.insertInfo(logInfo);//插入状态日至表
} }
if (pobj.currentStatus == "已退回"){ if (pobj.currentStatus == "isReject"){
var parms ={ var parms ={
"businessMode": pobj.businessMode, "businessMode": pobj.businessMode,
"currentStatus": "beforeSubmission" "currentStatus": "beforeSubmission"
...@@ -181,10 +181,10 @@ class SchemeCtl extends CtlBase { ...@@ -181,10 +181,10 @@ class SchemeCtl extends CtlBase {
console.log("------------------------------修改方案------------------------------------"); console.log("------------------------------修改方案------------------------------------");
console.log(JSON.stringify(pobj)); console.log(JSON.stringify(pobj));
console.log("------------------------------修改方案------------------------------------"); console.log("------------------------------修改方案------------------------------------");
if (pobj.businessMode && pobj.businessMode != 'undefined' && pobj.schemeNumber && pobj.schemeNumber != 'undefined' if (pobj.businessMode && pobj.businessMode != 'undefined' && pobj.schemeNumber && pobj.schemeNumber != 'undefined' && pobj.baseInfo && pobj.baseInfo != 'undefined'){
&& pobj.baseInfo && pobj.baseInfo != 'undefined'){
try{ try{
pobj.currentStatus = "beforeConfirmation";//同时把方案的状态也更新为待确认 pobj.currentStatus = "beforeConfirmation";//同时把方案的状态也更新为待确认
pobj.statusReason = " ";
var businessInfo = await this.bizoptService.findInfoByDemandCode(pobj);//得到商机的信息,插入方案表时要用到 var businessInfo = await this.bizoptService.findInfoByDemandCode(pobj);//得到商机的信息,插入方案表时要用到
if (businessInfo){ if (businessInfo){
pobj.businessId = businessInfo.id;//商机id pobj.businessId = businessInfo.id;//商机id
...@@ -198,6 +198,7 @@ class SchemeCtl extends CtlBase { ...@@ -198,6 +198,7 @@ class SchemeCtl extends CtlBase {
//pobj.currentStatus = appconfig.pdict.businessStatus[businessInfo.business_status];//商机状态即为方案状态 //pobj.currentStatus = appconfig.pdict.businessStatus[businessInfo.business_status];//商机状态即为方案状态
//pobj.statusReason = businessInfo.close_reason;//状态原因 //pobj.statusReason = businessInfo.close_reason;//状态原因
} }
if (pobj.baseInfo.caseRemarks && pobj.baseInfo.caseRemarks != 'undefined'){ if (pobj.baseInfo.caseRemarks && pobj.baseInfo.caseRemarks != 'undefined'){
pobj.baseInfo.memoInfo = pobj.baseInfo.caseRemarks;//备注信息 pobj.baseInfo.memoInfo = pobj.baseInfo.caseRemarks;//备注信息
} }
...@@ -297,7 +298,9 @@ class SchemeCtl extends CtlBase { ...@@ -297,7 +298,9 @@ class SchemeCtl extends CtlBase {
//修改方案的时候,需要把修改的方案传给商城 //修改方案的时候,需要把修改的方案传给商城
var ttype = pobj.businessType; var ttype = pobj.businessType;
console.log("ttype:" + ttype);
pobj.businessType = appconfig.pdict.fdyDict[pobj.businessType]; pobj.businessType = appconfig.pdict.fdyDict[pobj.businessType];
console.log("businessType:" + pobj.businessType);
var rc = system.getObject("util.execClient"); var rc = system.getObject("util.execClient");
var requrl = this.receiveUrl; var requrl = this.receiveUrl;
var params = { var params = {
...@@ -314,7 +317,7 @@ class SchemeCtl extends CtlBase { ...@@ -314,7 +317,7 @@ class SchemeCtl extends CtlBase {
console.log(JSON.stringify(j) + "IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"); console.log(JSON.stringify(j) + "IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII");
if (j.status == 1){ if (j.status == 1){
pobj.businessType = ttype; pobj.businessType = ttype;
pobj.schemeNumber = j.data; //pobj.schemeNumber = j.data;
await this.service.updateInfoByDemandCode(pobj);//更新方案详情,同时更新新的方案编号 await this.service.updateInfoByDemandCode(pobj);//更新方案详情,同时更新新的方案编号
var bobj = {"businessMode":pobj.businessMode,"currentStatus":"beforeConfirmation"};//同时把商机状态更新回待确认 var bobj = {"businessMode":pobj.businessMode,"currentStatus":"beforeConfirmation"};//同时把商机状态更新回待确认
await this.bizoptService.updateStatusByDemandCode(bobj); await this.bizoptService.updateStatusByDemandCode(bobj);
...@@ -325,10 +328,12 @@ class SchemeCtl extends CtlBase { ...@@ -325,10 +328,12 @@ class SchemeCtl extends CtlBase {
} }
} }
catch(error){ catch(error){
console.log("EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE" + error);
return system.getResultError(error); return system.getResultError(error);
} }
} }
else{ else{
console.log("CCCCCCCCCCCCCCCCCCCCCCC参数错误!");
return system.getResultError("参数错误!"); return system.getResultError("参数错误!");
} }
} }
...@@ -353,6 +358,7 @@ class SchemeCtl extends CtlBase { ...@@ -353,6 +358,7 @@ class SchemeCtl extends CtlBase {
/*插入方案信息*/ /*插入方案信息*/
async insertInfo(mobj, qobj, req){ async insertInfo(mobj, qobj, req){
var pobj = mobj.d; var pobj = mobj.d;
console.log("22222222222222222" + JSON.stringify(pobj));
if (pobj.businessMode && pobj.businessMode != 'undefined' && pobj.baseInfo && pobj.baseInfo != 'undefined'){//商机编号必须存在 if (pobj.businessMode && pobj.businessMode != 'undefined' && pobj.baseInfo && pobj.baseInfo != 'undefined'){//商机编号必须存在
try{ try{
pobj.currentStatus = "beforeConfirmation";//商机状态为待用户确认 pobj.currentStatus = "beforeConfirmation";//商机状态为待用户确认
...@@ -445,12 +451,10 @@ class SchemeCtl extends CtlBase { ...@@ -445,12 +451,10 @@ class SchemeCtl extends CtlBase {
if (pobj.baseInfo.buyDuration && pobj.baseInfo.buyDuration != 'undefined'){ if (pobj.baseInfo.buyDuration && pobj.baseInfo.buyDuration != 'undefined'){
pobj.baseInfo.buyDuration = appconfig.pdict.buyDurationDict[pobj.baseInfo.buyDuration]; pobj.baseInfo.buyDuration = appconfig.pdict.buyDurationDict[pobj.baseInfo.buyDuration];
} }
if (pobj.baseInfo.isRenew ){ if (pobj.baseInfo.isRenew && pobj.baseInfo.isRenew != 'undefined' ){
pobj.baseInfo.isRenew = appconfig.pdict.isRenewDict[pobj.baseInfo.isRenew]; pobj.baseInfo.isRenew = appconfig.pdict.isRenewDict[pobj.baseInfo.isRenew];
} }
else{
pobj.baseInfo.isRenew = "不开启"
}
if (pobj.baseInfo.engagedIndustry && pobj.baseInfo.engagedIndustry != 'undefined'){ if (pobj.baseInfo.engagedIndustry && pobj.baseInfo.engagedIndustry != 'undefined'){
pobj.baseInfo.engagedIndName = appconfig.pdict.engagedIndustryDict[pobj.baseInfo.engagedIndustry];//从事行业名称 pobj.baseInfo.engagedIndName = appconfig.pdict.engagedIndustryDict[pobj.baseInfo.engagedIndustry];//从事行业名称
} }
...@@ -482,6 +486,7 @@ class SchemeCtl extends CtlBase { ...@@ -482,6 +486,7 @@ class SchemeCtl extends CtlBase {
} }
var rtn = await rc.execPost(params, requrl); var rtn = await rc.execPost(params, requrl);
var j = JSON.parse(rtn.stdout); var j = JSON.parse(rtn.stdout);
console.log("------------------------------------------" + rtn.stdout);
if (j.status == 1){ if (j.status == 1){
pobj.schemeNumber = j.data; pobj.schemeNumber = j.data;
pobj.businessType = btype; pobj.businessType = btype;
...@@ -490,7 +495,7 @@ class SchemeCtl extends CtlBase { ...@@ -490,7 +495,7 @@ class SchemeCtl extends CtlBase {
return system.getResult("操作成功!"); return system.getResult("操作成功!");
} }
else{ else{
return system.getResultError("提交方案出错!"); return j;
} }
} }
...@@ -503,6 +508,25 @@ class SchemeCtl extends CtlBase { ...@@ -503,6 +508,25 @@ class SchemeCtl extends CtlBase {
} }
} }
/*插入或更新方案*/
async createInfo(datajson,qobj, req){
console.log("datejson:" + JSON.stringify(datajson));
try{
var rs = await this.service.findInfoByDemandCode(datajson.d);
if (rs && rs != 'undefined'){
datajson.d.schemeNumber = rs.scheme_number;
return await this.updateInfoByDemandCode(datajson);
}
else{
return await this.insertInfo(datajson);
}
}
catch(error){
return system.getResultError(error);
}
}
timeFormat(date) { timeFormat(date) {
let localTime = moment.utc(date).toDate(); let localTime = moment.utc(date).toDate();
localTime = moment(localTime).format("YYYY-MM-DD"); localTime = moment(localTime).format("YYYY-MM-DD");
......
...@@ -45,6 +45,9 @@ class BizoptDao extends Dao { ...@@ -45,6 +45,9 @@ class BizoptDao extends Dao {
if (qobj.statusReason && qobj.statusReason != 'undefined') { if (qobj.statusReason && qobj.statusReason != 'undefined') {
setobj["close_reason"] = qobj.statusReason; setobj["close_reason"] = qobj.statusReason;
} }
else{
setobj["close_reason"] = "";
}
var whereobj = { "demand_code": qobj.businessMode }; var whereobj = { "demand_code": qobj.businessMode };
return await this.updateByWhere(setobj, whereobj, t); return await this.updateByWhere(setobj, whereobj, t);
} }
...@@ -84,6 +87,9 @@ class BizoptDao extends Dao { ...@@ -84,6 +87,9 @@ class BizoptDao extends Dao {
if (qobj.businessName && qobj.businessName != 'undefined'){ if (qobj.businessName && qobj.businessName != 'undefined'){
obj.business_info.businessName = qobj.businessName; obj.business_info.businessName = qobj.businessName;
} }
if (qobj.companyName && qobj.companyName != 'undefined'){
obj.business_info.companyName = qobj.companyName;
}
if (qobj.servicerCode && qobj.servicerCode != 'undefined') { if (qobj.servicerCode && qobj.servicerCode != 'undefined') {
obj.facilitator_id = qobj.servicerCode; obj.facilitator_id = qobj.servicerCode;
} }
...@@ -100,7 +106,7 @@ class BizoptDao extends Dao { ...@@ -100,7 +106,7 @@ class BizoptDao extends Dao {
obj.salesman_name = qobj.clerkName; obj.salesman_name = qobj.clerkName;
} }
if (qobj.clerkPhone && qobj.clerkPhone != 'undefined') { if (qobj.clerkPhone && qobj.clerkPhone != 'undefined') {
obj.salesman_phone = qobj.salesman_phone; obj.salesman_phone = qobj.clerkPhone;
} }
return await this.create(obj, t); return await this.create(obj, t);
} }
......
...@@ -59,6 +59,9 @@ class DeliverybillDao extends Dao { ...@@ -59,6 +59,9 @@ class DeliverybillDao extends Dao {
if (qobj.statusReason && qobj.statusReason != 'undefined') { if (qobj.statusReason && qobj.statusReason != 'undefined') {
setobj.close_reason = qobj.statusReason; setobj.close_reason = qobj.statusReason;
} }
else{
setobj.close_reason = "";
}
var whereobj = { "delivery_code": qobj.deliverNumber }; var whereobj = { "delivery_code": qobj.deliverNumber };
var rs = await this.findOne(whereobj); var rs = await this.findOne(whereobj);
if (rs && rs != 'undefined'){ if (rs && rs != 'undefined'){
...@@ -86,6 +89,9 @@ class DeliverybillDao extends Dao { ...@@ -86,6 +89,9 @@ class DeliverybillDao extends Dao {
if (qobj.statusReason && qobj.statusReason != 'undefined') { if (qobj.statusReason && qobj.statusReason != 'undefined') {
setobj.close_reason = qobj.statusReason; setobj.close_reason = qobj.statusReason;
} }
else{
setobj.close_reason = "";
}
return await this.updateByWhere(setobj, whereobj, t); return await this.updateByWhere(setobj, whereobj, t);
} }
...@@ -93,7 +99,8 @@ class DeliverybillDao extends Dao { ...@@ -93,7 +99,8 @@ class DeliverybillDao extends Dao {
async insertInfo(qobj, t) {//到时候看交付单信息后再确定 async insertInfo(qobj, t) {//到时候看交付单信息后再确定
var obj = { var obj = {
"delivery_code": qobj.deliverNumber, "delivery_code": qobj.deliverNumber,
"delivery_status": qobj.deliverStatus "delivery_status": qobj.deliverStatus,
"delivery_info":qobj.deliveryInfo
}; };
if (qobj.businessMode && qobj.businessMode != 'undefined'){ if (qobj.businessMode && qobj.businessMode != 'undefined'){
obj.demand_code = qobj.businessMode; obj.demand_code = qobj.businessMode;
...@@ -107,6 +114,10 @@ class DeliverybillDao extends Dao { ...@@ -107,6 +114,10 @@ class DeliverybillDao extends Dao {
if (qobj.businessType && qobj.businessType != 'undefined') { if (qobj.businessType && qobj.businessType != 'undefined') {
obj.product_code = qobj.businessType; obj.product_code = qobj.businessType;
} }
if (qobj.txOrderNum && qobj.txOrderNum != 'undefined'){
obj.master_source_number= qobj.txOrderNum;
}
if (qobj.channelSource && qobj.channelSource != 'undefined') { if (qobj.channelSource && qobj.channelSource != 'undefined') {
obj.source_name = qobj.channelSource; obj.source_name = qobj.channelSource;
} }
......
...@@ -6,64 +6,64 @@ class MaterialDao extends Dao { ...@@ -6,64 +6,64 @@ class MaterialDao extends Dao {
} }
/*根据交付单编号获取注册材料信息详情*/ /*根据交付单编号获取注册材料信息详情*/
async findInfoByDeliverNumber(qobj){ async findInfoByDeliverNumber(qobj) {
var qcwhere = {"delivery_code":qobj.deliverNumber}; var qcwhere = { "delivery_code": qobj.deliverNumber };
return await this.findOne(qcwhere); return await this.findOne(qcwhere);
} }
/*根据交付单编号更新交材料详情*/ /*根据交付单编号更新交材料详情*/
async updateInfoByDeliverNumber(qobj,t){ async updateInfoByDeliverNumber(qobj, t) {
var whereobj = {"delivery_code":qobj.deliverNumber}; var whereobj = { "delivery_code": qobj.deliverNumber };
var setobj = {}; var setobj = {};
if (qobj.companyInfo && qobj.companyInfo != 'undefined'){ if (qobj.companyInfo && qobj.companyInfo != 'undefined') {
setobj.company_info = qobj.companyInfo; setobj.company_info = qobj.companyInfo;
} }
if (qobj.registeredInfo && qobj.registeredInfo != 'undefined'){ if (qobj.registeredInfo && qobj.registeredInfo != 'undefined') {
setobj.registered_info = qobj.registeredInfo; setobj.registered_info = qobj.registeredInfo;
} }
if (qobj.contributionInfo && qobj.contributionInfo != 'undefined'){ if (qobj.contributionInfo && qobj.contributionInfo != 'undefined') {
setobj.contribution_info = qobj.contributionInfo; setobj.contribution_info = qobj.contributionInfo;
} }
if (qobj.positionInfo && qobj.positionInfo != 'undefined'){ if (qobj.positionInfo && qobj.positionInfo != 'undefined') {
setobj.position_info = qobj.positionInfo; setobj.position_info = qobj.positionInfo;
} }
if (qobj.managerInfo && qobj.managerInfo != 'undefined'){ if (qobj.managerInfo && qobj.managerInfo != 'undefined') {
setobj.position_info = qobj.managerInfo; setobj.position_info = qobj.managerInfo;
} }
if (qobj.regInfo && qobj.regInfo != 'undefined'){ if (qobj.regInfo && qobj.regInfo != 'undefined') {
setobj.file_info = qobj.regInfo; setobj.file_info = qobj.regInfo;
} }
if (qobj.expressInfo && qobj.expressInfo != 'undefined'){ if (qobj.expressInfo && qobj.expressInfo != 'undefined') {
setobj.express_info = qobj.expressInfo; setobj.express_info = qobj.expressInfo;
} }
return await this.updateByWhere(setobj,whereobj,t); return await this.updateByWhere(setobj, whereobj, t);
} }
/*插入注册材料信息*/ /*插入注册材料信息*/
async insertInfo(qobj,t){//公司注册,云上园区注册时的信息 async insertInfo(pobj, t) {//公司注册,云上园区注册时的信息
var obj = { var obj = {
"delivery_code":qobj.deliverNumber "delivery_code": pobj.deliverNumber
}; };
if (qobj.deliverId && qobj.deliverId != 'undefined'){ if (pobj.deliverId && pobj.deliverId != 'undefined') {
obj["delivery_id"] = qobj.deliverId; obj["delivery_id"] = pobj.deliverId;
} }
if (qobj.companyInfo && qobj.companyInfo != 'undefined'){ if (pobj.companyInfo && pobj.companyInfo != 'undefined') {
obj.company_info = qobj.companyInfo; obj.company_info = pobj.companyInfo;
} }
if (pobj.registeredInfo && pobj.registeredInfo != 'undefined'){ if (pobj.registeredInfo && pobj.registeredInfo != 'undefined') {
obj.registered_info = pobj.registeredInfo; obj.registered_info = pobj.registeredInfo;
} }
if (pobj.positionInfo && pobj.positionInfo != 'undefined'){ if (pobj.positionInfo && pobj.positionInfo != 'undefined') {
obj.position_info = pobj.positionInfo; obj.position_info = pobj.positionInfo;
} }
if (pobj.regInfo && pobj.regInfo != 'undefined'){ if (pobj.regInfo && pobj.regInfo != 'undefined') {
obj.file_info = pobj.regInfo; obj.file_info = pobj.regInfo;
} }
if (pobj.expressInfo && pobj.expressInfo != 'undefined'){ if (pobj.expressInfo && pobj.expressInfo != 'undefined') {
obj.express_info = pobj.expressInfo; obj.express_info = pobj.expressInfo;
} }
return await this.create(obj,t); return await this.create(obj, t);
} }
......
...@@ -16,6 +16,9 @@ class SchemeDao extends Dao { ...@@ -16,6 +16,9 @@ class SchemeDao extends Dao {
var setobj = {"scheme_status":qobj.currentStatus}; var setobj = {"scheme_status":qobj.currentStatus};
if (qobj.statusReason && qobj.statusReason != 'undefined'){ if (qobj.statusReason && qobj.statusReason != 'undefined'){
setobj["reject_reason"] = qobj.statusReason; setobj["reject_reason"] = qobj.statusReason;
}
else{
setobj["reject_reason"] = "";
} }
var whereobj = {"demand_code":qobj.businessMode}; var whereobj = {"demand_code":qobj.businessMode};
return await this.updateByWhere(setobj,whereobj,t); return await this.updateByWhere(setobj,whereobj,t);
...@@ -28,6 +31,12 @@ class SchemeDao extends Dao { ...@@ -28,6 +31,12 @@ class SchemeDao extends Dao {
if (qobj.schemeNumber && qobj.schemeNumber != 'undefined'){ if (qobj.schemeNumber && qobj.schemeNumber != 'undefined'){
setobj.scheme_number = qobj.schemeNumber; setobj.scheme_number = qobj.schemeNumber;
} }
if (qobj.statusReason && qobj.statusReason != 'undefined'){
setobj.reject_reason = qobj.statusReason;
}
else{
setobj.reject_reason = "";
}
return await this.updateByWhere(setobj,whereobj,t); return await this.updateByWhere(setobj,whereobj,t);
} }
......
...@@ -15,6 +15,9 @@ class StatuslogDao extends Dao { ...@@ -15,6 +15,9 @@ class StatuslogDao extends Dao {
if (qobj.statusReason && qobj.statusReason != 'undefined'){ if (qobj.statusReason && qobj.statusReason != 'undefined'){
obj.status_reason = qobj.statusReason; obj.status_reason = qobj.statusReason;
} }
else{
obj.status_reason = "";
}
if (qobj.clerkName && qobj.clerkName != 'undefined'){ if (qobj.clerkName && qobj.clerkName != 'undefined'){
obj.salesman_name = qobj.clerkName; obj.salesman_name = qobj.clerkName;
} }
......
...@@ -196,18 +196,24 @@ module.exports = { ...@@ -196,18 +196,24 @@ module.exports = {
"350200":"厦门", "350200":"厦门",
"350700":"南平" "350700":"南平"
}, },
"TaxpayerTypeDict": {//纳税人类型 "TaxpayerTypeDict": {//纳税人类型
"smallScaleTaxpayer": "小规模纳税人", "smallScaleTaxpayer": "小规模纳税人",
"generalTaxpayer": "一般纳税人" "generalTaxpayer": "一般纳税人"
}, },
"TaxpayerTypeDictT": {//纳税人类型取反
"小规模纳税人":"smallScaleTaxpayer",
"一般纳税人":"generalTaxpayer",
},
"companyNatureDict": {//公司类型 "companyNatureDict": {//公司类型
"limitedLiabilityCompany": "有限责任公司", "limitedLiabilityCompany": "有限责任公司",
"incorporatedCompany": "股份有限公司", "incorporatedCompany": "股份有限公司",
"groupLimitedCompany": "集团有限公司" "groupLimitedCompany": "集团有限公司"
}, },
"companyNatureDictT": {//公司类型取反
"有限责任公司":"limitedLiabilityCompany" ,
"股份有限公司":"incorporatedCompany" ,
"集团有限公司":"groupLimitedCompany"
},
"engagedIndustryDict": {//从事行业 "engagedIndustryDict": {//从事行业
"culturalMedia": "文化传媒类", "culturalMedia": "文化传媒类",
"scienceAndTechnology": "科技类", "scienceAndTechnology": "科技类",
...@@ -223,6 +229,21 @@ module.exports = { ...@@ -223,6 +229,21 @@ module.exports = {
"service": "服务类", "service": "服务类",
"engineering": "工程类" "engineering": "工程类"
}, },
"engagedIndustryDictT": {//从事行业取反
"文化传媒类":"culturalMedia" ,
"科技类":"scienceAndTechnology",
"影业类":"filmIndustry" ,
"贸易类":"trade",
"咨询类":"consult" ,
"广告类":"advertisement",
"管理类":"administration" ,
"租赁类":"lease",
"代理类":"proxy" ,
"培训类":"train",
"设计类":"design",
"服务类":"service",
"工程类":"engineering"
},
"SealSevCaseDict": {//是否刻章 "SealSevCaseDict": {//是否刻章
"yes": "需要", "yes": "需要",
...@@ -238,13 +259,16 @@ module.exports = { ...@@ -238,13 +259,16 @@ module.exports = {
"practical": "实际经营地址", "practical": "实际经营地址",
"virtual": "虚拟地址" "virtual": "虚拟地址"
}, },
"registeredTypeDict": {//个体户类型 "registeredTypeDict": {//个体户类型
"selfEmployed": "个体商户", "selfEmployed": "个体商户",
"soleProprietorship": "个人独资", "soleProprietorship": "个人独资企业",
"company": "有限公司" "company": "有限公司"
}, },
"registeredTypeDictT": {//个体户类型反
"个体工商户":"selfEmployed" ,
"个人独资企业":"soleProprietorship",
"有限公司":"company"
},
"registeredParkDict": {//注册园区 "registeredParkDict": {//注册园区
"410200":"开封", "410200":"开封",
"321300":"宿迁", "321300":"宿迁",
...@@ -329,7 +353,7 @@ module.exports = { ...@@ -329,7 +353,7 @@ module.exports = {
"engraving": 140, "engraving": 140,
"posting": 150, "posting": 150,
"signed": 160, "signed": 160,
"completed": 170, "success": 170,
"expired": 180, "expired": 180,
"closed": 190 "closed": 190
}, },
......
...@@ -8,7 +8,7 @@ module.exports = (db, DataTypes) => { ...@@ -8,7 +8,7 @@ module.exports = (db, DataTypes) => {
return db.define("cacheinfo", { return db.define("cacheinfo", {
deliver_id: { // 交付单id deliver_id: { // 交付单id
allowNull: false, allowNull: false,
type: DataTypes.INTEGER type: DataTypes.STRING
}, },
cache_info: { // 缓存信息 cache_info: { // 缓存信息
allowNull: false, allowNull: false,
......
...@@ -50,6 +50,10 @@ module.exports = (db, DataTypes) => { ...@@ -50,6 +50,10 @@ module.exports = (db, DataTypes) => {
allowNull: false, allowNull: false,
type: DataTypes.STRING type: DataTypes.STRING
}, },
master_source_number:{//主订单号
allowNull: false,
type: DataTypes.STRING
},
settle_status: {// 服务单流转状态 settle_status: {// 服务单流转状态
allowNull: false, allowNull: false,
type: DataTypes.STRING, type: DataTypes.STRING,
......
...@@ -8,7 +8,7 @@ const appconfig = system.getSysConfig(); ...@@ -8,7 +8,7 @@ const appconfig = system.getSysConfig();
module.exports = (db, DataTypes) => { module.exports = (db, DataTypes) => {
return db.define("material", { return db.define("material", {
delivery_id: { // 交付单id delivery_id: { // 交付单id
allowNull: false, allowNull: true,
type: DataTypes.INTEGER type: DataTypes.INTEGER
}, },
delivery_code: { // 交付单编号 delivery_code: { // 交付单编号
......
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