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 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
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