| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273 | 
							- using AutoMapper;
 
- using CSRedis;
 
- using Microsoft.AspNetCore.Http;
 
- using Microsoft.AspNetCore.Mvc;
 
- using Newtonsoft.Json;
 
- using Org.BouncyCastle.Crypto;
 
- using System.Collections.Generic;
 
- using System.Diagnostics;
 
- using System.Linq;
 
- using wms.api.Job;
 
- using wms.dto;
 
- using wms.dto.request;
 
- using wms.dto.request.hj;
 
- using wms.dto.request.hj.dto;
 
- using wms.dto.request.share;
 
- using wms.dto.response;
 
- using wms.dto.response.hj;
 
- using wms.dto.response.share;
 
- using wms.service;
 
- using wms.service.IService;
 
- using wms.sqlsugar;
 
- using wms.sqlsugar.model.hj;
 
- using wms.util;
 
- using wms.util.Check;
 
- using wms.util.Ext;
 
- using wms.util.Http;
 
- namespace wms.api.Controllers
 
- {
 
-     /// <summary>
 
-     /// 合金库控制器
 
-     /// </summary>
 
-     [Route("api/[controller]/[action]")]
 
-     [ApiController]
 
-     public class HjController : BaseController
 
-     {
 
-         private readonly IHJService _hJService;
 
-         private readonly ILogger<HjController> _logger;
 
-         private readonly IMapper _mapper;
 
-         static object lockerCopperLineReceiveInstr = new object();
 
-         static object lockerWetLineBackInApply = new object();
 
-         static object lockerStockChange = new object();
 
-         static object lockerSpecialPickMaterApply = new object();
 
-         static object lockerSyncMaterInfoList = new object();
 
-         static object lockerApplyStockOutTask = new object();
 
-         static object lockerWetLinePickMaterApply = new object();
 
-         static object lockerCompleteTask = new object();
 
-         static object lockerApplyStockInLoc = new object();
 
-         static object lockerMoveTask = new object();
 
-         static object lockerSrmPickOutCompleted = new object();
 
-         static object lockWcsUploadInfo = new object();
 
-         static object lockerMannel = new object();
 
-         static object lockerCarryTask = new object();
 
-         static object lockerStockInfo = new object();
 
-         static object lockerPdaTaskInfo = new object();
 
-         static object lockerCancelOrComplet = new object();
 
-         
 
-         Repository<SysJob> _sysJobrepository => new Repository<SysJob>();
 
-         public HjController(IHJService hJService, ILogger<HjController> logger, IMapper mapper) :base(hJService, logger)
 
-         {
 
-             _hJService = hJService;
 
-             _logger= logger;
 
-             _mapper = mapper;
 
-         }
 
-         #region 业务方法
 
-         /// <summary>
 
-         /// 更新任务进程
 
-         /// </summary>
 
-         /// <param name="reqEntity"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes<int> WcsTaskCallBack(WcsTaskCallBackRequest reqEntity)
 
-         {
 
-            return  _hJService.WcsTaskCallBack(reqEntity);
 
-         }
 
-         /// <summary>
 
-         /// 获取巷道
 
-         /// </summary>
 
-         /// <param name="reqEntity"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes<string> GetTunnelPriorityList(GetTunnelPriorityListRequest reqEntity)
 
-         {
 
-             return _hJService.GetTunnelPriorityList(reqEntity);
 
-         }
 
-         /// <summary>
 
-         /// 分配货位
 
-         /// </summary>
 
-         /// <param name="reqEntity"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes<ApplyStockInLocResponse> ApplyStockInLoc(ApplyStockInLocRequest reqEntity)
 
-         {
 
-             return ConcurrencyReqControl<ApplyStockInLocRequest, SRes<ApplyStockInLocResponse>>(lockerApplyStockInLoc, "ApplyStockInLoc" + reqEntity.TunnelNum, "分配货位" + reqEntity.PickUpEquipmentNo, reqEntity, _hJService.ApplyStockInLoc);
 
-         }
 
-         /// <summary>
 
-         /// 完成任务
 
-         /// </summary>
 
-         /// <param name="reqEntity"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes<int> CompleteTask(CompleteTaskRequest reqDto)
 
-         {
 
-             lock (lockerCompleteTask)
 
-             {
 
-                 return _hJService.CompleteTask(reqDto);
 
-             }
 
-         }
 
-         /// <summary>
 
-         /// 申请移库任务
 
-         /// </summary>
 
-         /// <param name="reqEntity"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes<AddWcsMoveTaskResponse> AddWcsMoveTask(AddWcsMoveTaskRequest reqEntity)
 
-         {
 
-             lock (lockerMoveTask)
 
-             {
 
-                 return _hJService.AddWcsMoveTask(reqEntity);
 
-             }
 
-         }
 
-         /// <summary>
 
-         /// 堆垛机出库放货完成
 
-         /// </summary>
 
-         /// <param name="reqEntity"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public  SRes<int> SrmPickOutCompleted(SrmPickOutCompletedRequest reqDto)
 
-         {
 
-             lock (lockerSrmPickOutCompleted)
 
-             {
 
-                 return _hJService.SrmPickOutCompleted(reqDto);
 
-             }
 
-         }
 
-         /// <summary>
 
-         /// WCS信息上传
 
-         /// </summary>
 
-         /// <param name="reqEntity"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes WcsUploadInfo(WcsUploadInfoRequest reqDto)
 
-         {
 
-             lock (lockWcsUploadInfo)
 
-             {
 
-                 //if (reqDto.Weight > 1)
 
-                 //{
 
-                 //    var webBaseUrl = AppSettings.GetConfig("maxweight");
 
-                 //}
 
-                 return _hJService.WcsUploadInfo(reqDto);
 
-             }
 
-         }
 
-         /// <summary>
 
-         /// 物料主数据推送接口
 
-         /// </summary>
 
-         /// <param name="reqBody"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes SyncMaterInfoList(HJSyncMaterInfoListRequest reqDto)
 
-         {
 
-             var res = new SRes();
 
-             if (string.IsNullOrEmpty(reqDto.ReqId))
 
-             {
 
-                 res.ResCode = ResponseStatusCodeEnum.NotReqId.GetHashCode();
 
-                 res.ResMsg = ResponseStatusCodeEnum.NotReqId.GetDescription();
 
-                 return res;
 
-             }
 
-             if (reqDto.ListInfo == null || !reqDto.ListInfo.Any())
 
-             {
 
-                 res.ResCode = ResponseStatusCodeEnum.DocDetailNotExist.GetHashCode();
 
-                 res.ResMsg = ResponseStatusCodeEnum.DocDetailNotExist.GetDescription();
 
-                 return res;
 
-             }
 
-             return ConcurrencyReqControl<HJSyncMaterInfoListRequest, SRes>(lockerSyncMaterInfoList, "SyncMaterInfoList", "物料主数据推送" + reqDto.ReqId, reqDto, _hJService.SyncMaterInfo);
 
-         }
 
-         /// <summary>
 
-         /// 镀铜满轮入库/550工字轮入库反馈接口
 
-         /// </summary>
 
-         /// <param name="billcode"></param>
 
-         /// <returns></returns>
 
-         [HttpPost(Name = "CopperLineStockInFeedBack")]
 
-         public CopperLineStockInFeedBackResponse CopperLineStockInFeedBack(string billcode)
 
-         {
 
-             var list = _hJService.GetBillFeedbackList(p => p.BillCode == billcode && p.ApiCode == "CopperLineStockInFeedBack" && p.PostResult == 0 ||( p.PostResult == 2 && p.PostNum < 5));
 
-             if (!list.Any())
 
-             {
 
-                 return new CopperLineStockInFeedBackResponse() { ResCode = ResponseStatusCodeEnum.NoResult.GetHashCode(), ResMsg = ResponseStatusCodeEnum.NoResult.GetDescription() };
 
-             }
 
-             var dtolist = _mapper.Map<List<CopperLineStockInFeedBackItem>>(list);
 
-             CopperLineStockInFeedBackRequest dto = new CopperLineStockInFeedBackRequest();
 
-             dto.ListInfo = dtolist;
 
-             CopperLineStockInFeedBackResponse resbody = JsonConvert.DeserializeObject<CopperLineStockInFeedBackResponse>(WmsServiceExportApi(dto));
 
-             List<long> ids = list.Select(p => p.Id).ToList();
 
-             List<string> doccodelist = list.Select(p => p.BillCode).ToList();
 
-             if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
 
-             {
 
-                 //更新推送表数据
 
-                 _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
 
-                 {
 
-                     Columns = it => new hjBillFeedbackPush { PostResult = 1, PostNum = it.PostNum + 1 },
 
-                     WhereExpression = it => ids.Contains(it.Id)
 
-                 });
 
-                 //删除单据表数据
 
-                 _hJService.DeleteDoc(p => doccodelist.Contains(p.DocNo));
 
-             }
 
-             else
 
-             {
 
-                 //更新推送表数据
 
-                 _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
 
-                 {
 
-                     Columns = it => new hjBillFeedbackPush { PostResult = 2, PostNum = it.PostNum + 1 },
 
-                     WhereExpression = it => ids.Contains(it.Id)
 
-                 });
 
-             }
 
-             return resbody;
 
-         }
 
-         /// <summary>
 
-         /// 湿拉生产退料/余料反馈接口
 
-         /// </summary>
 
-         /// <param name="billcode"></param>
 
-         /// <returns></returns>
 
-         [HttpPost(Name = "WetLineBackInFeedBack")]
 
-         public WetLineBackInFeedBackResponse WetLineBackInFeedBack(string billcode)
 
-         {
 
-             var list = _hJService.GetBillFeedbackList(p => p.BillCode == billcode && p.ApiCode == "WetLineBackInFeedBack" && p.PostResult == 0 || (p.PostResult == 2 && p.PostNum < 5));
 
-             var dtolist = _mapper.Map<List<WetLineBackInFeedBackRequestItem>>(list);
 
-             var dto = new WetLineBackInFeedBackRequest() { ListInfo = dtolist };
 
-             WetLineBackInFeedBackResponse resbody = JsonConvert.DeserializeObject<WetLineBackInFeedBackResponse>(WmsServiceExportApi(dtolist));
 
-             List<long> ids = list.Select(p => p.Id).ToList();
 
-             List<string> doccodelist = list.Select(p => p.BillCode).ToList();
 
-             if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
 
-             {
 
-                 //更新推送表数据
 
-                 _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
 
-                 {
 
-                     Columns = it => new hjBillFeedbackPush { PostResult = 1, PostNum = it.PostNum + 1 },
 
-                     WhereExpression = it => ids.Contains(it.Id)
 
-                 });
 
-                 //删除单据表数据
 
-                 _hJService.DeleteDoc(p => doccodelist.Contains(p.DocNo));
 
-             }
 
-             else
 
-             {
 
-                 //更新推送表数据
 
-                 _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
 
-                 {
 
-                     Columns = it => new hjBillFeedbackPush { PostResult = 2, PostNum = it.PostNum + 1 },
 
-                     WhereExpression = it => ids.Contains(it.Id)
 
-                 });
 
-             }
 
-             return resbody;
 
-         }
 
-         /// <summary>
 
-         /// 改判反馈接口
 
-         /// </summary>
 
-         /// <param name="billcode"></param>
 
-         /// <returns></returns>
 
-         [HttpPost(Name = "StockChangeFeedBack")]
 
-         public StockChangeFeedBackResponse StockChangeFeedBack(string billcode)
 
-         {
 
-             var list = _hJService.GetBillFeedbackList(p => p.BillCode == billcode);
 
-             var dtolist = _mapper.Map<List<StockChangeRequestItem>>(list);
 
-             StockChangeFeedBackRequest dto = new StockChangeFeedBackRequest() { BillCode = billcode };
 
-             dto.ListInfo = dtolist;
 
-             StockChangeFeedBackResponse resbody = JsonConvert.DeserializeObject<StockChangeFeedBackResponse>(WmsServiceExportApi(dto));
 
-             List<long> ids = list.Select(p => p.Id).ToList();
 
-             List<string> doccodelist = list.Select(p => p.BillCode).ToList();
 
-             if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
 
-             {
 
-                 //更新推送表数据
 
-                 _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
 
-                 {
 
-                     Columns = it => new hjBillFeedbackPush { PostResult = 1, PostNum = it.PostNum + 1 },
 
-                     WhereExpression = it => ids.Contains(it.Id)
 
-                 });
 
-                 //删除单据表数据
 
-                 _hJService.DeleteDoc(p => doccodelist.Contains(p.DocNo));
 
-             }
 
-             else
 
-             {
 
-                 //更新推送表数据
 
-                 _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
 
-                 {
 
-                     Columns = it => new hjBillFeedbackPush { PostResult = 2, PostNum = it.PostNum + 1 },
 
-                     WhereExpression = it => ids.Contains(it.Id)
 
-                 });
 
-             }
 
-             return resbody;
 
-         }
 
-         /// <summary>
 
-         /// 特殊料反馈接口
 
-         /// </summary>
 
-         /// <param name="billcode"></param>
 
-         /// <returns></returns>
 
-         [HttpPost(Name = "SpecialPickMaterFeedBack")]
 
-         public SpecialPickMaterFeedBackResponse SpecialPickMaterFeedBack(string billcode)
 
-         {
 
-             var list = _hJService.GetBillFeedbackList(p => p.BillCode == billcode && p.ApiCode == "SpecialPickMaterFeedBack" && p.PostResult == 0 || (p.PostResult == 2 && p.PostNum < 5));
 
-             var dtolist = _mapper.Map<List<SpecialPickMaterFeedBackRequestItem>>(list);
 
-             SpecialPickMaterFeedBackRequest dto = new SpecialPickMaterFeedBackRequest() { ListInfo = dtolist };
 
-             SpecialPickMaterFeedBackResponse resbody = JsonConvert.DeserializeObject<SpecialPickMaterFeedBackResponse>(WmsServiceExportApi(dtolist));
 
-             List<long> ids = list.Select(p => p.Id).ToList();
 
-             List<string> doccodelist = list.Select(p => p.BillCode).ToList();
 
-             if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
 
-             {
 
-                 //更新推送表数据
 
-                 _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
 
-                 {
 
-                     Columns = it => new hjBillFeedbackPush { PostResult = 1, PostNum = it.PostNum + 1 },
 
-                     WhereExpression = it => ids.Contains(it.Id)
 
-                 });
 
-                 //删除单据表数据
 
-                 _hJService.DeleteDoc(p => doccodelist.Contains(p.DocNo));
 
-             }
 
-             else
 
-             {
 
-                 //更新推送表数据
 
-                 _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
 
-                 {
 
-                     Columns = it => new hjBillFeedbackPush { PostResult = 2, PostNum = it.PostNum + 1 },
 
-                     WhereExpression = it => ids.Contains(it.Id)
 
-                 });
 
-             }
 
-             return resbody;
 
-         }
 
-         /// <summary>
 
-         /// 移库货位上报MES接口
 
-         /// </summary>
 
-         /// <param name="billcode"></param>
 
-         /// <returns></returns>
 
-         [HttpPost(Name = "MoveStockFeedBack")]
 
-         public MoveStockFeedBackResponse MoveStockFeedBack(string billcode)
 
-         {
 
-             var list = _hJService.GetBillFeedbackList1(p => p.DocsNo == billcode && p.TypeCode == "MoveStockFeedBack" && p.PostResult == 0 || (p.PostResult == 2 && p.PostQty < 5));
 
-             var dtolist = _mapper.Map<List<MoveStockFeedBackRequestItem>>(list);
 
-             MoveStockFeedBackRequest dto = new MoveStockFeedBackRequest() { ListInfo = dtolist };
 
-             MoveStockFeedBackResponse resbody = JsonConvert.DeserializeObject<MoveStockFeedBackResponse>(WmsServiceExportApi(dto));
 
-             List<long> ids = list.Select(p => p.Id).ToList();
 
-             List<string> doccodelist = list.Select(p => p.DocsNo).ToList();
 
-             if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
 
-             {
 
-                 //更新推送表数据
 
-                 _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
 
-                 {
 
-                     Columns = it => new hjBillFeedbackPush { PostResult = 1, PostNum = it.PostNum + 1 },
 
-                     WhereExpression = it => ids.Contains(it.Id)
 
-                 });
 
-             }
 
-             else
 
-             {
 
-                 //更新推送表数据
 
-                 _hJService.UpdateBillFeedbackPushModelColumns(new sqlsugar.model.UpdateModelColumns<hjBillFeedbackPush>()
 
-                 {
 
-                     Columns = it => new hjBillFeedbackPush { PostResult = 2, PostNum = it.PostNum + 1 },
 
-                     WhereExpression = it => ids.Contains(it.Id)
 
-                 });
 
-             }
 
-             return resbody;
 
-         }
 
-         /// <summary>
 
-         /// 条码信息查询接口
 
-         /// </summary>
 
-         /// <param name="billcode"></param>
 
-         /// <returns></returns>
 
-         [HttpPost(Name = "GetBarCodeInfo")]
 
-         public GetBarCodeInfoResponse GetBarCodeInfo(GetBarCodeInfoRequest barcode)
 
-         {
 
-             GetBarCodeInfoResponse resbody = JsonConvert.DeserializeObject<GetBarCodeInfoResponse>(WmsServiceExportApi(barcode));
 
-             return resbody;
 
-         }
 
-         /// <summary>
 
-         /// 镀铜补空/取满指令接收接口(包含550工字轮)
 
-         /// </summary>
 
-         /// <param name="reqDto"></param>
 
-         /// <returns></returns>
 
-         [HttpPost(Name = "CopperLineReceiveInstr")]
 
-         public SRes CopperLineReceiveInstr(CopperLineNewRequest reqDtoList)
 
-         {
 
-             var res = new SRes();
 
-             if (reqDtoList != null && reqDtoList.data!= null && reqDtoList.data.Any())
 
-             {
 
-                 foreach (var reqDto in reqDtoList.data)
 
-                 {
 
-                     res = ConcurrencyReqControl<CopperLineRequest, SRes>(lockerCopperLineReceiveInstr, "CopperLineReceiveInstr" + reqDto.WbCode, reqDto.WbCode, reqDto, _hJService.CopperLineReceiveInstr);
 
-                     if (res.ResCode != ResponseStatusCodeEnum.Sucess.GetHashCode())
 
-                     {
 
-                         continue;
 
-                     }
 
-                 }
 
-             }
 
-            return res;
 
-         }
 
-         /// <summary>
 
-         /// 镀铜补空/取满指令接收接口(手持机用)
 
-         /// </summary>
 
-         /// <param name="reqDto"></param>
 
-         /// <returns></returns>
 
-         [HttpPost(Name = "PdaCopperLineReceiveInstr")]
 
-         public SRes PdaCopperLineReceiveInstr(CopperLineRequest reqDto)
 
-         {
 
-             return  ConcurrencyReqControl<CopperLineRequest, SRes>(lockerCopperLineReceiveInstr, "CopperLineReceiveInstr" + reqDto.WbCode, reqDto.WbCode, reqDto, _hJService.PdaCopperLineReceiveInstr);
 
-         }
 
-         /// <summary>
 
-         /// 申请出库任务
 
-         /// </summary>
 
-         /// <param name="reqDto"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public ApplyStockOutTaskResponse ApplyStockOutTask(ApplyStockOutTaskRequest reqDto)
 
-         {
 
-             var result = new ApplyStockOutTaskResponse();
 
-             if (reqDto.OutType == 2)
 
-             {
 
-                 if (string.IsNullOrEmpty(reqDto.Tunnel))
 
-                 {
 
-                     return new ApplyStockOutTaskResponse()
 
-                     {
 
-                        ResCode = ResponseStatusCodeEnum.ErrParam.GetHashCode(),
 
-                        ResMsg = "巷道值没有传值"
 
-                     };
 
-                 }
 
-                 var req = new ApplyEmptySpoolRequest() { Tunnel = int.Parse(reqDto.Tunnel),OutEndPostion = reqDto.OutEndPostion };
 
-                 return ConcurrencyReqControl<ApplyEmptySpoolRequest, ApplyStockOutTaskResponse>(lockerApplyStockOutTask, "ApplyStockOutTask" + reqDto.OutEndPostion, reqDto.OutEndPostion, req, _hJService.ApplyEmptySpoolService);
 
-             }
 
-             return result;
 
-         }
 
-         /// <summary>
 
-         /// 获取巷道空轮数量
 
-         /// </summary>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes<GetTunnelEmptyConResponse> GetTunnelEmptyConCount(GetTunnelEmptyConCountRequest reqDto)
 
-         {
 
-             return _hJService.GetTunnelEmptyConCount(reqDto);
 
-         }
 
-         /// <summary>
 
-         /// 库存改判
 
-         /// </summary>
 
-         /// <param name="reqDto"></param>
 
-         /// <returns></returns>
 
-         [HttpPost(Name = "StockChange")]
 
-         public StockChangeResponse StockChange(StockChangeRequest reqDto)
 
-         {
 
-             return ConcurrencyReqControl<StockChangeRequest, StockChangeResponse>(lockerStockChange, "StockChange" + reqDto.BillCode, reqDto.BillCode, reqDto, _hJService.StockChange);
 
-         }
 
-         /// <summary>
 
-         /// 特殊出库领料申请接口
 
-         /// </summary>
 
-         /// <param name="reqDto"></param>
 
-         /// <returns></returns>
 
-         [HttpPost(Name = "SpecialPickMaterApply")]
 
-         public SpecialPickMaterApplyResponse SpecialPickMaterApply(SpecialPickMaterApplyRequest reqDto)
 
-         {
 
-             return ConcurrencyReqControl<SpecialPickMaterApplyRequest, SpecialPickMaterApplyResponse>(lockerSpecialPickMaterApply, "SpecialPickMaterApply" + reqDto.MatBarCode, reqDto.MatBarCode, reqDto, _hJService.SpecialPickMaterApply);
 
-         }
 
-         /// <summary>
 
-         /// 实时库存查询接口
 
-         /// </summary>
 
-         /// <param name="reqDto"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public GetCurStockListResponse GetCurStockList(GetCurStockListRequest reqDto)
 
-         {
 
-             return _hJService.GetCurStockList(reqDto);
 
-         }
 
-         #endregion
 
-         #region RCS调用接口
 
-       
 
-         /// <summary>
 
-         /// 镀铜一楼res下任务
 
-         /// </summary>
 
-         /// <param name="reqDto"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public GenAgvSchedulingTaskResponse CopperLineAgvTaskToRcs(GenAgvSchedulingTaskRequest reqDto)
 
-         {
 
-             var result = new GenAgvSchedulingTaskResponse();
 
-             //GenAgvSchedulingTaskRequest resReq = new GenAgvSchedulingTaskRequest();
 
-             var apiurl = wms.util.AppSettings.GetConfig("RcsCreateTaskPushUrl");
 
-             var strRes = HttpUtil.PostRequest(apiurl, JsonConvert.SerializeObject(reqDto), 30000);
 
-             if (string.IsNullOrEmpty(strRes))
 
-             {
 
-                 result.message = "返回空";
 
-                 return result;
 
-             }
 
-             return JsonConvert.DeserializeObject<GenAgvSchedulingTaskResponse>(strRes);
 
-         }
 
-         /// <summary>
 
-         /// 镀铜一楼res继续任务
 
-         /// </summary>
 
-         /// <param name="reqDto"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public GenAgvSchedulingTaskResponse CopperLineContinueTaskToRcs(GenAgvSchedulingTaskRequest reqDto)
 
-         {
 
-             var result = new GenAgvSchedulingTaskResponse();
 
-             //GenAgvSchedulingTaskRequest resReq = new GenAgvSchedulingTaskRequest()
 
-             //{ };
 
-             var apiurl = wms.util.AppSettings.GetConfig("RcsContinuePushUrl");
 
-             var strRes = HttpUtil.PostRequest(apiurl, JsonConvert.SerializeObject(reqDto), 30000);
 
-             if (string.IsNullOrEmpty(strRes))
 
-             {
 
-                 result.message = "返回空";
 
-                 return result;
 
-             }
 
-             return JsonConvert.DeserializeObject<GenAgvSchedulingTaskResponse>(strRes);
 
-         }
 
-         /// <summary>
 
-         /// 镀铜二楼IWMS下发满轮出库
 
-         /// </summary>
 
-         /// <param name="reqDto"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes CopperLineAgvTaskStockOutToIWms(CopperLineAgvTaskStockOutToIWmsRequest reqDto)
 
-         {
 
-             var result = new SRes();
 
-             CopperLineAgvTaskStockOutToIWmsRequest resReq = new CopperLineAgvTaskStockOutToIWmsRequest()
 
-             { 
 
-                 matCode = "",
 
-                 wbCode = "满轮接驳口",
 
-                 inSpoolFull = "1",
 
-                 wetInto = true,
 
-                 wetIntoSpec = false,
 
-                 isSurplus = "",
 
-                 isRework = "",
 
-                 matNo = "",
 
-                 spoolNo = "",
 
-                 gradeCode = "",
 
-                 taskNo = Guid.NewGuid().ToString(),
 
-             };
 
-             var apiurl = wms.util.AppSettings.GetConfig("IWmsStockOutPushUrl");
 
-             var strRes = HttpUtil.PostRequest(apiurl, JsonConvert.SerializeObject(reqDto), 30000);
 
-             if (string.IsNullOrEmpty(strRes))
 
-             {
 
-                 //result.message = "返回空";
 
-                 return result;
 
-             }
 
-             return JsonConvert.DeserializeObject<SRes>(strRes);
 
-         }
 
-         /// <summary>
 
-         /// 镀铜二楼IWMS下发空轮/退料/余料入库
 
-         /// </summary>
 
-         /// <param name="reqDto"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes CopperLineAgvTaskStockInToIWms(CopperLineAgvTaskStockInToIWmsRequest reqDto)
 
-         {
 
-             var result = new SRes();
 
-             CopperLineAgvTaskStockInToIWmsRequest resReq = new CopperLineAgvTaskStockInToIWmsRequest()
 
-             {
 
-                 matCode = "",
 
-                 workAreaCode = "11",
 
-                 outSpoolFull = "1",
 
-                 taskNo = Guid.NewGuid().ToString()
 
-             };
 
-             var apiurl = wms.util.AppSettings.GetConfig("IWmsStockInPushUrl");
 
-             var strRes = HttpUtil.PostRequest(apiurl, JsonConvert.SerializeObject(reqDto), 30000);
 
-             if (string.IsNullOrEmpty(strRes))
 
-             {
 
-                 //result.message = "返回空";
 
-                 return result;
 
-             }
 
-             return JsonConvert.DeserializeObject<SRes>(strRes);
 
-         }
 
-         /// <summary>
 
-         /// AGV执行回调
 
-         /// </summary>
 
-         /// <param name="reqDto"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public agvCallbackResponse agvCallback(agvCallbackRequest reqDto)
 
-         {
 
-             var res = new agvCallbackResponse() { code = "0",message = "成功" };
 
-             return res;
 
-         }
 
-         /// <summary>
 
-         /// 复核异常上报接口
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public RfidCheckDiffResponse RfidCheckDiff(RfidCheckDiffRequest request)
 
-         {
 
-             var res = new RfidCheckDiffResponse();
 
-             //异常
 
-             _hJService.RfidCheckDiffService(request);
 
-             _logger.LogInformation("复核异常上报接口RfidCheckDiff接收数据:" + JsonConvert.SerializeObject(request));
 
-             return res;
 
-         }
 
-         /// <summary>
 
-         /// 湿拉生产退料/余料/空轮申请接口
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes WetLineBackInApply(WetLineBackInApplyRequest reqDto)
 
-         {
 
-             return ConcurrencyReqControl<WetLineBackInApplyRequest, SRes>(lockerWetLineBackInApply, "WetLineBackInApply" + reqDto.MatBarCode, reqDto.MatBarCode, reqDto, _hJService.WetLineBackInApplyService);
 
-             //接收指令
 
-             //入库逻辑
 
-             //下发wcs任务
 
-         }
 
-         /// <summary>
 
-         /// 湿拉产线领料申请接口WetLinePickMaterApply
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes WetLinePickMaterApply(WetLinePickMaterApplyRequest reqDto)
 
-         {
 
-             return ConcurrencyReqControl<WetLinePickMaterApplyRequest, SRes>(lockerWetLinePickMaterApply, "WetLinePickMaterApply" + reqDto.MatCode, reqDto.MatCode, reqDto, _hJService.WetLinePickMaterApplyService);
 
-         }
 
-         #endregion
 
-         #region 定时任务业务
 
-         /// <summary>
 
-         /// 添加定时任务
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string AddJob(AddJobRequest request)
 
-         {
 
-             request.Id = IdFactory.NewId();
 
-             return _hJService.AddJob(request);
 
-         }
 
-         /// <summar y>
 
-         /// 编辑定时任务
 
-         /// </summary>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string UpdateJobEntity(AddJobRequest request)
 
-         {
 
-             return _hJService.UpdateJobEntity(request);
 
-         }
 
-         /// <summary>
 
-         /// 获取job根据id
 
-         /// </summary>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string GetSysJobById(long id)
 
-         {
 
-             return JsonConvert.SerializeObject(_hJService.GetSysJobById(id));
 
-         }
 
-         /// <summary>
 
-         /// 启用job
 
-         /// </summary>
 
-         /// <param name="id"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string StartJob(DetailRequest2Str req)
 
-         {
 
-             var res = new SRes();
 
-             var sysjob = _sysJobrepository.GetById(req.Id);
 
-             if (sysjob == null)
 
-             {
 
-                 res.ResCode = 0;
 
-                 res.ResMsg = "没有找到对应的定时任务";
 
-                 return res.ToCamelCaseString();
 
-             }
 
-             JobScheduler.Start(sysjob.Code, Type.GetType("wms.api.Job.PostJob"), sysjob.CronExpression);
 
-             return res.ToCamelCaseString();
 
-         }
 
-         /// <summary>
 
-         /// 执行job
 
-         /// </summary>
 
-         /// <param name="reqEntity"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string ExecuteJob(DetailCodeRequest reqEntity)
 
-         {
 
-             var res = new SRes();
 
-             if (string.IsNullOrEmpty(reqEntity.Code))
 
-             {
 
-                 res.ResCode = 0;
 
-                 res.ResMsg = "参数错误";
 
-                 return res.ToCamelCaseString();
 
-             }
 
-             var jobEntity = _sysJobrepository.GetSingle(p => p.Code == reqEntity.Code);
 
-             if (jobEntity == null)
 
-             {
 
-                 res.ResCode = 0;
 
-                 res.ResMsg = "没有找到该编码";
 
-                 return res.ToCamelCaseString();
 
-             }
 
-             var jobapilist = _hJService.GetSysApiDetail(jobEntity.Id);
 
-             if (jobapilist.Any())
 
-             {
 
-                 foreach (var item in jobapilist)
 
-                 {
 
-                     Task.Run(() => { HttpUtil.PostRequest(item.ApiUrl, item.RequestBody); });
 
-                 }
 
-             }
 
-             return res.ToCamelCaseString();
 
-         }
 
-         /// <summary>
 
-         /// 分页Job列表
 
-         /// </summary>
 
-         /// <param name="reqEntity"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public List<dto.response.hj.SysJobDto> GetSysJobList(GetSysJobListRequest reqEntity)
 
-         {
 
-             var list = _sysJobrepository.GetList();
 
-             var listdto = _mapper.Map<List<dto.response.hj.SysJobDto>>(list);
 
-             if (listdto != null && listdto.Any())
 
-             {
 
-                 for (int i = 0; i < list.Count; i++)
 
-                 {
 
-                     listdto[i].JobExecuteStatus = GetExecuteStatus(new DetailCodeRequest() { Code = listdto[i].Code });
 
-                 }
 
-                 return listdto;
 
-             }
 
-             return new List<dto.response.hj.SysJobDto>();
 
-         }
 
-         /// <summary>
 
-         /// 获取执行状态
 
-         /// </summary>
 
-         /// <param name="reqEntity"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string GetExecuteStatus(DetailCodeRequest reqEntity)
 
-         {
 
-             var jobInfo = _sysJobrepository.GetFirst(p=>p.Code == reqEntity.Code);
 
-             var jobs = JobScheduler.GetJobList(Const.JobGroupName).Result;
 
-             if (jobs != null)
 
-             {
 
-                 var temp = jobs.Where(p => p.JobName == jobInfo.Code);
 
-                 if (temp.Any())
 
-                 {
 
-                     return temp.First().JobStatus;
 
-                 }
 
-                 else
 
-                 {
 
-                     return "Stop";
 
-                 }
 
-             }
 
-             else
 
-             {
 
-                 return "Stop";
 
-             }
 
-         }
 
-         [HttpPost]
 
-         public string GetId()
 
-         {
 
-             return IdFactory.NewId().ToString();
 
-         }
 
-         #endregion
 
-         #region 库存管理
 
-         /// <summary>
 
-         /// 手动出库确定
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string ManualTask(ManualTaskRequest request)
 
-         {
 
-             lock (lockerMannel)
 
-             {
 
-                 return _hJService.ManualTask(request);
 
-             }
 
-         }
 
-         #endregion
 
-         #region 合金PDA
 
-         /// <summary>
 
-         /// 合金解绑
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes<int> Unbounding(UnboundRequest request)
 
-         {
 
-             return _hJService.Unbounding(request);
 
-         }
 
-         #region pda出库
 
-         /// <summary>
 
-         /// pda指定出库确定
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string PdaManualTask(ManualTaskRequest request)
 
-         {
 
-             request.BusType = TaskBusType.TaskBusType_HJ_PdaManualOut.GetHashCode().ToString();
 
-             return _hJService.ManualTask(request);
 
-         }
 
-         /// <summary>
 
-         /// pda质检领料出库确定
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string PdaQualityTask(ManualTaskRequest request)
 
-         {
 
-             request.BusType = TaskBusType.TaskBusType_HJ_QualityOut.GetHashCode().ToString();
 
-             return _hJService.ManualTask(request);
 
-         }
 
-         /// <summary>
 
-         /// pda呆滞料出库确定
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string PdaInactionStockTask(ManualTaskRequest request)
 
-         {
 
-             request.BusType = TaskBusType.TaskBusType_HJ_DullMaterOut.GetHashCode().ToString();
 
-             return _hJService.ManualTask(request);
 
-         }
 
-         #endregion
 
-         /// <summary>
 
-         /// pda单据查询
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string GetDocumentsAll(DocumentsRequest request)
 
-         {
 
-             return _hJService.GetPageDocumentsList(request).ToCamelCaseString();
 
-         }
 
-         /// <summary>
 
-         /// pda单据明细查询(传单号)
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string GetDocumentDetails(DocumentsRequest request)
 
-         {
 
-             return _hJService.GetDocumentDetailListByDocsNo(request).ToCamelCaseString();
 
-         }
 
-         /// <summary>
 
-         /// 获取物料信息,根据RFID
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes<MaterInfo> GetMaterInfoByRfid(PdaRfidRequest request)
 
-         {
 
-             return _hJService.MaterInfoByRfid(request);
 
-         }
 
-         /// <summary>
 
-         /// 提交(组盘)
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string PdaGroupStock(PdaRfidRequest request)
 
-         {
 
-             lock (lockerStockInfo)
 
-             {
 
-                 return _hJService.PdaGroupStock(request);
 
-             }
 
-         }
 
-         /// <summary>
 
-         /// pda 下发任务
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string PdaInsterInTask(PdaRfidRequest request)
 
-         {
 
-             lock (lockerPdaTaskInfo)
 
-             {
 
-                 return _hJService.PdaInsertTask(request);
 
-             }
 
-             
 
-         }
 
-         /// <summary>
 
-         /// 获取设备报警信息
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string GetEquipErrorInfo(ErrorInfoRequest request)
 
-         {
 
-             var it = RedisHelper.Get("equoneRGV3");
 
-             return it;
 
-         }
 
-         /// <summary>
 
-         /// 获取物料报警信息
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string GetMaterErrorInfo(ErrorInfoRequest request)
 
-         {
 
-             return "";
 
-         }
 
-         /// <summary>
 
-         /// 获取业务报警信息
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string GetBusinessErrorInfo(ErrorInfoRequest request)
 
-         {
 
-             return "";
 
-         }
 
-         /// <summary>
 
-         /// agv空轮搬运任务(一楼空轮初始化)
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public string AgvTaskInfo(AgvTaskInfoRequest request)
 
-         {
 
-             return _hJService.AgvCarryTaskInfo(request);
 
-         }
 
-         #endregion
 
-         /// <summary>
 
-         /// 取消/完成任务验证(只验证不做业务处理,开放wcs系统调用)
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         //[HttpPost]
 
-         //public SRes CancelTaskVerify(CancelTaskRequest request)
 
-         //{
 
-         //    lock (lockerCancelOrComplet)
 
-         //    {
 
-         //        return _hJService.CancelTaskVerify(request);
 
-         //    }
 
-         //}
 
-         /// <summary>
 
-         /// 执行任务(开放wcs调用,前端不调用)
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         //[HttpPost]
 
-         //public SRes CarryTaskInfo(CancelTaskRequest request)
 
-         //{
 
-         //    lock (lockerCarryTask)
 
-         //    {
 
-         //        return _hJService.CarryTaskInfo(request);
 
-         //    }
 
-         //}
 
-         /// <summary>du
 
-         /// 异常任务的库存处理
 
-         /// </summary>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes GetErrorTaskInfo()
 
-         {
 
-             var res = new SRes();
 
-             //获取货位锁是出库锁,当前时间差大于等于1 
 
-             var list = _hJService.GetOutStateList();
 
-             //根据条码捞取历史任务表中的数据
 
-             var barcode = list.Select(p => p.ContGrpBarCode).ToList();
 
-             var task = _hJService.GetTaskHistoryByCode(barcode);
 
-             if (task.Any())
 
-             {
 
-                 foreach (var item in task)
 
-                 {
 
-                     if (item.Type != TaskType.OutDepot)
 
-                     {
 
-                         continue;
 
-                     }
 
-                     if (item.Status != dto.TaskStatus.Finish)
 
-                     {
 
-                         continue;
 
-                     }
 
-                     var info = CompleteTask(new CompleteTaskRequest() { TaskNum = item.ID, OperationType = 2, WCSUpdateName = "wcs" });
 
-                     if (info.ResCode != ResponseStatusCodeEnum.Sucess.GetHashCode())
 
-                     {
 
-                         res.ResCode = ResponseStatusCodeEnum.Fail.GetHashCode();
 
-                         res.ResMsg = ResponseStatusCodeEnum.Fail.GetDescription();
 
-                         return res;
 
-                     }
 
-                 }
 
-             }
 
-             return res;
 
-         }
 
-         #region 推送数据
 
-         /// <summary>
 
-         /// 数据推送接口
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public PushResponse PushErpDate(PushDate request)
 
-         {
 
-             var result = new PushResponse();
 
-             if (request.init == 1)
 
-             {
 
-                 //手动推送
 
-                 //if (!request.CLBarCode.Any())
 
-                 //{
 
-                 //    result.ResCode = ResponseStatusCodeEnum.ErrParam.GetHashCode();
 
-                 //    result.ResMsg = ResponseStatusCodeEnum.ErrParam.GetDescription();
 
-                 //    return result;
 
-                 //}
 
-                 //var list = _hJService.GetPushDatelistMannel(request);
 
-                 //if (!list.Any())
 
-                 //{
 
-                 //    result.ResCode = ResponseStatusCodeEnum.NoResult.GetHashCode();
 
-                 //    result.ResMsg = ResponseStatusCodeEnum.NoResult.GetDescription();
 
-                 //    return result;
 
-                 //}
 
-                 //if (list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_1F_StockIn.ToString()).ToList().Any())
 
-                 //{
 
-                 //    PushRequest push = new PushRequest();
 
-                 //    var onefloor = list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_1F_StockIn.ToString()).ToList();
 
-                 //    var info = _mapper.Map<List<ListInfo>>(onefloor);
 
-                 //    push.list = info;
 
-                 //    var resbody = JsonConvert.DeserializeObject<PushResponse>(WmsServiceExportApi(push));
 
-                 //    var matBarCode = info.Select(p => p.MatBarCode).ToList();
 
-                 //    if (resbody.success == true)
 
-                 //    {
 
-                 //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
 
-                 //        {
 
-                 //            Columns = it => new BillPushinfo { PostResult = 1, PostQty = it.PostQty + 1, ResDesc = "手动推送成功", EditTime = DateTime.Now },
 
-                 //            WhereExpression = it => matBarCode.Contains(it.CLBarCode)
 
-                 //        });
 
-                 //    }
 
-                 //    else
 
-                 //    {
 
-                 //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
 
-                 //        {
 
-                 //            Columns = it => new BillPushinfo { PostResult = 2, PostQty = it.PostQty + 1, ResDesc = "手动推送失败", EditTime = DateTime.Now },
 
-                 //            WhereExpression = it => matBarCode.Contains(it.CLBarCode)
 
-                 //        });
 
-                 //    }
 
-                 //}
 
-                 //退料
 
-                 //if (list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_2F_BackStockIn.ToString()).ToList().Any())
 
-                 //{
 
-                 //    WetLineBackInFeedBackRequest wetLineBack = new WetLineBackInFeedBackRequest();
 
-                 //    var back = _mapper.Map<List<WetLineBackInFeedBackRequestItem>>(list);
 
-                 //    back.ForEach(p =>
 
-                 //    {
 
-                 //        p.BusType = "1";
 
-                 //        p.WareName = "合金库";
 
-                 //    });
 
-                 //    wetLineBack.ListInfo = back;
 
-                 //    var resbody = JsonConvert.DeserializeObject<WetLineBackInFeedBackResponse>(WmsServiceExportApi(wetLineBack));
 
-                 //    var rfid = back.Select(p => p.RFID).ToList();
 
-                 //    if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
 
-                 //    {
 
-                 //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
 
-                 //        {
 
-                 //            Columns = it => new BillPushinfo { PostResult = 1, PostQty = it.PostQty + 1, ResDesc = "手动推送" },
 
-                 //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
 
-                 //        });
 
-                 //    }
 
-                 //    else
 
-                 //    {
 
-                 //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
 
-                 //        {
 
-                 //            Columns = it => new BillPushinfo { PostResult = 2, PostQty = it.PostQty + 1 },
 
-                 //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
 
-                 //        });
 
-                 //    }
 
-                 //}
 
-                 ////余料
 
-                 //if (list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_2F_LeftStockIn.ToString()).ToList().Any())
 
-                 //{
 
-                 //    WetLineBackInFeedBackRequest wetLineBack = new WetLineBackInFeedBackRequest();
 
-                 //    var back = _mapper.Map<List<WetLineBackInFeedBackRequestItem>>(list);
 
-                 //    back.ForEach(p =>
 
-                 //    {
 
-                 //        p.BusType = "2";
 
-                 //        p.WareName = "合金库";
 
-                 //    });
 
-                 //    wetLineBack.ListInfo = back;
 
-                 //    var resbody = JsonConvert.DeserializeObject<WetLineBackInFeedBackResponse>(WmsServiceExportApi(wetLineBack));
 
-                 //    var rfid = back.Select(p => p.RFID).ToList();
 
-                 //    if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
 
-                 //    {
 
-                 //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
 
-                 //        {
 
-                 //            Columns = it => new BillPushinfo { PostResult = 1, PostQty = it.PostQty + 1, ResDesc = "手动推送" },
 
-                 //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
 
-                 //        });
 
-                 //    }
 
-                 //    else
 
-                 //    {
 
-                 //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
 
-                 //        {
 
-                 //            Columns = it => new BillPushinfo { PostResult = 2, PostQty = it.PostQty + 1 },
 
-                 //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
 
-                 //        });
 
-                 //    }
 
-                 //}
 
-             }
 
-             else
 
-             {
 
-                 ////自动推送
 
-                 //var list = _hJService.GetPushDatelistAuto(request);
 
-                 //if (!list.Any())
 
-                 //{
 
-                 //    return new PushResponse() { ResCode = ResponseStatusCodeEnum.NoResult.GetHashCode(), ResMsg = ResponseStatusCodeEnum.NoResult.GetDescription() };
 
-                 //}
 
-                 //if (list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_1F_StockIn.ToString()).ToList().Any())
 
-                 //{
 
-                 //    var onefloor = list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_1F_StockIn.ToString()).ToList();
 
-                 //    PushRequest push = new PushRequest();
 
-                 //    var info = _mapper.Map<List<ListInfo>>(onefloor);
 
-                 //    push.list = info;
 
-                 //    var resbody = JsonConvert.DeserializeObject<PushResponse>(WmsServiceExportApi(push));
 
-                 //    var matBarCode = info.Select(p => p.MatBarCode).ToList();
 
-                 //    if (resbody.success == true)
 
-                 //    {
 
-                 //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
 
-                 //        {
 
-                 //            Columns = it => new BillPushinfo { PostResult = 1, PostQty = it.PostQty + 1, ResDesc = "自动推送" ,EditTime = DateTime.Now},
 
-                 //            WhereExpression = it => matBarCode.Contains(it.CLBarCode)
 
-                 //        });
 
-                 //    }
 
-                 //    else
 
-                 //    {
 
-                 //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
 
-                 //        {
 
-                 //            Columns = it => new BillPushinfo { PostResult = 2, PostQty = it.PostQty + 1, EditTime = DateTime.Now },
 
-                 //            WhereExpression = it => matBarCode.Contains(it.CLBarCode)
 
-                 //        });
 
-                 //    }
 
-                 //}
 
-                 //退料
 
-                 //if (list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_2F_BackStockIn.ToString()).ToList().Any())
 
-                 //{
 
-                 //    WetLineBackInFeedBackRequest wetLineBack = new WetLineBackInFeedBackRequest();
 
-                 //    var back = _mapper.Map<List<WetLineBackInFeedBackRequestItem>>(list);
 
-                 //    back.ForEach(p =>
 
-                 //    {
 
-                 //        p.BusType = "1";
 
-                 //        p.WareName = "合金库";
 
-                 //    });
 
-                 //    wetLineBack.ListInfo = back;
 
-                 //    var resbody = JsonConvert.DeserializeObject<WetLineBackInFeedBackResponse>(WmsServiceExportApi(wetLineBack));
 
-                 //    var rfid = back.Select(p => p.RFID).ToList();
 
-                 //    if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
 
-                 //    {
 
-                 //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
 
-                 //        {
 
-                 //            Columns = it => new BillPushinfo { PostResult = 1, PostQty = it.PostQty + 1, ResDesc = "自动推送" },
 
-                 //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
 
-                 //        });
 
-                 //    }
 
-                 //    else
 
-                 //    {
 
-                 //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
 
-                 //        {
 
-                 //            Columns = it => new BillPushinfo { PostResult = 2, PostQty = it.PostQty + 1 },
 
-                 //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
 
-                 //        });
 
-                 //    }
 
-                 //}
 
-                 ////余料
 
-                 //if (list.Where(p => p.TypeCode == FackbeekType.InterfaceType_HJ_2F_LeftStockIn.ToString()).ToList().Any())
 
-                 //{
 
-                 //    WetLineBackInFeedBackRequest wetLineBack = new WetLineBackInFeedBackRequest();
 
-                 //    var back = _mapper.Map<List<WetLineBackInFeedBackRequestItem>>(list);
 
-                 //    back.ForEach(p =>
 
-                 //    {
 
-                 //        p.BusType = "2";
 
-                 //        p.WareName = "合金库";
 
-                 //    });
 
-                 //    wetLineBack.ListInfo = back;
 
-                 //    var resbody = JsonConvert.DeserializeObject<WetLineBackInFeedBackResponse>(WmsServiceExportApi(wetLineBack));
 
-                 //    var rfid = back.Select(p => p.RFID).ToList();
 
-                 //    if (resbody.ResCode == ResponseStatusCodeEnum.Sucess.GetHashCode())
 
-                 //    {
 
-                 //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
 
-                 //        {
 
-                 //            Columns = it => new BillPushinfo { PostResult = 1, PostQty = it.PostQty + 1, ResDesc = "自动推送" },
 
-                 //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
 
-                 //        });
 
-                 //    }
 
-                 //    else
 
-                 //    {
 
-                 //        _hJService.UpdatePushModelColumns(new sqlsugar.model.UpdateModelColumns<BillPushinfo>()
 
-                 //        {
 
-                 //            Columns = it => new BillPushinfo { PostResult = 2, PostQty = it.PostQty + 1 },
 
-                 //            WhereExpression = it => rfid.Contains(it.RFIDBarCode)
 
-                 //        });
 
-                 //    }
 
-                 //}
 
-             }
 
-             return result;
 
-         }
 
-         #endregion
 
-         #region 异常处理
 
-         /// <summary>
 
-         /// 强制取消任务
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes ForceCancelTask(WebErrorRequest request)
 
-         {
 
-             return _hJService.ForceCancelTask(request);
 
-         }
 
-         /// <summary>
 
-         /// 删除库存信息
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes DeleteStockInfo(DetailCodeRequest request)
 
-         {
 
-             return _hJService.DeleteStockInfo(request);
 
-         }
 
-         /// <summary>
 
-         /// 修改库存状态
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes UpdateStockState(DetailCodeRequestdto request)
 
-         {
 
-             return _hJService.UpdateStockState(request);
 
-         }
 
-         /// <summary>
 
-         /// 修改货位状态
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes UpdateCellState(DetailCodeRequestdto request)
 
-         {
 
-             return _hJService.UpdateCellState(request);
 
-         }
 
-         /// <summary>
 
-         /// 货位数据互换
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes DataSwapCell(DataSwapCellRequest request)
 
-         {
 
-             return _hJService.DataSwapCell(request);
 
-         }
 
-         /// <summary>
 
-         /// 补数据
 
-         /// </summary>
 
-         /// <param name="request"></param>
 
-         /// <returns></returns>
 
-         [HttpPost]
 
-         public SRes DataBasePatch(DetailCodeRequest request)
 
-         {
 
-             return _hJService.DataBasePatch(request);
 
-         }
 
-         #endregion
 
-     }
 
- }
 
 
  |