| | |
| | | }); |
| | | }, |
| | | outbound() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | const platformOptions = [ |
| | | { label: "ç«å°2", value: "2-1" }, |
| | | { label: "ç«å°3", value: "3-1" }, |
| | | ]; |
| | | const mountNode = document.createElement("div"); |
| | | document.body.appendChild(mountNode); |
| | | // if (this.selection.length === 0) { |
| | | // return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | // } |
| | | // const platformOptions = [ |
| | | // { label: "ç«å°2", value: "2-1" }, |
| | | // { label: "ç«å°3", value: "3-1" }, |
| | | // ]; |
| | | // const mountNode = document.createElement("div"); |
| | | // document.body.appendChild(mountNode); |
| | | |
| | | const formData = reactive({ |
| | | selectedPlatform: platformOptions[0].value, |
| | | }); |
| | | |
| | | const vnode = createVNode( |
| | | ElDialog, |
| | | { |
| | | title: "åºåºæä½ - éæ©åºåºç«å°", |
| | | width: "500px", |
| | | modelValue: true, |
| | | appendToBody: true, |
| | | "onUpdate:modelValue": (isVisible) => { |
| | | if (!isVisible) { |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | } |
| | | }, |
| | | style: { |
| | | padding: "20px 0", |
| | | borderRadius: "8px", |
| | | }, |
| | | }, |
| | | { |
| | | default: () => |
| | | h( |
| | | ElForm, |
| | | { |
| | | model: formData, |
| | | rules: { |
| | | selectedPlatform: [ |
| | | { required: true, message: "è¯·éæ©åºåºç«å°", trigger: "change" }, |
| | | ], |
| | | }, |
| | | ref: "outboundForm", |
| | | labelWidth: "100px", |
| | | style: { |
| | | padding: "0 30px", |
| | | }, |
| | | }, |
| | | [ |
| | | h(ElFormItem, { |
| | | label: "åºåºç«å°", |
| | | prop: "selectedPlatform", |
| | | style: { |
| | | marginBottom: "24px", |
| | | }, |
| | | }, [ |
| | | h(ElSelect, { |
| | | placeholder: "è¯·éæ©åºåºç«å°ï¼3-12ï¼", |
| | | modelValue: formData.selectedPlatform, |
| | | "onUpdate:modelValue": (val) => { |
| | | formData.selectedPlatform = val; |
| | | }, |
| | | style: { |
| | | width: "100%", |
| | | height: "40px", |
| | | borderRadius: "4px", |
| | | borderColor: "#dcdfe6", |
| | | }, |
| | | }, platformOptions.map((platform) => |
| | | h(ElOption, { label: platform.label, value: platform.value }) |
| | | )), |
| | | ]), |
| | | h("div", { |
| | | style: { |
| | | textAlign: "right", |
| | | marginTop: "8px", |
| | | paddingRight: "4px", |
| | | }, |
| | | }, [ |
| | | h(ElButton, { |
| | | type: "text", |
| | | onClick: () => { |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | ElMessage.info("åæ¶åºåºæä½"); |
| | | }, |
| | | style: { |
| | | marginRight: "8px", |
| | | color: "#606266", |
| | | }, |
| | | }, "åæ¶"), |
| | | h(ElButton, { |
| | | type: "primary", |
| | | onClick: async () => { |
| | | const formRef = vnode.component.refs.outboundForm; |
| | | try { |
| | | await formRef.validate(); |
| | | } catch (err) { |
| | | return; |
| | | } |
| | | |
| | | const keys = this.selection.map((item) => item.id); |
| | | const requestParams = { |
| | | detailIds: keys, |
| | | outboundTargetLocation: formData.selectedPlatform, |
| | | outboundQuantity: 1, |
| | | operator: "", |
| | | orderNo: this.row.orderNo, |
| | | }; |
| | | |
| | | this.http |
| | | .post( |
| | | "api/Outbound/ProcessPickingOutbound", |
| | | requestParams, |
| | | "æ°æ®å¤çä¸" |
| | | ) |
| | | .then((x) => { |
| | | if (!x.status) return ElMessage.error(x.message); |
| | | ElMessage.success("æä½æå"); |
| | | this.showDetialBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); |
| | | }); |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | }) |
| | | // .catch(() => { |
| | | // ElMessage.error("请æ±å¤±è´¥ï¼è¯·ç¨åéè¯"); |
| | | // const formData = reactive({ |
| | | // selectedPlatform: platformOptions[0].value, |
| | | // }); |
| | | }, |
| | | style: { |
| | | borderRadius: "4px", |
| | | padding: "8px 20px", |
| | | }, |
| | | }, "ç¡®å®åºåº"), |
| | | ]), |
| | | ]), |
| | | } |
| | | ); |
| | | |
| | | vnode.appContext = this.$.appContext; |
| | | render(vnode, mountNode); |
| | | // const vnode = createVNode( |
| | | // ElDialog, |
| | | // { |
| | | // title: "åºåºæä½ - éæ©åºåºç«å°", |
| | | // width: "500px", |
| | | // modelValue: true, |
| | | // appendToBody: true, |
| | | // "onUpdate:modelValue": (isVisible) => { |
| | | // if (!isVisible) { |
| | | // render(null, mountNode); |
| | | // document.body.removeChild(mountNode); |
| | | // } |
| | | // }, |
| | | // style: { |
| | | // padding: "20px 0", |
| | | // borderRadius: "8px", |
| | | // }, |
| | | // }, |
| | | // { |
| | | // default: () => |
| | | // h( |
| | | // ElForm, |
| | | // { |
| | | // model: formData, |
| | | // rules: { |
| | | // selectedPlatform: [ |
| | | // { required: true, message: "è¯·éæ©åºåºç«å°", trigger: "change" }, |
| | | // ], |
| | | // }, |
| | | // ref: "outboundForm", |
| | | // labelWidth: "100px", |
| | | // style: { |
| | | // padding: "0 30px", |
| | | // }, |
| | | // }, |
| | | // [ |
| | | // h(ElFormItem, { |
| | | // label: "åºåºç«å°", |
| | | // prop: "selectedPlatform", |
| | | // style: { |
| | | // marginBottom: "24px", |
| | | // }, |
| | | // }, [ |
| | | // h(ElSelect, { |
| | | // placeholder: "è¯·éæ©åºåºç«å°ï¼3-12ï¼", |
| | | // modelValue: formData.selectedPlatform, |
| | | // "onUpdate:modelValue": (val) => { |
| | | // formData.selectedPlatform = val; |
| | | // }, |
| | | // style: { |
| | | // width: "100%", |
| | | // height: "40px", |
| | | // borderRadius: "4px", |
| | | // borderColor: "#dcdfe6", |
| | | // }, |
| | | // }, platformOptions.map((platform) => |
| | | // h(ElOption, { label: platform.label, value: platform.value }) |
| | | // )), |
| | | // ]), |
| | | // h("div", { |
| | | // style: { |
| | | // textAlign: "right", |
| | | // marginTop: "8px", |
| | | // paddingRight: "4px", |
| | | // }, |
| | | // }, [ |
| | | // h(ElButton, { |
| | | // type: "text", |
| | | // onClick: () => { |
| | | // render(null, mountNode); |
| | | // document.body.removeChild(mountNode); |
| | | // ElMessage.info("åæ¶åºåºæä½"); |
| | | // }, |
| | | // style: { |
| | | // marginRight: "8px", |
| | | // color: "#606266", |
| | | // }, |
| | | // }, "åæ¶"), |
| | | // h(ElButton, { |
| | | // type: "primary", |
| | | // onClick: async () => { |
| | | // const formRef = vnode.component.refs.outboundForm; |
| | | // try { |
| | | // await formRef.validate(); |
| | | // } catch (err) { |
| | | // return; |
| | | // } |
| | | |
| | | // const keys = this.selection.map((item) => item.id); |
| | | // const requestParams = { |
| | | // detailIds: keys, |
| | | // outboundTargetLocation: formData.selectedPlatform, |
| | | // outboundQuantity: 1, |
| | | // operator: "", |
| | | // orderNo: this.row.orderNo, |
| | | // }; |
| | | |
| | | // this.http |
| | | // .post( |
| | | // "api/Outbound/ProcessPickingOutbound", |
| | | // requestParams, |
| | | // "æ°æ®å¤çä¸" |
| | | // ) |
| | | // .then((x) => { |
| | | // if (!x.status) return ElMessage.error(x.message); |
| | | // ElMessage.success("æä½æå"); |
| | | // this.showDetialBox = false; |
| | | // this.$emit("parentCall", ($vue) => { |
| | | // $vue.getData(); |
| | | // }); |
| | | // render(null, mountNode); |
| | | // document.body.removeChild(mountNode); |
| | | // }) |
| | | // // .catch(() => { |
| | | // // ElMessage.error("请æ±å¤±è´¥ï¼è¯·ç¨åéè¯"); |
| | | // // }); |
| | | // }, |
| | | // style: { |
| | | // borderRadius: "4px", |
| | | // padding: "8px 20px", |
| | | // }, |
| | | // }, "ç¡®å®åºåº"), |
| | | // ]), |
| | | // ]), |
| | | // } |
| | | // ); |
| | | |
| | | // vnode.appContext = this.$.appContext; |
| | | // render(vnode, mountNode); |
| | | }, |
| | | outboundbatch() { |
| | | if (this.selection.length === 0) { |
| | |
| | | }); |
| | | }, |
| | | outbound() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | // if (this.selection.length === 0) { |
| | | // return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | // } |
| | | // const platformOptions = [ |
| | | // { label: "ç«å°2", value: "2-1" }, |
| | | // { label: "ç«å°3", value: "3-1" }, |
| | | // ]; |
| | | // const mountNode = document.createElement("div"); |
| | | // document.body.appendChild(mountNode); |
| | | |
| | | const keys = this.selection.map((item) => item.id); |
| | | const requestParams = { |
| | | detailIds: keys, |
| | | outboundQuantity: 1, |
| | | operator: "", |
| | | orderNo: this.row.orderNo, |
| | | isBatch: this.isBatch |
| | | }; |
| | | this.$refs.DirectOutbound.open(requestParams); |
| | | // const formData = reactive({ |
| | | // selectedPlatform: platformOptions[0].value, |
| | | // }); |
| | | |
| | | // const vnode = createVNode( |
| | | // ElDialog, |
| | | // { |
| | | // title: "åºåºæä½ - éæ©åºåºç«å°", |
| | | // width: "500px", |
| | | // modelValue: true, |
| | | // appendToBody: true, |
| | | // "onUpdate:modelValue": (isVisible) => { |
| | | // if (!isVisible) { |
| | | // render(null, mountNode); |
| | | // document.body.removeChild(mountNode); |
| | | // } |
| | | // }, |
| | | // style: { |
| | | // padding: "20px 0", |
| | | // borderRadius: "8px", |
| | | // }, |
| | | // }, |
| | | // { |
| | | // default: () => |
| | | // h( |
| | | // ElForm, |
| | | // { |
| | | // model: formData, |
| | | // rules: { |
| | | // selectedPlatform: [ |
| | | // { required: true, message: "è¯·éæ©åºåºç«å°", trigger: "change" }, |
| | | // ], |
| | | // }, |
| | | // ref: "outboundForm", |
| | | // labelWidth: "100px", |
| | | // style: { |
| | | // padding: "0 30px", |
| | | // }, |
| | | // }, |
| | | // [ |
| | | // h(ElFormItem, { |
| | | // label: "åºåºç«å°", |
| | | // prop: "selectedPlatform", |
| | | // style: { |
| | | // marginBottom: "24px", |
| | | // }, |
| | | // }, [ |
| | | // h(ElSelect, { |
| | | // placeholder: "è¯·éæ©åºåºç«å°ï¼3-12ï¼", |
| | | // modelValue: formData.selectedPlatform, |
| | | // "onUpdate:modelValue": (val) => { |
| | | // formData.selectedPlatform = val; |
| | | // }, |
| | | // style: { |
| | | // width: "100%", |
| | | // height: "40px", |
| | | // borderRadius: "4px", |
| | | // borderColor: "#dcdfe6", |
| | | // }, |
| | | // }, platformOptions.map((platform) => |
| | | // h(ElOption, { label: platform.label, value: platform.value }) |
| | | // )), |
| | | // ]), |
| | | // h("div", { |
| | | // style: { |
| | | // textAlign: "right", |
| | | // marginTop: "8px", |
| | | // paddingRight: "4px", |
| | | // }, |
| | | // }, [ |
| | | // h(ElButton, { |
| | | // type: "text", |
| | | // onClick: () => { |
| | | // render(null, mountNode); |
| | | // document.body.removeChild(mountNode); |
| | | // ElMessage.info("åæ¶åºåºæä½"); |
| | | // }, |
| | | // style: { |
| | | // marginRight: "8px", |
| | | // color: "#606266", |
| | | // }, |
| | | // }, "åæ¶"), |
| | | // h(ElButton, { |
| | | // type: "primary", |
| | | // onClick: async () => { |
| | | // const formRef = vnode.component.refs.outboundForm; |
| | | // try { |
| | | // await formRef.validate(); |
| | | // } catch (err) { |
| | | // return; |
| | | // } |
| | | |
| | | // const keys = this.selection.map((item) => item.id); |
| | | // const requestParams = { |
| | | // detailIds: keys, |
| | | // outboundTargetLocation: formData.selectedPlatform, |
| | | // outboundQuantity: 1, |
| | | // operator: "", |
| | | // orderNo: this.row.orderNo, |
| | | // }; |
| | | |
| | | // this.http |
| | | // .post( |
| | | // "api/Outbound/ProcessPickingOutbound", |
| | | // requestParams, |
| | | // "æ°æ®å¤çä¸" |
| | | // ) |
| | | // .then((x) => { |
| | | // if (!x.status) return ElMessage.error(x.message); |
| | | // ElMessage.success("æä½æå"); |
| | | // this.showDetialBox = false; |
| | | // this.$emit("parentCall", ($vue) => { |
| | | // $vue.getData(); |
| | | // }); |
| | | // render(null, mountNode); |
| | | // document.body.removeChild(mountNode); |
| | | // }) |
| | | // // .catch(() => { |
| | | // // ElMessage.error("请æ±å¤±è´¥ï¼è¯·ç¨åéè¯"); |
| | | // // }); |
| | | // }, |
| | | // style: { |
| | | // borderRadius: "4px", |
| | | // padding: "8px 20px", |
| | | // }, |
| | | // }, "ç¡®å®åºåº"), |
| | | // ]), |
| | | // ]), |
| | | // } |
| | | // ); |
| | | |
| | | // vnode.appContext = this.$.appContext; |
| | | // render(vnode, mountNode); |
| | | }, |
| | | outboundbatch() { |
| | | if (this.selection.length === 0) { |
| | |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | if (rows.length > 1) return this.$error("è¯·éæ©ä¸æ¡æ°æ®!"); |
| | | |
| | | |
| | | // ç¡®ä¿éä¸è¡æidï¼æ ¹æ®å®é
è¡¨æ ¼æ°æ®åæ®µè°æ´ï¼æ¯å¦rows[0].detailIdçï¼ |
| | | const selectedId = rows[0].id || rows[0].detailId; |
| | | if (!selectedId) return this.$error("é䏿°æ®ç¼ºå°å¿
è¦IDåæ®µ!"); |
| | | |
| | | if(rows[0].orderStatus!=0&&rows[0].orderStatus!=1)return this.$error("è¯¥åæ®å·²ç»å®æ"); |
| | | |
| | | const platformOptions = [ |
| | | { label: "ç«å°2", value: "2-1" }, |
| | | { label: "ç«å°3", value: "3-1" }, |
| | |
| | | const codeImgSrc = ref(""); |
| | | const value = ref(""); |
| | | const userInfo = reactive({ |
| | | userName: "admin", |
| | | password: "123456", |
| | | userName: "", |
| | | password: "", |
| | | verificationCode: "1234", |
| | | UUID: undefined, |
| | | }); |
| | |
| | | using System.Text.Json; |
| | | using System.Threading; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core.LogHelper; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_IBasicService; |
| | | |
| | |
| | | var result = await PostAsync<TaskModel, ApiResponse<TasksData>>(url, request); |
| | | if (result != null && result.Code == 0) |
| | | { |
| | | _logger.LogInformation(result.Serialize()); |
| | | |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | |
| | | private async Task<TResponse> PostAsync<TRequest, TResponse>(string url, TRequest request) |
| | | { |
| | | |
| | | TResponse response1 = (TResponse)Activator.CreateInstance(typeof(TResponse)); |
| | | try |
| | | { |
| | | string json = JsonConvert.SerializeObject(request, new JsonSerializerSettings |
| | | { |
| | | ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver() |
| | |
| | | throw new HttpRequestException(body); |
| | | } |
| | | |
| | | return JsonConvert.DeserializeObject<TResponse>(body); |
| | | response1 = JsonConvert.DeserializeObject<TResponse>(body); |
| | | |
| | | return response1; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Logger.Add(request == null ? "" : JsonConvert.SerializeObject(request), response1 == null ? ex.ToString() : JsonConvert.SerializeObject(response1)); |
| | | throw new Exception(ex.Message); |
| | | } |
| | | finally |
| | | { |
| | | Logger.Add(request == null ? "" : JsonConvert.SerializeObject(request), response1 == null ? "" : JsonConvert.SerializeObject(response1)); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core.HttpContextUser; |
| | | using WIDESEA_Core.LogHelper; |
| | | using WIDESEA_Core.Util; |
| | | using WIDESEA_DTO.Base; |
| | | using WIDESEA_DTO.ReturnMES; |
| | |
| | | |
| | | public WebResponseContent OutboundFeedback(string orderNo) |
| | | { |
| | | WebResponseContent webResponse = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_OutboundOrder outboundOrder = _outboundOrderRepository.Db.Queryable<Dt_OutboundOrder>().Where(x => x.OrderNo == orderNo).Includes(x => x.Details).First(); |
| | | if (outboundOrder == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°å¯¹åºçåºåºåä¿¡æ¯"); |
| | | return webResponse = WebResponseContent.Instance.Error($"æªæ¾å°å¯¹åºçåºåºåä¿¡æ¯"); |
| | | } |
| | | |
| | | List<Dt_MesReturnRecord> returnRecords = BaseDal.QueryData(x => x.OrderNo == orderNo && x.OrderId == outboundOrder.Id && x.ReturnStatus == 2); |
| | |
| | | MaterialOutboundReturnDTO? returnDTO = BuildOutboundFeedbackData(outboundOrder); |
| | | if (returnDTO == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æå»ºåè°å¯¹è±¡å¤±è´¥"); |
| | | return webResponse = WebResponseContent.Instance.Error($"æå»ºåè°å¯¹è±¡å¤±è´¥"); |
| | | } |
| | | |
| | | if (returnDTO.Details.Count <= 0) |
| | | { |
| | | return WebResponseContent.Instance.Error($"è¯¥åæ®æ æç»å¯åä¼ "); |
| | | return webResponse = WebResponseContent.Instance.Error($"è¯¥åæ®æ æç»å¯åä¼ "); |
| | | } |
| | | |
| | | string apiUrl = AppSettings.GetValue("MaterialOutboundFeedbackUrl"); |
| | |
| | | Dt_AllocateOrder allocateOrder = _allocateRepository.QueryFirst(x => x.OrderNo == outboundOrder.OrderNo); |
| | | if (allocateOrder == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°å¯¹åºçè°æ¨å"); |
| | | return webResponse = WebResponseContent.Instance.Error($"æªæ¾å°å¯¹åºçè°æ¨å"); |
| | | } |
| | | |
| | | AllocationReturnDTO? returnDTO = BuildAllocationFeedbackData(outboundOrder, allocateOrder.FromWarehouse, allocateOrder.ToWarehouse); |
| | | if (returnDTO == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æå»ºåè°å¯¹è±¡å¤±è´¥"); |
| | | return webResponse = WebResponseContent.Instance.Error($"æå»ºåè°å¯¹è±¡å¤±è´¥"); |
| | | } |
| | | |
| | | if (returnDTO.Details.Count <= 0) |
| | | { |
| | | return WebResponseContent.Instance.Error($"è¯¥åæ®æ æç»å¯åä¼ "); |
| | | return webResponse = WebResponseContent.Instance.Error($"è¯¥åæ®æ æç»å¯åä¼ "); |
| | | } |
| | | |
| | | string apiUrl = AppSettings.GetValue("AllocationFeedbackUrl"); ; |
| | |
| | | lineNos = returnDTO.Details.Select(x => x.LineNo).ToList(); |
| | | httpResponseResult = _httpClientHelper.Post<MesResponseDTO>(apiUrl, requestData); |
| | | httpResponseResult.ApiUrl = apiUrl; |
| | | |
| | | Logger.Add(requestData, httpResponseResult.Serialize()); |
| | | } |
| | | |
| | | bool isSuccess = httpResponseResult.IsSuccess && httpResponseResult.Data.Code == "200"; |
| | |
| | | _unitOfWorkManage.CommitTran(); |
| | | int successCount = returnRecords.Where(x => x.ReturnStatus == 1).Count() + (isSuccess ? 1 : 0); |
| | | int failCount = returnRecords.Where(x => x.ReturnStatus == 2).Count() + (isSuccess ? 1 : 0); |
| | | WebResponseContent responseContent = new WebResponseContent(); |
| | | responseContent.Status = true; |
| | | responseContent.Message = $"åè°æåæ¡æ°ï¼{successCount}ï¼åè°å¤±è´¥æ¡æ°ï¼{failCount}"; |
| | | return responseContent; |
| | | |
| | | webResponse.Status = true; |
| | | webResponse.Message = $"åè°æåæ¡æ°ï¼{successCount}ï¼åè°å¤±è´¥æ¡æ°ï¼{failCount}"; |
| | | |
| | | return webResponse; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | return webResponse = WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | finally |
| | | { |
| | | Logger.Add(orderNo, webResponse.Serialize()); |
| | | } |
| | | } |
| | | |
| | |
| | | StockId = stockInfo == null ? 0 : stockInfo.Id, |
| | | Barcode = item.Barcode, |
| | | MaterielCode = item.MaterielCode, |
| | | MaterielName = item.MaterielName, |
| | | BatchNo = item.BatchNo, |
| | | Unit = item.Unit, |
| | | InboundOrderRowNo = item.lineNo, |
| | |
| | | List<Barcodes> barcodesList = new List<Barcodes>(); |
| | | Barcodes barcodes = new Barcodes |
| | | { |
| | | Barcode = newBarcode, |
| | | Barcode = isUnpacked ? newBarcode : stockDetail?.Barcode, |
| | | Qty = barcodeQuantity, |
| | | SupplyCode = stockDetail?.SupplyCode ?? "", |
| | | BatchNo = stockDetail?.BatchNo ?? "", |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"æ¡ç ä¸è½ä¸ºç©º"); |
| | | } |
| | | var materialName = _materialInfoRepository.QueryFirst(x => x.MaterielCode == detailDto.materialCode).MaterielName; |
| | | var materialName = _materialInfoRepository.QueryFirst(x => x.MaterielCode == detailDto.MaterialCode).MaterielName; |
| | | if (detailDto.Barcodes != null && detailDto.Barcodes.Any()) |
| | | { |
| | | foreach (var barcodeDto in detailDto.Barcodes) |
| | |
| | | { |
| | | |
| | | // ç¬¬ä¸æ¥ï¼æ´æ°ValidDateçåçSQLï¼SQL Serverï¼ |
| | | string updateSql = @" |
| | | UPDATE s |
| | | SET s.ValidDate = DATEADD(DAY, m.ValidityDays, s.CreateDate) |
| | | FROM Dt_StockInfoDetail s |
| | | INNER JOIN Dt_MaterialExpirationDate m ON SUBSTRING(s.MaterielCode, 1, 6) = m.MaterialCode |
| | | WHERE s.ValidDate IS NULL"; |
| | | int updateValidDateResult = _db.Ado.ExecuteCommand(updateSql); |
| | | // string updateSql = @" |
| | | //UPDATE s |
| | | //SET s.ValidDate = DATEADD(DAY, m.ValidityDays, s.CreateDate) |
| | | //FROM Dt_StockInfoDetail s |
| | | //INNER JOIN Dt_MaterialExpirationDate m ON SUBSTRING(s.MaterielCode, 1, 6) = m.MaterialCode |
| | | //WHERE s.ValidDate IS NULL"; |
| | | // int updateValidDateResult = _db.Ado.ExecuteCommand(updateSql); |
| | | |
| | | // ç¬¬äºæ¥ï¼æ´æ°è¿æç¶æçåçSQL |
| | | string updateStatusSql = @" |
| | |
| | | { |
| | | var allQzServices = new List<TasksQz>() |
| | | { |
| | | //new TasksQz() |
| | | //{ |
| | | // Id = 1, |
| | | // AssemblyName = "WIDESEA_WMSServer", |
| | | // ClassName = "AgvTaskJob", |
| | | // CreateTime = DateTime.Now, |
| | | // IntervalSecond = 3, |
| | | // IsDeleted = false, |
| | | // IsStart = false, |
| | | // JobGroup = "WIDESEA_WMSServer", |
| | | // Name = "AgvTaskJob", |
| | | // TriggerType = 0 |
| | | //}, |
| | | new TasksQz() |
| | | { |
| | | Id = 1, |
| | | AssemblyName = "WIDESEA_WMSServer", |
| | | ClassName = "AgvTaskJob", |
| | | CreateTime = DateTime.Now, |
| | | IntervalSecond = 3, |
| | | IsDeleted = false, |
| | | IsStart = false, |
| | | JobGroup = "WIDESEA_WMSServer", |
| | | Name = "AgvTaskJob", |
| | | TriggerType = 0 |
| | | }, |
| | | |
| | | }; |
| | | foreach (var item in allQzServices) |