All checks were successful
continuous-integration/drone/push Build is passing
- Add marker pole CRUD functionality with database tables (odf_marker_poles, odf_marker_pole_images) - Implement marker pole API endpoints and service layer with data isolation by department - Add UniApp pages for marker pole list, detail, and creation workflows - Add Vue management backend pages for marker pole and audit log management - Implement audit logging system via ActionFilter to track all business entity modifications - Extend search API to include marker poles in results alongside cables and faults - Add OdfAuditLogsController and service for querying audit trail data - Update optical box detail page with left-right frame color scheme (green-orange) - Add cable type page as entry point for marker poles and fault lists - Create database migration scripts for v1.2.0 schema and permissions - Add DeptDataScopeHelper for department-based data access control - Update MCP settings to disable SQL Server connection and fix formatting - Add marker pole service integration in UniApp with COS image upload support
65 lines
2.0 KiB
C#
65 lines
2.0 KiB
C#
using Infrastructure.Attribute;
|
|
using ZR.Model.Business;
|
|
using ZR.Repository;
|
|
using ZR.Service.Business.IBusinessService;
|
|
|
|
namespace ZR.Service.Business
|
|
{
|
|
/// <summary>
|
|
/// 标石/杆号牌图片Service业务层处理
|
|
/// </summary>
|
|
[AppService(ServiceType = typeof(IOdfMarkerPoleImagesService), ServiceLifetime = LifeTime.Transient)]
|
|
public class OdfMarkerPoleImagesService : BaseService<OdfMarkerPoleImages>, IOdfMarkerPoleImagesService
|
|
{
|
|
/// <summary>
|
|
/// 按标石 ID 查询图片列表
|
|
/// </summary>
|
|
/// <param name="markerPoleId"></param>
|
|
/// <returns></returns>
|
|
public List<OdfMarkerPoleImages> GetByMarkerPoleId(int markerPoleId)
|
|
{
|
|
return Queryable()
|
|
.Where(x => x.MarkerPoleId == markerPoleId)
|
|
.OrderBy(x => x.Id)
|
|
.ToList();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 批量插入图片记录
|
|
/// </summary>
|
|
/// <param name="markerPoleId"></param>
|
|
/// <param name="imageUrls"></param>
|
|
/// <returns></returns>
|
|
public int BatchInsert(int markerPoleId, string[] imageUrls)
|
|
{
|
|
if (imageUrls == null || imageUrls.Length == 0)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
var list = imageUrls
|
|
.Where(url => !string.IsNullOrWhiteSpace(url))
|
|
.Select(url => new OdfMarkerPoleImages
|
|
{
|
|
MarkerPoleId = markerPoleId,
|
|
ImageUrl = url,
|
|
CreatedAt = DateTime.Now
|
|
}).ToList();
|
|
|
|
return Insert(list);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 按标石 ID 删除所有图片记录
|
|
/// </summary>
|
|
/// <param name="markerPoleId"></param>
|
|
/// <returns></returns>
|
|
public int DeleteByMarkerPoleId(int markerPoleId)
|
|
{
|
|
return Deleteable()
|
|
.Where(x => x.MarkerPoleId == markerPoleId)
|
|
.ExecuteCommand();
|
|
}
|
|
}
|
|
}
|