Commit da74c651 by 庄冰

zhuangbing

parent 5c41e79f
...@@ -36,7 +36,7 @@ class NeedsolutionService extends ServiceBase { ...@@ -36,7 +36,7 @@ class NeedsolutionService extends ServiceBase {
return system.getResultFail(-104,"业务方案信息不能为空"); return system.getResultFail(-104,"业务方案信息不能为空");
} }
var solution = ab.solutionContent.solution; var solution = ab.solutionContent.solution;
if(bizType=="companyreg"){//普通公司注册 if(bizType=="esp.companyreg"){//普通公司注册
if(!solution.companyName){ if(!solution.companyName){
return system.getResultFail(-105,"公司名称不能为空"); return system.getResultFail(-105,"公司名称不能为空");
} }
...@@ -62,7 +62,7 @@ class NeedsolutionService extends ServiceBase { ...@@ -62,7 +62,7 @@ class NeedsolutionService extends ServiceBase {
return system.getResultFail(-112,"经营范围不能为空"); return system.getResultFail(-112,"经营范围不能为空");
} }
} }
if(bizType=="companyreg_cloud"){//云上公司注册 if(bizType=="esp.companyreg_cloud"){//云上公司注册
if(!solution.park){ if(!solution.park){
return system.getResultFail(-113,"注册园区不能为空"); return system.getResultFail(-113,"注册园区不能为空");
} }
...@@ -153,7 +153,7 @@ class NeedsolutionService extends ServiceBase { ...@@ -153,7 +153,7 @@ class NeedsolutionService extends ServiceBase {
if (pageSize > 500) { if (pageSize > 500) {
pageSize = 500; pageSize = 500;
} }
var bizType = ab.bizType || "companyreg";// companyreg_cloud var bizType = ab.bizType || "esp.companyreg";// esp.companyreg_cloud
var pageIndex = Number(ab.pageIndex || 1); var pageIndex = Number(ab.pageIndex || 1);
var from = pageIndex == 1 ? 0 : Number((pageIndex - 1) * pageSize); var from = pageIndex == 1 ? 0 : Number((pageIndex - 1) * pageSize);
//select * from log where data->'$.id' = 142; //select * from log where data->'$.id' = 142;
...@@ -179,7 +179,7 @@ class NeedsolutionService extends ServiceBase { ...@@ -179,7 +179,7 @@ class NeedsolutionService extends ServiceBase {
sqlCount += " and status = :status"; sqlCount += " and status = :status";
paramWhere.status = ab.status; paramWhere.status = ab.status;
} }
if(bizType=="companyreg"){//普通公司注册 if(bizType=="esp.companyreg"){//普通公司注册
if (ab.companyName) {//企业名称 if (ab.companyName) {//企业名称
sql = sql+" and solutionContent->'$.solution.companyName' = :companyName"; sql = sql+" and solutionContent->'$.solution.companyName' = :companyName";
sqlCount = sqlCount+" and solutionContent->'$.solution.companyName' = :companyName"; sqlCount = sqlCount+" and solutionContent->'$.solution.companyName' = :companyName";
...@@ -211,7 +211,7 @@ class NeedsolutionService extends ServiceBase { ...@@ -211,7 +211,7 @@ class NeedsolutionService extends ServiceBase {
paramWhere.companyCategory = ab.companyCategory; paramWhere.companyCategory = ab.companyCategory;
} }
} }
if(bizType=="companyreg_cloud"){//云上公司注册 if(bizType=="esp.companyreg_cloud"){//云上公司注册
if (ab.park) {//注册园区 if (ab.park) {//注册园区
sql = sql+" and solutionContent->'$.solution.park' = :park"; sql = sql+" and solutionContent->'$.solution.park' = :park";
sqlCount = sqlCount+" and solutionContent->'$.solution.park' = :park"; sqlCount = sqlCount+" and solutionContent->'$.solution.park' = :park";
...@@ -329,52 +329,59 @@ class NeedsolutionService extends ServiceBase { ...@@ -329,52 +329,59 @@ class NeedsolutionService extends ServiceBase {
return system.getResultSuccess(); return system.getResultSuccess();
} }
// //立即支付下单保存方案 //立即支付下单保存方案
// async createSolutionByOrder(pobj){ async createSolutionByOrder(pobj){
// var ab = pobj.actionBody; var ab = pobj.actionBody;
// var app = pobj.appInfo; var app = pobj.appInfo;
// if(!app || !app.uapp_id){ if(!app || !app.uapp_id){
// return system.getResultFail(-100,"未知渠道"); return system.getResultFail(-100,"未知渠道");
// } }
// if(!ab.solutionBizid){ if(!ab.solutionBizid){
// return system.getResultFail(-101,"需求编号不能为空"); return system.getResultFail(-101,"需求编号不能为空");
// } }
// var needinfo = await this.needinfoDao.model.findOne({ var needinfo = await this.needinfoDao.model.findOne({
// where:{channelNeedNo:ab.intentionBizId,uapp_id:app.uapp_id},raw:true where:{channelNeedNo:ab.intentionBizId,uapp_id:app.uapp_id},raw:true
// }); });
// if(!needinfo || !needinfo.id){ if(!needinfo || !needinfo.id){
// return system.getResultFail(-102,"未知需求信息"); return system.getResultFail(-102,"未知需求信息");
// } }
// var solution = { var solution = "";
// "companyName":ab.companyName, var bizType = "esp.companyreg";
// "area":ab.area, if(ab.companyName){
// "city": ab.city, solution = {
// "companyCategory": ab.companyCategory, "companyName":ab.companyName,
// "companyType": ab.companyType, "area":ab.area,
// "orgType" :ab.orgType, "city": ab.city,
// "industryType": ab,industryType, "companyCategory": ab.companyCategory,
// "scope": ab.scope, "companyType": ab.companyType,
// "remark":ab.remark "orgType" :ab.orgType,
// }; "industryType": ab,industryType,
// var { "scope": ab.scope,
// "notes":"方案备注", "remark":ab.remark
// "bizType":"companyreg", };
// "solution":{ }else if(ab.park){
// "area":"区", solution = {
// "city":"市", "park":ab.park,
// "scope":"经营范围", "productType":ab.productType,
// "remark":"方案备注", "remark":ab.remark
// "orgType":"组织类型", };
// "companyName":"测试公司名称", bizType = "esp.companyreg_cloud";
// "companyType":"公司性质", }
// "industryType":"行业", var solutionContent = {
// "companyCategory":"纳税人类型" "bizType":bizType,
// } "solution":solution
// } };
// var reqObj = { solutionContent = JSON.stringify(solutionContent);
// ab["channelNeedNo"] = needinfo.channelNeedNo;
// } // ab["solutionNo"] = solutionNo;
// } var solutionNo = await this.getBusUid("ns");
var reqObj = {
solutionContent:solutionContent,solutionNo:solutionNo,status:"ywc",needNo:needinfo.needNo,
channelNeedNo:needinfo.channelNeedNo,orderNo:ab.orderNo,createUserId:needinfo.followManUserId
};
await this.dao.create(reqObj);
return system.getResultSuccess();
}
} }
module.exports = NeedsolutionService; module.exports = NeedsolutionService;
...@@ -391,4 +398,4 @@ module.exports = NeedsolutionService; ...@@ -391,4 +398,4 @@ module.exports = NeedsolutionService;
// industryType // industryType
// scope // scope
// remark // remark
// solutionBizid // solutionBizidchannelNeedNo
\ No newline at end of file \ 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