_,err=db.Exec(c,"INSERT INTO `lie_order_goods_img` (`issuebillid`, `issueentryid`, `image_src`)VALUES(?,?,?)",orderId,entryid,image_src)
var(
issuebillid,issueentryidstring
scanqtyint64
)
err=db.QueryRow(c,"select scanqty,issuebillid,issueentryid from lie_erp_order where id = ? and materialno = ? ",id,materialno).Scan(&scanqty,&issuebillid,&issueentryid)
ifissuebillid==""{
close()
service.ErrorReturn(c,"该型号不在该详情中")
}
scanqty=scanqty+num;
_,err=db.Exec(c,"update `lie_erp_order` set scanqty = ? where id = ?",scanqty,id)
imageArr:=strings.Split(image_src,",")
for_,image_val:=rangeimageArr{
_,err=db.Exec(c,"INSERT INTO `lie_order_goods_img` (`issuebillid`, `issueentryid`, `image_src`)VALUES(?,?,?)",issuebillid,issueentryid,image_val)
//查询sql select id from (SELECT *,qty-scanqty show_zan FROM `lie_erp_order` where materialno = ? and ordersn = ? order by show_zan asc) abc where show_zan >= ?
err=db.QueryRow(c,"select id from (SELECT *,qty-scanqty show_zan FROM `lie_erp_order` where materialno = ? and ordersn = ? order by show_zan asc) abc where show_zan >= ?",materialno,ordersn,num).Scan(&id)
rows,err:=db.Query(c,"select id,ordersn,issuebillid,issueentryid,materialno,materialname,brand,qty,unit,baseqty,lot,factorylot,warehouse,location,salegroup,saleperson from lie_erp_order where ordersn = ?",orderId)
rows,err:=db.Query(c,"select id,ordersn,issuebillid,issueentryid,materialno,materialname,brand,qty,unit,baseqty,scanqty,lot,factorylot,warehouse,location,salegroup,saleperson from lie_erp_order where ordersn = ?",orderId)
imagerows,err:=db.Query(c,"select issuebillid,issueentryid,image_src from lie_order_goods_img where issuebillid = ? and issueentryid = ?",Issuebillid,Issueentryid)
imagerows,err:=db.Query(c,"select issuebillid,issueentryid,image_src from lie_order_goods_img where issuebillid = ? and issueentryid = ? order by id desc limit 0,3",Issuebillid,Issueentryid)