| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_ITaskInfoRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | |
| | | { |
| | | } |
| | | |
| | | public int GetTaskNum(string sequenceName) |
| | | { |
| | | return Db.Ado.GetScalar($"SELECT NEXT VALUE FOR {sequenceName}").ObjToInt(); |
| | | } |
| | | |
| | | public override int AddData(Dt_Task entity) |
| | | { |
| | | return base.AddData(entity); |
| | | } |
| | | |
| | | public override int AddData(List<Dt_Task> listEntity) |
| | | { |
| | | if (listEntity.GroupBy(x => x.PalletCode).Select(x => x.Count()).Any(x => x > 1)) |
| | | { |
| | | throw new Exception("任塿°ç»æ°æ®æçå·éå¤"); |
| | | } |
| | | |
| | | if (QueryFirst(x => listEntity.Select(v => v.PalletCode).Contains(x.PalletCode)) != null) |
| | | { |
| | | throw new Exception("æéå¤ä»»å¡"); |
| | | } |
| | | |
| | | return base.AddData(listEntity); |
| | | } |
| | | } |
| | | } |