Browse Source

今天代码结束

任翠亮 5 years ago
parent
commit
89e333c49d
2 changed files with 563 additions and 3 deletions
  1. 36 3
      awj/awj/apps/stockinvoice/views.py
  2. 527 0
      awj/logs/hwj.log

+ 36 - 3
awj/awj/apps/stockinvoice/views.py

@@ -33,8 +33,14 @@ class InvoiceView(View):
         UNI_NO_PAY = request.POST.get("UNI_NO_PAY")   #纳税人识别码   1
         SAL_ADR = request.POST.get("SAL_ADR")   #开票客户地址   1
         SAL_TEL = request.POST.get("SAL_TEL")   #开票客户电话   1
+        SAL_KH_BANK = request.POST.get("SAL_KH_BANK")  # 开户账号   1
         USR = request.POST.get("USR")   #制单人编码   1
         USR_NAME = request.POST.get("USR_NAME")   #制单人姓名   1
+        SAL_ID_CODE = request.POST.get("SAL_ID_CODE")   #开户银行账号   1
+        REM = request.POST.get("REM")   #发票备注   1
+        print(SAL_KH_BANK)
+        print(SAL_ID_CODE)
+        print(REM)
         print(ZL_NO)   #单据号码    1
         print(LZ_DD)   #单据日期    1
         print(INV_NO)   #发票号码    1
@@ -64,7 +70,7 @@ class InvoiceView(View):
             #获取查看用户是否存在,不存在则插入
             row_usr = cursor.execute("SELECT COUNT(*) FROM SALM WHERE SAL_NO=%s",[USR]).fetchall()[0][0]
             if row_usr==0:
-                cursor.execute("INSERT INTO SALM(SAL_NO,[NAME])VALUES (%s,%s)", [USR,USR])
+                cursor.execute("INSERT INTO SALM(SAL_NO,[NAME])VALUES (%s,%s)", [USR,USR_NAME])
 
             #判断是否开票开票
             if int(ZHANG_ID) == 3:
@@ -74,8 +80,35 @@ class InvoiceView(View):
                 'RMB',1,'F','F',1)""", ['PC'+ZL_NO[2::], datetime.datetime.strptime(LZ_DD,'%Y-%m-%d'),CUS_NO,USR,USR,datetime.datetime.strptime(LZ_DD,'%Y-%m-%d'),
                 datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),AMT])
             #插入进货单表身
-            cursor.execute("""INSERT INTO TF_PSS(PS_ID,PS_NO,PS_DD,WH,PRD_NO,QTY,UP,AMT,AMTN_NET,TAX_RTO,ITM,UNIT,CSTN_SAL)
-            VALUES('PC',%s,%s,'0000','AQ001',1,1,%s,%s,5,1,1,%s)""", ['PC'+ZL_NO[2::], datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),AMT,AMT,AMT])
+                cursor.execute("""INSERT INTO TF_PSS(PS_ID,PS_NO,PS_DD,WH,PRD_NO,QTY,UP,AMT,AMTN_NET,TAX_RTO,ITM,UNIT,CSTN_SAL,PRE_ITM)
+            VALUES('PC',%s,%s,'0000','AQ001',1,1,%s,%s,5,1,1,%s,1)""", ['PC'+ZL_NO[2::], datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),AMT,AMT,AMT])
+
+            #增加发票记录
+                # cursor.execute("""INSERT INTO INV_NO (BIL_NO,INV_NO,BIL_ID,INV_ID,CUS_NO,TITLE_BUY,TITLE_PAY,AMT,TAX_ID1,TAX_ID2,INV_TT,INV_DD)
+                # VALUES(%s,%s,'LP',21,%s,%s,%s,%s,1,1,1,%s,%s)""", [ZL_NO, INV_NO,CUS_NO,CUS_NO_NAME,CUS_NO_NAME,AMT,datetime.datetime.strptime(LZ_DD, '%Y-%m-%d')])
+                cursor.execute("""INSERT INTO INV_NO (BIL_NO,INV_NO,BIL_ID,INV_ID,CUS_NO,TITLE_BUY,TITLE_PAY,AMT,TAX_ID1,TAX_ID2,INV_TT,INV_DD,UNI_NO_PAY,SAL_ADR,SAL_TEL,SAL_KH_BANK,SAL_ID_CODE)
+                VALUES(%s,%s,'LP',21,%s,%s,%s,%s,1,1,1,%s,%s,%s,%s,%s,%s)""",[ZL_NO, INV_NO, CUS_NO, CUS_NO_NAME, CUS_NO_NAME, AMT,datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),
+                 UNI_NO_PAY,SAL_ADR,SAL_TEL,SAL_KH_BANK,SAL_ID_CODE])
+
+            #插入立账单MF_MRP
+                cursor.execute("""INSERT INTO MF_ARP(ARP_ID,OPN_ID,ARP_NO,BIL_NO,CUS_NO,PAY_DD,INV_NO,AMT,AMTN,AMTN_NET,CUR_ID,EXC_RTO,CLOSE_ID,BIL_ID,SYS_DATE)VALUES
+                (2,2,%s,%s,%s,%s,%s,%s,%s,%s,'RMB',1,'F','LP',%s)""", [ 'AP'+ZL_NO[2::],ZL_NO,CUS_NO,datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),INV_NO
+                ,AMT,AMT,AMT,datetime.datetime.strptime(LZ_DD, '%Y-%m-%d')])
+
+            #插入进货开票表头
+                cursor.execute("""INSERT INTO MF_LZ1(LZ_ID,LZ_NO,PAY_DD,LZ_DD,CUS_NO,INV_NO,CUR_ID,EXC_RTO,USR,CHK_MAN,AMT,AMTN_NET,ARP_NO,CLS_DATE,TAX_ID,ZHANG_ID,
+            SYS_DATE,VOH_CHK,TURN_ID,INV_BIL_ID,INV_BIL_NO,FLG_VOH)VALUES
+            ('LP',%s,%s,%s,%s,%s,'RMB',1,%s,%s,
+            %s,%s,%s,%s,'1',3,%s,1,1,'LP',%s,'F')""", [ZL_NO, datetime.datetime.strptime(LZ_DD, '%Y-%m-%d')
+            ,datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),CUS_NO,INV_NO,USR,USR,AMT,AMT,'AP'+ZL_NO[2::],datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),datetime.datetime.strptime(LZ_DD, '%Y-%m-%d')
+            ,ZL_NO])
+
+            #插入进货开票表身
+                cursor.execute("""INSERT INTO TF_LZ1(LZ_ID,LZ_NO,ITM,PS_NO,AMT,AMTN_NET,PRD_NO,EST_ITM,PAY_DD,TAX_RTO,QTY,UP,BIL_ID,UNIT,PRD_NAME,CUS_NO,UP_ZG,PRE_ITM)VALUES
+            ('LP',%s,1,%s,%s,%s,'AQ001',1,%s,5,1,1,'PC',1,'服務費用',%s,1,1)""", [ZL_NO,'PC'+ZL_NO[2::],AMT,AMT,datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),CUS_NO])
+
+            #开完发票回写进货单表身已开金额
+                cursor.execute("""UPDATE TF_PSS SET AMT_FP=%s,AMTN_NET_FP=%s WHERE PS_NO=%s""", [AMT,AMT,'PC'+ZL_NO[2::]])
         context = {
             'a': 'POST提交'
         }

+ 527 - 0
awj/logs/hwj.log

@@ -882,3 +882,530 @@ Traceback (most recent call last):
 django.db.utils.IntegrityError: ('23000', "[23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]违反了 PRIMARY KEY 约束 'PK__MF_PSS'。不能在对象 'dbo.MF_PSS' 中插入重复键。 (2627) (SQLExecDirectW); [23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]语句已终止。 (3621)")
 ERROR 2019-10-17 23:24:18,480 basehttp 154 "POST /invoice/ HTTP/1.1" 500 129530
 INFO 2019-10-17 23:24:39,910 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
+ERROR 2019-10-18 14:08:39,860 log 228 Internal Server Error: /invoice/
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+pyodbc.IntegrityError: ('23000', "[23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]违反了 PRIMARY KEY 约束 'PK__MF_PSS'。不能在对象 'dbo.MF_PSS' 中插入重复键。 (2627) (SQLExecDirectW); [23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]语句已终止。 (3621)")
+
+The above exception was the direct cause of the following exception:
+
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
+    response = get_response(request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
+    response = self.process_exception_by_middleware(e, request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
+    response = wrapped_callback(request, *callback_args, **callback_kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
+    return handler(request, *args, **kwargs)
+  File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 75, in post
+    datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),AMT])
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
+    return super().execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
+    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
+    return executor(sql, params, many, context)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
+    raise dj_exc_value.with_traceback(traceback) from exc_value
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+django.db.utils.IntegrityError: ('23000', "[23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]违反了 PRIMARY KEY 约束 'PK__MF_PSS'。不能在对象 'dbo.MF_PSS' 中插入重复键。 (2627) (SQLExecDirectW); [23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]语句已终止。 (3621)")
+ERROR 2019-10-18 14:08:39,897 basehttp 154 "POST /invoice/ HTTP/1.1" 500 129655
+INFO 2019-10-18 14:10:22,226 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
+INFO 2019-10-18 14:12:42,840 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
+ERROR 2019-10-18 14:24:23,829 log 228 Internal Server Error: /invoice/
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
+    response = get_response(request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
+    response = self.process_exception_by_middleware(e, request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
+    response = wrapped_callback(request, *callback_args, **callback_kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
+    return handler(request, *args, **kwargs)
+  File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 87, in post
+    datetime.datetime.strptime(LZ_DD,'%Y-%m-%d'),INV_NO,AMT,AMT,AMT,datetime.datetime.strptime(LZ_DD,'%Y-%m-%d')])
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
+    return super().execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
+    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
+    return executor(sql, params, many, context)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 542, in execute
+    sql = self.format_sql(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 510, in format_sql
+    sql = sql % tuple('?' * len(params))
+TypeError: not all arguments converted during string formatting
+ERROR 2019-10-18 14:24:23,831 basehttp 154 "POST /invoice/ HTTP/1.1" 500 112068
+ERROR 2019-10-18 14:26:22,690 log 228 Internal Server Error: /invoice/
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
+    response = get_response(request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
+    response = self.process_exception_by_middleware(e, request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
+    response = wrapped_callback(request, *callback_args, **callback_kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
+    return handler(request, *args, **kwargs)
+  File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 87, in post
+    datetime.datetime.strptime(LZ_DD,'%Y-%m-%d'),INV_NO,datetime.datetime.strptime(LZ_DD,'%Y-%m-%d')])
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
+    return super().execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
+    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
+    return executor(sql, params, many, context)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 542, in execute
+    sql = self.format_sql(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 510, in format_sql
+    sql = sql % tuple('?' * len(params))
+TypeError: not all arguments converted during string formatting
+ERROR 2019-10-18 14:26:22,695 basehttp 154 "POST /invoice/ HTTP/1.1" 500 111683
+ERROR 2019-10-18 14:27:31,739 log 228 Internal Server Error: /invoice/
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
+    response = get_response(request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
+    response = self.process_exception_by_middleware(e, request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
+    response = wrapped_callback(request, *callback_args, **callback_kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
+    return handler(request, *args, **kwargs)
+  File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 87, in post
+    datetime.datetime.strptime(LZ_DD,'%Y-%m-%d'),INV_NO,datetime.datetime.strptime(LZ_DD,'%Y-%m-%d')])
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
+    return super().execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
+    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
+    return executor(sql, params, many, context)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 542, in execute
+    sql = self.format_sql(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 510, in format_sql
+    sql = sql % tuple('?' * len(params))
+TypeError: not all arguments converted during string formatting
+ERROR 2019-10-18 14:27:31,740 basehttp 154 "POST /invoice/ HTTP/1.1" 500 111600
+INFO 2019-10-18 14:29:33,513 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
+INFO 2019-10-18 14:30:49,220 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
+INFO 2019-10-18 14:33:54,856 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
+INFO 2019-10-18 16:55:49,676 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
+WARNING 2019-10-18 17:35:41,041 log 228 Forbidden: /invoice/
+WARNING 2019-10-18 17:35:41,042 basehttp 154 "POST /invoice/ HTTP/1.1" 403 12
+WARNING 2019-10-18 17:36:40,118 log 228 Forbidden: /invoice/
+WARNING 2019-10-18 17:36:40,118 basehttp 154 "POST /invoice/ HTTP/1.1" 403 12
+WARNING 2019-10-18 17:37:26,363 log 228 Forbidden: /invoice/
+WARNING 2019-10-18 17:37:26,363 basehttp 154 "POST /invoice/ HTTP/1.1" 403 12
+ERROR 2019-10-18 17:40:08,827 log 228 Internal Server Error: /invoice/
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]',' 附近有语法错误。 (102) (SQLExecDirectW); [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
+
+The above exception was the direct cause of the following exception:
+
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
+    response = get_response(request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
+    response = self.process_exception_by_middleware(e, request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
+    response = wrapped_callback(request, *callback_args, **callback_kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
+    return handler(request, *args, **kwargs)
+  File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 71, in post
+    row_usr = cursor.execute("SELECT COUNT(*) FROM SALM WHERE SAL_NO=%s,NAME=%s",[USR,USR_NAME]).fetchall()[0][0]
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
+    return super().execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
+    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
+    return executor(sql, params, many, context)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
+    raise dj_exc_value.with_traceback(traceback) from exc_value
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+django.db.utils.ProgrammingError: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]',' 附近有语法错误。 (102) (SQLExecDirectW); [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
+ERROR 2019-10-18 17:40:08,829 basehttp 154 "POST /invoice/ HTTP/1.1" 500 126022
+ERROR 2019-10-18 17:42:05,691 log 228 Internal Server Error: /invoice/
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
+    response = get_response(request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
+    response = self.process_exception_by_middleware(e, request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
+    response = wrapped_callback(request, *callback_args, **callback_kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
+    return handler(request, *args, **kwargs)
+  File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 91, in post
+    UNI_NO_PAY,SAL_ADR,SAL_TEL,SAL_KH_BANK,SAL_ID_CODE])
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
+    return super().execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
+    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
+    return executor(sql, params, many, context)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 542, in execute
+    sql = self.format_sql(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 510, in format_sql
+    sql = sql % tuple('?' * len(params))
+TypeError: not enough arguments for format string
+ERROR 2019-10-18 17:42:05,693 basehttp 154 "POST /invoice/ HTTP/1.1" 500 114075
+INFO 2019-10-18 18:14:39,620 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
+ERROR 2019-10-18 18:19:40,492 log 228 Internal Server Error: /invoice/
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
+    response = get_response(request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
+    response = self.process_exception_by_middleware(e, request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
+    response = wrapped_callback(request, *callback_args, **callback_kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
+    return handler(request, *args, **kwargs)
+  File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 108, in post
+    (%,200001,'LP',21,%s,%s,%s,%s,1,1,1)""", [ZL_NO, CUS_NO,CUS_NO_NAME,CUS_NO_NAME,AMT])
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
+    return super().execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
+    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
+    return executor(sql, params, many, context)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 542, in execute
+    sql = self.format_sql(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 510, in format_sql
+    sql = sql % tuple('?' * len(params))
+ValueError: unsupported format character ',' (0x2c) at index 123
+ERROR 2019-10-18 18:19:40,494 basehttp 154 "POST /invoice/ HTTP/1.1" 500 112036
+INFO 2019-10-18 18:20:06,062 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
+INFO 2019-10-18 18:24:54,648 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
+INFO 2019-10-18 18:43:21,037 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
+ERROR 2019-10-18 19:37:18,327 log 228 Internal Server Error: /invoice/
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]在 SET 子句中多次指定了列名 'UP'。在同一 SET 子句中不得为一个列分配多个值。请修改 SET 子句,以确保一个列仅更新一次。如果 SET 子句更新了某视图的多列,那么列名 'UP' 可能会在该视图定义中出现两次。 (264) (SQLExecDirectW); [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
+
+The above exception was the direct cause of the following exception:
+
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
+    response = get_response(request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
+    response = self.process_exception_by_middleware(e, request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
+    response = wrapped_callback(request, *callback_args, **callback_kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
+    return handler(request, *args, **kwargs)
+  File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 84, in post
+    VALUES('PC',%s,%s,'0000','AQ001',1,1,%s,%s,5,1,1,%s,%s)""", ['PC'+ZL_NO[2::], datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),AMT,AMT,AMT,AMT])
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
+    return super().execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
+    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
+    return executor(sql, params, many, context)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
+    raise dj_exc_value.with_traceback(traceback) from exc_value
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+django.db.utils.ProgrammingError: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]在 SET 子句中多次指定了列名 'UP'。在同一 SET 子句中不得为一个列分配多个值。请修改 SET 子句,以确保一个列仅更新一次。如果 SET 子句更新了某视图的多列,那么列名 'UP' 可能会在该视图定义中出现两次。 (264) (SQLExecDirectW); [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
+ERROR 2019-10-18 19:37:18,330 basehttp 154 "POST /invoice/ HTTP/1.1" 500 131455
+ERROR 2019-10-18 19:39:04,222 log 228 Internal Server Error: /invoice/
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
+    response = get_response(request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
+    response = self.process_exception_by_middleware(e, request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
+    response = wrapped_callback(request, *callback_args, **callback_kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
+    return handler(request, *args, **kwargs)
+  File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 84, in post
+    VALUES('PC',%s,%s,'0000','AQ001',1,%s,%s,%s,5,1,1,%s,%s)""", ['PC'+ZL_NO[2::], datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),AMT,AMT,AMT,AMT])
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
+    return super().execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
+    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
+    return executor(sql, params, many, context)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 542, in execute
+    sql = self.format_sql(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 510, in format_sql
+    sql = sql % tuple('?' * len(params))
+TypeError: not enough arguments for format string
+ERROR 2019-10-18 19:39:04,224 basehttp 154 "POST /invoice/ HTTP/1.1" 500 113069
+ERROR 2019-10-18 19:41:17,426 log 228 Internal Server Error: /invoice/
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
+    response = get_response(request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
+    response = self.process_exception_by_middleware(e, request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
+    response = wrapped_callback(request, *callback_args, **callback_kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
+    return handler(request, *args, **kwargs)
+  File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 84, in post
+    VALUES('PC',%s,%s,'0000','AQ001',1,%s,%s,%s,5,1,1,%s,%s)""", ['PC'+ZL_NO[2::], datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),AMT,AMT,AMT])
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
+    return super().execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
+    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
+    return executor(sql, params, many, context)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 542, in execute
+    sql = self.format_sql(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 510, in format_sql
+    sql = sql % tuple('?' * len(params))
+TypeError: not enough arguments for format string
+ERROR 2019-10-18 19:41:17,428 basehttp 154 "POST /invoice/ HTTP/1.1" 500 112945
+ERROR 2019-10-18 19:41:50,353 log 228 Internal Server Error: /invoice/
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+pyodbc.IntegrityError: ('23000', "[23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]违反了 PRIMARY KEY 约束 'PK__MF_PSS'。不能在对象 'dbo.MF_PSS' 中插入重复键。 (2627) (SQLExecDirectW); [23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]语句已终止。 (3621)")
+
+The above exception was the direct cause of the following exception:
+
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
+    response = get_response(request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
+    response = self.process_exception_by_middleware(e, request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
+    response = wrapped_callback(request, *callback_args, **callback_kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
+    return handler(request, *args, **kwargs)
+  File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 81, in post
+    datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),AMT])
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
+    return super().execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
+    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
+    return executor(sql, params, many, context)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
+    raise dj_exc_value.with_traceback(traceback) from exc_value
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+django.db.utils.IntegrityError: ('23000', "[23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]违反了 PRIMARY KEY 约束 'PK__MF_PSS'。不能在对象 'dbo.MF_PSS' 中插入重复键。 (2627) (SQLExecDirectW); [23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]语句已终止。 (3621)")
+ERROR 2019-10-18 19:41:50,355 basehttp 154 "POST /invoice/ HTTP/1.1" 500 130619
+ERROR 2019-10-18 19:42:27,658 log 228 Internal Server Error: /invoice/
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]在 SET 子句中多次指定了列名 'UP'。在同一 SET 子句中不得为一个列分配多个值。请修改 SET 子句,以确保一个列仅更新一次。如果 SET 子句更新了某视图的多列,那么列名 'UP' 可能会在该视图定义中出现两次。 (264) (SQLExecDirectW); [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
+
+The above exception was the direct cause of the following exception:
+
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
+    response = get_response(request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
+    response = self.process_exception_by_middleware(e, request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
+    response = wrapped_callback(request, *callback_args, **callback_kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
+    return handler(request, *args, **kwargs)
+  File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 84, in post
+    VALUES('PC',%s,%s,'0000','AQ001',1,1,%s,%s,5,1,1,%s,%s)""", ['PC'+ZL_NO[2::], datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),AMT,AMT,AMT,AMT])
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
+    return super().execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
+    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
+    return executor(sql, params, many, context)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
+    raise dj_exc_value.with_traceback(traceback) from exc_value
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+django.db.utils.ProgrammingError: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]在 SET 子句中多次指定了列名 'UP'。在同一 SET 子句中不得为一个列分配多个值。请修改 SET 子句,以确保一个列仅更新一次。如果 SET 子句更新了某视图的多列,那么列名 'UP' 可能会在该视图定义中出现两次。 (264) (SQLExecDirectW); [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
+ERROR 2019-10-18 19:42:27,659 basehttp 154 "POST /invoice/ HTTP/1.1" 500 131458
+ERROR 2019-10-18 19:43:44,138 log 228 Internal Server Error: /invoice/
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]在 SET 子句中多次指定了列名 'UP'。在同一 SET 子句中不得为一个列分配多个值。请修改 SET 子句,以确保一个列仅更新一次。如果 SET 子句更新了某视图的多列,那么列名 'UP' 可能会在该视图定义中出现两次。 (264) (SQLExecDirectW); [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
+
+The above exception was the direct cause of the following exception:
+
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
+    response = get_response(request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
+    response = self.process_exception_by_middleware(e, request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
+    response = wrapped_callback(request, *callback_args, **callback_kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
+    return handler(request, *args, **kwargs)
+  File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 84, in post
+    VALUES('PC',%s,%s,'0000','AQ001',1,1,%s,%s,5,1,1,%s,%s)""", ['PC'+ZL_NO[2::], datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),AMT,AMT,AMT,AMT])
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
+    return super().execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
+    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
+    return executor(sql, params, many, context)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
+    raise dj_exc_value.with_traceback(traceback) from exc_value
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+django.db.utils.ProgrammingError: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]在 SET 子句中多次指定了列名 'UP'。在同一 SET 子句中不得为一个列分配多个值。请修改 SET 子句,以确保一个列仅更新一次。如果 SET 子句更新了某视图的多列,那么列名 'UP' 可能会在该视图定义中出现两次。 (264) (SQLExecDirectW); [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
+ERROR 2019-10-18 19:43:44,139 basehttp 154 "POST /invoice/ HTTP/1.1" 500 131458
+ERROR 2019-10-18 19:45:12,557 log 228 Internal Server Error: /invoice/
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]在 SET 子句中多次指定了列名 'UP'。在同一 SET 子句中不得为一个列分配多个值。请修改 SET 子句,以确保一个列仅更新一次。如果 SET 子句更新了某视图的多列,那么列名 'UP' 可能会在该视图定义中出现两次。 (264) (SQLExecDirectW); [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
+
+The above exception was the direct cause of the following exception:
+
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
+    response = get_response(request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
+    response = self.process_exception_by_middleware(e, request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
+    response = wrapped_callback(request, *callback_args, **callback_kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
+    return handler(request, *args, **kwargs)
+  File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 84, in post
+    VALUES('PC',%s,%s,'0000','AQ001',1,1,%s,%s,5,1,1,%s,%s)""", ['PC'+ZL_NO[2::], datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),AMT,AMT,AMT,AMT])
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
+    return super().execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
+    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
+    return executor(sql, params, many, context)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
+    raise dj_exc_value.with_traceback(traceback) from exc_value
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+django.db.utils.ProgrammingError: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]在 SET 子句中多次指定了列名 'UP'。在同一 SET 子句中不得为一个列分配多个值。请修改 SET 子句,以确保一个列仅更新一次。如果 SET 子句更新了某视图的多列,那么列名 'UP' 可能会在该视图定义中出现两次。 (264) (SQLExecDirectW); [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
+ERROR 2019-10-18 19:45:12,560 basehttp 154 "POST /invoice/ HTTP/1.1" 500 131458
+ERROR 2019-10-18 19:47:07,834 log 228 Internal Server Error: /invoice/
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]在 SET 子句中多次指定了列名 'EST_ITM'。在同一 SET 子句中不得为一个列分配多个值。请修改 SET 子句,以确保一个列仅更新一次。如果 SET 子句更新了某视图的多列,那么列名 'EST_ITM' 可能会在该视图定义中出现两次。 (264) (SQLExecDirectW); [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
+
+The above exception was the direct cause of the following exception:
+
+Traceback (most recent call last):
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
+    response = get_response(request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
+    response = self.process_exception_by_middleware(e, request)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
+    response = wrapped_callback(request, *callback_args, **callback_kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
+    return self.dispatch(request, *args, **kwargs)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
+    return handler(request, *args, **kwargs)
+  File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 108, in post
+    ('LP',%s,1,%s,%s,%s,'AQ001',0,%s,5,1,1,'PC',1,'服務費用',%s,1,1,1)""", [ZL_NO,'PC'+ZL_NO[2::],AMT,AMT,datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),CUS_NO])
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
+    return super().execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
+    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
+    return executor(sql, params, many, context)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
+    raise dj_exc_value.with_traceback(traceback) from exc_value
+  File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
+    return self.cursor.execute(sql, params)
+  File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
+    return self.cursor.execute(sql, params)
+django.db.utils.ProgrammingError: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]在 SET 子句中多次指定了列名 'EST_ITM'。在同一 SET 子句中不得为一个列分配多个值。请修改 SET 子句,以确保一个列仅更新一次。如果 SET 子句更新了某视图的多列,那么列名 'EST_ITM' 可能会在该视图定义中出现两次。 (264) (SQLExecDirectW); [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
+ERROR 2019-10-18 19:47:07,836 basehttp 154 "POST /invoice/ HTTP/1.1" 500 131500
+INFO 2019-10-18 19:48:39,128 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
+INFO 2019-10-18 19:52:03,188 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
+INFO 2019-10-18 20:02:22,372 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25