1. bug fix

This commit is contained in:
Kai 2021-08-12 18:46:53 +08:00
parent 866b47cd43
commit 98ccc88ecb
3 changed files with 7 additions and 2 deletions

View File

@ -4090,6 +4090,7 @@ namespace SolarPower.Repository.Implement
var powerStationIds = string.Join(",", powerStationDic.Value); var powerStationIds = string.Join(",", powerStationDic.Value);
var temp_sql = @$"SELECT ps.Id AS PowerStationId, var temp_sql = @$"SELECT ps.Id AS PowerStationId,
c.Priority AS Priority,
c.Name AS CityName, c.Name AS CityName,
ps.Name AS PowerStationName, ps.Name AS PowerStationName,
inv.InverterName AS InverterName, inv.InverterName AS InverterName,
@ -4109,6 +4110,7 @@ namespace SolarPower.Repository.Implement
} }
sql = string.Join(" UNION ", sql_perSiteDB); sql = string.Join(" UNION ", sql_perSiteDB);
sql = "(" + sql + ") ORDER BY Priority";
result = (await conn.QueryAsync<PowerStationInverter>(sql, new { Filter = filter })).ToList(); result = (await conn.QueryAsync<PowerStationInverter>(sql, new { Filter = filter })).ToList();
} }
@ -4138,6 +4140,7 @@ namespace SolarPower.Repository.Implement
var powerStationIds = string.Join(",", powerStationDic.Value); var powerStationIds = string.Join(",", powerStationDic.Value);
var temp_sql = @$"SELECT ps.Id AS PowerStationId, var temp_sql = @$"SELECT ps.Id AS PowerStationId,
c.Priority AS Priority,
c.Name AS CityName, c.Name AS CityName,
ps.Name AS PowerStationName, ps.Name AS PowerStationName,
d.Name AS DeviceName, d.Name AS DeviceName,
@ -4158,6 +4161,8 @@ namespace SolarPower.Repository.Implement
sql = string.Join(" UNION ", sql_perSiteDB); sql = string.Join(" UNION ", sql_perSiteDB);
sql = "(" + sql + ") ORDER BY Priority";
result = (await conn.QueryAsync<PowerStationDevice>(sql, new { Filter = filter })).ToList(); result = (await conn.QueryAsync<PowerStationDevice>(sql, new { Filter = filter })).ToList();
} }
catch (Exception exception) catch (Exception exception)

View File

@ -861,7 +861,7 @@
//#region 產生檔案html //#region 產生檔案html
function CreateRecodeFileBox(dom, value, show_del_btn) { function CreateRecodeFileBox(dom, value, show_del_btn) {
var str = ""; var str = "";
str += '<div class="col-auto px-0 py-2 mx-2">'; str += '<div class="col-2 px-0 py-2 mx-2">';
var split = value.fileName.split("."); var split = value.fileName.split(".");
var excel_format = ["xls", "xlsx"]; var excel_format = ["xls", "xlsx"];
var word_format = ["doc", "docx"]; var word_format = ["doc", "docx"];

View File

@ -121,7 +121,7 @@
<!-- /.Modal 人員基本資料 --> <!-- /.Modal 人員基本資料 -->
<!-- Modal 人員電站資訊 --> <!-- Modal 人員電站資訊 -->
<div class="modal fade" id="user-power-station-modal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false"> <div class="modal fade" id="user-power-station-modal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document"> <div class="modal-dialog modal-dialog-centered modal-xl" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title"> <h4 class="modal-title">