| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | <<<<<<< HEAD |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_IPackInfoService; |
| | | ======= |
| | | using WIDESEAWCS_Common.Utilities; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_IPackInfoRepository; |
| | | using WIDESEAWCS_IPackInfoService; |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_PackInfoRepository; |
| | | >>>>>>> main |
| | | |
| | | namespace WIDESEAWCS_PackInfoService |
| | | { |
| | | public class StationPackInfoService : ServiceBase<Dt_StationPackInfo, IStationPackInfoRepository>, IStationPackInfoService |
| | | { |
| | | <<<<<<< HEAD |
| | | public StationPackInfoService(IStationPackInfoRepository BaseDal) : base(BaseDal) |
| | | { |
| | | ======= |
| | | private readonly IStationPackDetailRepository _stationPackDetailRepository; |
| | | private readonly IPackinfoRepository _packInfoRepository; |
| | | private readonly IPackaxisTaskRepository _packaxisTaskRepository; |
| | | public StationPackInfoService(IStationPackInfoRepository BaseDal, IStationPackDetailRepository stationPackDetailRepository, IPackinfoRepository packInfoRepository, IPackaxisTaskRepository packaxisTaskRepository) : base(BaseDal) |
| | | { |
| | | _stationPackDetailRepository = stationPackDetailRepository; |
| | | _packInfoRepository = packInfoRepository; |
| | | _packaxisTaskRepository = packaxisTaskRepository; |
| | | } |
| | | /// <summary> |
| | | /// æå¨æ¸
空ç åæ§è¡å·¥ä½æ°æ® |
| | | /// </summary> |
| | | /// <param name="StationCode"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent ManualClearPalletStationData(string StationCode) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_StationPackInfo packInfo = BaseDal.QueryFirst(x => x.StationCode == StationCode); |
| | | if (packInfo.PackType != 0 ) |
| | | { |
| | | packInfo.PackType = 0; |
| | | packInfo.OrderNo = ""; |
| | | packInfo.MakeCode = ""; |
| | | packInfo.MaterielCode = ""; |
| | | packInfo.PackNum = 0; |
| | | packInfo.AssignNum = 0; |
| | | packInfo.ExecutingNum = 0; |
| | | packInfo.OverNum = 0; |
| | | content.Status = BaseDal.UpdateData(packInfo); |
| | | //åæ¶å é¤ç åå¾
æ§è¡æç»è¡¨ |
| | | |
| | | //å é¤ç å工使§è¡æç»ï¼ä¿®æ¹å¾
ç åä¿¡æ¯ç®±ç ç¶æä¸º0 |
| | | List<Dt_StationPackDetail> stationPackDetails = _stationPackDetailRepository.QueryData(x => x.StationPackId == packInfo.id); |
| | | List<string> barCodes = stationPackDetails.Select(x => x.BoxCode).ToList(); |
| | | List<Dt_Packinfo> packinfos = _packInfoRepository.QueryData(x => barCodes.Contains(x.BarCode)).ToList(); |
| | | packinfos.ForEach(x => x.PackStatus = 0);//æ¹åç¶æ |
| | | _packInfoRepository.UpdateData(packinfos); |
| | | _stationPackDetailRepository.DeleteData(stationPackDetails); |
| | | } |
| | | else |
| | | { |
| | | return WebResponseContent.Instance.Error("æ¸
é¤å¤±è´¥ï¼è¯¥å·¥ä½æ²¡æç åæ°æ®ï¼"); |
| | | } |
| | | |
| | | } |
| | | catch(Exception e) |
| | | { |
| | | WebResponseContent.Instance.Error(e.Message); |
| | | } |
| | | return content; |
| | | >>>>>>> main |
| | | } |
| | | } |
| | | } |