From 8605cf4a014b8c7a9dde35db30bc713ad5fcbbd3 Mon Sep 17 00:00:00 2001 From: dev02 Date: Wed, 7 Jun 2023 09:41:23 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=89=8D=E5=8F=B0]=20=E4=BF=AE=E6=94=B9alert?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E7=B6=AD=E4=BF=AE=E6=94=B9api,=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9alert=20=E8=AE=80=E5=8F=96=E7=B6=AD=E4=BF=AE?= =?UTF-8?q?=E5=96=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/_alert.html | 258 +++++++++++++++++- .../ApiControllers/OperationController.cs | 6 +- FrontendWebApi/Models/Operation.cs | 1 + FrontendWebApi/appsettings.Development.json | 4 +- FrontendWebApi/appsettings.json | 4 +- 5 files changed, 263 insertions(+), 10 deletions(-) diff --git a/Frontend/_alert.html b/Frontend/_alert.html index 52227b9..120c1bc 100644 --- a/Frontend/_alert.html +++ b/Frontend/_alert.html @@ -208,6 +208,140 @@ + + + \ No newline at end of file diff --git a/FrontendWebApi/ApiControllers/OperationController.cs b/FrontendWebApi/ApiControllers/OperationController.cs index de27670..70679ec 100644 --- a/FrontendWebApi/ApiControllers/OperationController.cs +++ b/FrontendWebApi/ApiControllers/OperationController.cs @@ -1156,7 +1156,7 @@ namespace FrontendWebApi.ApiControllers from operation_record opr left join device d on opr.fix_do_code = d.device_number left join userinfo ui on opr.work_person_id = ui.userinfo_guid - where opr.deleted = 0 and opr.id = @id"; + where opr.deleted = 0 and (opr.id = @id or opr.formId = '{ofl.formId}')"; var param = new { @id = ofl.id }; @@ -1226,8 +1226,8 @@ namespace FrontendWebApi.ApiControllers { "@end_time", or.end_time}, { "@work_time", or.work_time}, { "@finish_time", or.finish_time}, - { "@notice", or.notice}, - { "@description", or.description}, + { "@notice", or.notice == "null" ? null : or.notice}, + { "@description", or.description == "null" ? null : or.description}, { "@created_by", myUser.userinfo_guid}, { "@created_at", DateTime.Now} }; diff --git a/FrontendWebApi/Models/Operation.cs b/FrontendWebApi/Models/Operation.cs index fc706df..3c6e301 100644 --- a/FrontendWebApi/Models/Operation.cs +++ b/FrontendWebApi/Models/Operation.cs @@ -47,6 +47,7 @@ namespace FrontendWebApi.Models public List main_system_tag { get; set; }//大类tag public List sub_system_tag { get; set; }//小类tag public byte? work_type { get; set; } // 1:保養, 2:維修 + public string formId { get; set; } //異常代碼 } public class BuildingList diff --git a/FrontendWebApi/appsettings.Development.json b/FrontendWebApi/appsettings.Development.json index b530df5..3cb7892 100644 --- a/FrontendWebApi/appsettings.Development.json +++ b/FrontendWebApi/appsettings.Development.json @@ -17,8 +17,8 @@ "Server": "FYlY+w0XDIz+jmF2rlZWJw==", //0.201 "Port": "js2LutKe+rdjzdxMPQUrvQ==", //"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30 - //"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp - "Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome + "Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp + //"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome //"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel //"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office "Root": "SzdxEgaJJ7tcTCrUl2zKsA==", diff --git a/FrontendWebApi/appsettings.json b/FrontendWebApi/appsettings.json index 1052fc0..6fae936 100644 --- a/FrontendWebApi/appsettings.json +++ b/FrontendWebApi/appsettings.json @@ -23,8 +23,8 @@ "Server": "FYlY+w0XDIz+jmF2rlZWJw==", //0.201 "Port": "js2LutKe+rdjzdxMPQUrvQ==", //"Database": "VJB2XC+lAtzuHObDGMVOAA==", //三菱 - //"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp - "Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome + "Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp + //"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome //"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel //"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office "Root": "SzdxEgaJJ7tcTCrUl2zKsA==",