Commit 4f759f86 by 庄冰

zhuangbing

parent fdc1669c
......@@ -35,6 +35,44 @@ class NeedsolutionService extends ServiceBase {
if(!ab.solutionContent.solution){
return system.getResultFail(-104,"业务方案信息不能为空");
}
var solution = ab.solutionContent.solution;
if(bizType=="companyreg"){//普通公司注册
if(!solution.companyName){
return system.getResultFail(-105,"公司名称不能为空");
}
if(!solution.city){
return system.getResultFail(-106,"注册城市不能为空");
}
if(!solution.area){
return system.getResultFail(-107,"注册区域不能为空");
}
if(!solution.companyCategory){
return system.getResultFail(-108,"纳税人类型不能为空");
}
if(!solution.companyType){
return system.getResultFail(-109,"公司性质不能为空");
}
if(!solution.orgType){
return system.getResultFail(-110,"组织类型不能为空");
}
if(!solution.industryType){
return system.getResultFail(-111,"从事行业不能为空");
}
if(!solution.scope){
return system.getResultFail(-112,"经营范围不能为空");
}
}
if(bizType=="companyreg_cloud"){//云上公司注册
if(!solution.park){
return system.getResultFail(-113,"注册园区不能为空");
}
if(!solution.registerType){
return system.getResultFail(-114,"注册类型不能为空");
}
if(!solution.productType){
return system.getResultFail(-115,"产品类型不能为空");
}
}
//获取需求信息
var needinfo = await this.needinfoDao.model.findOne({
where:{needNo:ab.needNo},raw:true
......@@ -142,42 +180,42 @@ class NeedsolutionService extends ServiceBase {
paramWhere.status = ab.status;
}
if(bizType=="companyreg"){//普通公司注册
if (ab.entName) {//企业名称
sql = sql+" and solutionContent->'$.solution.entName' = :entName";
sqlCount = sqlCount+" and solutionContent->'$.solution.entName' = :entName";
paramWhere.entName = ab.entName;
if (ab.companyName) {//企业名称
sql = sql+" and solutionContent->'$.solution.companyName' = :companyName";
sqlCount = sqlCount+" and solutionContent->'$.solution.companyName' = :companyName";
paramWhere.companyName = ab.companyName;
}//
if (ab.organizationType) {//组织类型
sql = sql+" and solutionContent->'$.solution.organizationType' = :organizationType";
sqlCount = sqlCount+" and solutionContent->'$.solution.organizationType' = :organizationType";
paramWhere.organizationType = ab.organizationType;
if (ab.orgType) {//组织类型
sql = sql+" and solutionContent->'$.solution.orgType' = :orgType";
sqlCount = sqlCount+" and solutionContent->'$.solution.orgType' = :orgType";
paramWhere.orgType = ab.orgType;
}
if (ab.entNature) {//公司性质
sql = sql+" and solutionContent->'$.solution.entNature' = :entNature";
sqlCount = sqlCount+" and solutionContent->'$.solution.entNature' = :entNature";
paramWhere.entNature = ab.entNature;
if (ab.companyType) {//公司性质
sql = sql+" and solutionContent->'$.solution.companyType' = :companyType";
sqlCount = sqlCount+" and solutionContent->'$.solution.companyType' = :companyType";
paramWhere.companyType = ab.companyType;
}
if (ab.city) {//城市
sql = sql+" and solutionContent->'$.solution.city' = :city";
sqlCount = sqlCount+" and solutionContent->'$.solution.city' = :city";
paramWhere.city = ab.city;
}
if (ab.province) {//省份
sql = sql+" and solutionContent->'$.solution.province' = :province";
sqlCount = sqlCount+" and solutionContent->'$.solution.province' = :province";
paramWhere.province = ab.province;
if (ab.area) {//区域
sql = sql+" and solutionContent->'$.solution.area' = :area";
sqlCount = sqlCount+" and solutionContent->'$.solution.area' = :area";
paramWhere.area = ab.area;
}
if (ab.taxpayerType) {//纳税人类型
sql = sql+" and solutionContent->'$.solution.taxpayerType' = :taxpayerType";
sqlCount = sqlCount+" and solutionContent->'$.solution.taxpayerType' = :taxpayerType";
paramWhere.taxpayerType = ab.taxpayerType;
if (ab.companyCategory) {//纳税人类型
sql = sql+" and solutionContent->'$.solution.companyCategory' = :companyCategory";
sqlCount = sqlCount+" and solutionContent->'$.solution.companyCategory' = :companyCategory";
paramWhere.companyCategory = ab.companyCategory;
}
}
if(bizType=="companyreg_cloud"){//云上公司注册
if (ab.regPark) {//注册园区
sql = sql+" and solutionContent->'$.solution.regPark' = :regPark";
sqlCount = sqlCount+" and solutionContent->'$.solution.regPark' = :regPark";
paramWhere.regPark = ab.regPark;
if (ab.park) {//注册园区
sql = sql+" and solutionContent->'$.solution.park' = :park";
sqlCount = sqlCount+" and solutionContent->'$.solution.park' = :park";
paramWhere.park = ab.park;
}
if (ab.productType) {//产品类型
sql = sql+" and solutionContent->'$.solution.productType' = :productType";
......
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