This commit is contained in:
parent
992e42a5ae
commit
335bee4928
|
|
@ -38,7 +38,7 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
|||
var userDeptId = HttpContext.GetDeptId();
|
||||
// 如果前端指定了公司 deptId,则只查该公司的光缆(需在用户可见范围内)
|
||||
var targetDeptId = parm.DeptId ?? userDeptId;
|
||||
var response = _OdfCablesService.GetList(parm, targetDeptId.Value);
|
||||
var response = _OdfCablesService.GetList(parm, targetDeptId);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
|
@ -190,7 +190,7 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
|||
{
|
||||
var userDeptId = HttpContext.GetDeptId();
|
||||
var targetDeptId = parm.DeptId ?? userDeptId;
|
||||
var list = _OdfCablesService.ExportList(parm, targetDeptId.Value);
|
||||
var list = _OdfCablesService.ExportList(parm, targetDeptId);
|
||||
if (list == null || list.Result == null || list.Result.Count <= 0)
|
||||
{
|
||||
return ToResponse(ResultCode.FAIL, "没有要导出的数据");
|
||||
|
|
|
|||
|
|
@ -458,8 +458,8 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
|||
["备注"] = newRecord.Remarks,
|
||||
["光衰值"] = newRecord.OpticalAttenuation,
|
||||
["历史故障"] = newRecord.HistoryRemarks,
|
||||
["创建时间"] = newRecord.CreatedAt,
|
||||
["修改时间"] = newRecord.UpdatedAt,
|
||||
["创建时间"] = (object?)newRecord.CreatedAt ?? "",
|
||||
["修改时间"] = (object?)newRecord.UpdatedAt ?? "",
|
||||
["光缆断信息"] = newRecord.OpticalCableOffRemarks,
|
||||
["设备型号"] = newRecord.EquipmentModel,
|
||||
["业务类型"] = newRecord.BusinessType,
|
||||
|
|
@ -703,7 +703,7 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
|||
[Log(Title = "清空数据", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult GetOdfPortsEmpty(int Id)
|
||||
{
|
||||
var oldRecord = _OdfPortsService.GetFirst(f => f.Id == Id);
|
||||
var oldRecord = _OdfPortsService.GetFirst(f => f.Id == Id)!;
|
||||
string oldData = BuildAuditJson(new Dictionary<string, object>
|
||||
{
|
||||
["连接状态"] = oldRecord.Status,
|
||||
|
|
@ -723,7 +723,7 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
|||
response.OpticalCableOffRemarks = "";
|
||||
var s = _OdfPortsService.Update(response);
|
||||
|
||||
var newRecord = _OdfPortsService.GetFirst(f => f.Id == Id);
|
||||
var newRecord = _OdfPortsService.GetFirst(f => f.Id == Id)!;
|
||||
string newData = BuildAuditJson(new Dictionary<string, object>
|
||||
{
|
||||
["连接状态"] = newRecord.Status,
|
||||
|
|
@ -759,7 +759,7 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
|||
// 循环每条记录分别记录 DELETE 审计日志
|
||||
foreach (var id in idArr)
|
||||
{
|
||||
var oldRecord = _OdfPortsService.GetFirst(f => f.Id == id);
|
||||
var oldRecord = _OdfPortsService.GetFirst(f => f.Id == id)!;
|
||||
string oldData = BuildAuditJson(new Dictionary<string, object>
|
||||
{
|
||||
["Id"] = oldRecord.Id,
|
||||
|
|
@ -778,8 +778,8 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
|||
["备注"] = oldRecord.Remarks,
|
||||
["光衰值"] = oldRecord.OpticalAttenuation,
|
||||
["历史故障"] = oldRecord.HistoryRemarks,
|
||||
["创建时间"] = oldRecord.CreatedAt,
|
||||
["修改时间"] = oldRecord.UpdatedAt,
|
||||
["创建时间"] = (object?)oldRecord.CreatedAt ?? "",
|
||||
["修改时间"] = (object?)oldRecord.UpdatedAt ?? "",
|
||||
["光缆断信息"] = oldRecord.OpticalCableOffRemarks,
|
||||
["设备型号"] = oldRecord.EquipmentModel,
|
||||
["业务类型"] = oldRecord.BusinessType,
|
||||
|
|
@ -949,7 +949,7 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
|||
}
|
||||
else
|
||||
{
|
||||
rowNumber = int.Parse(rowRaw);
|
||||
rowNumber = int.Parse(rowRaw ?? "0");
|
||||
// 光交箱的数字行号是右侧
|
||||
portSide = rack.RackType == 1 ? 1 : 0;
|
||||
}
|
||||
|
|
@ -990,7 +990,7 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
|||
}
|
||||
else
|
||||
{
|
||||
remarks = $"{excelItem.YeWuMingCheng?.Trim()} {excelItem.EquipmentModel?.Trim()} {excelItem.BusinessType?.Trim()} {(!string.IsNullOrEmpty(excelItem.one) ? excelItem?.one + "/" : "")}{(!string.IsNullOrEmpty(excelItem.two?.Trim()) ? excelItem.two?.Trim() + "/" : "")}{excelItem.three?.Trim()}";
|
||||
remarks = $"{excelItem.YeWuMingCheng?.Trim()} {excelItem.EquipmentModel?.Trim()} {excelItem.BusinessType?.Trim()} {(!string.IsNullOrEmpty(excelItem.one) ? excelItem.one + "/" : "")}{(!string.IsNullOrEmpty(excelItem.two?.Trim()) ? excelItem.two?.Trim() + "/" : "")}{excelItem.three?.Trim()}";
|
||||
remarks = remarks.Trim();
|
||||
}
|
||||
if (port == null)
|
||||
|
|
@ -1117,7 +1117,7 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
|||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -1258,8 +1258,8 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
|||
["备注"] = port.Remarks,
|
||||
["光衰值"] = port.OpticalAttenuation,
|
||||
["历史故障"] = port.HistoryRemarks,
|
||||
["创建时间"] = port.CreatedAt,
|
||||
["修改时间"] = port.UpdatedAt,
|
||||
["创建时间"] = (object?)port.CreatedAt ?? "",
|
||||
["修改时间"] = (object?)port.UpdatedAt ?? "",
|
||||
["光缆断信息"] = port.OpticalCableOffRemarks,
|
||||
["设备型号"] = port.EquipmentModel,
|
||||
["业务类型"] = port.BusinessType,
|
||||
|
|
@ -1320,8 +1320,8 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
|||
["备注"] = port.Remarks,
|
||||
["光衰值"] = port.OpticalAttenuation,
|
||||
["历史故障"] = port.HistoryRemarks,
|
||||
["创建时间"] = port.CreatedAt,
|
||||
["修改时间"] = port.UpdatedAt,
|
||||
["创建时间"] = (object?)port.CreatedAt ?? "",
|
||||
["修改时间"] = (object?)port.UpdatedAt ?? "",
|
||||
["光缆断信息"] = port.OpticalCableOffRemarks,
|
||||
["设备型号"] = port.EquipmentModel,
|
||||
["业务类型"] = port.BusinessType,
|
||||
|
|
@ -1374,8 +1374,8 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
|||
["备注"] = port.Remarks,
|
||||
["光衰值"] = port.OpticalAttenuation,
|
||||
["历史故障"] = port.HistoryRemarks,
|
||||
["创建时间"] = port.CreatedAt,
|
||||
["修改时间"] = port.UpdatedAt,
|
||||
["创建时间"] = (object?)port.CreatedAt ?? "",
|
||||
["修改时间"] = (object?)port.UpdatedAt ?? "",
|
||||
["光缆断信息"] = port.OpticalCableOffRemarks,
|
||||
["设备型号"] = port.EquipmentModel,
|
||||
["业务类型"] = port.BusinessType,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user