Commit 7e4c8f1e by 王勇飞

bizopt fix api

parent 88cd8ea8
......@@ -59,10 +59,10 @@ class CtlBase {
//添加组织结构路径,如果是上级,取上级
if (req.xctx.ptags && req.xctx.ptags != "") {
pobj.opath = req.xctx.ptags
pob.isPrincipal = true
pobj.isPrincipal = true
} else {
pobj.opath = req.xctx.opath
pob.isPrincipal = false
pobj.isPrincipal = false
}
if (!req.xctx.appkey) {
return [-200, "请求头缺少应用x-app-key"]
......
......@@ -75,30 +75,30 @@ class BizOptCtl extends CtlBase {
* @param {*} mobj
* @param {*} qobj
* @param {*} req
*/
async distribution(mobj, qobj, req) {
let pobj = mobj.d;
let params = {
* {
demand_code_list: ["1", "2", "3"],//至少一个需求编号
salesman_opcode: "",//唯一标识
salesman_id: "jdlfaj",//销售员id
salesman_name: "",//销售员姓名
salesman_phone: "",//销售员手机号
}
*/
async distribution(mobj, qobj, req) {
let pobj = mobj.d;
}
/**
* 关闭需求
* @param {*} mobj
*/
async closeBizopt(mobj, qobj, req) {
let pobj = mobj.d;
pobj.business_status = "isClosed";
let params = {
* {
demand_code: "",//需求编号
close_reason: "",//关闭原因
remarks: ""//备注
}
*/
async closeBizopt(mobj, qobj, req) {
let pobj = mobj.d;
pobj.business_status = "isClosed";
//根据需求编号去更新该条需求的状态为已关闭
try {
let res = await this.service.updateStatusByDemandCode(pobj);
......
......@@ -10,46 +10,46 @@ class OperationrecordCtl extends CtlBase {
/**
* 查询记录信息
* @param {*} mobj
*/
async findOne(mobj, qobj, req) {
let pobj = mobj.d;
let params = {
* {
demand_code: "",//需求编号
close_reason: "",//关闭原因
remarks: ""//备注
operation_type: ""//操作类型
}
*/
async findAllInfo(mobj, qobj, req) {
let pobj = mobj.d;
try {
if (!pobj.demand_code) {
return system.getResultError("fitaxschemeCtl/findOne 缺少需求编号!");
return system.getResultError("operationrecordCtl/findAllInfo 缺少需求编号!");
}
let res = await this.service.findInfo(pobj);
let res = await this.service.findAllInfo(pobj);
return system.getResult(res);
} catch (error) {
console.log("fitaxschemeCtl/findOne " + error);
return system.getResultError("fitaxschemeCtl/findOne 查询企业失败!");
console.log("operationrecordCtl/findAllInfo " + error);
return system.getResultError("operationrecordCtl/findAllInfo 查询企业失败!");
}
}
/**
* 新建记录信息
* @param {*} mobj
* {
demand_code: "",//需求编号
operator: { id: "", name: "" },//操作人
operation_type: "",//操作类型
operation_details: {}//操作详细记录
}
*/
async insertInfo(mobj, qobj, req) {
let pobj = mobj.d;
let params = {
demand_code: "",//需求编号
close_reason: "",//关闭原因
remarks: ""//备注
}
try {
if (!pobj.demand_code) {
return system.getResultError("fitaxschemeCtl/insertInfo 缺少需求编号!");
}
let insertRes = await this.service.insertInfo(pobj);
return system.getResult("添加企业成功!");
return system.getResult("添加记录信息成功!");
} catch (error) {
console.log("operationrecordCtl/insertInfo " + error);
return system.getResultError("operationrecordCtl/insertInfo 添加&修改企业信息失败!");
return system.getResultError("operationrecordCtl/insertInfo 添加记录信息失败!");
}
}
}
......
......@@ -10,6 +10,7 @@ class OperationrecordDao extends Dao {
*@param {*} qobj
*/
async findAllInfo(qobj) {
qobj.order_type = "BIZ",//数据类型需求|订单
qobj.raw = true;
return await this.model.findAll(qobj);
}
......@@ -22,6 +23,7 @@ class OperationrecordDao extends Dao {
async insertInfo(qobj, t) {
let obj = {
"demand_code": qobj.demand_code,// 需求编码
"order_type": "BIZ",
}
if (qobj.operator) {// 操作人
obj.operator = qobj.operator;
......
......@@ -16,7 +16,7 @@ module.exports = {
"tencentCloud": "腾讯云"
},
"bizoptStatus": {
"bizoptStatus": {//财税需求状态
"pending": "待处理",
"beforeFollowUp": "待跟进",
"followingUp": "跟进中",
......@@ -25,6 +25,12 @@ module.exports = {
"isClosed": "已关闭"
},
"operationType": {//财税需求-分配记录-操作类型
"distribution": "分配",
"followUp": "跟进",
"close": "关闭"
},
"businessType": {//商机类型
"companyCase": "公司注册",
"psCase": "云上园区注册",
......@@ -37,10 +43,10 @@ module.exports = {
"sealSevCase": "刻章服务",
"icChangeCase": "工商变更",
"ssOpenCase": "社保开户",
"ICP":"icp",
"EDI":"edi",
"ICPANNUALREPORT":"icp年报",
"EDIANNUALREPORT":"edi年报"
"ICP": "icp",
"EDI": "edi",
"ICPANNUALREPORT": "icp年报",
"EDIANNUALREPORT": "edi年报"
},
"businessStatus": {//商机状态
......@@ -156,62 +162,62 @@ module.exports = {
},
"registeredAreaDict": {//注册地区
"110100":"北京",
"310100":"上海",
"330100":"杭州",
"370200":"青岛",
"320500":"苏州",
"330200":"宁波",
"320100":"南京",
"320200":"无锡",
"330300":"温州",
"130100":"石家庄",
"330700":"金华",
"320400":"常州",
"320600":"南通",
"320300":"徐州",
"330400":"嘉兴",
"331000":"台州",
"330600":"绍兴",
"140100":"太原",
"370600":"烟台",
"321000":"扬州",
"440100":"广州",
"440300":"深圳",
"510100":"成都",
"420100":"武汉",
"500100":"重庆",
"410100":"郑州",
"430100":"长沙",
"530100":"昆明",
"610100":"西安",
"441900":"东莞",
"350100":"福州",
"520100":"贵阳",
"360100":"南昌",
"440600":"佛山",
"120100":"天津",
"370100":"济南",
"210100":"沈阳",
"210200":"大连",
"230100":"哈尔滨",
"220100":"长春",
"340100":"合肥",
"410200":"开封",
"321300":"宿迁",
"370783":"寿光",
"442000":"中山",
"420500":"宜昌",
"350200":"厦门",
"350700":"南平"
"110100": "北京",
"310100": "上海",
"330100": "杭州",
"370200": "青岛",
"320500": "苏州",
"330200": "宁波",
"320100": "南京",
"320200": "无锡",
"330300": "温州",
"130100": "石家庄",
"330700": "金华",
"320400": "常州",
"320600": "南通",
"320300": "徐州",
"330400": "嘉兴",
"331000": "台州",
"330600": "绍兴",
"140100": "太原",
"370600": "烟台",
"321000": "扬州",
"440100": "广州",
"440300": "深圳",
"510100": "成都",
"420100": "武汉",
"500100": "重庆",
"410100": "郑州",
"430100": "长沙",
"530100": "昆明",
"610100": "西安",
"441900": "东莞",
"350100": "福州",
"520100": "贵阳",
"360100": "南昌",
"440600": "佛山",
"120100": "天津",
"370100": "济南",
"210100": "沈阳",
"210200": "大连",
"230100": "哈尔滨",
"220100": "长春",
"340100": "合肥",
"410200": "开封",
"321300": "宿迁",
"370783": "寿光",
"442000": "中山",
"420500": "宜昌",
"350200": "厦门",
"350700": "南平"
},
"TaxpayerTypeDict": {//纳税人类型
"smallScaleTaxpayer": "小规模纳税人",
"generalTaxpayer": "一般纳税人"
},
"TaxpayerTypeDictT": {//纳税人类型取反
"小规模纳税人":"smallScaleTaxpayer",
"一般纳税人":"generalTaxpayer",
"小规模纳税人": "smallScaleTaxpayer",
"一般纳税人": "generalTaxpayer",
},
"companyNatureDict": {//公司类型
"limitedLiabilityCompany": "有限责任公司",
......@@ -219,9 +225,9 @@ module.exports = {
"groupLimitedCompany": "集团公司"
},
"companyNatureDictT": {//公司类型取反
"有限责任公司":"limitedLiabilityCompany" ,
"股份有限公司":"incorporatedCompany" ,
"集团公司":"groupLimitedCompany"
"有限责任公司": "limitedLiabilityCompany",
"股份有限公司": "incorporatedCompany",
"集团公司": "groupLimitedCompany"
},
"engagedIndustryDict": {//从事行业
"culturalMedia": "文化传媒类",
......@@ -239,19 +245,19 @@ module.exports = {
"engineering": "工程类"
},
"engagedIndustryDictT": {//从事行业取反
"文化传媒类":"culturalMedia" ,
"科技类":"scienceAndTechnology",
"影业类":"filmIndustry" ,
"贸易类":"trade",
"咨询类":"consult" ,
"广告类":"advertisement",
"管理类":"administration" ,
"租赁类":"lease",
"代理类":"proxy" ,
"培训类":"train",
"设计类":"design",
"服务类":"service",
"工程类":"engineering"
"文化传媒类": "culturalMedia",
"科技类": "scienceAndTechnology",
"影业类": "filmIndustry",
"贸易类": "trade",
"咨询类": "consult",
"广告类": "advertisement",
"管理类": "administration",
"租赁类": "lease",
"代理类": "proxy",
"培训类": "train",
"设计类": "design",
"服务类": "service",
"工程类": "engineering"
},
"SealSevCaseDict": {//是否刻章
......@@ -274,25 +280,25 @@ module.exports = {
"company": "有限公司"
},
"registeredTypeDictT": {//个体户类型反
"个体工商":"selfEmployed" ,
"个人独资":"soleProprietorship",
"有限公司":"company"
"个体工商": "selfEmployed",
"个人独资": "soleProprietorship",
"有限公司": "company"
},
"registeredParkDict": {//注册园区
"410200":"开封",
"321300":"宿迁",
"310100":"上海",
"370783":"寿光",
"442000":"中山",
"420500":"宜昌",
"440600":"佛山",
"340100":"合肥",
"510100":"成都",
"500100":"重庆",
"350200":"厦门",
"350700":"南平",
"330100":"杭州",
"441900":"东莞"
"410200": "开封",
"321300": "宿迁",
"310100": "上海",
"370783": "寿光",
"442000": "中山",
"420500": "宜昌",
"440600": "佛山",
"340100": "合肥",
"510100": "成都",
"500100": "重庆",
"350200": "厦门",
"350700": "南平",
"330100": "杭州",
"441900": "东莞"
},
"sealSevTypeDict": {//刻章类型
......@@ -330,10 +336,10 @@ module.exports = {
"/ic/gsnb/": "icCheckCase",
"/ic/gschangs/": "icChangeCase",
"/ic/sbopen/": "ssOpenCase",
"/qcfw/icp/":"ICP",
"/qcfw/edi/":"EDI",
"/qcfw/icpannals/":"ICPANNUALREPORT",
"/qcfw/ediannals/":"EDIANNUALREPORT"
"/qcfw/icp/": "ICP",
"/qcfw/edi/": "EDI",
"/qcfw/icpannals/": "ICPANNUALREPORT",
"/qcfw/ediannals/": "EDIANNUALREPORT"
},
"fdyDict": {//产品反对应关系
"companyCase": "/ic/gsreg/",
......@@ -347,10 +353,10 @@ module.exports = {
"icCheckCase": "/ic/gsnb/",
"icChangeCase": "/ic/gschangs/",
"ssOpenCase": "/ic/sbopen/",
"ICP":"/qcfw/icp/",
"EDI":"/qcfw/edi/",
"ICPANNUALREPORT":"/qcfw/icpannals/",
"EDIANNUALREPORT":"/qcfw/ediannals/"
"ICP": "/qcfw/icp/",
"EDI": "/qcfw/edi/",
"ICPANNUALREPORT": "/qcfw/icpannals/",
"EDIANNUALREPORT": "/qcfw/ediannals/"
},
"ddyDict": {//和庄冰的交付单对应关系
"paid": 1,
......
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