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Model/MES/pro/DTO/ProFinishedProductReceiptDto.cs b/ZR.Model/MES/pro/DTO/ProFinishedProductReceiptDto.cs
new file mode 100644
index 00000000..c9363933
--- /dev/null
+++ b/ZR.Model/MES/pro/DTO/ProFinishedProductReceiptDto.cs
@@ -0,0 +1,109 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace ZR.Model.Dto
+{
+ ///
+ /// MES成品入库单主表(含产品信息及标签打印状态)查询对象
+ ///
+ public class ProFinishedProductReceiptQueryDto : PagerInfo
+ {
+ ///
+ /// 入库类型
+ ///
+ public string ReceiptType { get; set; }
+
+ ///
+ /// 单据状态
+ ///
+ public string Status { get; set; }
+
+ public DateTime? StartTime { get; set; }
+
+ public DateTime? EndTime { get; set; }
+ }
+
+ ///
+ /// MES成品入库单主表(含产品信息及标签打印状态)输入输出对象
+ ///
+ public class ProFinishedProductReceiptDto
+ {
+ [Required(ErrorMessage = "入库单号(主键,规则:RCP+日期+流水号,如RCP20251112001)不能为空")]
+ public string ReceiptNo { get; set; }
+
+ [Required(ErrorMessage = "入库日期不能为空")]
+ public DateTime? ReceiptDate { get; set; }
+
+ public string SiteNo { get; set; }
+
+ public string WorkOrder { get; set; }
+
+ [Required(ErrorMessage = "仓库编码(关联仓库表)不能为空")]
+ public string WarehouseCode { get; set; }
+
+ [Required(ErrorMessage = "入库类型:NORMAL-正常入库;REWORK-返工入库;RETURN-客户退货;OTHER-其他不能为空")]
+ public string ReceiptType { get; set; }
+
+ [Required(ErrorMessage = "单据状态:DRAFT-草稿;SUBMITTED-已提交;APPROVED-已审核;CANCELED-已取消不能为空")]
+ public string Status { get; set; }
+
+ [Required(ErrorMessage = "产品编号(对应JSON中的PartNumber,如5615101DSV0000B96)不能为空")]
+ public string PartNumber { get; set; }
+
+ [Required(ErrorMessage = "产品名称(对应JSON中的Description,如A58左后门把手-手动版-幻彩银)不能为空")]
+ public string Description { get; set; }
+
+ public string Color { get; set; }
+
+ public string Specification { get; set; }
+
+ public string ProductionLine { get; set; }
+
+ public string Team { get; set; }
+
+ public string ShiftNo { get; set; }
+
+ public string LabelFrom { get; set; }
+
+ public DateTime? ProductionTime { get; set; }
+
+ [Required(ErrorMessage = "批次编码(对应JSON中的BatchCode,如20251016)不能为空")]
+ public string BatchCode { get; set; }
+
+ [Required(ErrorMessage = "计量单位(如个、箱、台)不能为空")]
+ public string Unit { get; set; }
+
+ public string PackageCode { get; set; }
+
+ public int? PackageCount { get; set; }
+
+ public int? PackageNum { get; set; }
+
+ public string LabelCode { get; set; }
+
+ [Required(ErrorMessage = "标签打印状态:UNPRINTED-未打印;PRINTED-已打印不能为空")]
+ public string LabelPrintStatus { get; set; }
+
+ public string StorageLocation { get; set; }
+
+ public string QcStatus { get; set; }
+
+ [Required(ErrorMessage = "创建人(用户ID)不能为空")]
+ public string CreatedBy { get; set; }
+
+ [Required(ErrorMessage = "创建时间(对应JSON中的CreatedTime)不能为空")]
+ public DateTime? CreatedTime { get; set; }
+
+ public string UpdatedBy { get; set; }
+
+ public DateTime? UpdatedTime { get; set; }
+
+ public string ApprovedBy { get; set; }
+
+ public DateTime? ApprovedTime { get; set; }
+
+ public string Remark { get; set; }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Model/MES/pro/DTO/ProFinishedProductReceiptLogDto.cs b/ZR.Model/MES/pro/DTO/ProFinishedProductReceiptLogDto.cs
new file mode 100644
index 00000000..18f707a8
--- /dev/null
+++ b/ZR.Model/MES/pro/DTO/ProFinishedProductReceiptLogDto.cs
@@ -0,0 +1,45 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace ZR.Model.Dto
+{
+ ///
+ /// MES成品入库单操作日志表查询对象
+ ///
+ public class ProFinishedProductReceiptLogQueryDto : PagerInfo
+ {
+ public DateTime? StartTime { get; set; }
+
+ public DateTime? EndTime { get; set; }
+ }
+
+ ///
+ /// MES成品入库单操作日志表输入输出对象
+ ///
+ public class ProFinishedProductReceiptLogDto
+ {
+ [Required(ErrorMessage = "自增主键不能为空")]
+ [JsonConverter(typeof(ValueToStringConverter))]
+ public long Id { get; set; }
+
+ [Required(ErrorMessage = "关联入库单号不能为空")]
+ public string ReceiptNo { get; set; }
+
+ [Required(ErrorMessage = "操作人(用户ID)不能为空")]
+ public string OperatedBy { get; set; }
+
+ [Required(ErrorMessage = "操作时间不能为空")]
+ public DateTime? OperatedTime { get; set; }
+
+ [Required(ErrorMessage = "操作类型:CREATE-创建;UPDATE-修改;APPROVE-审核;CANCEL-取消;PRINT_LABEL-打印标签;OTHER-其他不能为空")]
+ public string OperationType { get; set; }
+
+ public string OperationContent { get; set; }
+
+ public string OperationResult { get; set; }
+
+ public string Remark { get; set; }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Model/MES/pro/ProFinishedProductReceipt.cs b/ZR.Model/MES/pro/ProFinishedProductReceipt.cs
new file mode 100644
index 00000000..6b009e2a
--- /dev/null
+++ b/ZR.Model/MES/pro/ProFinishedProductReceipt.cs
@@ -0,0 +1,196 @@
+
+namespace ZR.Model.Business
+{
+ ///
+ /// MES成品入库单主表(含产品信息及标签打印状态)
+ ///
+ [SugarTable("pro_finished_product_receipt")]
+ public class ProFinishedProductReceipt
+ {
+ ///
+ /// 入库单号(主键,规则:RCP+日期+流水号,如RCP20251112001)
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "receipt_no")]
+ public string ReceiptNo { get; set; }
+
+ ///
+ /// 入库日期
+ ///
+ [SugarColumn(ColumnName = "receipt_date")]
+ public DateTime? ReceiptDate { get; set; }
+
+ ///
+ /// 站点编号(对应JSON中的SiteNo)
+ ///
+ [SugarColumn(ColumnName = "site_no")]
+ public string SiteNo { get; set; }
+
+ ///
+ /// 生产工单号(对应JSON中的WorkOrder)
+ ///
+ [SugarColumn(ColumnName = "work_order")]
+ public string WorkOrder { get; set; }
+
+ ///
+ /// 仓库编码(关联仓库表)
+ ///
+ [SugarColumn(ColumnName = "warehouse_code")]
+ public string WarehouseCode { get; set; }
+
+ ///
+ /// 入库类型:NORMAL-正常入库;REWORK-返工入库;RETURN-客户退货;OTHER-其他
+ ///
+ [SugarColumn(ColumnName = "receipt_type")]
+ public string ReceiptType { get; set; }
+
+ ///
+ /// 单据状态:DRAFT-草稿;SUBMITTED-已提交;APPROVED-已审核;CANCELED-已取消
+ ///
+ public string Status { get; set; }
+
+ ///
+ /// 产品编号(对应JSON中的PartNumber,如5615101DSV0000B96)
+ ///
+ [SugarColumn(ColumnName = "part_number")]
+ public string PartNumber { get; set; }
+
+ ///
+ /// 产品名称(对应JSON中的Description,如A58左后门把手-手动版-幻彩银)
+ ///
+ public string Description { get; set; }
+
+ ///
+ /// 颜色(对应JSON中的Color,如幻彩银)
+ ///
+ public string Color { get; set; }
+
+ ///
+ /// 规格型号(对应JSON中的Specification,如手动版)
+ ///
+ public string Specification { get; set; }
+
+ ///
+ /// 生产线
+ ///
+ [SugarColumn(ColumnName = "production_line")]
+ public string ProductionLine { get; set; }
+
+ ///
+ /// 班组(对应JSON中的Team,如B班)
+ ///
+ public string Team { get; set; }
+
+ ///
+ /// 班次(如早班/中班/晚班)
+ ///
+ [SugarColumn(ColumnName = "shift_no")]
+ public string ShiftNo { get; set; }
+
+ ///
+ /// 标签来源(对应JSON中的LabelFrom,如后道)
+ ///
+ [SugarColumn(ColumnName = "label_from")]
+ public string LabelFrom { get; set; }
+
+ ///
+ /// 生产时间(对应JSON中的ProductionTime)
+ ///
+ [SugarColumn(ColumnName = "production_time")]
+ public DateTime? ProductionTime { get; set; }
+
+ ///
+ /// 批次编码(对应JSON中的BatchCode,如20251016)
+ ///
+ [SugarColumn(ColumnName = "batch_code")]
+ public string BatchCode { get; set; }
+
+ ///
+ /// 计量单位(如个、箱、台)
+ ///
+ public string Unit { get; set; }
+
+ ///
+ /// 包装编码(对应JSON中的PackageCode,如BNW20240401_001)
+ ///
+ [SugarColumn(ColumnName = "package_code")]
+ public string PackageCode { get; set; }
+
+ ///
+ /// 包装数量(对应JSON中的PackageCout,如1)
+ ///
+ [SugarColumn(ColumnName = "package_count")]
+ public int? PackageCount { get; set; }
+
+ ///
+ /// 每包数量(对应JSON中的PackageNum,如24)
+ ///
+ [SugarColumn(ColumnName = "package_num")]
+ public int? PackageNum { get; set; }
+
+ ///
+ /// 标签编码(对应JSON中的LabelCode,如60102853-Y73-01/2025040811//)
+ ///
+ [SugarColumn(ColumnName = "label_code")]
+ public string LabelCode { get; set; }
+
+ ///
+ /// 标签打印状态:UNPRINTED-未打印;PRINTED-已打印
+ ///
+ [SugarColumn(ColumnName = "label_print_status")]
+ public string LabelPrintStatus { get; set; }
+
+ ///
+ /// 存储库位(如A区-1货架-01层)
+ ///
+ [SugarColumn(ColumnName = "storage_location")]
+ public string StorageLocation { get; set; }
+
+ ///
+ /// 质检状态:PENDING-待检;QUALIFIED-合格;UNQUALIFIED-不合格
+ ///
+ [SugarColumn(ColumnName = "qc_status")]
+ public string QcStatus { get; set; }
+
+ ///
+ /// 创建人(用户ID)
+ ///
+ [SugarColumn(ColumnName = "created_by")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// 创建时间(对应JSON中的CreatedTime)
+ ///
+ [SugarColumn(ColumnName = "created_time")]
+ public DateTime? CreatedTime { get; set; }
+
+ ///
+ /// 更新人(用户ID)
+ ///
+ [SugarColumn(ColumnName = "updated_by")]
+ public string UpdatedBy { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [SugarColumn(ColumnName = "updated_time")]
+ public DateTime? UpdatedTime { get; set; }
+
+ ///
+ /// 审核人(用户ID)
+ ///
+ [SugarColumn(ColumnName = "approved_by")]
+ public string ApprovedBy { get; set; }
+
+ ///
+ /// 审核时间
+ ///
+ [SugarColumn(ColumnName = "approved_time")]
+ public DateTime? ApprovedTime { get; set; }
+
+ ///
+ /// 备注信息
+ ///
+ public string Remark { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Model/MES/pro/ProFinishedProductReceiptLog.cs b/ZR.Model/MES/pro/ProFinishedProductReceiptLog.cs
new file mode 100644
index 00000000..4608bcc0
--- /dev/null
+++ b/ZR.Model/MES/pro/ProFinishedProductReceiptLog.cs
@@ -0,0 +1,58 @@
+
+namespace ZR.Model.Business
+{
+ ///
+ /// MES成品入库单操作日志表
+ ///
+ [SugarTable("pro_finished_product_receipt_log")]
+ public class ProFinishedProductReceiptLog
+ {
+ ///
+ /// 自增主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public long Id { get; set; }
+
+ ///
+ /// 关联入库单号
+ ///
+ [SugarColumn(ColumnName = "receipt_no")]
+ public string ReceiptNo { get; set; }
+
+ ///
+ /// 操作人(用户ID)
+ ///
+ [SugarColumn(ColumnName = "operated_by")]
+ public string OperatedBy { get; set; }
+
+ ///
+ /// 操作时间
+ ///
+ [SugarColumn(ColumnName = "operated_time")]
+ public DateTime? OperatedTime { get; set; }
+
+ ///
+ /// 操作类型:CREATE-创建;UPDATE-修改;APPROVE-审核;CANCEL-取消;PRINT_LABEL-打印标签;OTHER-其他
+ ///
+ [SugarColumn(ColumnName = "operation_type")]
+ public string OperationType { get; set; }
+
+ ///
+ /// 操作内容(如“标签打印成功,编码:XXX”)
+ ///
+ [SugarColumn(ColumnName = "operation_content")]
+ public string OperationContent { get; set; }
+
+ ///
+ /// 操作结果:SUCCESS-成功;FAIL-失败
+ ///
+ [SugarColumn(ColumnName = "operation_result")]
+ public string OperationResult { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Service/mes/pro/IService/IProFinishedProductReceiptLogService.cs b/ZR.Service/mes/pro/IService/IProFinishedProductReceiptLogService.cs
new file mode 100644
index 00000000..27195f3b
--- /dev/null
+++ b/ZR.Service/mes/pro/IService/IProFinishedProductReceiptLogService.cs
@@ -0,0 +1,23 @@
+using System;
+using ZR.Model;
+using ZR.Model.Dto;
+using ZR.Model.Business;
+using System.Collections.Generic;
+
+namespace ZR.Service.Business.IBusinessService
+{
+ ///
+ /// MES成品入库单操作日志表service接口
+ ///
+ public interface IProFinishedProductReceiptLogService : IBaseService
+ {
+ PagedInfo GetList(ProFinishedProductReceiptLogQueryDto parm);
+
+ ProFinishedProductReceiptLog GetInfo(long Id);
+
+ ProFinishedProductReceiptLog AddProFinishedProductReceiptLog(ProFinishedProductReceiptLog parm);
+
+ int UpdateProFinishedProductReceiptLog(ProFinishedProductReceiptLog parm);
+
+ }
+}
diff --git a/ZR.Service/mes/pro/IService/IProFinishedProductReceiptService.cs b/ZR.Service/mes/pro/IService/IProFinishedProductReceiptService.cs
new file mode 100644
index 00000000..6c83d328
--- /dev/null
+++ b/ZR.Service/mes/pro/IService/IProFinishedProductReceiptService.cs
@@ -0,0 +1,23 @@
+using System;
+using ZR.Model;
+using ZR.Model.Dto;
+using ZR.Model.Business;
+using System.Collections.Generic;
+
+namespace ZR.Service.Business.IBusinessService
+{
+ ///
+ /// MES成品入库单主表(含产品信息及标签打印状态)service接口
+ ///
+ public interface IProFinishedProductReceiptService : IBaseService
+ {
+ PagedInfo GetList(ProFinishedProductReceiptQueryDto parm);
+
+ ProFinishedProductReceipt GetInfo(string ReceiptNo);
+
+ ProFinishedProductReceipt AddProFinishedProductReceipt(ProFinishedProductReceipt parm);
+
+ int UpdateProFinishedProductReceipt(ProFinishedProductReceipt parm);
+
+ }
+}
diff --git a/ZR.Service/mes/pro/ProFinishedProductReceiptLogService.cs b/ZR.Service/mes/pro/ProFinishedProductReceiptLogService.cs
new file mode 100644
index 00000000..1c4be0f3
--- /dev/null
+++ b/ZR.Service/mes/pro/ProFinishedProductReceiptLogService.cs
@@ -0,0 +1,83 @@
+using System;
+using SqlSugar;
+using Infrastructure.Attribute;
+using Infrastructure.Extensions;
+using ZR.Model;
+using ZR.Model.Dto;
+using ZR.Model.Business;
+using ZR.Repository;
+using ZR.Service.Business.IBusinessService;
+using System.Linq;
+
+namespace ZR.Service.Business
+{
+ ///
+ /// MES成品入库单操作日志表Service业务层处理
+ ///
+ [AppService(ServiceType = typeof(IProFinishedProductReceiptLogService), ServiceLifetime = LifeTime.Transient)]
+ public class ProFinishedProductReceiptLogService : BaseService, IProFinishedProductReceiptLogService
+ {
+ ///
+ /// 查询MES成品入库单操作日志表列表
+ ///
+ ///
+ ///
+ public PagedInfo GetList(ProFinishedProductReceiptLogQueryDto parm)
+ {
+ var predicate = Expressionable.Create();
+
+ var response = Queryable()
+ .Where(predicate.ToExpression())
+ .ToPage(parm);
+
+ return response;
+ }
+
+
+ ///
+ /// 获取详情
+ ///
+ ///
+ ///
+ public ProFinishedProductReceiptLog GetInfo(long Id)
+ {
+ var response = Queryable()
+ .Where(x => x.Id == Id)
+ .First();
+
+ return response;
+ }
+
+ ///
+ /// 添加MES成品入库单操作日志表
+ ///
+ ///
+ ///
+ public ProFinishedProductReceiptLog AddProFinishedProductReceiptLog(ProFinishedProductReceiptLog model)
+ {
+ return Context.Insertable(model).ExecuteReturnEntity();
+ }
+
+ ///
+ /// 修改MES成品入库单操作日志表
+ ///
+ ///
+ ///
+ public int UpdateProFinishedProductReceiptLog(ProFinishedProductReceiptLog model)
+ {
+ //var response = Update(w => w.Id == model.Id, it => new ProFinishedProductReceiptLog()
+ //{
+ // ReceiptNo = model.ReceiptNo,
+ // OperatedBy = model.OperatedBy,
+ // OperatedTime = model.OperatedTime,
+ // OperationType = model.OperationType,
+ // OperationContent = model.OperationContent,
+ // OperationResult = model.OperationResult,
+ // Remark = model.Remark,
+ //});
+ //return response;
+ return Update(model, true);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Service/mes/pro/ProFinishedProductReceiptService.cs b/ZR.Service/mes/pro/ProFinishedProductReceiptService.cs
new file mode 100644
index 00000000..0be8a115
--- /dev/null
+++ b/ZR.Service/mes/pro/ProFinishedProductReceiptService.cs
@@ -0,0 +1,153 @@
+using Infrastructure.Attribute;
+using Infrastructure.Extensions;
+using SqlSugar;
+using System;
+using System.Linq;
+using ZR.Model;
+using ZR.Model.Business;
+using ZR.Model.Dto;
+using ZR.Repository;
+using ZR.Service.Business.IBusinessService;
+using ZR.Service.System.IService;
+
+namespace ZR.Service.Business
+{
+ ///
+ /// MES成品入库单主表(含产品信息及标签打印状态)Service业务层处理
+ ///
+ [AppService(ServiceType = typeof(IProFinishedProductReceiptService), ServiceLifetime = LifeTime.Transient)]
+ public class ProFinishedProductReceiptService : BaseService, IProFinishedProductReceiptService
+ {
+ private readonly IProFinishedProductReceiptLogService _receiptLogService;
+
+ ///
+ /// 查询MES成品入库单主表(含产品信息及标签打印状态)列表
+ ///
+ ///
+ ///
+ public PagedInfo GetList(ProFinishedProductReceiptQueryDto parm)
+ {
+ var predicate = Expressionable.Create()
+ .AndIF(!string.IsNullOrEmpty(parm.ReceiptType), r => r.ReceiptType.Contains(parm.ReceiptType))
+ .AndIF(!string.IsNullOrEmpty(parm.Status), r => r.Status.Contains(parm.Status))
+ .AndIF(parm.StartTime != null, r => r.CreatedTime >= parm.StartTime)
+ .AndIF(parm.EndTime != null, r => r.CreatedTime <= parm.EndTime);
+
+ var response = Queryable()
+ .Where(predicate.ToExpression())
+ .ToPage(parm);
+
+ return response;
+ }
+
+ ///
+ /// 获取详情
+ ///
+ ///
+ ///
+ public ProFinishedProductReceipt GetInfo(string ReceiptNo)
+ {
+ var response = Queryable()
+ .Where(x => x.ReceiptNo == ReceiptNo)
+ .First();
+
+ return response;
+ }
+
+ ///
+ /// 添加MES成品入库单主表(含产品信息及标签打印状态)
+ ///
+ ///
+ ///
+ public ProFinishedProductReceipt AddProFinishedProductReceipt(ProFinishedProductReceipt model)
+ {
+
+
+ try
+ {
+ model.CreatedTime = DateTime.Now;
+ var insertedModel = Context.Insertable(model).ExecuteReturnEntity();
+
+ if (insertedModel != null && !string.IsNullOrEmpty(insertedModel.ReceiptNo))
+ {
+ _receiptLogService.AddProFinishedProductReceiptLog(
+ new ProFinishedProductReceiptLog
+ {
+ ReceiptNo = model.ReceiptNo,
+ OperatedBy = "",
+ OperatedTime = DateTime.Now,
+ OperationType = "CREATE",
+ OperationContent = "入库单创建成功",
+ OperationResult = "SUCCESS",
+ Remark = ""
+ });
+ return insertedModel;
+ } else
+ {
+ throw new Exception("入库单插入失败");
+ }
+ }
+ catch (Exception ex)
+ {
+ _receiptLogService.AddProFinishedProductReceiptLog(
+ new ProFinishedProductReceiptLog
+ {
+ ReceiptNo = model.ReceiptNo,
+ OperatedBy = "",
+ OperatedTime = DateTime.Now,
+ OperationType = "CREATE",
+ OperationContent = "入库单创建失败",
+ OperationResult = "FAIL",
+ Remark = ""
+ });
+ throw new Exception($"添加成品入库单失败:{ex.Message}", ex);
+ }
+ }
+
+ ///
+ /// 修改MES成品入库单主表(含产品信息及标签打印状态)
+ ///
+ ///
+ ///
+ public int UpdateProFinishedProductReceipt(ProFinishedProductReceipt model)
+ {
+ //var response = Update(w => w.ReceiptNo == model.ReceiptNo, it => new ProFinishedProductReceipt()
+ //{
+ // ReceiptDate = model.ReceiptDate,
+ // SiteNo = model.SiteNo,
+ // WorkOrder = model.WorkOrder,
+ // WarehouseCode = model.WarehouseCode,
+ // ReceiptType = model.ReceiptType,
+ // Status = model.Status,
+ // PartNumber = model.PartNumber,
+ // Description = model.Description,
+ // Color = model.Color,
+ // Specification = model.Specification,
+ // ProductionLine = model.ProductionLine,
+ // Team = model.Team,
+ // ShiftNo = model.ShiftNo,
+ // LabelFrom = model.LabelFrom,
+ // ProductionTime = model.ProductionTime,
+ // BatchCode = model.BatchCode,
+ // Unit = model.Unit,
+ // PackageCode = model.PackageCode,
+ // PackageCount = model.PackageCount,
+ // PackageNum = model.PackageNum,
+ // LabelCode = model.LabelCode,
+ // LabelPrintStatus = model.LabelPrintStatus,
+ // StorageLocation = model.StorageLocation,
+ // QcStatus = model.QcStatus,
+ // CreatedBy = model.CreatedBy,
+ // CreatedTime = model.CreatedTime,
+ // UpdatedBy = model.UpdatedBy,
+ // UpdatedTime = model.UpdatedTime,
+ // ApprovedBy = model.ApprovedBy,
+ // ApprovedTime = model.ApprovedTime,
+ // Remark = model.Remark,
+ //});
+ //return response;
+ return Update(model, true);
+ }
+
+ }
+}
\ No newline at end of file