Commit 24663175 by 蒋勇

d

parent 112cacb4
...@@ -79,7 +79,9 @@ class DeliverybillService extends ServiceBase { ...@@ -79,7 +79,9 @@ class DeliverybillService extends ServiceBase {
var self=this var self=this
return this.db.transaction(async function (t){ return this.db.transaction(async function (t){
//先按照ids查询出交付单的合计服务成本 //先按照ids查询出交付单的合计服务成本
let settleAmount=await self.dao.findSum("cost_price",{where:{id:{[self.db.Op.In]:ids}},transaction:t}) let d= await self.dao.customQuery("select sum(cost_price) as settleAmount from delivery_bill where id in (:idstr)",{idstr:ids});
// let settleAmount=await self.dao.model.sum("cost_price",{where:{id:{[self.db.Op.In]:['40','41','42']}},transaction:t})
let settleAmount=d[0].settleAmount
settleAmount=isNaN(settleAmount)?0:settleAmount settleAmount=isNaN(settleAmount)?0:settleAmount
let settlecode=await self. getBusUid("JSD") let settlecode=await self. getBusUid("JSD")
let settleObj={ let settleObj={
......
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