Commit 294087d6 by 王昆

gsb

parent a6740c1d
#!/bin/bash #!/bin/bash
FROM registry.cn-beijing.aliyuncs.com/hantang2/node105:v2 FROM registry.cn-beijing.aliyuncs.com/hantang2/node105:v2
MAINTAINER jy "jiangyong@gongsibao.com" MAINTAINER jy "jiangyong@gongsibao.com"
ADD xgg-deliver /apps/xgg-deliver/ ADD xgg-saas-platform /apps/xgg-saas-platform/
WORKDIR /apps/xgg-deliver/ WORKDIR /apps/xgg-saas-platform/
RUN cnpm install -S RUN cnpm install -S
CMD ["node","/apps/xgg-deliver/main.js"] CMD ["node","/apps/xgg-saas-platform/main.js"]
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
5、利用k8s上线镜像为运行容器(这一步后续会实现为自动化) 5、利用k8s上线镜像为运行容器(这一步后续会实现为自动化)
项目版本号段分配 项目版本号段分配
19. xggdeliver release-v19.x.x 19. xggsaasplatform release-v24.x.x
后续号端请继续补充 后续号端请继续补充
查看自己项目号段到达的数字,执行git tag | grep v【号段前缀】 查看自己项目号段到达的数字,执行git tag | grep v【号段前缀】
......
var system = require("../../../system")
const CtlBase = require("../../ctlms.base");
class InvoiceCtl extends CtlBase {
constructor() {
super();
this.invoiceSve = system.getObject("service.invoice.invoiceSve");
}
/**
* 业务进度字典
* @param {*} pobj
*/
async processDics(pobj, pobj2, req) {
try {
return await this.invoiceSve.processDics(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 发票申请列表-管理员
* @param {*} pobj
*/
async invoicePage(pobj, pobj2, req) {
try {
this.doTimeCondition(pobj, ["createTimeBegin", "createTimeEnd"]);
return await this.invoiceSve.invoicePage(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 发票申请列表-业务员
* @param {*} pobj
*/
async myInvoicePage(pobj, pobj2, req) {
try {
pobj.operator_id = req.loginUser.id;
this.doTimeCondition(pobj, ["createTimeBegin", "createTimeEnd"]);
return await this.invoiceSve.invoicePage(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 进度处理
* @param {*} pobj
*/
async handleStatus(pobj) {
try {
return await this.invoiceSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 根据ID查详细信息
* @param {*} pobj
*/
async invoice(pobj, pobj2, req) {
try {
return await this.invoiceSve.invoice(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
}
module.exports = InvoiceCtl;
\ No newline at end of file
var system = require("../../../system")
const CtlBase = require("../../ctlms.base");
class InvoiceCtl extends CtlBase {
constructor() {
super();
this.invoiceSve = system.getObject("service.invoice.invoiceSve");
}
/**
* 申请发票校验
* @param {*} pobj
*/
async verification(pobj) {
try {
return await this.invoiceSve.apiVerification(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 申请发票校验试算
* @param {*} pobj
*/
async verificationAndCalculation(pobj) {
try {
return await this.invoiceSve.apiVerificationAndCalculation(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 查询明细(平台)
* @param {*} pobj
*/
async queryInvoice(pobj) {
try {
return await this.invoiceSve.apiQueryInvoiceAdmin(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 发票明细(交付商)
* @param {*} pobj
*/
async queryInvoiceDeliverer(pobj) {
try {
return await this.invoiceSve.apiQueryInvoiceDeliverer(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 发票试算接口
* @param {*} pobj
*/
async calcInvoice(pobj) {
try {
return await this.invoiceSve.apiCalcInvoice(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 计算发票增值税
* @param {*} pobj
*/
async calculationValueAddedTax(pobj) {
try {
return await this.invoiceSve.calculationValueAddedTax(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 计算发票附加税
* @param {*} pobj
*/
async calculationAdditionalTax(pobj) {
try {
return await this.invoiceSve.calculationAdditionalTax(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 发票申请保存
* @param {*} pobj
*/
async saveInvoice(pobj) {
try {
return await this.invoiceSve.apiSaveInvoiceAdm(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 平台审批
* @param {*} pobj
*/
async platformAssignment(pobj){
try {
let nextStatus = this.trim(pobj.nextStatus);
if(nextStatus=="1030"){ //平台交付商分配
pobj.id=this.trim(pobj.id);
pobj.delivererAmount=system.y2f(pobj.delivererAmount);
pobj.merchantId=this.trim(pobj.merchantId);
pobj.delivererId=this.trim(pobj.delivererId);
pobj.delivererName=this.trim(pobj.delivererName);
}else if(nextStatus=="1070"){//平台提交审批
pobj.id=this.trim(pobj.id);
pobj.auditContent=this.trim(pobj.auditContent);
pobj.delivererContent=this.trim(pobj.delivererContent);
pobj.mailAddr=this.trim(pobj.mailAddr);
pobj.mailMobile=this.trim(pobj.mailMobile);
pobj.mailTo=this.trim(pobj.mailTo);
}else if(nextStatus=="1090"){//平台完成
pobj.id=this.trim(pobj.id);
pobj.auditContent=this.trim(pobj.auditContent);
pobj.delivererContent=this.trim(pobj.delivererContent);
pobj.mailAddr=this.trim(pobj.mailAddr);
pobj.mailMobile=this.trim(pobj.mailMobile);
pobj.mailTo=this.trim(pobj.mailTo);
}else if(nextStatus=="1300"){//平台第二次审核不通过
pobj.id=this.trim(pobj.id);
}
return await this.invoiceSve.apiPlatformAssignment(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 交付商审批
* @param {*} pobj
*/
async delivererAssignment(pobj){
try {
let nextStatus = this.trim(pobj.nextStatus);
if(nextStatus=="1050"){ //交付商审批
pobj.id=this.trim(pobj.id);
pobj.invoiceNo=this.trim(pobj.invoiceNo);
pobj.invoiceImg=this.trim(pobj.invoiceImg);
}else if(nextStatus=="1060"){ //交付商提交审批
pobj.id=this.trim(pobj.id);
}else if(nextStatus=="1080"){ //交付商邮寄
pobj.id=this.trim(pobj.id);
pobj.mailNo=this.trim(pobj.mailNo);
}else if(nextStatus=="1040"){ //交付商拒绝处理
pobj.breakReason=this.trim(pobj.breakReason);
}
return await this.invoiceSve.apiDelivererAssignment(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 完税证明
* @param {*} pobj
*/
async txPayment(pobj){
try {
return await this.invoiceSve.apiTxPayment(pobj);
} catch (error) {
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 查看完税证明
* @param {*} pobj
*/
async queryTxPayment(pobj){
try {
return await this.invoiceSve.apiQueryTxPayment(pobj);
} catch (error) {
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 发票列表(交付商)
* @param {*} pobj
*/
async delivererInvoices(pobj){
try {
return await this.invoiceSve.apiDelivererInvoices(pobj);
} catch (error) {
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 发票审核列表(交付商)
* @param {*} pobj
*/
async delivererApplyInvoices(pobj){
try {
return await this.invoiceSve.apiDelivererApplyInvoices(pobj);
} catch (error) {
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 发票列表(平台)
* @param {*} pobj
*/
async queryInvoices(pobj){
try {
return await this.invoiceSve.apiQueryInvoices(pobj);
} catch (error) {
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 发票申请列表(平台)
* @param {*} pobj
*/
async queryApplyInvoices(pobj){
try {
return await this.invoiceSve.apiQueryApplyInvoices(pobj);
} catch (error) {
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 平台更新邮寄号(平台)
* @param {*} pobj
*/
async upEmNo(pobj){
try {
return await this.invoiceSve.apiUpEmNo(pobj);
} catch (error) {
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
async redrush(pobj, pobj2, req, res) {
try {
return await this.invoiceSve.apiRedrush(pobj);
} catch (error) {
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 发票红冲列表
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
* @param {*} res
*/
async redRushList(pobj,pobj2,req,res){
try {
return await this.invoiceSve.apiRedrushList(pobj);
} catch (error) {
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
}
module.exports = InvoiceCtl;
\ No newline at end of file
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctlms.base");
var cacheBaseComp = null;
class MerchantCtl extends CtlBase {
constructor() {
super();
this.merchantSve = system.getObject("service.merchant.merchantSve");
}
async nameList(pobj, pobj2, req) {
try {
return await this.merchantSve.nameList();
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async infoPage(pobj, pobj2, req) {
try {
this.doTimeCondition(pobj, ["createdBegin", "createdEnd"]);
return await this.merchantSve.infoPage(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async add(pobj, pobj2, req) {
try {
return await this.merchantSve.add(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async upd(pobj, pobj2, req) {
try {
return await this.merchantSve.upd(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async audit(pobj, pobj2, req) {
try {
return await this.merchantSve.audit(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
}
module.exports = MerchantCtl;
\ No newline at end of file
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctlms.base");
const logCtl = system.getObject("web.common.oplogCtl");
var cacheBaseComp = null;
class MerchantaccountCtl extends CtlBase {
constructor() {
super();
this.merchantaccountSve = system.getObject("service.merchant.merchantaccountSve");
}
async page(pobj, pobj2, req) {
try {
return await this.merchantaccountSve.page(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
}
module.exports = MerchantaccountCtl;
\ No newline at end of file
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctlms.base");
const logCtl = system.getObject("web.common.oplogCtl");
var cacheBaseComp = null;
class MerchantaddressCtl extends CtlBase {
constructor() {
super();
this.merchantaddressSve = system.getObject("service.merchant.merchantaddressSve");
}
async page(pobj, pobj2, req) {
try {
var condition = {
currentPage: pobj.currentPage,
pageSize: pobj.pageSize,
merchantId: pobj.merchantId || pobj.merchant_id,
}
var page = await this.merchantaddressSve.page(condition);
return page;
} catch (error) {
console.log(error);
return system.getResultFail(500, "接口异常:" + error.message);
}
}
async info(pobj, pobj2, req) {
try {
return await this.merchantaddressSve.info(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, "接口异常:" + error.message);
}
}
async save(pobj, pobj2, req) {
try {
var sign = {};
sign.id = pobj.id;
sign.merchantId = this.trim(pobj.merchantId) || this.trim(pobj.merchant_id);
sign.nameA = this.trim(pobj.nameA);
sign.contractNo = this.trim(pobj.contractNo);
sign.beginDate = this.trim(pobj.beginDate);
sign.endDate = this.trim(pobj.endDate);
sign.serviceRate = this.trim(pobj.serviceRate);
return await this.merchantaddressSve.save(sign);
} catch (error) {
console.log(error);
return system.getResultFail(500, "接口异常:" + error.message);
}
}
async setDefault(pobj, pobj2, req) {
try {
return await this.merchantaddressSve.setDefault(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, "接口异常:" + error.message);
}
}
}
module.exports = MerchantaddressCtl;
\ No newline at end of file
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctlms.base");
const logCtl = system.getObject("web.common.oplogCtl");
var cacheBaseComp = null;
class MerchantrechargeCtl extends CtlBase {
constructor() {
super();
this.merchantrechargeSve = system.getObject("service.merchant.merchantrechargeSve");
}
async page(pobj, pobj2, req) {
try {
return await this.merchantrechargeSve.page(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async info(pobj, pobj2, req) {
try {
return await this.merchantrechargeSve.info(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async audit(pobj, pobj2, req) {
try {
var loginUser = req.loginUser;
pobj.opUser = {
"ucid": loginUser.ucid,
"ucname": loginUser.ucname
}
return await this.merchantrechargeSve.audit(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
}
module.exports = MerchantrechargeCtl;
\ No newline at end of file
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctlms.base");
const logCtl = system.getObject("web.common.oplogCtl");
var cacheBaseComp = null;
class MerchantsignedCtl extends CtlBase {
constructor() {
super();
this.merchantsignedSve = system.getObject("service.merchant.merchantsignedSve");
}
async page(pobj, pobj2, req) {
try {
var condition = {
currentPage: pobj.currentPage,
pageSize: pobj.pageSize,
merchantId: pobj.merchantId || pobj.merchant_id,
}
return await this.merchantsignedSve.page(condition);
} catch (error) {
console.log(error);
return system.getResultFail(500, "接口异常:" + error.message);
}
}
async save(pobj, pobj2, req) {
try {
var sign = {};
sign.id = pobj.id;
sign.merchantId = this.trim(pobj.merchantId) || this.trim(pobj.merchant_id);
sign.nameA = this.trim(pobj.nameA);
sign.contractNo = this.trim(pobj.contractNo);
sign.beginDate = this.trim(pobj.beginDate);
sign.endDate = this.trim(pobj.endDate);
sign.serviceRate = this.trim(pobj.serviceRate);
return await this.merchantsignedSve.save(sign);
} catch (error) {
console.log(error);
return system.getResultFail(500, "接口异常:" + error.message);
}
}
async info(pobj, pobj2, req) {
try {
return await this.merchantsignedSve.info(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, "接口异常:" + error.message);
}
}
}
module.exports = MerchantsignedCtl;
\ No newline at end of file
var system = require("../../../system")
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctlms.base");
var cacheBaseComp = null;
class MerchanttitleCtl extends CtlBase {
constructor() {
super();
this.merchanttitleSve = system.getObject("service.merchant.merchanttitleSve");
}
async merchantTitleList(params){
params.currentPage=params.currentPage || 1;
params.pageSize=params.pageSize || 10;
try {
let res = await this.merchanttitleSve.merchantTitleList(params);
return res;
} catch (error) {
return system.getResultFail(500, "接口错误");
}
}
async merchantTitleSave(params){
try {
console.log(params);
return await this.merchanttitleSve.merchantTitleSave(params);
} catch (error) {
return system.getResultFail(500, "接口错误");
}
}
async merchantTitleInfo(params){
try {
console.log(params);
return await this.merchanttitleSve.merchantTitleInfo(params);
} catch (error) {
return system.getResultFail(500, "接口错误");
}
}
async merchantTitleDefault(params){
if(!params.id){
return system.getResultFail();
}else{
try {
return await this.merchanttitleSve.merchantTitleDefault(params);
} catch (error) {
return system.getResultFail(500, "接口错误");
}
}
}
}
module.exports = MerchanttitleCtl;
\ No newline at end of file
var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
const logCtl = system.getObject("web.common.oplogCtl");
const uuidv4 = require('uuid/v4');
var svgCaptcha = require('svg-captcha');
var cacheBaseComp = null;
class MerchanttradeprocessCtl extends CtlBase {
constructor() {
super("merchant", CtlBase.getServiceName(MerchanttradeprocessCtl));
this.redisClient = system.getObject("util.redisClient");
this.merchantSve = system.getObject("service.merchant.merchantSve");
}
async processList(pobj, pobj2, req) {
try {
var condition = {
currentPage: pobj.currentPage,
pageSize: pobj.pageSize,
merchantId: pobj.merchantId,
busiType: pobj.busiType,
invoiceApplyNo: this.trim(pobj.invoiceApplyNo),
createdBegin: this.trim(pobj.createdBegin),
createdEnd: this.trim(pobj.createdEnd),
}
this.doTimeCondition(condition, ["createdBegin", "createdEnd"]);
var page = await this.service.pageByCondition(condition);
return system.getResultSuccess(page);
} catch (error) {
console.log(error);
return system.getResultFail(500, "接口异常:" + error.message);
}
}
// try {
// } catch (error) {
// return system.getResultFail(500, "接口异常:" + error.message);
// }
}
module.exports = MerchanttradeprocessCtl;
\ No newline at end of file
var system = require("../../../system")
const CtlBase = require("../../ctlms.base");
class OrderCtl extends CtlBase {
constructor() {
super();
this.orderSve = system.getObject("service.order.orderSve");
}
async processList(pobj, pobj2, req) {
try {
return this.orderSve.allProcess(pobj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async allOrders(pobj, pobj2, req) {
var condition = {
currentPage: Number(pobj.currentPage || 1),
pageSize: Number(pobj.pageSize || 10),
id: this.trim(pobj.id),
status: pobj.status,
createdBegin: this.trim(pobj.createdBegin),
createdEnd: this.trim(pobj.createdEnd),
deliver_id: pobj.deliver_id,
}
this.doTimeCondition(condition, ["createdBegin", "createdEnd"]);
try {
return await this.orderSve.orders(condition);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async myOrders(pobj, pobj2, req) {
var condition = {
currentPage: pobj.currentPage || 1,
pageSize: pobj.pageSize || 10,
id: this.trim(pobj.id),
order_id: this.trim(pobj.order_id),
operator_id: req.loginUser.id,
deliver_id: this.trim(pobj.deliver_id),
status: pobj.status,
createdBegin: this.trim(pobj.createdBegin),
createdEnd: this.trim(pobj.createdEnd),
}
this.doTimeCondition(condition, ["createdBegin", "createdEnd"]);
try {
return await this.orderSve.orders(condition);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async orderInfo(pobj, pobj2, req) {
try {
return await this.orderSve.orderInfoAll({id: this.trim(pobj.id)});
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async orderChooseProducts(pobj, pobj2, req) {
let orderId = this.trim(pobj.id);
let order = await this.orderSve.orderInfo({id: orderId});
if(!order.data || !order.data.product_id) {
return system.getResult(null, "订单不存在");
}
let params = {
pid: order.data.product_id,
is_choose: 1,
}
try {
return await this.orderSve.productDics(params);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
/**
* 分配业务员
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
*/
async deliverAssignSalesman(pobj, pobj2, req) {
if (!pobj.id) {
return system.getResult(null, `参数错误 订单ID不能为空`);
}
if (!pobj.status) {
return system.getResult(null, `参数错误 订单状态不能为空`);
}
if (!pobj.operator_id) {
return system.getResult(null, `参数错误 业务员ID不能为空`);
}
try {
return await this.orderSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* 工商注册中
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
*/
async businessRegister(pobj, pobj2, req) {
if (!pobj.id) {
return system.getResult(null, `参数错误 订单ID不能为空`);
}
if (!pobj.status) {
return system.getResult(null, `参数错误 订单状态不能为空`);
}
try {
return await this.orderSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* 工商注册完成
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
*/
async businessRegisterComplete(pobj, pobj2, req) {
if (!pobj.id) {
return system.getResult(null, `参数错误 订单ID不能为空`);
}
if (!pobj.status) {
return system.getResult(null, `参数错误 状态码不能为空`);
}
if (!pobj.name) {
return system.getResult(null, `参数错误 个体工商户名称不能为空`);
}
if (!pobj.credit_code) {
return system.getResult(null, `参数错误 统一社会信用代码不能为空`);
}
if (!pobj.business_place) {
return system.getResult(null, `参数错误 经营场所不能为空`);
}
if (!pobj.business_scope) {
return system.getResult(null, `参数错误 经营范围不能为空`);
}
if (!pobj.reg_date) {
return system.getResult(null, `参数错误 注册日期不能为空`);
}
if (!pobj.business_img) {
return system.getResult(null, `参数错误 执照照片不能为空`);
}
// if (!pobj.business_gov_file) {
// return system.getResult(null, `参数错误 工商官方文件不能为空`);
// }
pobj.bd_id = req.loginUser.id;
pobj.bd_path = req.loginUser.orgpath;
try {
return await this.orderSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* 刻章办理中
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
*/
async chapterEngraving(pobj, pobj2, req) {
if (!pobj.id) {
return system.getResult(null, `参数错误 订单ID不能为空`);
}
if (!pobj.status) {
return system.getResult(null, `参数错误 状态码不能为空`);
}
try {
return await this.orderSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* 刻章办理已完成
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
*/
async chapterEngravedComplete(pobj, pobj2, req) {
if (!pobj.id) {
return system.getResult(null, `参数错误 订单ID不能为空`);
}
if (!pobj.status) {
return system.getResult(null, `参数错误 状态码不能为空`);
}
// if (!pobj.gongzhang) {
// return system.getResult(null, `参数错误 公章不能为空`);
// }
// if (!pobj.fapiaozhang) {
// return system.getResult(null, `参数错误 发票章不能为空`);
// }
// if (!pobj.caiwuzhang) {
// return system.getResult(null, `参数错误 财务章不能为空`);
// }
// if (!pobj.hetongzhang) {
// return system.getResult(null, `参数错误 合同章不能为空`);
// }
// if (!pobj.farenzhang) {
// return system.getResult(null, `参数错误 法人章不能为空`);
// }
// if (!pobj.zhang_gov_file) {
// return system.getResult(null, `参数错误 刻章官方文件不能为空`);
// }
try {
return await this.orderSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* 银行开户中
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
*/
async backAccountOpening(pobj, pobj2, req) {
if (!pobj.id) {
return system.getResult(null, `参数错误 订单ID不能为空`);
}
if (!pobj.status) {
return system.getResult(null, `参数错误 状态码不能为空`);
}
try {
return await this.orderSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* 银行已开户
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
*/
async backAccountOpenComplete(pobj, pobj2, req) {
if (!pobj.id) {
return system.getResult(null, `参数错误 订单ID不能为空`);
}
if (!pobj.status) {
return system.getResult(null, `参数错误 状态码不能为空`);
}
if (!pobj.bank_name) {
return system.getResult(null, `参数错误 账户名称不能为空`);
}
if (!pobj.bank_no) {
return system.getResult(null, `参数错误 账户号不能为空`);
}
if (!pobj.bank) {
return system.getResult(null, `参数错误 开户行不能为空`);
}
// if (!pobj.bank_img) {
// return system.getResult(null, `参数错误 账户信息不能为空`);
// }
// if (!pobj.bank_gov_file) {
// return system.getResult(null, `参数错误 银行开户官方文件不能为空`);
// }
try {
return await this.orderSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* 税务报道中
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
*/
async taxReporting(pobj, pobj2, req) {
if (!pobj.id) {
return system.getResult(null, `参数错误 订单ID不能为空`);
}
if (!pobj.status) {
return system.getResult(null, `参数错误 状态码不能为空`);
}
try {
return await this.orderSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* 税务报道完成
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
*/
async taxReportComplete(pobj, pobj2, req) {
if (!pobj.id) {
return system.getResult(null, `参数错误 订单ID不能为空`);
}
if (!pobj.status) {
return system.getResult(null, `参数错误 状态码不能为空`);
}
if (!pobj.tax_reg_day) {
return system.getResult(null, `参数错误 税务登记日不能为空`);
}
if (!pobj.tax_org) {
return system.getResult(null, `参数错误 税务机构名称不能为空`);
}
// if (!pobj.ca_img) {
// return system.getResult(null, `参数错误 CA照片不能为空`);
// }
// if (!pobj.tax_gov_file) {
// return system.getResult(null, `参数错误 税务报道官方文件不能为空`);
// }
try {
return await this.orderSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* 核定税种
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
*/
async taxCategoryDetermine(pobj, pobj2, req) {
if (!pobj.id) {
return system.getResult(null, `参数错误 订单ID不能为空`);
}
if (!pobj.status) {
return system.getResult(null, `参数错误 状态码不能为空`);
}
if (!pobj.common_tax_ladder) {
return system.getResult(null, `参数错误 普票个税阶梯不能为空`);
}
if (!pobj.common_other_ladder) {
return system.getResult(null, `参数错误 普票增值税、附加税阶梯不能为空`);
}
if (!pobj.special_tax_ladder) {
return system.getResult(null, `参数错误 专票个税阶梯不能为空`);
}
if (!pobj.special_other_ladder) {
return system.getResult(null, `参数错误 专票增值税、附加税阶梯不能为空`);
}
if (!pobj.add_value_up_type) {
return system.getResult(null, `参数错误 增值税累计类型不能为空`);
}
if (!pobj.tax_up_type) {
return system.getResult(null, `参数错误 个税累计类型不能为空`);
}
try {
return await this.orderSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* 交付商提交审核
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
*/
async submitAudit(pobj, pobj2, req) {
if (!pobj.id) {
return system.getResult(null, `参数错误 订单ID不能为空`);
}
if (!pobj.status) {
return system.getResult(null, `参数错误 状态码不能为空`);
}
try {
return await this.orderSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/**
* 交付商订单交付
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
*/
async mailed(pobj, pobj2, req) {
if (!pobj.id) {
return system.getResult(null, `参数错误 订单ID不能为空`);
}
if (!pobj.status) {
return system.getResult(null, `参数错误 状态码不能为空`);
}
if (!pobj.deliver_mail_no) {
return system.getResult(null, `参数错误 交付商交付快递单号不能为空`);
}
if (!pobj.deliver_mail_img) {
return system.getResult(null, `参数错误 交付商交付快递单号图片不能为空`);
}
try {
return await this.orderSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
}
module.exports = OrderCtl;
\ No newline at end of file
var system = require("../../../system")
const CtlBase = require("../../ctlms.base");
class InvoiceCtl extends CtlBase {
constructor() {
super();
this.invoiceSve = system.getObject("service.invoice.invoiceSve");
}
}
module.exports = InvoiceCtl;
\ No newline at end of file
var system = require("../../../system")
const CtlBase = require("../../ctlms.base");
class OrderCtl extends CtlBase {
constructor() {
super();
this.orderSve = system.getObject("service.order.orderSve");
}
}
module.exports = OrderCtl;
\ No newline at end of file
...@@ -7,8 +7,8 @@ var ENVINPUT = { ...@@ -7,8 +7,8 @@ var ENVINPUT = {
REDIS_HOST: process.env.REDIS_HOST, REDIS_HOST: process.env.REDIS_HOST,
REDIS_PORT: process.env.REDIS_PORT, REDIS_PORT: process.env.REDIS_PORT,
REDIS_PWD: process.env.REDIS_PWD, REDIS_PWD: process.env.REDIS_PWD,
DB_NAME: process.env.XGGDELIVER_DB_NAME, DB_NAME: process.env.XGGSAASPLATFORM_DB_NAME,
REDIS_DB: process.env.XGGDELIVER_REDIS_DB, REDIS_DB: process.env.XGGSAASPLATFORM_REDIS_DB,
APP_ENV: process.env.APP_ENV ? process.env.APP_ENV : "dev" APP_ENV: process.env.APP_ENV ? process.env.APP_ENV : "dev"
}; };
var settings = { var settings = {
...@@ -26,7 +26,7 @@ var settings = { ...@@ -26,7 +26,7 @@ var settings = {
salt: "%iatpD1gcxz7iF#B", salt: "%iatpD1gcxz7iF#B",
defaultpwd: "987456", defaultpwd: "987456",
basepath: path.normalize(path.join(__dirname, '../..')), basepath: path.normalize(path.join(__dirname, '../..')),
port: process.env.NODE_PORT || 3012, port: process.env.NODE_PORT || 3701,
reqEsAddr: function () { reqEsAddr: function () {
if (this.env == "dev") { if (this.env == "dev") {
var localsettings = require("./localsettings"); var localsettings = require("./localsettings");
......
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