本文整理汇总了Python中base.utils.MethodUtil.getReqList方法的典型用法代码示例。如果您正苦于以下问题:Python MethodUtil.getReqList方法的具体用法?Python MethodUtil.getReqList怎么用?Python MethodUtil.getReqList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类base.utils.MethodUtil
的用法示例。
在下文中一共展示了MethodUtil.getReqList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: applySave
# 需要导入模块: from base.utils import MethodUtil [as 别名]
# 或者: from base.utils.MethodUtil import getReqList [as 别名]
def applySave(request):
"""保存结算申请单"""
paytypeid = request.session.get("s_paytypeid")
s_ucode = request.session.get("s_ucode")
venderid = request.session.get("s_suppcode")
pstart = mtu.getReqVal(request,"pstart",None)
pend = mtu.getReqVal(request,"pend",None)
cstart = mtu.getReqVal(request,"cstart",None)
cend = mtu.getReqVal(request,"cend",None)
refsheetids = mtu.getReqList(request,"refsheetid",None)
balancePlaceId = mtu.getReqVal(request,"balancePlaceId")
params = {}
result = {}
#判断是否可以提交结算单
islimit = mtu.getProperties(Constants.SCM_CONFIG_MODULE,Constants.SCM_CONFIG_BILL_ISLIMIT)
if islimit == 'True':
sequence = allowCommit(paytypeid,venderid)
else:
sequence = "0"
if sequence=="0":
planpaydate = datetime.date.today().strftime("%Y-%m-%d")
params["pstart"]=pstart
params["pend"]=pend
params["cstart"]=cstart
params["cend"]=cend
params["planpaydate"]=planpaydate
params["editor"]=s_ucode
params["editdate"]=datetime.date.today().strftime("%Y-%m-%d")
# params["sheetid"] = sheetId
params["venderid"] = venderid
try:
conn2 = mtu.get_MssqlConn()
errors = 0
try:
blist = []
for row in refsheetids:
ric = eval(row)
blist.append(ric)
payableamt = findPayableCostValue(conn2,balancePlaceId,venderid)
if not payableamt:
payableamt = decimal.Decimal(0.0)
costvalue = findCostValue(conn2,venderid)
if not costvalue:
costvalue = decimal.Decimal(0.0)
unjsvalue = unbalancedCostValue(conn2,venderid,pstart)
if not unjsvalue:
unjsvalue = decimal.Decimal(0.0)
undqvalue = undueCostValue(conn2,venderid,pend)
if not undqvalue:
undqvalue = decimal.Decimal(0.0)
advance = findAdvance(conn2,venderid)
if not advance:
advance = decimal.Decimal(0.0)
payablemoney = sum([float(row["costvalue"]) for row in blist])
if not payablemoney:
payablemoney = decimal.Decimal(0.0)
params["payablemoney"]=float(payablemoney) #应付金额
params["advance"]=float(advance) #预付款余额,预付款应扣金额(promoney)默认0 (写表billhead0)
params["costvalue"]=float(costvalue) #库存金额 (写表billhead0)
params["undqvalue"]=float(undqvalue) #未到期金额 (写表billhead0) 取不为空数据
params["payableamt"]=float(payableamt) #应付账款金额 (写表billhead0)
params["unjsvalue"]=float(unjsvalue) #应结未结金额 (写表billhead0) 取不为空数据
#新增
type=0
typeStr = "新增"
sheetId = getSheetId(conn2)
conn = mtu.getMssqlConn()
conn.autocommit(False)
klist = findKxsum(conn,venderid,pend)
kxmoney = sum([row["kmoney"] for row in klist])
if not kxmoney:
kxmoney = decimal.Decimal(0.0)
cashlist = filter(lambda row:row["kkflag"]==0,[row for row in klist])
invoicelist = filter(lambda row:row["kkflag"]==1,[row for row in klist])
kxcash = sum([row["kmoney"] for row in cashlist])
if not kxcash:
kxcash = decimal.Decimal(0.0)
kxinvoice = sum([row["kmoney"] for row in invoicelist])
if not kxinvoice:
kxinvoice = decimal.Decimal(0.0)
#应付金额=实付金额+帐扣金额
#应开票金额=实付金额
params["kxmoney"]=float(kxmoney) #扣项金额合计
#.........这里部分代码省略.........