Selaa lähdekoodia

1、修复无法编译问题
2、修复网页报错问题

MY 2 viikkoa sitten
vanhempi
commit
92a361f0b9

+ 11 - 4
JLHHJSvr/Com/UnLockTable.cs

@@ -7,17 +7,24 @@ using LJLib.Net.SPI.Com;
 
 namespace JLHHJSvr.Com
 {
-    public sealed class UnLockTableRequest : ILJRequest<UnLockTableResponse>
+    public sealed class UnLockTableRequest : ILJTokenRequest<UnLockTableResponse>
     {
         public override string GetApiName()
         {
             return "UnLockTable";
         }
         /// <summary>
-        /// 登录token
+        /// 单据关键字
         /// </summary>
-        public string token { get; set; }
-        public List<u_lock_table> lockList { get; set; }
+        public string keyword { get; set; }
+        /// <summary>
+        /// 单据相关id
+        /// </summary>
+        public int billid { get; set; }
+        /// <summary>
+        /// 单据相关编码
+        /// </summary>
+        public string billcode { get; set; }
     }
 
     public sealed class UnLockTableResponse : LJResponse

+ 2 - 12
JLHHJSvr/Excutor/UnLockTableExcutor.cs

@@ -17,12 +17,6 @@ namespace JLHHJSvr.Excutor
         protected override void ExcuteInternal(UnLockTableRequest request, object state, UnLockTableResponse rslt)
         {
             var tokendata = BllHelper.GetToken(request.token);
-            if (tokendata == null)
-            {
-                rslt.ErrMsg = "会话已经中断,请重新登录";
-                return;
-            }
-
             using (var con = GlobalVar.ConnectionString.NewSqlConnection())
             using (var cmd = con.CreateCommand())
             {
@@ -32,16 +26,12 @@ namespace JLHHJSvr.Excutor
                 {
                     try
                     {
-                        foreach (var bill in request.lockList)
-                        {
-                            LockHelper.UnLockBill(cmd, bill.keyword, bill.billid, tokendata.username,tokendata.empid == 0 ? (byte)1 : (byte)0);
-                        }
-
+                        LockHelper.UnLockBill(cmd, request.keyword, request.billid, tokendata.username,tokendata.empid == 0 ? (byte)1 : (byte)0);
                         cmd.Transaction.Commit();
                     }
                     catch (Exception e)
                     {
-                        cmd.Transaction.Rollback();
+                        cmd.Transaction?.Rollback();
                         rslt.ErrMsg = e.Message;
                     }
                 }

+ 0 - 2
JLHHJSvr/JLHHJSvr.csproj

@@ -97,7 +97,6 @@
     <Compile Include="Com\AuditWorkmanship.cs" />
     <Compile Include="Com\BanMtrlDef.cs" />
     <Compile Include="Com\BanMultiPrice.cs" />
-    <Compile Include="Com\CheckTableIsLock.cs" />
     <Compile Include="Com\CommonDynamicSelect.cs" />
     <Compile Include="Com\CopyConfigureCodeMxList.cs" />
     <Compile Include="Com\CopyMattressAudited.cs" />
@@ -341,7 +340,6 @@
     <Compile Include="Excutor\AuditWorkmanshipExcutor.cs" />
     <Compile Include="Excutor\BanMtrlDefExcutor.cs" />
     <Compile Include="Excutor\BanMultiPriceExcutor.cs" />
-    <Compile Include="Excutor\CheckTableIsLockExcutor.cs" />
     <Compile Include="Excutor\CommonDynamicSelectExcutor.cs" />
     <Compile Include="Excutor\CopyConfigureCodeMxListExcutor.cs" />
     <Compile Include="Excutor\CopyMattressAuditedExcutor.cs" />

+ 0 - 5
JLHWEB/src/api/interface/index.ts

@@ -1063,11 +1063,6 @@ export namespace GenericApi {
     billid: number;
     billcode: string;
   }
-  export interface ReqCheckLock {
-    keyword: string;
-    billid: number;
-    billcode: string;
-  }
 }
 
 export namespace FileApi {

+ 1 - 1
JLHWEB/src/api/modules/common.ts

@@ -144,4 +144,4 @@ export const LockBill = (params?: GenericApi.ReqLockBill) => {
  */
 export const UnLockBill = (params?: GenericApi.ReqLockBill) => {
   return http.post(PORT1 + `/UnLockTable`, params);
-};
+};

+ 2 - 2
JLHWEB/src/views/erpapi/mattressInterface/index.vue

@@ -44,7 +44,7 @@ import { detailAction } from "@/components/LjDetail/interface";
 import mittBus from "@/utils/mittBus";
 import { MittEnum } from "@/enums/mittEnum";
 import { getCurrentRecords } from "@/utils/index";
-import { CheckLock } from "@/api/modules/common";
+import { LockBill } from "@/api/modules/common";
 
 const { t } = useI18n();
 const router = useRouter();
@@ -327,7 +327,7 @@ const routeToEdit = async type => {
   }
 
   const _cur = curRecords[curRecords.length - 1];
-  await CheckLock({ keyword: "MattressInterface", billid: _cur.mattressid, billcode: _cur.mattresscode });
+  await LockBill({ keyword: "MattressInterface", billid: _cur.mattressid, billcode: _cur.mattresscode });
   // router.push(`/erpapi/mattressInterface/${type}/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}&type=${type}`);
 
   try {

+ 2 - 2
JLHWEB/src/views/quote/mattressQuote/hooks/index.tsx

@@ -30,7 +30,7 @@ import ToastHistoryPrice from "@/components/ToastWidget/HistoryPrice/index.vue";
 import { useRouter } from "vue-router";
 import { useGlobalStore } from "@/stores/modules/global";
 import { storeToRefs } from "pinia";
-import { CheckLock } from "@/api/modules/common";
+import { LockBill } from "@/api/modules/common";
 // import { title } from "process";
 
 interface defaultState {
@@ -6055,7 +6055,7 @@ export const useHooks = (t?: any) => {
       return false;
     }
 
-    await CheckLock({ keyword: "MattressInterface", billid: _cur.mattressid, billcode: _cur.mattresscode });
+    await LockBill({ keyword: "MattressInterface", billid: _cur.mattressid, billcode: _cur.mattresscode });
 
     router.push({
       path: `/erpapi/mattressInterface/edit/${_cur.mattressid}`,