为什么在js里面写插入提交时候会提交两次数据,另外我想将tNumber的值放入的insert中这个该怎么写 var form = this.options.form; var tNumber = form.getWidgetByName("tNumber").getValue(); var sql = "SQL(\"BUDGET\",\"INSERT INTO budgetEntry_test (tNumber,rNumber,belongTo,accrualJan,accrualFeb,accrualMar,accrualApr,accrualMay,accrualJun,accrualJul,accrualAug,accrualSep,accrualOct,accrualNov,accrualDec,ver) SELECT '22' as tNumber,(Row_Number() over( ORDER BY dimensionID )) AS RowNo,dimensionID,SUM (ISNULL(Jan, 0)) je1,SUM (ISNULL(Feb, 0)) je2,SUM (ISNULL(Mar, 0)) je3,SUM (ISNULL(Apr, 0)) je4,SUM (ISNULL(May, 0)) je5,SUM (ISNULL(Jun, 0)) je6,SUM (ISNULL(Jul, 0)) je7,SUM (ISNULL(Aug, 0)) je8,SUM (ISNULL(Sep, 0)) je9,SUM (ISNULL(Oct, 0)) je10,SUM (ISNULL(Nov, 0)) je11,SUM (ISNULL(Dec, 0)) je12,ver FROM gatherLaborBudget GROUP BY bYear,ver,dimensionID,accountItemID\",1,1)"; FR.remoteEvaluate(sql); |