修正報表錯誤
This commit is contained in:
parent
09d355ae98
commit
d04ce71a37
@ -133,9 +133,21 @@ namespace SolarPower.Controllers
|
||||
ApiResult<dynamic> apiResult = new ApiResult<dynamic>();
|
||||
try
|
||||
{
|
||||
var a = await stationReportRepository.Gettablebody(post);
|
||||
apiResult.Code = "0000";
|
||||
apiResult.Data = a;
|
||||
|
||||
var checkinv = stationReportRepository.Findhaveinv(post);
|
||||
var getinvsql = checkinv.Result[0] as IDictionary<string, object>;
|
||||
if (getinvsql["mySelect"] == null)
|
||||
{
|
||||
apiResult.Code = "9985";
|
||||
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
||||
}
|
||||
else
|
||||
{
|
||||
var a = await stationReportRepository.Gettablebody(post);
|
||||
apiResult.Code = "0000";
|
||||
apiResult.Data = a;
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@ -741,7 +753,8 @@ namespace SolarPower.Controllers
|
||||
Userid = postObject.Userid
|
||||
};
|
||||
var k = stationReportRepository.Findhaveinv(select_Table);
|
||||
if(k.Result[0].values == null)
|
||||
var getinvsql = k.Result[0] as IDictionary<string, object>;
|
||||
if (getinvsql["mySelect"] == null)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ namespace SolarPower.Models
|
||||
{ "0002","請先刪除相關逆變器"},
|
||||
{ "0003","請先刪除相關設備"},
|
||||
{ "0004","請先移除相關逆變器綁定"},
|
||||
{ "9985","該電站尚無逆變器資料"},
|
||||
{ "9986", "該帳號已被註冊,請重新輸入"},
|
||||
{ "9987", "查無該運維作業記錄檔案"},
|
||||
{ "9988", "查無該資料紀錄"},
|
||||
|
||||
@ -742,14 +742,19 @@
|
||||
var url = "/StationReport/GetForm";
|
||||
$.post(url, send_data, function (rel) {
|
||||
if (rel.code != "0000") {
|
||||
toast_error(rel.msg);
|
||||
if (rel.code == "9985") {
|
||||
toast_warning(rel.msg);
|
||||
} else {
|
||||
toast_error(rel.msg);
|
||||
}
|
||||
$('#TableBody').empty();
|
||||
$('#totbody').empty();
|
||||
return;
|
||||
}
|
||||
var sta = "";
|
||||
$('#TableBody').empty();
|
||||
$('#totbody').empty();
|
||||
$('#tothead').empty();
|
||||
|
||||
if (form == 0) {//日報表
|
||||
var thour = 0;
|
||||
var tpr = 0;
|
||||
@ -934,7 +939,6 @@
|
||||
haveinvertName = [];
|
||||
}
|
||||
$('.overflow-auto').show();
|
||||
|
||||
nowform = form;
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user