已删除3个文件
已修改25个文件
已重命名3个文件
已添加3个文件
| | |
| | | window.webConfig = { |
| | | "webApiBaseUrl": "http://192.168.10.88:8099/", |
| | | "webApiBaseUrl": "http://127.0.0.1:8099/", |
| | | "webApiProduction":"http://192.168.10.88:8099/" |
| | | } |
| | |
| | | WebResponseContent Save(Sys_Menu menu); |
| | | |
| | | WebResponseContent DelMenu(int menuId); |
| | | object GetMenuActionList(int roleId); |
| | | } |
| | | } |
| | |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" /> |
| | | <PackageReference Include="WIDESEAWCS_Core" Version="1.0.10" /> |
| | | <PackageReference Include="WIDESEAWCS_Core" Version="1.0.19" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | |
| | | { |
| | | DeviceName = item.DeviceName, |
| | | DeviceCode = childDeviceCode, |
| | | DeviceStatus = Device.inRead == 1 ? "å¨çº¿" : "离线", |
| | | DeviceStatus = Device.inRead == 1 ? "å¯å" : "ä¸å¯å", |
| | | DeviceMachine = GetMachine(Device.Status), |
| | | TaskID = Device.TaskNum, |
| | | Err_Status = GetSpec(Device.Spec) |
| | |
| | | <Project> |
| | | <PropertyGroup> |
| | | <_PublishTargetUrl>E:\IISText\èæ¹ä¸ä¸\WCS</_PublishTargetUrl> |
| | | <History>True|2025-04-21T09:54:03.6534614Z;True|2025-04-19T10:28:25.0898569+08:00;True|2025-04-17T14:04:50.3243452+08:00;True|2025-03-27T16:23:43.2657011+08:00;True|2025-03-25T12:01:47.0052741+08:00;True|2025-02-14T17:36:18.5767695+08:00;True|2025-02-14T14:39:49.5856199+08:00;</History> |
| | | <History>True|2025-04-27T11:58:33.9706872Z;True|2025-04-27T14:52:52.9853720+08:00;True|2025-04-21T17:54:03.6534614+08:00;True|2025-04-19T10:28:25.0898569+08:00;True|2025-04-17T14:04:50.3243452+08:00;True|2025-03-27T16:23:43.2657011+08:00;True|2025-03-25T12:01:47.0052741+08:00;True|2025-02-14T17:36:18.5767695+08:00;True|2025-02-14T14:39:49.5856199+08:00;</History> |
| | | <LastFailureDetails /> |
| | | </PropertyGroup> |
| | | </Project> |
| | |
| | | if (App.User.RoleId == RoleId) return WebResponseContent.Instance.Error("æ æä½æé"); |
| | | return base.UpdateData(saveModel); |
| | | } |
| | | public override PageGridData<Sys_Role> GetPageData(PageDataOptions options) |
| | | { |
| | | PageGridData<Sys_Role> pageGridData = new PageGridData<Sys_Role>(); |
| | | if (App.User.IsSuperAdmin) |
| | | { |
| | | var GridData = base.GetPageData(options); |
| | | pageGridData = new PageGridData<Sys_Role>() |
| | | { |
| | | Rows = options.Order?.ToLower() == OrderByType.Asc.ToString().ToLower() ? GridData.Rows.OrderBy(x => x.RoleId).ToList() : GridData.Rows, |
| | | Total = GridData.Total |
| | | }; |
| | | return pageGridData; |
| | | } |
| | | //public override PageGridData<Sys_Role> GetPageData(PageDataOptions options) |
| | | //{ |
| | | // PageGridData<Sys_Role> pageGridData = new PageGridData<Sys_Role>(); |
| | | // if (App.User.IsSuperAdmin) |
| | | // { |
| | | // var GridData = base.GetPageData(options); |
| | | // pageGridData = new PageGridData<Sys_Role>() |
| | | // { |
| | | // Rows = options.Order?.ToLower() == OrderByType.Asc.ToString().ToLower() ? GridData.Rows.OrderBy(x => x.RoleId).ToList() : GridData.Rows, |
| | | // Total = GridData.Total |
| | | // }; |
| | | // return pageGridData; |
| | | // } |
| | | |
| | | var roleIds = GetAllChildren(App.User.RoleId).Select(x => x.Id); |
| | | //æ å½¢èåä¼ æ¥è¯¢è§è²ä¸ææç¨æ· |
| | | string where = ValidatePageOptions(options); |
| | | // var roleIds = GetAllChildren(App.User.RoleId).Select(x => x.Id); |
| | | // //æ å½¢èåä¼ æ¥è¯¢è§è²ä¸ææç¨æ· |
| | | // string where = ValidatePageOptions(options); |
| | | |
| | | int total = 0; |
| | | pageGridData = new PageGridData<Sys_Role>() |
| | | { |
| | | Rows = BaseDal.Db.Queryable<Sys_Role>().Where(x => roleIds.Contains(x.RoleId)).Where(where).OrderBy(x => x.RoleId).ToPageList(options.Page, options.Rows), |
| | | Total = total |
| | | }; |
| | | // int total = 0; |
| | | // pageGridData = new PageGridData<Sys_Role>() |
| | | // { |
| | | // Rows = BaseDal.Db.Queryable<Sys_Role>().Where(x => roleIds.Contains(x.RoleId)).Where(where).OrderBy(x => x.RoleId).ToPageList(options.Page, options.Rows), |
| | | // Total = total |
| | | // }; |
| | | |
| | | return pageGridData; |
| | | } |
| | | // return pageGridData; |
| | | //} |
| | | /// <summary> |
| | | /// ç¼è¾æéæ¶ï¼è·åæå®è§è²çææèåæé |
| | | /// </summary> |
| | |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly ICacheService _cacheService; |
| | | private readonly ISys_MenuService _menuService; |
| | | private readonly ISys_RoleService _sys_RoleService; |
| | | public Sys_UserService(ISys_UserRepository repository, IUnitOfWorkManage unitOfWorkManage, ICacheService cacheService, ISys_RoleService sys_RoleService) : base(repository) |
| | | public Sys_UserService(ISys_UserRepository repository, IUnitOfWorkManage unitOfWorkManage, ICacheService cacheService, ISys_RoleService sys_RoleService, ISys_MenuService menuService) : base(repository) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _cacheService = cacheService; |
| | | _sys_RoleService = sys_RoleService; |
| | | _menuService = menuService; |
| | | } |
| | | public override PageGridData<Sys_User> GetPageData(PageDataOptions options) |
| | | { |
| | | var roleIds = _sys_RoleService.GetAllChildren(App.User.RoleId).Select(x => x.Id); |
| | | PageGridData<Sys_User> pageGridData = new PageGridData<Sys_User>(); |
| | | //æ å½¢èåä¼ æ¥è¯¢è§è²ä¸ææç¨æ· |
| | | if (App.User.IsSuperAdmin) |
| | | { |
| | | var GridData = base.GetPageData(options); |
| | | pageGridData = new PageGridData<Sys_User>() |
| | | { |
| | | Rows = options.Order?.ToLower() == "asc" ? GridData.Rows.OrderBy(x => x.Role_Id).ToList() : GridData.Rows, |
| | | Total = GridData.Total |
| | | }; |
| | | return pageGridData; |
| | | } |
| | | string where = ValidatePageOptions(options); |
| | | var a = BaseDal.Db.Queryable<Sys_User>().Where(x => roleIds.Contains(x.Role_Id)).Where(where); |
| | | int total = 0; |
| | | pageGridData = new PageGridData<Sys_User>() |
| | | { |
| | | Rows = BaseDal.Db.Queryable<Sys_User>().Where(x => roleIds.Contains(x.Role_Id)).Where(where).ToPageList(options.Page, options.Rows), |
| | | Total = total |
| | | }; |
| | | //public override PageGridData<Sys_User> GetPageData(PageDataOptions options) |
| | | //{ |
| | | // var roleIds = _sys_RoleService.GetAllChildren(App.User.RoleId).Select(x => x.Id); |
| | | // PageGridData<Sys_User> pageGridData = new PageGridData<Sys_User>(); |
| | | // //æ å½¢èåä¼ æ¥è¯¢è§è²ä¸ææç¨æ· |
| | | // if (App.User.IsSuperAdmin) |
| | | // { |
| | | // var GridData = base.GetPageData(options); |
| | | // pageGridData = new PageGridData<Sys_User>() |
| | | // { |
| | | // Rows = options.Order?.ToLower() == "asc" ? GridData.Rows.OrderBy(x => x.Role_Id).ToList() : GridData.Rows, |
| | | // Total = GridData.Total |
| | | // }; |
| | | // return pageGridData; |
| | | // } |
| | | // string where = ValidatePageOptions(options); |
| | | // var a = BaseDal.Db.Queryable<Sys_User>().Where(x => roleIds.Contains(x.Role_Id)).Where(where); |
| | | // int total = 0; |
| | | // pageGridData = new PageGridData<Sys_User>() |
| | | // { |
| | | // Rows = BaseDal.Db.Queryable<Sys_User>().Where(x => roleIds.Contains(x.Role_Id)).Where(where).ToPageList(options.Page, options.Rows), |
| | | // Total = total |
| | | // }; |
| | | |
| | | return pageGridData; |
| | | } |
| | | // return pageGridData; |
| | | //} |
| | | public WebResponseContent Login(LoginInfo loginInfo) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | |
| | | UserInfo user = BaseDal.GetUserInfo(loginInfo.UserName, loginInfo.Password); |
| | | if (user != null) |
| | | { |
| | | object obj = _menuService.GetMenuActionList(user.RoleId); |
| | | #region 夿å½åç¨æ·æ¯å¦å¯ç¨ |
| | | if (BaseDal.QueryFirst(x => x.User_Id == user.UserId, s => s.Enable) != 1) throw new Exception($"è´¦å·{user.UserName}ç¦æ¢ä½¿ç¨,请è系管çå"); |
| | | #endregion |
| | |
| | | window.webConfig = { |
| | | "webApiBaseUrl": "http://192.168.10.88:8098/", |
| | | "webApiBaseUrl": "http://127.0.0.1:8098/", |
| | | "webApiProduction":"http://192.168.10.88:8098/" |
| | | } |
| | |
| | | return this.$error("æå·ä¸è½ä¸ºç©º"); |
| | | } |
| | | }) |
| | | if (formData.detailData.length > 3) return this.$error("å
¥åºåæç»ä¸è½è¶
è¿3个"); |
| | | // if (formData.detailData.length > 3) return this.$error("å
¥åºåæç»ä¸è½è¶
è¿3个"); |
| | | return req; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | // this.$error(formData.detailData.length) |
| | | if (formData.detailData.length > 3) return this.$error("å
¥åºåæç»ä¸è½è¶
è¿3个"); |
| | | // if (formData.detailData.length > 3) return this.$error("å
¥åºåæç»ä¸è½è¶
è¿3个"); |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | if (this.currentAction == 'Add') { |
| | | let locationCodes=this.getOption("locationCode"); |
| | | locationCodes.bind.data.splice(0); |
| | | this.http.post("/api/LocationInfo/GetLocationCodes", null, true).then( |
| | | source => { |
| | | if (!source.status) return this.$error(source.message); |
| | | for (let i = 0; i < source.data.length; i++) { |
| | | locationCodes.bind.data.push({ key: source.data[i], value: source.data[i] }); |
| | | } |
| | | this.refresh(); |
| | | }) |
| | | let locationCodes = this.getOption("locationCode"); |
| | | locationCodes.bind.data.splice(0); |
| | | this.http.post("/api/LocationInfo/GetLocationCodes", null, true).then( |
| | | source => { |
| | | if (!source.status) return this.$error(source.message); |
| | | for (let i = 0; i < source.data.length; i++) { |
| | | locationCodes.bind.data.push({ key: source.data[i], value: source.data[i] }); |
| | | } |
| | | this.refresh(); |
| | | }) |
| | | this.editFormOptions.forEach(x => { |
| | | x.forEach(option => { |
| | | if (option.field == 'orderNo' || option.field == 'orderType') { |
| | | option.readonly = false |
| | | } |
| | | }) |
| | | }) |
| | | this.detailOptions.columns.forEach(x => { |
| | | if (x.field == 'materielCode' || x.field == 'batchNo' || x.field == 'orderQuantity' || x.field == 'locationCode') { |
| | | x.readonly = false |
| | | } |
| | | }); |
| | | } else { |
| | | this.detailOptions.columns.forEach(x => { |
| | | if (x.field == 'materielCode' || x.field == 'batchNo' || x.field == 'orderQuantity' || x.field == 'locationCode') { |
| | | x.readonly = true// row.orderStatus > 0 |
| | | } |
| | | }); |
| | | this.editFormOptions.forEach(x => { |
| | | x.forEach(option => { |
| | | if (option.field == 'orderNo' || option.field == 'orderType') { |
| | | option.readonly = true |
| | | } |
| | | }) |
| | | }) |
| | | // this.detailOptions.columns.forEach(x => { |
| | | // if (x.field == 'materielCode' || x.field == 'batchNo' || x.field == 'orderQuantity' || x.field == 'locationCode') { |
| | | // x.readonly = true// row.orderStatus > 0 |
| | | // } |
| | | // }); |
| | | } |
| | | // if (row.orderStatus != '0') { |
| | | // this.detailOptions.columns.forEach(x => { |
| | |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | //æ©å±é¡µé¢åå§åæä½ |
| | | this.columns.push({ |
| | | field: 'æä½', |
| | | title: 'æä½', |
| | | width: 90, |
| | | fixed: 'right', |
| | | align: 'center', |
| | | formatter: (row) => { |
| | | return ( |
| | | '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æ¥çæç»</i>' |
| | | ); |
| | | }, |
| | | click: (row) => { |
| | | this.$refs.gridBody.open(row); |
| | | } |
| | | }); |
| | | // this.columns.push({ |
| | | // field: 'æä½', |
| | | // title: 'æä½', |
| | | // width: 90, |
| | | // fixed: 'right', |
| | | // align: 'center', |
| | | // formatter: (row) => { |
| | | // return ( |
| | | // '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æ¥çæç»</i>' |
| | | // ); |
| | | // }, |
| | | // click: (row) => { |
| | | // this.$refs.gridBody.open(row); |
| | | // } |
| | | // }); |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/outbound/outboundOrder.js"; |
| | | import extend from "@/extension/outbound/outboundOrder_hty.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | |
| | | devicePlcType: "", |
| | | deviceRemark: "", |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { |
| | | title: "设å¤ç¼å·", |
| | | required: true, |
| | | field: "deviceCode", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "设å¤åç§°", |
| | | required: true, |
| | | field: "deviceName", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "设å¤ç±»å", |
| | | required: true, |
| | | field: "deviceType", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "设å¤ç¶æ", |
| | | required: true, |
| | | field: "deviceStatus", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | [ |
| | | { title: "设å¤IP", required: true, field: "deviceIp", type: "string" }, |
| | | { |
| | | title: "设å¤ç«¯å£", |
| | | required: true, |
| | | field: "devicePort", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "PLCç±»å", |
| | | required: true, |
| | | field: "devicePlcType", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "夿³¨", |
| | | field: "deviceRemark", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | ]); |
| | | const editFormOptions = ref([]); |
| | | const searchFormFields = ref({ |
| | | deviceCode: "", |
| | | deviceType: "", |
| | |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "æçç¼å·", field: "palletCode",type:"like" }, |
| | | { title: "è´§ä½ç¼å·", field: "locationCode",type:"like" }, |
| | | { title: "æçç¼å·", field: "palletCode", type: "like" }, |
| | | { title: "è´§ä½ç¼å·", field: "locationCode", type: "like" }, |
| | | { |
| | | title: "åºåç¶æ", |
| | | field: "stockStatus", |
| | |
| | | devicePlcType: "", |
| | | deviceRemark: "", |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { |
| | | title: "设å¤ç¼å·", |
| | | required: true, |
| | | field: "deviceCode", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "设å¤åç§°", |
| | | required: true, |
| | | field: "deviceName", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "设å¤ç±»å", |
| | | required: true, |
| | | field: "deviceType", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "设å¤ç¶æ", |
| | | required: true, |
| | | field: "deviceStatus", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | [ |
| | | { title: "设å¤IP", required: true, field: "deviceIp", type: "string" }, |
| | | { |
| | | title: "设å¤ç«¯å£", |
| | | required: true, |
| | | field: "devicePort", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "PLCç±»å", |
| | | required: true, |
| | | field: "devicePlcType", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "夿³¨", |
| | | field: "deviceRemark", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | ]); |
| | | const editFormOptions = ref([]); |
| | | const searchFormFields = ref({ |
| | | orderNo: "", |
| | | batchNo: "", |
| | |
| | | [ |
| | | // { title: "æ¹æ¬¡å·", field: "batchNo" }, |
| | | { |
| | | title: "æ¹æ¬¡å·", |
| | | field: "batchNo", |
| | | title: "æ¹å·", |
| | | field: "orderNo", |
| | | type: "select", |
| | | dataKey: "StockbatchNos", |
| | | data: [], |
| | | }, |
| | | { |
| | | title: "åºåæç»ç¶æ", |
| | | field: "status", |
| | | type: "select", |
| | | dataKey: "stockStatusEmun", |
| | | data: [], |
| | | title: "æå·", |
| | | field: "batchNo", |
| | | type: "like", |
| | | }, |
| | | // { |
| | | // title: "åºåæç»ç¶æ", |
| | | // field: "status", |
| | | // type: "select", |
| | | // dataKey: "stockStatusEmun", |
| | | // data: [], |
| | | // }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | |
| | | }, |
| | | { |
| | | field: "orderNo", |
| | | title: "åæ®ç¼å·", |
| | | title: "æ¹å·", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "batchNo", |
| | | title: "æ¹æ¬¡å·", |
| | | title: "æå·", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | |
| | | if (!content.Status) |
| | | throw new Exception(content.Message); |
| | | } |
| | | |
| | | |
| | | BaseDal.Db.InsertNav(inboundOrder).Include(x => x.Details).ExecuteCommand(); |
| | | Db.Ado.CommitTran(); |
| | | content = WebResponseContent.Instance.OK(); |
| | |
| | | { |
| | | if (saveModel.DetailData == null || saveModel.DetailData.Count == 0) throw new Exception($"å
¥åºåæç»ä¸è½ä¸ºç©º"); |
| | | List<InboundOrderDetailAddDTO> inboundOrderDetail = saveModel.DetailData.DicToIEnumerable<InboundOrderDetailAddDTO>(); |
| | | if (inboundOrderDetail.FirstOrDefault(x => x.OrderDetailStatus > 0) != null) throw new Exception($"订åå·²å¼å§ç»çå
¥åº"); |
| | | var inboundOrderDetails = _inboundOrderDetailService.Db.Queryable<Dt_InboundOrderDetail>().Where(x => saveModel.DelKeys.Contains(x.Id)).ToList(); |
| | | if (inboundOrderDetails.Count > 0) |
| | | { |
| | | if (inboundOrderDetails.FirstOrDefault(x => x.OrderDetailStatus != OrderDetailStatusEnum.New.ObjToInt()) != null) |
| | | throw new Exception($"åå¨å·²ç»çå·¥åï¼å·²å
è§£ç"); |
| | | } |
| | | //if (inboundOrderDetail.FirstOrDefault(x => x.OrderDetailStatus > 0) != null) throw new Exception($"订åå·²å¼å§ç»çå
¥åº"); |
| | | //var inboundOrderDetails = _inboundOrderDetailService.Db.Queryable<Dt_InboundOrderDetail>().Where(x => saveModel.DelKeys.Contains(x.Id)).ToList(); |
| | | //if (inboundOrderDetails.Count > 0) |
| | | //{ |
| | | // if (inboundOrderDetails.FirstOrDefault(x => x.OrderDetailStatus != OrderDetailStatusEnum.New.ObjToInt()) != null) |
| | | // throw new Exception($"åå¨å·²ç»çå·¥åï¼å·²å
è§£ç"); |
| | | //} |
| | | content = base.UpdateData(saveModel); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | var inboundOrders = BaseDal.QueryData(x => keys.Contains(x.Id)); |
| | | if (inboundOrders.FirstOrDefault(x => x.OrderStatus != InboundStatusEnum.æªå¼å§.ObjToInt()) != null) |
| | | throw new Exception($"å
¥åºååå¨ç»çå
¥åºä¿¡æ¯"); |
| | | foreach (var inboundOrder in inboundOrders) |
| | | //var inboundOrders = BaseDal.QueryData(x => keys.Contains(x.Id)); |
| | | var inboundOrders = BaseDal.Db.Queryable<Dt_InboundOrder>().Includes(x => x.Details).Where(x => keys.Contains(x.Id)).ToList(); |
| | | if (inboundOrders.Count < 1) throw new Exception("æªæ¾å°å
¥åºå"); |
| | | List<Dt_InboundOrderDetail> orderDetails = new List<Dt_InboundOrderDetail>(); |
| | | foreach (var item in inboundOrders) |
| | | { |
| | | var inboundOrderDetails = BaseDal.Db.Queryable<Dt_InboundOrder>().Includes(x => x.Details).First(x => x.OrderNo == inboundOrder.OrderNo).Details; |
| | | if (inboundOrderDetails != null || inboundOrderDetails.Count > 0) |
| | | { |
| | | if (inboundOrderDetails.FirstOrDefault(x => x.OrderDetailStatus != OrderDetailStatusEnum.New.ObjToInt()) != null) |
| | | throw new Exception($"å
¥åºåã{inboundOrder.OrderNo}ãåå¨ç»çå
¥åºä¿¡æ¯"); |
| | | } |
| | | if (item.Details.Where(x => x.ReceiptQuantity != x.OverInQuantity).Any()) |
| | | throw new Exception("å卿ªå
¥åºå®ææç"); |
| | | orderDetails.AddRange(item.Details); |
| | | item.Details = null; |
| | | } |
| | | content = base.DeleteData(keys); |
| | | BaseDal.DeleteAndMoveIntoHty(inboundOrders, OperateType.人工å é¤); |
| | | content.Status = _inboundOrderDetailService.Repository.DeleteAndMoveIntoHty(orderDetails, OperateType.人工å é¤); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | return (false, "æç©æä¿¡æ¯æªå½å
¥ï¼è¯·å½å
¥ç©æä¿¡æ¯", inboundOrderAddDTO); |
| | | } |
| | | |
| | | if (BaseDal.QueryFirst(x => x.UpperOrderNo == inboundOrderAddDTO.UpperOrderNo && !string.IsNullOrEmpty(x.UpperOrderNo)) != null) |
| | | if (BaseDal.QueryFirst(x => x.OrderNo == inboundOrderAddDTO.orderNo && !string.IsNullOrEmpty(x.OrderNo)) != null) |
| | | { |
| | | return (false, "忮已åå¨", inboundOrderAddDTO); |
| | | } |
| | |
| | | [ExporterHeader(DisplayName = "ç§»å
¥å岿¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç§»å
¥å岿¶é´")] |
| | | public DateTime InsertTime { get; set; } |
| | | |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_OutboundOrderDetail_Hty.OrderId), nameof(SourceId))] |
| | | public new List<Dt_OutboundOrderDetail_Hty> Details { get; set; } |
| | | } |
| | | } |
| | |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly ITaskRepository _taskRepository; |
| | | private readonly IOutboundOrderDetailRepository _outboundOrderDetailRepository; |
| | | private readonly SqlSugarClient _dbBase; |
| | | |
| | | public IOutboundOrderRepository Repository => BaseDal; |
| | | |
| | | public OutboundOrderService(IOutboundOrderRepository BaseDal, IBasicRepository basicRepository, IMapper mapper, IMaterielInfoService materielInfoService, IStockInfoDetailService stockDetailService, IStockInfoService stockInfoService, IUnitOfWorkManage unitOfWorkManage,ITaskRepository taskRepository) : base(BaseDal) |
| | | public OutboundOrderService(IOutboundOrderRepository BaseDal, IBasicRepository basicRepository, IMapper mapper, IMaterielInfoService materielInfoService, IStockInfoDetailService stockDetailService, IStockInfoService stockInfoService, IUnitOfWorkManage unitOfWorkManage, ITaskRepository taskRepository, IOutboundOrderDetailRepository outboundOrderDetailRepository) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _materielInfoService = materielInfoService; |
| | |
| | | _stockService = stockInfoService; |
| | | _dbBase = unitOfWorkManage.GetDbClient(); |
| | | _taskRepository = taskRepository; |
| | | _outboundOrderDetailRepository = outboundOrderDetailRepository; |
| | | } |
| | | |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | |
| | | } |
| | | saveModel.DetailData = dics; |
| | | return base.UpdateData(saveModel); |
| | | } |
| | | |
| | | public override WebResponseContent DeleteData(object[] keys) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | List<Dt_OutboundOrder> _OutboundOrders = BaseDal.Db.Queryable<Dt_OutboundOrder>().Includes(x => x.Details).Where(x => keys.Contains(x.Id)).ToList(); |
| | | if (_OutboundOrders.Count < 1) throw new Exception("æªæ¾å°åºåºå"); |
| | | List<Dt_OutboundOrderDetail> orderDetails = new List<Dt_OutboundOrderDetail>(); |
| | | foreach (var item in _OutboundOrders) |
| | | { |
| | | if (item.Details.Where(x => x.LockQuantity != x.OverOutQuantity).Any()) |
| | | throw new Exception("å卿ªåºåºå®ææç"); |
| | | orderDetails.AddRange(item.Details); |
| | | item.Details = null; |
| | | } |
| | | BaseDal.DeleteAndMoveIntoHty(_OutboundOrders, OperateType.人工å é¤); |
| | | content.Status = _outboundOrderDetailRepository.DeleteAndMoveIntoHty(orderDetails, OperateType.人工å é¤); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | public WebResponseContent AddOutboundOrder(OutboundOrderAddDTO orderAddDTO) |
| | |
| | | return (false, "忮已åå¨", outboundOrderAddDTO); |
| | | } |
| | | return (true, "æå", outboundOrderAddDTO); |
| | | } |
| | | |
| | | public WebResponseContent ReleaseOutOrder(int orderId) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | } |
| | |
| | | Dt_InboundOrder inboundOrder = _inboundService.InbounOrderService.GetInboundOrder(stockInfoDetail.OrderNo); |
| | | if (inboundOrder == null) throw new Exception($"æªæ¾å°æç[{lineDTO.Barcode}]çå
¥åºåä¿¡æ¯"); |
| | | |
| | | var BatchNo = stockInfoDetail.BatchNo.Substring(0, 2); |
| | | var BatchNo = stockInfoDetail.BatchNo; |
| | | #region 夿æ¯å¦æå®è´§ä½ |
| | | Dt_InboundOrderDetail? orderDetail = inboundOrder.Details.FirstOrDefault(x => x.BatchNo == stockInfoDetail.BatchNo); |
| | | if (orderDetail == null) throw new Exception($"æªæ¾å°æç[{lineDTO.Barcode}]çå
¥åºåæç»ä¿¡æ¯"); |
| | |
| | | #endregion |
| | | else |
| | | { |
| | | instockInfoDetail = _stockService.StockInfoDetailService.Get_StockInfoDetail(stockInfoDetail.OrderNo, BatchNo);//å
¥åºååå¨åºåï¼å¤æè´§ä½ |
| | | instockInfoDetail = _stockService.StockInfoDetailService.Get_StockInfoDetail(stockInfoDetail.OrderNo /*BatchNo*/);//å
¥åºååå¨åºåï¼å¤æè´§ä½ |
| | | if (instockInfoDetail != null) instockInfo = _stockService.StockInfoService.Repository.GetStockInfo(instockInfoDetail.StockId); |
| | | if (instockInfo != null) |
| | | { |
| | |
| | | |
| | | if (locationInfo == null)//åé
æ°è´§ä½ |
| | | { |
| | | List<Dt_InboundOrderDetail> inboundOrderDetailList = inboundOrder.Details.Where(x => x.BatchNo.Contains(BatchNo) && x.OverInQuantity == 0).ToList(); |
| | | List<Dt_InboundOrderDetail> inboundOrderDetailList = inboundOrder.Details.Where(x => /*x.BatchNo.Contains(BatchNo) &&*/ x.OverInQuantity == 0).ToList(); |
| | | int inboundOrderCount = inboundOrderDetailList.Count; |
| | | locationInfo = _basicService.LocationInfoService.AssignLocation(inboundOrderCount);//éæ°åé
è´§ä½ |
| | | } |
| | |
| | | }; |
| | | dt_Tasks.Add(task); |
| | | item1.StockStatus = StockStatusEmun.ç§»åºä¸.ObjToInt(); |
| | | locationInfo2.CurrentQty++; |
| | | //locationInfo2.CurrentQty++; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | stockInfos.AddRange(result.Item1); |
| | | outboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); |
| | | outboundOrderDetail.LockQuantity = result.Item1.Count; |
| | | outStockLockInfos = result.Item2; |
| | | locationInfos = result.Item3; |
| | | outboundOrder.OrderStatus = OutboundStatusEnum.åºåºä¸.ObjToInt(); |
| | |
| | | stockInfo = new Dt_StockInfo(); |
| | | stockInfo.Details = new List<Dt_StockInfoDetail>(); |
| | | #region MyRegion |
| | | string OrderNo = productionlineDTO.batchNo.Substring(0, 6);// DateTime.Now.ToString("yyMMdd"); |
| | | string OrderNo = productionlineDTO.batchNo.Substring(0, 8);// DateTime.Now.ToString("yyMMdd"); |
| | | Dt_InboundOrder? inboundOrder = _inboundService.InbounOrderService.GetInboundOrder(OrderNo); |
| | | if (inboundOrder == null) throw new Exception($"æªæ¾å°æ¹å·ä¸ºã{OrderNo}ãçå
¥åºå"); |
| | | //var BatchNo = string.Join("", productionlineDTO.batchNo.Except(OrderNo)); |
| | | var BatchNo = productionlineDTO.batchNo.Substring(6); |
| | | var BatchNo = productionlineDTO.batchNo.Substring(8); |
| | | Dt_InboundOrderDetail? inboundOrderDetail = inboundOrder.Details.Where(x => x.BatchNo == BatchNo).FirstOrDefault(); |
| | | if (inboundOrderDetail == null) throw new Exception($"æ¹å·ã{OrderNo}ãçå
¥åºåæªæ¾å°æå·ã{BatchNo}ã"); |
| | | if (inboundOrderDetail.OrderQuantity - inboundOrderDetail.ReceiptQuantity < 1) throw new Exception($"æ¹å·ã{OrderNo}ãçæå·ã{BatchNo}ãå¯ç»çæ°éä¸è¶³"); |
| | |
| | | else if (task.TaskType == (int)TaskTypeEnum.Relocation) |
| | | { |
| | | task.TaskState = WMStask.TaskState; |
| | | if (task.TaskState == (int)WIDESEA_Core.Enums.TaskRelocationStatusEnum.RelocationFinish) |
| | | if (task.TaskState == (int)WIDESEA_Core.Enums.TaskRelocationStatusEnum.SC_RelocationFinish) |
| | | content = UpdateTaskStatusRelocationCarFinish(task); |
| | | else |
| | | content = UpdateData(task); |
| | |
| | | { |
| | | /*if (task.TaskType == TaskOutboundTypeEnum.Outbound.ObjToInt())*/ |
| | | Sourcelocation.CurrentQty--; |
| | | if (Sourcelocation.CurrentQty <= 0 && Sourcelocation.Row != 2) |
| | | if (Sourcelocation.CurrentQty <= 0) |
| | | { |
| | | Sourcelocation.CurrentQty = 0; |
| | | Sourcelocation.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | Sourcelocation.EnableStatus = EnableStatusEnum.Normal.ObjToInt(); |
| | | } |
| | | if (Sourcelocation.Row == 1 && Sourcelocation.LocationStatus == LocationStatusEnum.Free.ObjToInt()) |
| | | { |
| | | Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.Row == 2 && x.Column == Sourcelocation.Column && x.Layer == Sourcelocation.Layer); |
| | | if (locationInfo.CurrentQty == 0 /*&& locationInfo.LocationStatus == LocationStatusEnum.Free.ObjToInt()*/) |
| | | { |
| | | locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | locationInfo.EnableStatus = EnableStatusEnum.Normal.ObjToInt(); |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | } |
| | | } |
| | | _basicService.LocationInfoService.Repository.UpdateData(Sourcelocation); |
| | | } |
| | |
| | | { |
| | | Dt_OutStockLockInfo? outStockLockInfo = _outboundService.OutboundStockLockInfoService.Repository.QueryFirst(x => x.TaskNum == task.TaskNum); |
| | | Dt_OutboundOrder? outboundOrder = null; |
| | | Dt_OutboundOrderDetail? outboundOrderDetail = null; |
| | | int overCount = 0; |
| | | if (outStockLockInfo != null) |
| | | { |
| | | Dt_OutboundOrderDetail outboundOrderDetail = _outboundService.OutboundOrderDetailService.Repository.QueryFirst(x => x.Id == outStockLockInfo.OrderDetailId); |
| | | outboundOrderDetail = _outboundService.OutboundOrderDetailService.Repository.QueryFirst(x => x.Id == outStockLockInfo.OrderDetailId); |
| | | if (outboundOrderDetail != null) |
| | | { |
| | | outboundOrder = Db.Queryable<Dt_OutboundOrder>().Where(x => x.Id == outboundOrderDetail.OrderId).Includes(x => x.Details).First(); |
| | |
| | | if (outboundOrder != null && outboundOrder.Details.Count == overCount) |
| | | { |
| | | outboundOrder.OrderStatus = OutboundStatusEnum.åºåºå®æ.ObjToInt(); |
| | | _outboundService.OutboundOrderService.Repository.DeleteAndMoveIntoHty(outboundOrder, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | | _outboundService.OutboundOrderDetailService.Repository.DeleteAndMoveIntoHty(outboundOrder.Details, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | | outboundOrder.Details = null; |
| | | _outboundService.OutboundOrderService.Repository.DeleteAndMoveIntoHty(outboundOrder, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | | } |
| | | else |
| | | { |
| | | if (outboundOrderDetail != null) |
| | | _outboundService.OutboundOrderDetailService.Repository.UpdateData(outboundOrderDetail); |
| | | } |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.èªå¨å®æ : OperateType.äººå·¥å®æ); |
| | | if (outStockLockInfo != null) _outboundService.OutboundStockLockInfoService.Repository.UpdateData(outStockLockInfo); |
| | |
| | | Targetlocation.CurrentQty++; |
| | | stockInfo.LocationCode = Targetlocation.LocationCode; |
| | | stockInfo.SerialNumber = Targetlocation.CurrentQty; |
| | | stockInfo.StockStatus = StockStatusEmun.å·²å
¥åº.ObjToInt(); |
| | | if (Sourcelocation.CurrentQty == 0) Sourcelocation.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | Dt_Task _Task = BaseDal.QueryFirst(x => x.TaskNum != task.TaskNum && x.TaskType == task.TaskType && x.SourceAddress == Sourcelocation.LocationCode && x.TargetAddress == Targetlocation.LocationCode); |
| | | if (_Task == null) |
| | |
| | | <Project> |
| | | <PropertyGroup> |
| | | <_PublishTargetUrl>E:\IISText\èæ¹ä¸ä¸\WMS</_PublishTargetUrl> |
| | | <History>True|2025-04-18T09:17:44.2558979Z;True|2025-04-18T11:56:16.2333182+08:00;True|2025-04-17T14:04:11.2641163+08:00;True|2025-03-27T16:24:43.5017432+08:00;True|2025-03-18T16:14:40.3832855+08:00;True|2025-02-18T14:43:41.4214052+08:00;True|2025-02-17T16:47:47.1464719+08:00;True|2025-02-14T13:02:33.0683296+08:00;True|2025-02-11T13:55:27.2837544+08:00;True|2025-02-11T13:54:12.7390669+08:00;True|2025-02-10T16:40:04.5645895+08:00;True|2025-02-10T16:24:19.3540916+08:00;True|2025-02-10T14:24:04.2140946+08:00;True|2025-02-10T14:01:37.7817950+08:00;True|2025-02-10T13:58:35.5650499+08:00;True|2025-02-10T13:49:31.5513866+08:00;False|2025-02-10T13:49:18.2135044+08:00;True|2025-02-10T11:32:33.6168149+08:00;False|2025-02-10T11:31:56.1964136+08:00;False|2025-02-10T11:31:03.0326897+08:00;True|2025-02-10T11:25:27.6553142+08:00;True|2025-01-18T15:10:06.4957375+08:00;False|2025-01-18T15:09:32.6588841+08:00;True|2025-01-18T15:07:28.0952526+08:00;True|2025-01-18T15:05:38.5243008+08:00;True|2025-01-18T15:03:32.1684791+08:00;True|2025-01-18T15:00:14.2579995+08:00;False|2025-01-18T14:59:17.3888861+08:00;False|2025-01-18T14:57:59.9512472+08:00;True|2025-01-18T13:57:17.7790615+08:00;True|2025-01-18T12:53:22.4660853+08:00;True|2025-01-17T17:26:35.1781925+08:00;True|2025-01-17T16:54:55.6218094+08:00;</History> |
| | | <History>True|2025-05-07T09:51:44.1784374Z;True|2025-04-27T14:53:35.8458295+08:00;True|2025-04-18T17:17:44.2558979+08:00;True|2025-04-18T11:56:16.2333182+08:00;True|2025-04-17T14:04:11.2641163+08:00;True|2025-03-27T16:24:43.5017432+08:00;True|2025-03-18T16:14:40.3832855+08:00;True|2025-02-18T14:43:41.4214052+08:00;True|2025-02-17T16:47:47.1464719+08:00;True|2025-02-14T13:02:33.0683296+08:00;True|2025-02-11T13:55:27.2837544+08:00;True|2025-02-11T13:54:12.7390669+08:00;True|2025-02-10T16:40:04.5645895+08:00;True|2025-02-10T16:24:19.3540916+08:00;True|2025-02-10T14:24:04.2140946+08:00;True|2025-02-10T14:01:37.7817950+08:00;True|2025-02-10T13:58:35.5650499+08:00;True|2025-02-10T13:49:31.5513866+08:00;False|2025-02-10T13:49:18.2135044+08:00;True|2025-02-10T11:32:33.6168149+08:00;False|2025-02-10T11:31:56.1964136+08:00;False|2025-02-10T11:31:03.0326897+08:00;True|2025-02-10T11:25:27.6553142+08:00;True|2025-01-18T15:10:06.4957375+08:00;False|2025-01-18T15:09:32.6588841+08:00;True|2025-01-18T15:07:28.0952526+08:00;True|2025-01-18T15:05:38.5243008+08:00;True|2025-01-18T15:03:32.1684791+08:00;True|2025-01-18T15:00:14.2579995+08:00;False|2025-01-18T14:59:17.3888861+08:00;False|2025-01-18T14:57:59.9512472+08:00;True|2025-01-18T13:57:17.7790615+08:00;True|2025-01-18T12:53:22.4660853+08:00;True|2025-01-17T17:26:35.1781925+08:00;True|2025-01-17T16:54:55.6218094+08:00;</History> |
| | | <LastFailureDetails /> |
| | | </PropertyGroup> |
| | | </Project> |