|  |  | 
 |  |  | using System.Linq; | 
 |  |  | using System.Text; | 
 |  |  | using System.Threading.Tasks; | 
 |  |  | using WIDESEAWCS_Core; | 
 |  |  | using WIDESEAWCS_Core.BaseRepository; | 
 |  |  | using WIDESEAWCS_Core.BaseServices; | 
 |  |  | using WIDESEAWCS_ISystemServices; | 
 |  |  | 
 |  |  |     public class dt_batchinfoService : ServiceBase<dt_batchInfo, IRepository<dt_batchInfo>>, Idt_BatchinfoService | 
 |  |  |     { | 
 |  |  |         private readonly IMapper _mapper; | 
 |  |  |         public override PageGridData<dt_batchInfo> GetPageData(PageDataOptions options) | 
 |  |  |         { | 
 |  |  |             return base.GetPageData(options); | 
 |  |  |         } | 
 |  |  |         /// <summary> | 
 |  |  |         /// ä»å¨å±(æ°æ®åºè®¿é®) | 
 |  |  |         /// </summary> | 
 |  |  | 
 |  |  |             _mapper = mapper; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// ä¿®æ¹å
¥åºæ¹æ¬¡ä¿¡æ¯ | 
 |  |  |         /// </summary> | 
 |  |  |         /// <param name="batch"></param> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public WebResponseContent UpdateInBatch(string batch)  | 
 |  |  |         { | 
 |  |  |             WebResponseContent content = new WebResponseContent(); | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 var batchibfo = BaseDal.QueryFirst(v=>v.Id==1); | 
 |  |  |                 batchibfo.InBatch = batch; | 
 |  |  |                 BaseDal.UpdateData(batchibfo); | 
 |  |  |  | 
 |  |  |                 content = WebResponseContent.Instance.OK(); | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  |                 content = WebResponseContent.Instance.Error($"ä¿®æ¹å
¥åºæ¹æ¬¡å·å¤±è´¥:ã{ex.Message}ã"); | 
 |  |  |             } | 
 |  |  |             return content; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// ä¿®æ¹åºåºæ¹æ¬¡ä¿¡æ¯ | 
 |  |  |         /// </summary> | 
 |  |  |         /// <param name="batch"></param> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public WebResponseContent UpdateOutBatch(string batch) | 
 |  |  |         { | 
 |  |  |             WebResponseContent content = new WebResponseContent(); | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 var batchibfo = BaseDal.QueryFirst(v => v.Id == 1); | 
 |  |  |                 batchibfo.OutBatch = batch; | 
 |  |  |                 BaseDal.UpdateData(batchibfo); | 
 |  |  |  | 
 |  |  |                 content = WebResponseContent.Instance.OK(); | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  |                 content = WebResponseContent.Instance.Error($"ä¿®æ¹å
¥åºæ¹æ¬¡å·å¤±è´¥:ã{ex.Message}ã"); | 
 |  |  |             } | 
 |  |  |             return content; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// ä¿®æ¹åºåºç©æä¿¡æ¯ï¼éè¦åºå¤è´è¿æ¯èªäº§ | 
 |  |  |         /// </summary> | 
 |  |  |         /// <param name="batch"></param> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         public WebResponseContent UpdateOutStorageMode(int mode) | 
 |  |  |         { | 
 |  |  |             WebResponseContent content = new WebResponseContent(); | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 var batchibfo = BaseDal.QueryFirst(v => v.Id == 1); | 
 |  |  |                 batchibfo.materType = mode; | 
 |  |  |                 BaseDal.UpdateData(batchibfo); | 
 |  |  |  | 
 |  |  |                 content = WebResponseContent.Instance.OK(); | 
 |  |  |             } | 
 |  |  |             catch (Exception ex) | 
 |  |  |             { | 
 |  |  |                 content = WebResponseContent.Instance.Error($"ä¿®æ¹å
¥åºæ¹æ¬¡å·å¤±è´¥:ã{ex.Message}ã"); | 
 |  |  |             } | 
 |  |  |             return content; | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  | } |