|
@@ -10,6 +10,7 @@
|
|
|
|
|
|
const auditConst = require('../const/audit').material;
|
|
|
const pushType = require('../const/audit').pushType;
|
|
|
+const pushOperate = require('../const/spec_3f').pushOperate;
|
|
|
const smsTypeConst = require('../const/sms_type');
|
|
|
const wxConst = require('../const/wechat_template');
|
|
|
const shenpiConst = require('../const/shenpi');
|
|
@@ -291,6 +292,8 @@ module.exports = app => {
|
|
|
// }
|
|
|
|
|
|
// todo 更新标段tender状态 ?
|
|
|
+ // 检查三方特殊推送
|
|
|
+ await this.ctx.service.specMsg.addMaterialMsg(transaction, pid, materialInfo, pushOperate.material.flow);
|
|
|
await transaction.commit();
|
|
|
} catch (err) {
|
|
|
await transaction.rollback();
|
|
@@ -358,7 +361,8 @@ module.exports = app => {
|
|
|
hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), material_decimal.tp), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.exponent_rate/100), material_decimal.tp)),
|
|
|
};
|
|
|
await this.ctx.helper.sendWechat(nextAudit.aid, smsTypeConst.const.TC, smsTypeConst.judge.approval.toString(), wxConst.template.material, wechatData);
|
|
|
-
|
|
|
+ // 检查三方特殊推送
|
|
|
+ await this.ctx.service.specMsg.addMaterialMsg(transaction, pid, materialInfo, pushOperate.material.flow);
|
|
|
|
|
|
// 添加短信通知-需要审批提醒功能
|
|
|
// const smsUser = await this.ctx.service.projectAccount.getDataById(nextAudit.aid);
|
|
@@ -445,6 +449,9 @@ module.exports = app => {
|
|
|
hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), material_decimal.tp), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.exponent_rate/100), material_decimal.tp)),
|
|
|
};
|
|
|
await this.ctx.helper.sendWechat(users, smsTypeConst.const.TC, smsTypeConst.judge.result.toString(), wxConst.template.material, wechatData);
|
|
|
+ // 检查三方特殊推送
|
|
|
+ await this.ctx.service.specMsg.addMaterialMsg(transaction, pid, materialInfo, pushOperate.material.flow);
|
|
|
+ await this.ctx.service.specMsg.addMaterialMsg(transaction, pid, materialInfo, pushOperate.material.checked);
|
|
|
|
|
|
// 添加短信通知-审批通过提醒功能
|
|
|
// const mobile_array = [];
|
|
@@ -545,6 +552,8 @@ module.exports = app => {
|
|
|
hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), material_decimal.tp), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.exponent_rate/100), material_decimal.tp)),
|
|
|
};
|
|
|
await this.ctx.helper.sendWechat(users, smsTypeConst.const.TC, smsTypeConst.judge.result.toString(), wxConst.template.material, wechatData);
|
|
|
+ // 检查三方特殊推送
|
|
|
+ await this.ctx.service.specMsg.addMaterialMsg(transaction, pid, materialInfo, pushOperate.material.flow);
|
|
|
|
|
|
// 添加短信通知-审批退回提醒功能
|
|
|
// const mobile_array = [];
|
|
@@ -640,6 +649,8 @@ module.exports = app => {
|
|
|
hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), material_decimal.tp), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.exponent_rate/100), material_decimal.tp)),
|
|
|
};
|
|
|
await this.ctx.helper.sendWechat(preAuditor.aid, smsTypeConst.const.TC, smsTypeConst.judge.approval.toString(), wxConst.template.material, wechatData);
|
|
|
+ // 检查三方特殊推送
|
|
|
+ await this.ctx.service.specMsg.addMaterialMsg(transaction, pid, materialInfo, pushOperate.material.flow);
|
|
|
|
|
|
await transaction.insert(this.tableName, newAuditors);
|
|
|
await transaction.commit();
|
|
@@ -748,6 +759,8 @@ module.exports = app => {
|
|
|
hs_m_tp: this.ctx.helper.add(this.ctx.helper.round(this.ctx.helper.mul(materialInfo.m_tp, 1+materialInfo.rate/100), material_decimal.tp), this.ctx.helper.round(this.ctx.helper.mul(materialInfo.ex_tp, 1+materialInfo.exponent_rate/100), material_decimal.tp)),
|
|
|
};
|
|
|
await this.ctx.helper.sendWechat(audit.aid, smsTypeConst.const.TC, smsTypeConst.judge.approval.toString(), wxConst.template.material, wechatData);
|
|
|
+ // 检查三方特殊推送
|
|
|
+ await this.ctx.service.specMsg.addMaterialMsg(transaction, pid, materialInfo, pushOperate.material.flow);
|
|
|
await transaction.commit();
|
|
|
} catch (err) {
|
|
|
await transaction.rollback();
|