Commit 0614365d by 王勇飞

gyq

parent 646eb790
......@@ -455,13 +455,7 @@ class DeliverybillCtl extends CtlBase {
}
}
<<<<<<< HEAD
async settleApply(p, q, req) {
let ids = p.ids
let rtn = await this.service.settleApply(ids, p.userid, p.username)
return system.getResult({})
=======
async settleApplyForTacent(p,q,req){
let ids=p.ids
let spname=p.spname
......@@ -475,7 +469,6 @@ class DeliverybillCtl extends CtlBase {
let spid=p.spid
let rtn=await this.service.settleApply(ids,p.userid,p.username,spname,spid)
return system.getResult({})
>>>>>>> aa70fce057be916a4fa83f794ed2e2334e50370d
}
/*根据商机编号插入交付单信息*/
async insertInfo(nobj, qobj, req) {//队列的时候用
......
......@@ -78,32 +78,6 @@ class DeliverybillService extends ServiceBase {
}
}
<<<<<<< HEAD
async settleApply(ids, uid, uname) {
var self = this
return this.db.transaction(async function (t) {
//先按照ids查询出交付单的合计服务成本
let settleAmount = await self.dao.findSum("cost_price", { where: { id: { [self.db.Op.In]: ids } }, transaction: t })
settleAmount = isNaN(settleAmount) ? 0 : settleAmount
let settlecode = await self.getBusUid("JSD")
let settleObj = {
code: settlecode,
settle_amount: settleAmount,
creator_id: uid,
creator: uname
}
//生成结算单,结算单状态为待审核
let newentity = await self.db.models.settlebill.create(settleObj, { transaction: t })
//然后按照ids更新交付单的状态为结算中,更新结算单的id到交付单表
for (let idstr of ids) {
let up = await self.dao.updateByWhere({
settle_status: 'settling',
settlebill_id: newentity.id
}, { id: idstr }, t);
}
return newentity
});
=======
//为租户自己给交付打标记,表示中台已经给予结算,自己记账用
//租户自己临时记录结算情况
async settleApplyForTacent(ids,uid,uname,spname,spid){
......@@ -166,7 +140,6 @@ class DeliverybillService extends ServiceBase {
}
return newentity
});
>>>>>>> aa70fce057be916a4fa83f794ed2e2334e50370d
}
async findAndCountAll(obj) {
var self = this;
......
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