Commit 3b9605ea by 孙亚楠

dd

parent c01e371c
...@@ -11,6 +11,7 @@ class OrderCtl extends CtlBase { ...@@ -11,6 +11,7 @@ class OrderCtl extends CtlBase {
super(); super();
this.orderSve = system.getObject("service.order.orderSve"); this.orderSve = system.getObject("service.order.orderSve");
this.userSve = system.getObject("service.uc.userSve"); this.userSve = system.getObject("service.uc.userSve");
this.TAX_CATEGORY = [1,2]; //计费模式
} }
async processList(pobj, pobj2, req) { async processList(pobj, pobj2, req) {
...@@ -340,8 +341,66 @@ class OrderCtl extends CtlBase { ...@@ -340,8 +341,66 @@ class OrderCtl extends CtlBase {
return system.getResult(null, `系统错误 错误信息 ${error}`); return system.getResult(null, `系统错误 错误信息 ${error}`);
} }
} }
/**
* 个体户签约
* @param {*} params
*/
async signing(pobj, pobj2, req) {
if (!pobj.hasOwnProperty('credit_code') && !pobj.credit_code) {
return system.getResult(null, `参数错误 同意社会信用代码不能为空`);
}
if (!pobj.hasOwnProperty('cost_rate')) {
return system.getResult(null, `参数错误 核定成本费用率不能为空`);
}
if (!pobj.hasOwnProperty('add_value_up_type') && !pobj.add_value_up_type) {
return system.getResult(null, `参数错误 增值税累计类型不能为空`);
}
if (!pobj.hasOwnProperty('tax_up_type')) {
return system.getResult(null, `参数错误 个税累计类型不能为空`);
}
if (!pobj.hasOwnProperty('service_begin_time')) {
return system.getResult(null, `参数错误 服务开始时间不能为空`);
}
if (!pobj.hasOwnProperty('service_end_time')) {
return system.getResult(null, `参数错误 服务结束时间不能为空`);
}
if (!pobj.hasOwnProperty('service_rate') && !pobj.service_rate) {
return system.getResult(null, `参数错误 服务费比例不能为空`);
}
if (!pobj.hasOwnProperty('tax_rate') && !pobj.tax_rate) {
return system.getResult(null, `参数错误 含税价百分比不能为空`);
}
try {
pobj.service_rate=system.y2f(pobj.service_rate);
pobj.tax_rate=system.y2f(pobj.tax_rate);
pobj.cost_rate=system.y2f(pobj.cost_rate);
return await this.orderSve.signing(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* 建帐
* @param {*} params
*/
async createAccount(pobj, pobj2, req) {
if (!pobj.hasOwnProperty('credit_code') && !pobj.credit_code) {
return system.getResult(null, `参数错误 同意社会信用代码不能为空`);
}
try {
return await this.orderSve.createAccount(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
} }
module.exports = OrderCtl; module.exports = OrderCtl;
\ No newline at end of file
...@@ -171,5 +171,32 @@ class OrderService extends ServiceBase { ...@@ -171,5 +171,32 @@ class OrderService extends ServiceBase {
await this.pushapiSve.push(options); await this.pushapiSve.push(options);
} }
/**
* @params 个体户签约
*/
async signing(params){
try {
return await this.callms("order", "signing", params);
} catch (error) {
console.log(error);
return system.getResult(error);
}
}
/**
* @params 建仗
*/
async createAccount(params){
try {
//todo somthing ...
if(1==1){
return await this.callms("order", "createAccount", params);
}
} catch (error) {
console.log(error);
return system.getResult(error);
}
}
} }
module.exports = OrderService; module.exports = OrderService;
\ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
1. [交付商验收](#platformAuditDetermine) 1. [交付商验收](#platformAuditDetermine)
1. [客户交付](#deliverCustomer) 1. [客户交付](#deliverCustomer)
1. [订单完成](#orderComplete) 1. [订单完成](#orderComplete)
1. [个体户签约](#signing)
## **<a name="processList"> 业务进度字典 </a>** ## **<a name="processList"> 业务进度字典 </a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
...@@ -635,4 +635,62 @@ ...@@ -635,4 +635,62 @@
"requestid": "efb46fd211be4ca6845acc53684fb61d" "requestid": "efb46fd211be4ca6845acc53684fb61d"
} }
```
## **<a name="signing"> 个体户签约 </a>**
[返回到目录](#menu)
##### URL
[/web/order/orderCtl/signing]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"credit_code": "1", //同意社会信用代码
"cost_rate": 0.9, //核定成本费用率 小数
"add_value_up_type": "", //增值税累计类型 增值税累计类型 1按月 2按季度
"tax_up_type": "", //个税累计类型 个税累计类型 1按月累计 2按年累计
"service_begin_time": "1", //服务开始时间
"service_end_time": "5", //服务结束时间
"service_rate": 0.9, //服务费比例 小数
"tax_rate": 0.9, //含税价百分比 小数
"sign_notes":"" //签约备注
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": null,
"requestid": "efb46fd211be4ca6845acc53684fb61d"
}
```
## **<a name="createAccount"> 建账 </a>**
[返回到目录](#menu)
##### URL
[/web/order/orderCtl/createAccount]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"credit_code": "1", //同意社会信用代码
}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": null,
"requestid": "efb46fd211be4ca6845acc53684fb61d"
}
``` ```
\ 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