已删除8个文件
已修改28个文件
已添加26个文件
| | |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="WIDESEAWCS_QuartzJob" Version="2.0.2" /> |
| | | <PackageReference Include="WIDESEAWCS_QuartzJob" Version="2.0.3" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="WIDESEAWCS_QuartzJob" Version="2.0.2" /> |
| | | <PackageReference Include="WIDESEAWCS_QuartzJob" Version="2.0.3" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | |
| | | } |
| | | }, |
| | | { |
| | | name: "æ å¨ å® æ", |
| | | icon: '', |
| | | class: '', |
| | | value: 'TaskHandCompleted', |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | { |
| | | name: "å æ¶ ä»» å¡", |
| | | icon: '', |
| | | class: '', |
| | | value: 'TaskHandCancel', |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | { |
| | | name: "任塿¢å¤", |
| | | icon: '', |
| | | class: '', |
| | |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | let enableBtn = this.buttons.find(x => x.value == 'Enable'); |
| | | if (enableBtn) { |
| | | enableBtn.onClick = function () { |
| | | this.$message.success('èªå®ä¹æé®ç¹å»äºä»¶'); |
| | | let EnableBtn = this.buttons.find(x => x.value == 'Enable'); |
| | | if (EnableBtn) { |
| | | EnableBtn.onClick = function () { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | |
| | | this.http |
| | | .post("api/LocationInfo/LocationEnableStatus", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | }); |
| | | } |
| | | } |
| | | let disableBtn = this.buttons.find(x => x.value == 'Disable'); |
| | | if (disableBtn) { |
| | | disableBtn.onClick = function () { |
| | | this.$message.success('èªå®ä¹æé®ç¹å»äºä»¶'); |
| | | let DisableBtn = this.buttons.find(x => x.value == 'Disable'); |
| | | if (DisableBtn) { |
| | | DisableBtn.onClick = function () { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | this.http |
| | | .post("api/LocationInfo/LocationDisableStatus", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | }); |
| | | } |
| | | } |
| | | |
| | |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | let TaskHandCancelBtn = this.buttons.find(x => x.value == 'TaskHandCancel'); |
| | | if (TaskHandCancelBtn) { |
| | | TaskHandCancelBtn.onClick = function () { |
| | | this.$message.success('èªå®ä¹æé®ç¹å»äºä»¶'); |
| | | } |
| | | } |
| | | let TaskHandCompletedBtn = this.buttons.find(x => x.value == 'TaskHandCompleted'); |
| | | if (TaskHandCompletedBtn) { |
| | | TaskHandCompletedBtn.onClick = function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | var param = rows[0].taskNum; |
| | | console.log(param); |
| | | this.http |
| | | .post("api/Task/TaskCompleted?taskNum="+param, "æ°æ®å¤çä¸...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('任塿å¨å®ææå.'); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | |
| | | depth: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | [ |
| | | {title: "åºå主é®",field: "areaId",type: "string",}, |
| | | {title: "ç¼åç¹ç¼å·",field: "pointCode",type: "string",}, |
| | | {title: "ç¼åç¹ç¶æ",field: "pointStatus",type: "select",dataKey: "locationStatusEnum",data: [],}, |
| | |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "å
许混æ¹", |
| | | field: "isMixBatch", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "å
许混æ", |
| | | field: "isMixMateriel", |
| | | type: "string", |
| | | }, |
| | | |
| | | { |
| | | title: "ç©ææè¿°", |
| | | field: "materielDes", |
| | |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "depth", |
| | | title: "深度", |
| | | type: "int", |
| | | width: 80, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "dispatchertime", |
| | | title: "ä»»å¡ä¸åæ¶é´", |
| | | type: "datetime", |
| | | width: 150, |
| | | align: "left", |
| | | hidden:true, |
| | | }, |
| | | { |
| | | field: "wMSId", |
| | |
| | | { |
| | | return BaseDal.QueryFirst(x => x.RoadwayNo == locationInfo.RoadwayNo && x.Column == locationInfo.Column && x.Layer == locationInfo.Layer && x.Depth != locationInfo.Depth && x.Row != locationInfo.Row && (SqlFunc.Abs(x.Row - locationInfo.Row) == 1)); |
| | | } |
| | | public void UpdateLocationLock(Dt_LocationInfo locationInfo, int? TaskNum) |
| | | public void UpdateLocationLock(Dt_LocationInfo locations, int TaskNum,int changType,bool black) |
| | | { |
| | | try |
| | | { |
| | | if (locationInfo.Depth == 2) |
| | | if (black) |
| | | { |
| | | Dt_LocationInfo dt_LocationInfo = null; |
| | | int beforeStatus = 0; |
| | | if (locationInfo.Row == 1 || locationInfo.Row == 5) |
| | | (Dt_LocationInfo?, int?) result = isDepth(locations); |
| | | if (result.Item1 != null && (result.Item2 == LocationStatusEnum.Free.ObjToInt()|| result.Item2 == LocationStatusEnum.Lock.ObjToInt())) |
| | | { |
| | | dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo); |
| | | beforeStatus = dt_LocationInfo.LocationStatus; |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt()) |
| | | { |
| | | dt_LocationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | BaseDal.UpdateData(dt_LocationInfo); |
| | | } |
| | | int beforeStatusEnd = result.Item1.LocationStatus; |
| | | |
| | | result.Item1.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | |
| | | BaseDal.UpdateData(result.Item1); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(result.Item1, beforeStatusEnd, changType, "", TaskNum); |
| | | } |
| | | else if (locationInfo.Row == 4 || locationInfo.Row == 8) |
| | | } |
| | | else |
| | | { |
| | | (Dt_LocationInfo?, int?) result = isDepth(locations); |
| | | if (result.Item1 != null && result.Item2 == LocationStatusEnum.Free.ObjToInt()) |
| | | { |
| | | dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo); |
| | | beforeStatus = dt_LocationInfo.LocationStatus; |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt()) |
| | | { |
| | | dt_LocationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | BaseDal.UpdateData(dt_LocationInfo); |
| | | } |
| | | int beforeStatusEnd = result.Item1.LocationStatus; |
| | | |
| | | result.Item1.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | |
| | | BaseDal.UpdateData(result.Item1); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(result.Item1, beforeStatusEnd, changType, "", TaskNum); |
| | | } |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Lock.ObjToInt(), "", TaskNum); |
| | | } |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | |
| | | } |
| | | public void UpdateLocationFree(Dt_LocationInfo locations, int TaskNum, int changType,bool black) |
| | | { |
| | | try |
| | | { |
| | | (Dt_LocationInfo?, int?) result = isDepth(locations); |
| | | if (result.Item1 != null) |
| | | { |
| | | int beforeStatusEnd = result.Item1.LocationStatus; |
| | | |
| | | result.Item1.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | |
| | | BaseDal.UpdateData(result.Item1); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(result.Item1, beforeStatusEnd, changType, "", TaskNum); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | |
| | | } |
| | | public void UpdateLocationFree(Dt_LocationInfo locationInfo, int? TaskNum) |
| | | { |
| | | try |
| | | { |
| | | if (locationInfo.Depth == 2) |
| | | { |
| | | Dt_LocationInfo dt_LocationInfo = null; |
| | | int beforeStatus = 0; |
| | | if (locationInfo.Row == 1 || locationInfo.Row == 5) |
| | | { |
| | | dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo); |
| | | beforeStatus = dt_LocationInfo.LocationStatus; |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt()) |
| | | { |
| | | dt_LocationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | BaseDal.UpdateData(dt_LocationInfo); |
| | | } |
| | | } |
| | | else if (locationInfo.Row == 4 || locationInfo.Row == 8) |
| | | { |
| | | dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo); |
| | | beforeStatus = dt_LocationInfo.LocationStatus; |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt()) |
| | | { |
| | | dt_LocationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | BaseDal.UpdateData(dt_LocationInfo); |
| | | } |
| | | } |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(dt_LocationInfo, beforeStatus, StockChangeType.Lock.ObjToInt(), "", TaskNum); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | |
| | | } |
| | | public Dt_LocationInfo isDepth(Dt_LocationInfo locationInfo) |
| | | public (Dt_LocationInfo?,int?) isDepth(Dt_LocationInfo locationInfo) |
| | | { |
| | | if (locationInfo.Depth == 2) |
| | | { |
| | | if (locationInfo.Row == 1 || locationInfo.Row == 5) |
| | | { |
| | | Dt_LocationInfo dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo); |
| | | |
| | | if (dt_LocationInfo != null&& dt_LocationInfo.LocationStatus==LocationStatusEnum.InStock.ObjToInt()) |
| | | { |
| | | return dt_LocationInfo; |
| | | return (dt_LocationInfo, LocationStatusEnum.InStock.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Free.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.Free.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Lock.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.Lock.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.PalletLock.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.PalletLock.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Pallet.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.Pallet.ObjToInt()); |
| | | } |
| | | } |
| | | else if (locationInfo.Row == 4 || locationInfo.Row == 8) |
| | | { |
| | | Dt_LocationInfo dt_LocationInfo = BaseDal.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo); |
| | | |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.InStock.ObjToInt()) |
| | | { |
| | | return dt_LocationInfo; |
| | | return (dt_LocationInfo, LocationStatusEnum.InStock.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Free.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.Free.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Lock.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.Lock.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.PalletLock.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.PalletLock.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Pallet.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.Pallet.ObjToInt()); |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | return (null, LocationStatusEnum.Free.ObjToInt()); |
| | | } |
| | | public void RelocationLock(Dt_LocationInfo locationInfo, Dt_LocationInfo locationInfos,int TaskNum) |
| | | public void RelocationLock(Dt_LocationInfo locationInfo, Dt_LocationInfo locationInfos, int TaskNum) |
| | | { |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | int beforeStatu = locationInfos.LocationStatus; |
| | | int beforeStartStatus = locationInfo.LocationStatus; |
| | | int beforeEndStatus = locationInfos.LocationStatus; |
| | | |
| | | locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | locationInfos.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | |
| | | if (locationInfos.LocationStatus == LocationStatusEnum.Pallet.ObjToInt()) |
| | | { |
| | | locationInfos.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt(); |
| | | } |
| | | else |
| | | { |
| | | locationInfos.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | } |
| | | |
| | | BaseDal.UpdateData(locationInfo); |
| | | |
| | | BaseDal.UpdateData(locationInfos); |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum); |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, beforeStatu, StockChangeType.Relocation.ObjToInt(), "", TaskNum); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStartStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum); |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, beforeEndStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum); |
| | | } |
| | | public void RelocationFree(Dt_LocationInfo locationInfo, Dt_LocationInfo locationInfos, int TaskNum) |
| | | public void RelocationFree(Dt_LocationInfo locations, int TaskNum) |
| | | { |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | int beforeStatu = locationInfos.LocationStatus; |
| | | int beforeEndStatus = locations.LocationStatus; |
| | | |
| | | locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | locationInfos.LocationStatus = LocationStatusEnum.InStock.ObjToInt(); |
| | | locations.LocationStatus = LocationStatusEnum.InStock.ObjToInt(); |
| | | |
| | | BaseDal.UpdateData(locationInfo); |
| | | BaseDal.UpdateData(locationInfos); |
| | | BaseDal.UpdateData(locations); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum); |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, beforeStatu, StockChangeType.Relocation.ObjToInt(), "", TaskNum); |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locations, beforeEndStatus, StockChangeType.Relocation.ObjToInt(), "", TaskNum); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | Dt_LocationInfo? AssignLocation(string stationCode, int inboundType); |
| | | Dt_LocationInfo? AssignLocation(string RoadwayNo); |
| | | void UpdateLocationLock(Dt_LocationInfo locationInfo,int? taskNum); |
| | | void UpdateLocationFree(Dt_LocationInfo locationInfo, int? taskNum); |
| | | Dt_LocationInfo isDepth(Dt_LocationInfo locationInfo); |
| | | void UpdateLocationLock(Dt_LocationInfo locationInfo,int task, int changType,bool black); |
| | | void UpdateLocationFree(Dt_LocationInfo locationInfo, int task, int changType, bool black); |
| | | |
| | | //(Dt_LocationInfo?,int) isDepth(Dt_LocationInfo locationInfo); |
| | | |
| | | void RelocationLock(Dt_LocationInfo locationInfo, Dt_LocationInfo locationInfos,int TaskNum); |
| | | void RelocationFree(Dt_LocationInfo locationInfo, Dt_LocationInfo locationInfos, int TaskNum); |
| | | void RelocationFree(Dt_LocationInfo locations, int TaskNum); |
| | | |
| | | WebResponseContent LocationEnableStatus(int[] keys); |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | public interface IInboundOrderDetail_HtyRepository : IRepository<Dt_InboundOrderDetail_Hty> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | public interface IInboundOrder_HtyRepository : IRepository<Dt_InboundOrder_Hty> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IInboundService |
| | | { |
| | | public interface IInboundOrderDetail_HtyService : IService<Dt_InboundOrderDetail_Hty> |
| | | { |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IInboundService |
| | | { |
| | | public interface IInboundOrder_HtyService : IService<Dt_InboundOrder_Hty> |
| | | { |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IOutboundRepository |
| | | { |
| | | public interface IOutboundOrderDetail_HtyRepository : IRepository<Dt_OutboundOrderDetail_Hty> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IOutboundRepository |
| | | { |
| | | public interface IOutboundOrder_HtyRepository : IRepository<Dt_OutboundOrder_Hty> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IOutboundService |
| | | { |
| | | public interface IOutboundOrderDetail_HtyService : IService<Dt_OutboundOrderDetail_Hty> |
| | | { |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_DTO.Outbound; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IOutboundService |
| | | { |
| | | public interface IOutboundOrder_HtyService : IService<Dt_OutboundOrder_Hty> |
| | | { |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IStockRepository |
| | | { |
| | | public interface IStockInfoDetail_HtyRepository : IRepository<Dt_StockInfoDetail_Hty> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IStockRepository |
| | | { |
| | | public interface IStockInfo_HtyRepository : IRepository<Dt_StockInfo_Hty> |
| | | { |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IStockService |
| | | { |
| | | public interface IStockInfoDetail_HtyService : IService<Dt_StockInfoDetail_Hty> |
| | | { |
| | | IStockInfoDetail_HtyRepository Repository { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IStockService |
| | | { |
| | | public interface IStockInfo_HtyService : IService<Dt_StockInfo_Hty> |
| | | { |
| | | IStockInfo_HtyRepository Repository { get; } |
| | | } |
| | | } |
| | |
| | | IStockInfoDetailService StockInfoDetailService { get; } |
| | | |
| | | IStockInfoService StockInfoService { get; } |
| | | IStockInfoDetail_HtyService StockInfoDetail_HtyService { get; } |
| | | |
| | | IStockInfo_HtyService StockInfo_HtyService { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | public class InboundOrderDetail_HtyRepository : RepositoryBase<Dt_InboundOrderDetail_Hty>, IInboundOrderDetail_HtyRepository |
| | | { |
| | | public InboundOrderDetail_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | public class InboundOrder_HtyRepository : RepositoryBase<Dt_InboundOrder_Hty>, IInboundOrder_HtyRepository |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | |
| | | public InboundOrder_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_InboundService |
| | | { |
| | | public partial class InboundOrderDetail_HtyService : ServiceBase<Dt_InboundOrderDetail_Hty, IInboundOrderDetail_HtyRepository>, IInboundOrderDetail_HtyService |
| | | { |
| | | public IInboundOrderDetail_HtyRepository Repository => BaseDal; |
| | | |
| | | public InboundOrderDetail_HtyService(IInboundOrderDetail_HtyRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Reflection.Metadata; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core.Utilities; |
| | | using WIDESEA_DTO; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_ITaskInfoRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_InboundService |
| | | { |
| | | public partial class InboundOrder_HtyService : ServiceBase<Dt_InboundOrder_Hty, IInboundOrder_HtyRepository>, IInboundOrder_HtyService |
| | | { |
| | | |
| | | |
| | | public InboundOrder_HtyService(IInboundOrder_HtyRepository BaseDal) : base(BaseDal) |
| | | { |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | using SqlSugar; |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "æºä¸»é®")] |
| | | public int SourceId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "夿³¨")] |
| | | public string OperateType { get; set; } |
| | | /// <summary> |
| | | /// å建人 |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建人")] |
| | | [ExporterHeader(DisplayName = "å建人")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å建人")] |
| | | public string Creater { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建æ¶é´ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建æ¶é´")] |
| | | [ExporterHeader(DisplayName = "å建æ¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å建æ¶é´")] |
| | | public DateTime CreateDate { get; set; } = DateTime.Now; |
| | | |
| | | /// <summary> |
| | | /// æ´æ°è
|
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹äºº")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹äºº")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "ä¿®æ¹äºº")] |
| | | public string Modifier { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹æ¥æ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹æ¥æ")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹æ¥æ")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ä¿®æ¹æ¥æ")] |
| | | public DateTime? ModifyDate { get; set; } |
| | | } |
| | | } |
| | |
| | | using SqlSugar; |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_InboundOrder_Hty), "å
¥åºå")] |
| | | public class Dt_InboundOrder_Hty : BaseEntity |
| | | public class Dt_InboundOrder_Hty |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_InboundOrderDetail_Hty.OrderId), nameof(Id))] |
| | | public List<Dt_InboundOrderDetail_Hty> Details { get; set; } |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "æºä¸»é®")] |
| | | public int SourceId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "夿³¨")] |
| | | public string OperateType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建人 |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建人")] |
| | | [ExporterHeader(DisplayName = "å建人")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å建人")] |
| | | public string Creater { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建æ¶é´ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建æ¶é´")] |
| | | [ExporterHeader(DisplayName = "å建æ¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å建æ¶é´")] |
| | | public DateTime CreateDate { get; set; } = DateTime.Now; |
| | | |
| | | /// <summary> |
| | | /// æ´æ°è
|
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹äºº")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹äºº")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "ä¿®æ¹äºº")] |
| | | public string Modifier { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹æ¥æ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹æ¥æ")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹æ¥æ")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ä¿®æ¹æ¥æ")] |
| | | public DateTime? ModifyDate { get; set; } |
| | | } |
| | | } |
| | |
| | | using SqlSugar; |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_OutboundOrderDetail_Hty), "åºåºåæç»")] |
| | | public class Dt_OutboundOrderDetail_Hty : BaseEntity |
| | | public class Dt_OutboundOrderDetail_Hty |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "æºä¸»é®")] |
| | | public int SourceId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "夿³¨")] |
| | | public string OperateType { get; set; } |
| | | /// <summary> |
| | | /// å建人 |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建人")] |
| | | [ExporterHeader(DisplayName = "å建人")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å建人")] |
| | | public string Creater { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建æ¶é´ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建æ¶é´")] |
| | | [ExporterHeader(DisplayName = "å建æ¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å建æ¶é´")] |
| | | public DateTime CreateDate { get; set; } = DateTime.Now; |
| | | |
| | | /// <summary> |
| | | /// æ´æ°è
|
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹äºº")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹äºº")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "ä¿®æ¹äºº")] |
| | | public string Modifier { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹æ¥æ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹æ¥æ")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹æ¥æ")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ä¿®æ¹æ¥æ")] |
| | | public DateTime? ModifyDate { get; set; } |
| | | } |
| | | } |
| | |
| | | using SqlSugar; |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_OutboundOrder_Hty), "åºåºå")] |
| | | public class Dt_OutboundOrder_Hty : BaseEntity |
| | | public class Dt_OutboundOrder_Hty |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_OutboundOrderDetail_Hty.OrderId), nameof(Id))] |
| | | public List<Dt_OutboundOrderDetail_Hty> Details { get; set; } |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "æºä¸»é®")] |
| | | public int SourceId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "夿³¨")] |
| | | |
| | | public string OperateType { get; set; } |
| | | /// <summary> |
| | | /// å建人 |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建人")] |
| | | [ExporterHeader(DisplayName = "å建人")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å建人")] |
| | | public string Creater { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建æ¶é´ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建æ¶é´")] |
| | | [ExporterHeader(DisplayName = "å建æ¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å建æ¶é´")] |
| | | public DateTime CreateDate { get; set; } = DateTime.Now; |
| | | |
| | | /// <summary> |
| | | /// æ´æ°è
|
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹äºº")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹äºº")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "ä¿®æ¹äºº")] |
| | | public string Modifier { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹æ¥æ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹æ¥æ")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹æ¥æ")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ä¿®æ¹æ¥æ")] |
| | | public DateTime? ModifyDate { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_StockInfoDetail_Hty), "åºåä¿¡æ¯æç»")] |
| | | public class Dt_StockInfoDetail_Hty |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåä¿¡æ¯ä¸»é®")] |
| | | public int StockId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©æç¼å·")] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "ç©æåç§°")] |
| | | public string MaterielName { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "åæ®ç¼å·")] |
| | | public string OrderNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 100, ColumnDescription = "åºåå·")] |
| | | public string SerialNumber { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "åºåæ°é")] |
| | | public decimal StockQuantity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "åºåºæ°é", DefaultValue = "0")] |
| | | public decimal OutboundQuantity { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåæç»ç¶æ")] |
| | | public int Status { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | [Navigate(NavigateType.OneToOne, nameof(Dt_StockQuantityChangeRecord.StockDetailId), nameof(Id))] |
| | | public Dt_StockQuantityChangeRecord StockQuantityChangeRecord { get; set; } |
| | | |
| | | |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "æºä¸»é®")] |
| | | public int SourceId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "夿³¨")] |
| | | public string OperateType { get; set; } |
| | | /// <summary> |
| | | /// å建人 |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建人")] |
| | | [ExporterHeader(DisplayName = "å建人")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å建人")] |
| | | public string Creater { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建æ¶é´ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建æ¶é´")] |
| | | [ExporterHeader(DisplayName = "å建æ¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å建æ¶é´")] |
| | | public DateTime CreateDate { get; set; } = DateTime.Now; |
| | | |
| | | /// <summary> |
| | | /// æ´æ°è
|
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹äºº")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹äºº")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "ä¿®æ¹äºº")] |
| | | public string Modifier { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹æ¥æ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹æ¥æ")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹æ¥æ")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ä¿®æ¹æ¥æ")] |
| | | public DateTime? ModifyDate { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Magicodes.ExporterAndImporter.Core; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_StockInfo_Hty), "åºåä¿¡æ¯")] |
| | | public class Dt_StockInfo_Hty |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æçç¼å·")] |
| | | public string PalletCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "è´§ä½ç¼å·")] |
| | | public string LocationCode { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "æ¯å¦æ»¡ç", DefaultValue = "0")] |
| | | public bool IsFull { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåç¶æ")] |
| | | public int StockStatus { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "æºä¸»é®")] |
| | | public int SourceId { get; set; } |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "夿³¨")] |
| | | public string OperateType { get; set; } |
| | | /// <summary> |
| | | /// å建人 |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建人")] |
| | | [ExporterHeader(DisplayName = "å建人")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å建人")] |
| | | public string Creater { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建æ¶é´ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å建æ¶é´")] |
| | | [ExporterHeader(DisplayName = "å建æ¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å建æ¶é´")] |
| | | public DateTime CreateDate { get; set; } = DateTime.Now; |
| | | |
| | | /// <summary> |
| | | /// æ´æ°è
|
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹äºº")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹äºº")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "ä¿®æ¹äºº")] |
| | | public string Modifier { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹æ¥æ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä¿®æ¹æ¥æ")] |
| | | [ExporterHeader(DisplayName = "ä¿®æ¹æ¥æ")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "ä¿®æ¹æ¥æ")] |
| | | public DateTime? ModifyDate { get; set; } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ä»»å¡å·")] |
| | | [ExporterHeader(DisplayName = "ä»»å¡å·")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»»å¡å·"), SequenceAttirbute(nameof(SequenceEnum.SeqTaskNum), 6000)] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»»å¡å·"), SequenceAttirbute(nameof(SequenceEnum.SeqTaskNum), 999999999)] |
| | | public int TaskNum { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | public string NextAddress { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 深度 |
| | | /// </summary> |
| | | [ImporterHeader(Name = "深度")] |
| | | [ExporterHeader(DisplayName = "深度")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "深度")] |
| | | public int Depth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç¼å· |
| | | /// </summary> |
| | | [ImporterHeader(Name = "åæ®ç¼å·")] |
| | |
| | | public DateTime? Dispatchertime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 深度 |
| | | /// </summary> |
| | | [ImporterHeader(Name = "深度")] |
| | | [ExporterHeader(DisplayName = "深度")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "深度")] |
| | | public int Depth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "夿³¨")] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_OutboundRepository |
| | | { |
| | | public class OutboundOrderDetail_HtyRepository : RepositoryBase<Dt_OutboundOrderDetail_Hty>, IOutboundOrderDetail_HtyRepository |
| | | { |
| | | public OutboundOrderDetail_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_OutboundRepository |
| | | { |
| | | public class OutboundOrder_HtyRepository : RepositoryBase<Dt_OutboundOrder_Hty>, IOutboundOrder_HtyRepository |
| | | { |
| | | public OutboundOrder_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_StockRepository; |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | | public partial class OutboundOrderDetail_HtyService : ServiceBase<Dt_OutboundOrderDetail_Hty, IOutboundOrderDetail_HtyRepository>, IOutboundOrderDetail_HtyService |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | |
| | | private readonly IStockService _stockService; |
| | | private readonly IBasicService _basicService; |
| | | private readonly IRecordService _recordService; |
| | | private readonly IOutboundRepository _outboundRepository; |
| | | private readonly IOutStockLockInfoService _outStockLockInfoService; |
| | | |
| | | public IOutboundOrderDetail_HtyRepository Repository => BaseDal; |
| | | |
| | | public OutboundOrderDetail_HtyService(IOutboundOrderDetail_HtyRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IStockService stockService, IBasicService basicService, IRecordService recordService, IOutboundRepository outboundRepository, IOutStockLockInfoService outStockLockInfoService) : base(BaseDal) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _stockService = stockService; |
| | | _basicService = basicService; |
| | | _recordService = recordService; |
| | | _outboundRepository = outboundRepository; |
| | | _outStockLockInfoService = outStockLockInfoService; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Serialization; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core.Utilities; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.Outbound; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | | public partial class OutboundOrder_HtyService : ServiceBase<Dt_OutboundOrder_Hty, IOutboundOrder_HtyRepository>, IOutboundOrder_HtyService |
| | | { |
| | | private readonly IMapper _mapper; |
| | | private readonly IMaterielInfoService _materielInfoService; |
| | | private readonly IStockInfoService _stockService; |
| | | private readonly IStockInfoDetailService _stockDetailService; |
| | | |
| | | public IOutboundOrder_HtyRepository Repository => BaseDal; |
| | | |
| | | public OutboundOrder_HtyService(IOutboundOrder_HtyRepository BaseDal, IMapper mapper, IMaterielInfoService materielInfoService, IStockInfoDetailService stockDetailService, IStockInfoService stockInfoService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _materielInfoService = materielInfoService; |
| | | _stockDetailService = stockDetailService; |
| | | _stockService = stockInfoService; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StockRepository |
| | | { |
| | | public class StockInfoDetail_HtyRepository : RepositoryBase<Dt_StockInfoDetail_Hty>, IStockInfoDetail_HtyRepository |
| | | { |
| | | public StockInfoDetail_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Org.BouncyCastle.Crypto; |
| | | using SqlSugar; |
| | | using SqlSugar.Extensions; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StockRepository |
| | | { |
| | | public class StockInfo_HtyRepository : RepositoryBase<Dt_StockInfo_Hty>, IStockInfo_HtyRepository |
| | | { |
| | | public StockInfo_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StockService |
| | | { |
| | | public partial class StockInfoDetail_HtyService : ServiceBase<Dt_StockInfoDetail_Hty, IStockInfoDetail_HtyRepository>, IStockInfoDetail_HtyService |
| | | { |
| | | public StockInfoDetail_HtyService(IStockInfoDetail_HtyRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | public IStockInfoDetail_HtyRepository Repository => BaseDal; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IRecordRepository; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_StockService |
| | | { |
| | | public partial class StockInfo_HtyService : ServiceBase<Dt_StockInfo_Hty, IStockInfo_HtyRepository>, IStockInfo_HtyService |
| | | { |
| | | private readonly IMapper _mapper; |
| | | |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly IStockRepository _stockRepository; |
| | | private readonly IRecordService _recordService; |
| | | |
| | | public IStockInfo_HtyRepository Repository => BaseDal; |
| | | |
| | | public StockInfo_HtyService(IStockInfo_HtyRepository BaseDal, IMapper mapper, IBasicRepository basicRepository, IStockRepository stockRepository, IRecordService recordService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _basicRepository = basicRepository; |
| | | _stockRepository = stockRepository; |
| | | _recordService = recordService; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>(); |
| | | ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>(); |
| | | ISugarQueryable<Dt_StockInfoDetail> sugarQueryable2 = _dbBase.Queryable<Dt_StockInfoDetail>(); |
| | | |
| | | |
| | | List<StockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).WhereIF(!string.IsNullOrEmpty(where), where).Select((b, a) => new StockViewDTO |
| | | { |
| | |
| | | StockStatus = b.StockStatus, |
| | | Details = b.Details, |
| | | }).ToPageList(options.Page, options.Rows, ref totalCount); |
| | | |
| | | |
| | | return new PageGridData<StockViewDTO>(totalCount, list); |
| | | |
| | | } |
| | |
| | | int index = 0; |
| | | while (needQuantity > 0) |
| | | { |
| | | |
| | | Dt_StockInfo stockInfo = stockInfos[index]; |
| | | decimal useableStockQuantity = stockInfo.Details.Where(x => x.MaterielCode == materielCode).Sum(x => x.StockQuantity - x.OutboundQuantity); |
| | | if (useableStockQuantity < needQuantity) |
| | |
| | | public IStockInfoDetailService StockInfoDetailService { get; } |
| | | |
| | | public IStockInfoService StockInfoService { get; } |
| | | public IStockInfoDetail_HtyService StockInfoDetail_HtyService { get; } |
| | | |
| | | public StockSerivce(IStockInfoDetailService stockInfoDetailService, IStockInfoService stockInfoService) |
| | | public IStockInfo_HtyService StockInfo_HtyService { get; } |
| | | |
| | | public StockSerivce(IStockInfoDetailService stockInfoDetailService, IStockInfoService stockInfoService, IStockInfoDetail_HtyService stockInfoDetail_HtyService, IStockInfo_HtyService stockInfo_HtyService) |
| | | { |
| | | StockInfoDetailService = stockInfoDetailService; |
| | | StockInfoService = stockInfoService; |
| | | StockInfoDetail_HtyService = stockInfoDetail_HtyService; |
| | | StockInfo_HtyService = stockInfo_HtyService; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | public int GetTaskNum(string sequenceName) |
| | | { |
| | | //return Db.Ado.GetScalar($"SELECT NEXT VALUE FOR {sequenceName}").ObjToInt(); |
| | | return Db.Ado.GetScalar($"SELECT NEXT VALUE FOR GetTaskNum").ObjToInt(); |
| | | return Db.Ado.GetScalar($"SELECT NEXT VALUE FOR {sequenceName}").ObjToInt(); |
| | | } |
| | | |
| | | public override int AddData(Dt_Task entity) |
| | |
| | | SourceAddress = outTask.TargetAddress, |
| | | TargetAddress = cachePoint.PointCode, |
| | | SourceKey = outTask.TaskId, |
| | | TaskNum = outTask.TaskNum, |
| | | //TaskNum = outTask.TaskNum, |
| | | TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), |
| | | TaskStatus = AGVTaskStatusEnum.AGV_New.ObjToInt(), |
| | | TaskType = TaskTypeEnum.AGVCarry.ObjToInt(), |
| | | }; |
| | |
| | | endCachePoint.PointStatus = LocationStatusEnum.InStock.ObjToInt(); |
| | | _basicService.CachePointService.Repository.UpdateData(endCachePoint); |
| | | } |
| | | |
| | | BaseDal.DeleteData(task); |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | | //BaseDal.DeleteData(task); |
| | | |
| | | return new { code = 200, message = "æå" }; |
| | | } |
| | |
| | | BaseDal.AddData(task); |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | |
| | | locationInfo.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt(); |
| | | |
| | | |
| | | if (isUpdateStock) |
| | | { |
| | | locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateLocationLock(locationInfo,task.TaskNum); |
| | | _basicService.LocationInfoService.UpdateLocationLock(locationInfo, task.TaskNum, StockChangeType.Inbound.ObjToInt(), false); |
| | | |
| | | if (stockInfo != null && stockInfo.Details != null && stockInfo.Details.Count > 0) |
| | | { |
| | |
| | | return content = WebResponseContent.Instance.Error("æªæ¾å°åºåä¿¡æ¯"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | locationInfo.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateLocationLock(locationInfo, task.TaskNum, StockChangeType.Inbound.ObjToInt(), false); |
| | | } |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | //_basicService.LocationInfoService.Repository.UpdateData(dt_LocationInfo); |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), orderNo, task.TaskNum); |
| | | |
| | | return content = WebResponseContent.Instance.OK(); |
| | |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Core.Helper; |
| | | using Microsoft.AspNetCore.Http; |
| | | using System.Reflection.Metadata; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup; |
| | | |
| | | namespace WIDESEA_TaskInfoService |
| | | { |
| | |
| | | TargetAddress = roadwayInfo.OutStationCode, |
| | | TaskStatus = OutTaskStatusEnum.OutNew.ObjToInt(), |
| | | TaskType = TaskTypeEnum.Outbound.ObjToInt(), |
| | | Depth = locationInfo.Depth, |
| | | TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)) |
| | | }; |
| | | tasks.Add(task); |
| | |
| | | { |
| | | try |
| | | { |
| | | WebResponseContent content=new WebResponseContent(); |
| | | _unitOfWorkManage.BeginTran(); |
| | | //å¤æç§»åº |
| | | /*List<Dt_Task> RelocationTasks = */ |
| | | RelocationTask(tasks); |
| | | //BaseDal.AddData(RelocationTasks); |
| | | |
| | | BaseDal.AddData(tasks); |
| | | content=RelocationTasks(tasks.OrderBy(x=>x.Depth).ToList()); |
| | | if (content.Status) |
| | | { |
| | | _unitOfWorkManage.CommitTran(); |
| | | } |
| | | else |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return content; |
| | | } |
| | | //BaseDal.AddData(tasks); |
| | | if (stockInfos != null && outboundOrderDetails != null && outStockLockInfos != null && locationInfos != null) |
| | | { |
| | | WebResponseContent content = _outboundService.OutboundOrderDetailService.LockOutboundStockDataUpdate(stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos, tasks: tasks); |
| | | content = _outboundService.OutboundOrderDetailService.LockOutboundStockDataUpdate(stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos, tasks: tasks); |
| | | |
| | | if (content.Status) |
| | | { |
| | |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// ç§»åºä»»å¡ |
| | | /// </summary> |
| | | /// <param name="task"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent RelocationTask(List<Dt_Task> task) |
| | | public WebResponseContent RelocationTasks(List<Dt_Task> task) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | _unitOfWorkManage.BeginTran(); |
| | | for (int i = 0; i < task.Count; i++) |
| | | { |
| | | Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task[i].SourceAddress && x.RoadwayNo == task[i].Roadway); |
| | | if (locationInfo != null) |
| | | Dt_LocationInfo location = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task[i].SourceAddress && x.RoadwayNo == task[i].Roadway); |
| | | if (location != null) |
| | | { |
| | | Dt_LocationInfo location = _basicService.LocationInfoService.isDepth(locationInfo); |
| | | if (location != null) |
| | | //(Dt_LocationInfo?, int?) result = _basicService.LocationInfoService.isDepth(location); |
| | | (Dt_LocationInfo?, int?) result = isDepth(location); |
| | | if (result.Item1 != null &&result.Item2 != LocationStatusEnum.Lock.ObjToInt() && result.Item2 != LocationStatusEnum.PalletLock.ObjToInt() && result.Item2 != LocationStatusEnum.Free.ObjToInt()) |
| | | { |
| | | Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.LocationCode == location.LocationCode); |
| | | if (stockInfo != null && location.LocationStatus == LocationStatusEnum.InStock.ObjToInt()) |
| | | int sum = 0; |
| | | for (int j = 0; j < task.Count; j++) |
| | | { |
| | | Dt_LocationInfo? locationInfos = _basicService.LocationInfoService.AssignLocation(location.RoadwayNo); |
| | | if(locationInfos != null) |
| | | if (result.Item1.LocationCode == task[j].SourceAddress) |
| | | { |
| | | Dt_Task tasks = new() |
| | | { |
| | | CurrentAddress = location.LocationCode, |
| | | Grade = 0, |
| | | PalletCode = stockInfo.PalletCode, |
| | | NextAddress = locationInfos.LocationCode, |
| | | Roadway = location.RoadwayNo, |
| | | SourceAddress = location.LocationCode, |
| | | TargetAddress = locationInfos.LocationCode, |
| | | TaskStatus = InTaskStatusEnum.RelocationNew.ObjToInt(), |
| | | TaskType = TaskTypeEnum.Relocation.ObjToInt(), |
| | | TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)) |
| | | }; |
| | | BaseDal.AddData(tasks); |
| | | stockInfo.StockStatus = StockStatusEmun.ç§»åºéå®.ObjToInt(); |
| | | _stockService.StockInfoService.UpdateData(stockInfo); |
| | | _basicService.LocationInfoService.RelocationLock(location, locationInfos,tasks.TaskNum); |
| | | sum++; |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error("æªæ¾å°å¯åé
è´§ä½"); |
| | | } |
| | | } |
| | | if (sum == 0) |
| | | { |
| | | return content = RelocationTask(task[i]); |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error("æªæ¾å°åºåä¿¡æ¯"); |
| | | BaseDal.AddData(task[i]); |
| | | _basicService.LocationInfoService.UpdateLocationLock(location, task[i].TaskNum, StockChangeType.Outbound.ObjToInt(), true); |
| | | } |
| | | } |
| | | else if (result.Item1 == null && result.Item2 == LocationStatusEnum.Free.ObjToInt()) |
| | | { |
| | | BaseDal.AddData(task[i]); |
| | | location.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateData(location); |
| | | content = WebResponseContent.Instance.OK(); |
| | | } |
| | | else if (result.Item1 != null && result.Item2 == LocationStatusEnum.Free.ObjToInt()) |
| | | { |
| | | BaseDal.AddData(task[i]); |
| | | location.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateData(location); |
| | | _basicService.LocationInfoService.UpdateLocationLock(location, task[i].TaskNum, StockChangeType.Outbound.ObjToInt(), false); |
| | | content = WebResponseContent.Instance.OK(); |
| | | } |
| | | else if (result.Item1 != null && (result.Item2 == LocationStatusEnum.Lock.ObjToInt() || result.Item2 == LocationStatusEnum.PalletLock.ObjToInt())) |
| | | { |
| | | Dt_Task TaskInfo = BaseDal.QueryFirst(x => x.SourceAddress == result.Item1.LocationCode); |
| | | if (TaskInfo == null) |
| | | { |
| | | return content = WebResponseContent.Instance.Error("è´§ä½è¢«éå®ä¸å¯åºåº"); |
| | | } |
| | | else |
| | | { |
| | | BaseDal.AddData(task[i]); |
| | | location.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateData(location); |
| | | content = WebResponseContent.Instance.OK(); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error("ä»»å¡ä¿¡æ¯å¼å¸¸"); |
| | | return content = WebResponseContent.Instance.OK("ä»»å¡å¼å¸¸"); |
| | | } |
| | | |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | return content; |
| | | } |
| | | catch(Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return content = WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// ç§»åºä»»å¡ |
| | | /// </summary> |
| | | /// <param name="task"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent RelocationTask(Dt_Task task) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress && x.RoadwayNo == task.Roadway); |
| | | if (locationInfo != null) |
| | | { |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | //(Dt_LocationInfo?,int?) Result = _basicService.LocationInfoService.isDepth(locationInfo); |
| | | (Dt_LocationInfo?,int?) Result = isDepth(locationInfo); |
| | | if (Result.Item1 != null&& Result.Item2== LocationStatusEnum.InStock.ObjToInt()) |
| | | { |
| | | Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.LocationCode == Result.Item1.LocationCode); |
| | | Dt_StockInfoDetail stockInfoDetail = _stockService.StockInfoDetailService.Repository.QueryFirst(x => x.StockId==stockInfo.Id); |
| | | if (stockInfo != null&& stockInfoDetail != null) |
| | | { |
| | | (Dt_Task ?, Dt_LocationInfo ?) result= AddRelocationTask(Result.Item1, stockInfo, task); |
| | | if (result.Item1!=null&&result.Item2!=null) |
| | | { |
| | | _basicService.LocationInfoService.RelocationLock(Result.Item1, result.Item2, result.Item1.TaskNum); |
| | | locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateData(locationInfo); |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Relocation.ObjToInt(), "", task.TaskNum); |
| | | return content = WebResponseContent.Instance.OK(); |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error("ç§»åºä»»å¡çæå¤±è´¥"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error("æªæ¾å°åºåä¿¡æ¯"); |
| | | } |
| | | } |
| | | else if(Result.Item1 != null && Result.Item2 == LocationStatusEnum.Pallet.ObjToInt()) |
| | | { |
| | | Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.LocationCode == Result.Item1.LocationCode); |
| | | if (stockInfo != null) |
| | | { |
| | | (Dt_Task?, Dt_LocationInfo?) result = AddRelocationTask(Result.Item1, stockInfo, task); |
| | | if (result.Item1 != null && result.Item2 != null) |
| | | { |
| | | _basicService.LocationInfoService.RelocationLock(Result.Item1, result.Item2, result.Item1.TaskNum); |
| | | locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateData(locationInfo); |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Relocation.ObjToInt(), "", task.TaskNum); |
| | | return content = WebResponseContent.Instance.OK(); |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error("ç§»åºä»»å¡çæå¤±è´¥"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error("æªæ¾å°åºåä¿¡æ¯"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error("å¼å¸¸"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return content = WebResponseContent.Instance.Error("ä»»å¡ä¿¡æ¯å¼å¸¸"); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content = WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | |
| | | return content; |
| | | } |
| | | finally |
| | | { |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | public (Dt_Task?,Dt_LocationInfo?) AddRelocationTask(Dt_LocationInfo location,Dt_StockInfo stockInfo,Dt_Task task) |
| | | { |
| | | Dt_LocationInfo? locationInfos = _basicService.LocationInfoService.AssignLocation(location.RoadwayNo); |
| | | if (locationInfos != null) |
| | | { |
| | | Dt_Task tasks = new() |
| | | { |
| | | CurrentAddress = location.LocationCode, |
| | | Grade = 0, |
| | | PalletCode = stockInfo.PalletCode, |
| | | NextAddress = locationInfos.LocationCode, |
| | | Roadway = location.RoadwayNo, |
| | | SourceAddress = location.LocationCode, |
| | | TargetAddress = locationInfos.LocationCode, |
| | | TaskStatus = InTaskStatusEnum.RelocationNew.ObjToInt(), |
| | | TaskType = TaskTypeEnum.Relocation.ObjToInt(), |
| | | TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)) |
| | | }; |
| | | BaseDal.AddData(tasks); |
| | | BaseDal.AddData(task); |
| | | stockInfo.StockStatus = StockStatusEmun.ç§»åºéå®.ObjToInt(); |
| | | _stockService.StockInfoService.UpdateData(stockInfo); |
| | | } |
| | | return (task, locationInfos); |
| | | } |
| | | /// <summary> |
| | | /// çæåºåºä»»å¡ |
| | | /// </summary> |
| | |
| | | List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>(); |
| | | foreach (int key in keys) |
| | | { |
| | | |
| | | (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutboundOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) result = OutboundTaskDataHandle(key, stockSelectViews); |
| | | if (result.Item2 != null && result.Item2.Count > 0) |
| | | { |
| | |
| | | { |
| | | tasks.AddRange(result.Item1); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | WebResponseContent content = GenerateOutboundTaskDataUpdate(tasks, stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos); |
| | |
| | | TargetAddress = endStation, |
| | | TaskStatus = OutTaskStatusEnum.OutNew.ObjToInt(), |
| | | TaskType = TaskTypeEnum.PalletOutbound.ObjToInt(), |
| | | Depth = locationInfo.Depth, |
| | | TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)) |
| | | |
| | | }; |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | _unitOfWorkManage.BeginTran(); |
| | |
| | | BaseDal.AddData(task); |
| | | _stockService.StockInfoService.UpdateData(stockInfo); |
| | | |
| | | _basicService.LocationInfoService.UpdateLocationLock(locationInfo, task.TaskNum); |
| | | _basicService.LocationInfoService.UpdateData(locationInfo); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Relocation.ObjToInt(), "", task.TaskNum); |
| | | _basicService.LocationInfoService.UpdateLocationLock(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), false); |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Outbound.ObjToInt(), "", task.TaskNum); |
| | | |
| | | _unitOfWorkManage.CommitTran(); |
| | | return WebResponseContent.Instance.OK(); |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | public (Dt_LocationInfo?, int?) isDepth(Dt_LocationInfo locationInfo) |
| | | { |
| | | if (locationInfo.Depth == 2) |
| | | { |
| | | if (locationInfo.Row == 1 || locationInfo.Row == 5) |
| | | { |
| | | Dt_LocationInfo dt_LocationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo); |
| | | |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.InStock.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.InStock.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Free.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.Free.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Lock.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.Lock.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.PalletLock.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.PalletLock.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Pallet.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.Pallet.ObjToInt()); |
| | | } |
| | | } |
| | | else if (locationInfo.Row == 4 || locationInfo.Row == 8) |
| | | { |
| | | Dt_LocationInfo dt_LocationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.Row == locationInfo.Row + 1 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column && x.RoadwayNo == locationInfo.RoadwayNo); |
| | | |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.InStock.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.InStock.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Free.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.Free.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Lock.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.Lock.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.PalletLock.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.PalletLock.ObjToInt()); |
| | | } |
| | | if (dt_LocationInfo != null && dt_LocationInfo.LocationStatus == LocationStatusEnum.Pallet.ObjToInt()) |
| | | { |
| | | return (dt_LocationInfo, LocationStatusEnum.Pallet.ObjToInt()); |
| | | } |
| | | } |
| | | } |
| | | return (null, LocationStatusEnum.Free.ObjToInt()); |
| | | } |
| | | } |
| | | } |
| | |
| | | stockInfo.LocationCode = locationInfo.LocationCode; |
| | | stockInfo.StockStatus = StockStatusEmun.å·²å
¥åº.ObjToInt(); |
| | | _stockService.StockInfoService.Repository.UpdateData(stockInfo); |
| | | |
| | | beforeQuantity = stockInfo.Details.Where(x => x.Id != 0).Sum(x => x.StockQuantity); |
| | | |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum); |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Inbound.ObjToInt(),false); |
| | | |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | task.TaskStatus = InTaskStatusEnum.InFinish.ObjToInt(); |
| | | |
| | |
| | | |
| | | CheckCompleted(stockInfo, locationInfo); |
| | | |
| | | |
| | | _stockService.StockInfoService.Repository.AddData(stockInfo); |
| | | |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | locationInfo.LocationStatus = LocationStatusEnum.Pallet.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum); |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Inbound.ObjToInt(), false); |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | |
| | | task.TaskStatus = InTaskStatusEnum.InFinish.ObjToInt(); |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), "", task.TaskNum); |
| | | |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | |
| | | |
| | | public WebResponseContent OutboundTaskCompleted(Dt_Task task) |
| | | { |
| | | decimal beforeQuantity = 0; |
| | | Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(task.PalletCode); |
| | | |
| | | Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress); |
| | |
| | | stockInfo.LocationCode = locationInfo.LocationCode; |
| | | stockInfo.StockStatus = StockStatusEmun.åºåºå®æ.ObjToInt(); |
| | | _stockService.StockInfoService.Repository.UpdateData(stockInfo); |
| | | |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum); |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | if (task.Depth == 1) |
| | | { |
| | | if (DepthTask(task)) { } |
| | | else |
| | | { |
| | | locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), false); |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), false); |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | } |
| | | |
| | | task.TaskStatus = OutTaskStatusEnum.OutFinish.ObjToInt(); |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | | _stockService.StockInfoService.Repository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | | _stockService.StockInfoDetailService.Repository.DeleteAndMoveIntoHty(stockInfo.Details, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum); |
| | | beforeQuantity = stockInfo.Details.Where(x => x.Id != 0).Sum(x => x.StockQuantity); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Outbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum); |
| | | _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, beforeQuantity, stockInfo.Details.Sum(x => x.StockQuantity) - beforeQuantity, StockChangeType.Outbound); |
| | | |
| | | |
| | | return OnOutboundTaskCompleted?.Invoke(task) ?? WebResponseContent.Instance.OK(); |
| | | } |
| | |
| | | _stockService.StockInfoService.Repository.DeleteData(stockInfo); |
| | | |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | |
| | | locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum); |
| | | _basicService.LocationInfoService.UpdateLocationFree(locationInfo, task.TaskNum, StockChangeType.Outbound.ObjToInt(), false); |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | |
| | | |
| | | task.TaskStatus = OutTaskStatusEnum.OutFinish.ObjToInt(); |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum); |
| | | _stockService.StockInfoService.Repository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Outbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | |
| | | { |
| | | Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(task.PalletCode); |
| | | |
| | | Dt_LocationInfo locationStart = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress); |
| | | Dt_LocationInfo locationEnd = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress); |
| | | |
| | | CheckCompleted(stockInfo, locationStart); |
| | | CheckCompleted(stockInfo, locationEnd); |
| | | |
| | | stockInfo.LocationCode = locationEnd.LocationCode; |
| | | stockInfo.StockStatus = StockStatusEmun.å·²å
¥åº.ObjToInt(); |
| | | _stockService.StockInfoService.Repository.UpdateData(stockInfo); |
| | | |
| | | |
| | | //locationStart.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | _basicService.LocationInfoService.RelocationFree(locationStart, locationEnd, task.TaskNum); |
| | | //_basicService.LocationInfoService.Repository.UpdateData(locationStart); |
| | | |
| | | _basicService.LocationInfoService.RelocationFree(locationEnd, task.TaskNum); |
| | | |
| | | task.TaskStatus = InTaskStatusEnum.RelocationFinish.ObjToInt(); |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | public bool DepthTask(Dt_Task task) |
| | | { |
| | | Dt_LocationInfo location=_locationInfoService.Repository.QueryFirst(x=>x.LocationCode == task.SourceAddress); |
| | | if(location != null) |
| | | { |
| | | if(location.Row%2==0) |
| | | { |
| | | Dt_LocationInfo locations = _locationInfoService.Repository.QueryFirst(x => x.Row == location.Row + 1 && x.Layer == location.Layer && x.Column == location.Column && x.RoadwayNo == location.RoadwayNo); |
| | | Dt_Task tasks=BaseDal.QueryFirst(x=>x.SourceAddress == locations.LocationCode); |
| | | return tasks != null ? true : false; |
| | | } |
| | | else |
| | | { |
| | | Dt_LocationInfo locations = _locationInfoService.Repository.QueryFirst(x => x.Row == location.Row - 1 && x.Layer == location.Layer && x.Column == location.Column && x.RoadwayNo == location.RoadwayNo); |
| | | Dt_Task tasks = BaseDal.QueryFirst(x => x.SourceAddress == locations.LocationCode); |
| | | return tasks != null ? true : false; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | |
| | | List<LocationGroupDTO> locations = _repository.GetLocationGroups(roadway, locationAStatus, locationBStatus); |
| | | return locations; |
| | | } |
| | | [HttpPost, Route("LocationEnableStatus")] |
| | | public WebResponseContent LocationEnableStatus(int[] keys) |
| | | { |
| | | return Service.LocationEnableStatus(keys); ; |
| | | } |
| | | [HttpPost, Route("LocationDisableStatus")] |
| | | public WebResponseContent LocationDisableStatus(int[] keys) |
| | | { |
| | | return Service.LocationDisableStatus(keys); ; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | [HttpPost, Route("GenerateOutboundTask")] |
| | | public WebResponseContent GenerateOutboundTask(int id, List<StockSelectViewDTO> stockSelectViews) |
| | | public WebResponseContent GenerateOutboundTask(int id, [FromBody] List<StockSelectViewDTO> stockSelectViews) |
| | | { |
| | | return Service.GenerateOutboundTask(id, stockSelectViews); |
| | | } |
| | |
| | | { |
| | | return Service.GenerateOutboundTask(keys); |
| | | } |
| | | [HttpPost, Route("PalletOutboundTask")] |
| | | public WebResponseContent PalletOutboundTask(string roadwayNo, string endStation) |
| | | { |
| | | return Service.PalletOutboundTask(roadwayNo, endStation); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | builder.Services.AddAllOptionRegister();//读åé
ç½®æä»¶ |
| | | builder.Services.AddMemoryCacheSetup();//ç¼å |
| | | builder.Services.AddSqlsugarSetup();//SqlSugar å¯å¨æå¡ |
| | | builder.Services.AddInitializationHostServiceSetup();//åºç¨åå§åæå¡æ³¨å
¥ |
| | | //builder.Services.AddInitializationHostServiceSetup();//åºç¨åå§åæå¡æ³¨å
¥ |
| | | builder.Services.AddDbSetup();//Db å¯å¨æå¡ |
| | | |
| | | builder.Services.AddAutoMapperSetup(); |