| | |
| | | //{ field: 'wheels_ID', title: '主é®ID', type: 'int', width: 110, readonly: true, hidden: true, require: true, align: 'left' }, |
| | | { field: 'wheel_code', title: '车轮ç ', type: 'string', width: 150, align: 'left' }, |
| | | { field: 'locate', title: 'åºä½å·', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'wheels_CurrentStatue', title: 'ç¶æ', type: 'int', width: 110, align: 'left', bind: { key: "CurrentStatue", data: [] } }, |
| | | //{ field: 'wheels_SequenceNum', title: 'åºåå·', type: 'string', width: 110, align: 'left', sort: true, link: true, }, |
| | | //{ field: 'wheels_Num', title: '车轮å·', type: 'string', width: 110, align: 'left' }, |
| | | //{ field: 'wheels_Type', title: 'ç±»å(è½®/ç)', type: 'string', width: 110, align: 'left' }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | *Authorï¼jxx |
| | | *Contactï¼283591387@qq.com |
| | | *代ç ç±æ¡æ¶çæ,任使´æ¹é½å¯è½å¯¼è´è¢«ä»£ç çæå¨è¦ç |
| | | *ä¸å¡è¯·å¨@/extension/widesea_wms/invoices/Dt_InboundOrder.jsæ¤å¤ç¼å |
| | | --> |
| | | <template> |
| | | <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions" |
| | | :table="table" :extend="extend"> |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/widesea_wms/stock/SelectionWheels.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: 'ID', |
| | | footer: "Foots", |
| | | cnName: 'é¢éä¿¡æ¯', |
| | | name: 'stock/SelectionWheels', |
| | | url: "/SelectionWheels/", |
| | | sortName: "ID" |
| | | }); |
| | | const editFormFields = ref({ |
| | | ID:"", |
| | | CLTM:"", |
| | | CZTM:"", |
| | | location:"", |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { "title": "车轮æ¡ç ", "field": "CLTM", type: "text" }, |
| | | ], |
| | | [ |
| | | { "title": "车轴æ¡ç ", "field": "CZTM", type: "text" }, |
| | | |
| | | ], |
| | | [ |
| | | { "title": "åºä½å·", "field": "location", type: "text" }, |
| | | |
| | | ] |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | ID:"", |
| | | cltm:"", |
| | | cztm:"", |
| | | location:"", |
| | | |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { "title": "车轮æ¡ç ", "field": "cltm", type: "text" }, |
| | | ], |
| | | [ |
| | | { "title": "车轴æ¡ç ", "field": "cztm", type: "text" }, |
| | | |
| | | ], |
| | | [ |
| | | { "title": "åºä½å·", "field": "location", type: "text" }, |
| | | |
| | | ] |
| | | |
| | | ]); |
| | | const columns = ref([ |
| | | { field: 'id', title: '主é®ID', type: 'int', width: 110, readonly: true, hidden: true, require: true, align: 'left' }, |
| | | { field: 'cltm', title: '车轮æ¡ç ', type: 'string', width: 150, align: 'left' }, |
| | | { field: 'cztm', title: '车轴æ¡ç ', type: 'string', width: 150, align: 'left' }, |
| | | { field: 'location', title: 'åºä½å·', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'whereFrom', title: 'æ¥æº', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'createDate', title: 'å建æ¶é´', type: 'date', sort: true, width: 100, align: 'left' }, |
| | | ]); |
| | | |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "#detailTable", |
| | | columns: [], |
| | | sortName: "", |
| | | key: "" |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | |
| | | afterLevel = "ç级6"; |
| | | return afterLevel; |
| | | } |
| | | |
| | | public static string JkChangeType(string beforeLevel) |
| | | { |
| | | string afterLevel = string.Empty; |
| | | |
| | | if (beforeLevel.Contains("å")) |
| | | afterLevel = "æ£ä¿®åå"; |
| | | if (beforeLevel.Contains("ç级1")) |
| | | afterLevel = "æ£ä¿®ç级1"; |
| | | if (beforeLevel.Contains("ç级2")) |
| | | afterLevel = "æ£ä¿®ç级2"; |
| | | if (beforeLevel.Contains("ç级3")) |
| | | afterLevel = "æ£ä¿®ç级3"; |
| | | if (beforeLevel.Contains("ç级4")) |
| | | afterLevel = "æ£ä¿®ç级4"; |
| | | if (beforeLevel.Contains("ç级5")) |
| | | afterLevel = "æ£ä¿®ç级5"; |
| | | if (beforeLevel.Contains("ç级6")) |
| | | afterLevel = "æ£ä¿®ç级6"; |
| | | return afterLevel; |
| | | } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "车轴æ¡ç ")] |
| | | [ExporterHeader(DisplayName = "车轴æ¡ç ")] |
| | | [SugarColumn(ColumnName = "CLTM", Length = 50, ColumnDescription = "车轴æ¡ç ")] |
| | | [SugarColumn(ColumnName = "CZTM", Length = 50, ColumnDescription = "车轴æ¡ç ")] |
| | | public string CZTM { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = " æ¥æº")] |
| | | [ExporterHeader(DisplayName = "æ¥æº")] |
| | | [SugarColumn(ColumnName = "Location", Length = 20, ColumnDescription = "æ¥æº")] |
| | | [SugarColumn(ColumnName = "WhereFrom", Length = 20, ColumnDescription = "æ¥æº")] |
| | | public string WhereFrom { get; set; } |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | //[SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | //public int Wheels_ID { get; set; } |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Wheels_ID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 车轮ç¼å· |
| | | /// </summary> |
| | | [ImporterHeader(Name = "车轮ç¼å·")] |
| | | [ExporterHeader(DisplayName = "车轮ç¼å·")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "车轮ç¼å·")] |
| | | [SugarColumn(IsNullable = false,ColumnName = "wheel_code", Length = 50, ColumnDescription = "车轮ç¼å·")] |
| | | public string wheel_code { get; set; } |
| | | |
| | | |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "轮对å·")] |
| | | [ExporterHeader(DisplayName = "轮对å·")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "轮对å·")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "feedbackno", Length = 50, ColumnDescription = "轮对å·")] |
| | | public string feedbackno { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "车ç»å·")] |
| | | [ExporterHeader(DisplayName = "车ç»å·")] |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "车ç»å·")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "axes_code", Length = 20, ColumnDescription = "车ç»å·")] |
| | | public string axes_code { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "æ°/æ§")] |
| | | [ExporterHeader(DisplayName = "æ°/æ§")] |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "æ°/æ§")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "repair_item", Length = 20, ColumnDescription = "æ°/æ§")] |
| | | public string repair_item { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "车轮类å«(M/T)")] |
| | | [ExporterHeader(DisplayName = "车轮类å«(M/T)")] |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "车轮类å«(M/T)")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "dqtz_state", Length = 20, ColumnDescription = "车轮类å«(M/T)")] |
| | | public string dqtz_state { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "车轮åå·")] |
| | | [ExporterHeader(DisplayName = "车轮åå·")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "车轮åå·")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "axes_type", Length = 50, ColumnDescription = "车轮åå·")] |
| | | public string axes_type { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "æ¯åç级")] |
| | | [ExporterHeader(DisplayName = "æ¯åç级")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æ¯åç级")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "venderno", Length = 50, ColumnDescription = "æ¯åç级")] |
| | | public string venderno { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "è½®/çç±»å")] |
| | | [ExporterHeader(DisplayName = "è½®/çç±»å")] |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "è½®/çç±»å")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "bearing_type", Length = 20, ColumnDescription = "è½®/çç±»å")] |
| | | public string bearing_type { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å¶å¨çæè´¨")] |
| | | [ExporterHeader(DisplayName = "å¶å¨çæè´¨")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å¶å¨çæè´¨")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "matertextrue", Length = 50, ColumnDescription = "å¶å¨çæè´¨")] |
| | | public string matertextrue { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "车å")] |
| | | [ExporterHeader(DisplayName = "车å")] |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "车å")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "model", Length = 20, ColumnDescription = "车å")] |
| | | public string model { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å¶é å")] |
| | | [ExporterHeader(DisplayName = "å¶é å")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å¶é å")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "wheel_from", Length = 50, ColumnDescription = "å¶é å")] |
| | | public string wheel_from { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "é
å±å±")] |
| | | [ExporterHeader(DisplayName = "é
å±å±")] |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "é
å±å±")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "wheel_pan", Length = 20, ColumnDescription = "é
å±å±")] |
| | | public string wheel_pan { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "è½®æ¯åç´å¾")] |
| | | [ExporterHeader(DisplayName = "è½®æ¯åç´å¾")] |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "è½®æ¯åç´å¾")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "zjj", Length = 20, ColumnDescription = "è½®æ¯åç´å¾")] |
| | | public string zjj { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "é¢ä¼°éä¿®åè½®å¾å¼")] |
| | | [ExporterHeader(DisplayName = "é¢ä¼°éä¿®åè½®å¾å¼")] |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "é¢ä¼°éä¿®åè½®å¾å¼")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "zszj", Length = 20, ColumnDescription = "é¢ä¼°éä¿®åè½®å¾å¼")] |
| | | public string zszj { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "è½®ç¼å")] |
| | | [ExporterHeader(DisplayName = "è½®ç¼å")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "è½®ç¼å")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "zcd", Length = 50, ColumnDescription = "è½®ç¼å")] |
| | | public string zcd { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "è½´è£
/è½®è£
å¶å¨çå©ä½ç£¨è")] |
| | | [ExporterHeader(DisplayName = "è½´è£
/è½®è£
å¶å¨çå©ä½ç£¨è")] |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "è½´è£
/è½®è£
å¶å¨çå©ä½ç£¨è")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "m_zdpzzj", Length = 20, ColumnDescription = "è½´è£
/è½®è£
å¶å¨çå©ä½ç£¨è")] |
| | | public string m_zdpzzj { get; set; } |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [ImporterHeader(Name = "夿³¨")] |
| | | [ExporterHeader(DisplayName = "夿³¨")] |
| | | [SugarColumn(IsNullable = false, Length = 100, ColumnDescription = "夿³¨")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "remarks", Length = 100, ColumnDescription = "夿³¨")] |
| | | public string remarks { get; set; } |
| | | /// <summary> |
| | | /// ä¿å
»å¨ææé |
| | |
| | | [ImporterHeader(Name = "ä¿å
»å¨ææé")] |
| | | [ExporterHeader(DisplayName = "ä¿å
»å¨ææé")] |
| | | |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "ä¿å
»å¨ææé")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "mqtz_state", Length = 20, ColumnDescription = "ä¿å
»å¨ææé")] |
| | | public string mqtz_state { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "䏿¬¡ä¿å
»æ¶é´")] |
| | | [ExporterHeader(DisplayName = "䏿¬¡ä¿å
»æ¶é´")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "䏿¬¡ä¿å
»æ¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "dt_bearing_dx", Length = 50, ColumnDescription = "䏿¬¡ä¿å
»æ¶é´")] |
| | | public string dt_bearing_dx { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "䏿¬¡ä¿å
»æ¶é´")] |
| | | [ExporterHeader(DisplayName = "䏿¬¡ä¿å
»æ¶é´")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "䏿¬¡ä¿å
»æ¶é´")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "dt_rtn", Length = 50, ColumnDescription = "䏿¬¡ä¿å
»æ¶é´")] |
| | | public string dt_rtn { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | [ImporterHeader(Name = "é¢ä¼°è½®å¾å¼")] |
| | | [ExporterHeader(DisplayName = "é¢ä¼°è½®å¾å¼")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "é¢ä¼°è½®å¾å¼")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "Wheels_ygljz", Length = 50, ColumnDescription = "é¢ä¼°è½®å¾å¼")] |
| | | public string Wheels_ygljz { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å
¥åºæ¥æ")] |
| | | [ExporterHeader(DisplayName = "å
¥åºæ¥æ")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å
¥åºæ¥æ")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "dt_ins", Length = 50, ColumnDescription = "å
¥åºæ¥æ")] |
| | | public string dt_ins { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "äº¤æ£æ¥æ")] |
| | | [ExporterHeader(DisplayName = "äº¤æ£æ¥æ")] |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "äº¤æ£æ¥æ")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "dt_detect", Length = 20, ColumnDescription = "äº¤æ£æ¥æ")] |
| | | public string dt_detect { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "交æ£äºº")] |
| | | [ExporterHeader(DisplayName = "交æ£äºº")] |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "交æ£äºº")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "wheel_type", Length = 20, ColumnDescription = "交æ£äºº")] |
| | | public string wheel_type { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å
¥åºäºº")] |
| | | [ExporterHeader(DisplayName = "å
¥åºäºº")] |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "å
¥åºäºº")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "dept_code", Length = 20, ColumnDescription = "å
¥åºäºº")] |
| | | public string dept_code { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "å¤ç¨ç¶æ1")] |
| | | [ExporterHeader(DisplayName = "å¤ç¨ç¶æ1")] |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "å¤ç¨ç¶æ1")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "spare_state1", Length = 20, ColumnDescription = "å¤ç¨ç¶æ1")] |
| | | public string spare_state1 { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "è´§ä½å·")] |
| | | [ExporterHeader(DisplayName = "è´§ä½å·")] |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "è´§ä½å·")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "Locate", Length = 20, ColumnDescription = "è´§ä½å·")] |
| | | public string Locate { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [ImporterHeader(Name = "ç¶æ")] |
| | | [ExporterHeader(DisplayName = "ç¶æ")] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç¶æ")] |
| | | [SugarColumn(IsNullable = false, ColumnName = "Wheels_CurrentStatue", Length = 50, ColumnDescription = "ç¶æ")] |
| | | public int? Wheels_CurrentStatue { get; set; } = 1; |
| | | |
| | | |
| | |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.WMS; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.GZ_ZC.DistributeWheels; |
| | | using WIDESEA_StorageBasicRepository; |
| | | using WIDESEA_StorageBasicService; |
| | | |
| | | namespace WIDESEA_StoragIntegrationServices |
| | | { |
| | |
| | | if (string.IsNullOrEmpty(level)) throw new Exception("ç级转æ¢å¤±è´¥,è¯·æ£æ¥æ¥å£ççº§åæ°"); |
| | | //level = leftLevel; |
| | | } |
| | | else if ("rihgt".Equals(wheelsPosition)) |
| | | else if ("right".Equals(wheelsPosition)) |
| | | { |
| | | level = LevelChangeHelper.LevelChangeType(rightLevel); |
| | | if (string.IsNullOrEmpty(level)) throw new Exception("ç级转æ¢å¤±è´¥,è¯·æ£æ¥æ¥å£ççº§åæ°"); |
| | |
| | | |
| | | _unitOfWorkManage.BeginTran(); //å¼å¯äºå¡ |
| | | |
| | | |
| | | |
| | | _CZInfo_MesRepository.AddData(CZInfo_Mes); //æ·»å è½¦è½´ä¿¡æ¯ |
| | | _WheelsStockRepository.UpdateData(wheelsStocks); //æ´æ°åºåæ°æ® |
| | | _locationRepository.UpdateData(locationInfos); //æ´æ°åºä½æ°æ® |
| | | _taskRepository.AddData(listTask); //æ·»å 任塿°æ® |
| | | if(leftContainer != null) |
| | | { |
| | | _AxleshelfService.AddAxleshe(leftContainer, CZInfo_Mes,clxh, wheelsPosition, newOrOld); //æ·»å è½¦è½´ä¸æ¶è®°å½ |
| | | } |
| | | if (rightContainer != null) |
| | | { |
| | | _AxleshelfService.AddAxleshe(rightContainer, CZInfo_Mes,clxh,wheelsPosition,newOrOld); //æ·»å è½¦è½´ä¸æ¶è®°å½ |
| | | } |
| | | |
| | | //ä¸ååºåºä»»å¡ç»WCS |
| | | var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress); |
| | |
| | | _unitOfWorkManage.RollbackTran(); //åæ»äºå¡ |
| | | throw new Exception("WCSå¤ç失败"); |
| | | } |
| | | |
| | | _unitOfWorkManage.CommitTran(); //æäº¤äºå¡ |
| | | content.OK($"车轮åºåºä»»å¡ä¸åç»WCSæå."); |
| | | return content; |
| | | } |
| | | else |
| | |
| | | |
| | | |
| | | |
| | | public WebResponseContent SaveCZInfo2(SaveModel saveModel) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | //å¦å½åå卿ªå¼å§å
¥åºç车轮æå¶å¨çæ°æ®,åç¦æ¢ä¿åæ°æ°æ® 以鲿°æ®æ··ä¹± |
| | | var waitInbound = _CZInfo_MesRepository.QueryFirst(x => x.CurrentStatue == "0"); |
| | | if (waitInbound != null) |
| | | throw new Exception("å½åå卿ªå¼å§å
¥åºçè½¦è½´æ°æ®,请å
䏿¶å¯å¨ååä¿åä¿¡æ¯!"); |
| | | |
| | | //车轴æ¡ç |
| | | string czCode = saveModel.MainData["cztm"].ToString(); |
| | | if (string.IsNullOrEmpty(czCode)) |
| | | throw new Exception($"车轴æ¡ç ä¸è½ä¸ºç©º"); |
| | | |
| | | //è½¦è½´å· |
| | | string czh = saveModel.MainData["czh"].ToString(); |
| | | if (string.IsNullOrEmpty(czh)) |
| | | throw new Exception($"车轴å·ä¸è½ä¸ºç©º"); |
| | | //var clinfo = _InWheels_MesRepository.QueryFirst(x => x.Wheels_code == czCode); |
| | | //if (clinfo != null) throw new Exception("车轮å½å
¥ä¿¡æ¯å·²åå¨"); |
| | | |
| | | //åºåå· |
| | | //string madeUnit = saveModel.MainData["xlh"].ToString(); |
| | | //轮对æ¡ç |
| | | string ldtm = saveModel.MainData["ldtm"].ToString(); |
| | | //车å |
| | | string Cartype = saveModel.MainData["chexing"].ToString(); |
| | | if (string.IsNullOrEmpty(Cartype)) throw new Exception("éé
失败ï¼è½¦è½´è½¦ååæ°ä¸ºç©º"); |
| | | |
| | | //车轴åå· |
| | | string czxh = saveModel.MainData["czxh"].ToString(); |
| | | |
| | | //车轮åå· |
| | | string clxh = saveModel.MainData["clxh"].ToString(); |
| | | |
| | | //卿屿§ |
| | | string mttype = saveModel.MainData["mttype"].ToString(); |
| | | |
| | | //左轮座ç´å¾A1 |
| | | string zlzA1 = saveModel.MainData["zlzA1"].ToString(); |
| | | //左轮座ç´å¾A1 |
| | | string zlzA2 = saveModel.MainData["zlzA2"].ToString(); |
| | | //左轮座ç´å¾A1 |
| | | string zlzA3 = saveModel.MainData["zlzA3"].ToString(); |
| | | //左轮座ç´å¾A |
| | | string zlzA = saveModel.MainData["zlza"].ToString(); |
| | | |
| | | //左轮座ç´å¾B1 |
| | | string zlzB1 = saveModel.MainData["zlzB1"].ToString(); |
| | | //左轮座ç´å¾B1 |
| | | string zlzB2 = saveModel.MainData["zlzB2"].ToString(); |
| | | //左轮座ç´å¾B1 |
| | | string zlzB3 = saveModel.MainData["zlzB3"].ToString(); |
| | | //左轮座ç´å¾B |
| | | string zlzB = saveModel.MainData["zlzb"].ToString(); |
| | | |
| | | //左轮座ç´å¾C1 |
| | | string zlzC1 = saveModel.MainData["zlzC1"].ToString(); |
| | | //左轮座ç´å¾C1 |
| | | string zlzC2 = saveModel.MainData["zlzC2"].ToString(); |
| | | //左轮座ç´å¾C1 |
| | | string zlzC3 = saveModel.MainData["zlzC3"].ToString(); |
| | | //左轮座ç´å¾C |
| | | string zlzC = saveModel.MainData["zlzc"].ToString(); |
| | | |
| | | //å³è½®åº§ç´å¾A1 |
| | | string ylzA1 = saveModel.MainData["ylzA1"].ToString(); |
| | | //å³è½®åº§ç´å¾A1 |
| | | string ylzA2 = saveModel.MainData["ylzA2"].ToString(); |
| | | //å³è½®åº§ç´å¾A1 |
| | | string ylzA3 = saveModel.MainData["ylzA3"].ToString(); |
| | | //å³è½®åº§ç´å¾A |
| | | string ylzA = saveModel.MainData["ylza"].ToString(); |
| | | |
| | | //å³è½®åº§ç´å¾B1 |
| | | string ylzB1 = saveModel.MainData["ylzB1"].ToString(); |
| | | //å³è½®åº§ç´å¾B1 |
| | | string ylzB2 = saveModel.MainData["ylzB2"].ToString(); |
| | | //å³è½®åº§ç´å¾B1 |
| | | string ylzB3 = saveModel.MainData["ylzB3"].ToString(); |
| | | //å³è½®åº§ç´å¾B |
| | | string ylzB = saveModel.MainData["ylzb"].ToString(); |
| | | |
| | | //å³è½®åº§ç´å¾C1 |
| | | string ylzC1 = saveModel.MainData["ylzC1"].ToString(); |
| | | //å³è½®åº§ç´å¾C1 |
| | | string ylzC2 = saveModel.MainData["ylzC2"].ToString(); |
| | | //å³è½®åº§ç´å¾C1 |
| | | string ylzC3 = saveModel.MainData["ylzC3"].ToString(); |
| | | //å³è½®åº§ç´å¾C |
| | | string ylzC = saveModel.MainData["ylzc"].ToString(); |
| | | |
| | | //左轮座ç´å¾ |
| | | string zlzzj = saveModel.MainData["zlzzj"].ToString(); |
| | | //å³è½®åº§ç´å¾ |
| | | string ylzzj = saveModel.MainData["ylzzj"].ToString(); |
| | | |
| | | //æ°æ§ |
| | | string newOrOld = saveModel.MainData["NOdirection"].ToString(); |
| | | if (string.IsNullOrEmpty(newOrOld)) throw new Exception("æªéæ©æ°æ§ç±»å,è¯·éæ©!"); |
| | | |
| | | //车轮ä½ç½® |
| | | string wheelsPosition = saveModel.MainData["wheelsPosition"].ToString(); |
| | | if (string.IsNullOrEmpty(wheelsPosition)) throw new Exception("æªéæ©è½¦è½®ä½ç½®,è¯·éæ©!"); |
| | | |
| | | //左轮ç级 |
| | | string leftLevel = saveModel.MainData["zlzdj"].ToString(); |
| | | if (string.IsNullOrEmpty(leftLevel)) throw new Exception("éé
失败ï¼è½¦è½´å·¦è½®åº§ççº§åæ°ä¸ºç©º"); |
| | | //å³è½®ç级 |
| | | string rightLevel = saveModel.MainData["ylzdj"].ToString(); |
| | | if (string.IsNullOrEmpty(rightLevel)) throw new Exception("éé
失败ï¼è½¦è½´å³è½®åº§ççº§åæ°ä¸ºç©º"); |
| | | |
| | | //ç»´ä¿®ä»»å¡ |
| | | string wxrw = saveModel.MainData["wxrw"].ToString(); |
| | | if (string.IsNullOrEmpty(wxrw)) throw new Exception("éé
失败ï¼ç»´ä¿®ä»»å¡åæ°ä¸ºç©º"); |
| | | |
| | | string level = string.Empty; |
| | | //string rightlevel = string.Empty; |
| | | if ("all".Equals(wheelsPosition)) |
| | | { |
| | | level = LevelChangeHelper.LevelChangeType(leftLevel); |
| | | if (string.IsNullOrEmpty(level)) throw new Exception("ç级转æ¢å¤±è´¥,è¯·æ£æ¥æ¥å£ççº§åæ°"); |
| | | } |
| | | else if ("left".Equals(wheelsPosition)) |
| | | { |
| | | level = LevelChangeHelper.LevelChangeType(leftLevel); |
| | | if (string.IsNullOrEmpty(level)) throw new Exception("ç级转æ¢å¤±è´¥,è¯·æ£æ¥æ¥å£ççº§åæ°"); |
| | | //level = leftLevel; |
| | | } |
| | | else if ("rihgt".Equals(wheelsPosition)) |
| | | { |
| | | level = LevelChangeHelper.LevelChangeType(rightLevel); |
| | | if (string.IsNullOrEmpty(level)) throw new Exception("ç级转æ¢å¤±è´¥,è¯·æ£æ¥æ¥å£ççº§åæ°"); |
| | | //level = rightLevel; |
| | | } |
| | | |
| | | string rw = CheckTaskChangeHelper.CheckTaskChange(wxrw); |
| | | if (string.IsNullOrEmpty(rw)) throw new Exception("维修任å¡è½¬æ¢å¤±è´¥,è¯·æ£æ¥ç»´ä¿®ä»»å¡åæ°"); |
| | | |
| | | if (rw != newOrOld) throw new Exception("éé
失败:éé
æ°æ§è½®ä¸ç»´ä¿®ä»»å¡è§£æä¸ä¸è´"); |
| | | |
| | | Dt_SelectionStandards selectionStandards = _SelectionStandardsRepository.QueryFirst(x => x.CarType.Contains(Cartype) && x.mttype == mttype && x.neworold == newOrOld && level.Contains(x.gkdj)); |
| | | if (selectionStandards == null) throw new Exception($"æ¤è½¦å{Cartype}çéé
æ åå¼å¸¸,è¯·æ ¸å¯¹éé
æ åä¿¡æ¯!"); |
| | | |
| | | Dt_CZInfo_mes CZInfo_Mes = new Dt_CZInfo_mes |
| | | { |
| | | CZTM = czCode, |
| | | CHEXING = Cartype, |
| | | CreateDate = DateTime.Now, |
| | | Creater = "admin", |
| | | CurrentStatue = "1", |
| | | CZH = czh, |
| | | CZXH = czxh, |
| | | LDTM = ldtm, |
| | | MTTYPE = mttype, |
| | | ZLZA1 = zlzA1, |
| | | ZLZA2 = zlzA2, |
| | | ZLZA3 = zlzA3, |
| | | ZLZA = zlzA, |
| | | ZLZB1 = zlzB1, |
| | | ZLZB2 = zlzB2, |
| | | ZLZB3 = zlzB3, |
| | | ZLZB = zlzB, |
| | | ZLZC1 = zlzC1, |
| | | ZLZC2 = zlzC2, |
| | | ZLZC3 = zlzC3, |
| | | ZLZC = zlzC, |
| | | YLZA1 = ylzA1, |
| | | YLZA2 = ylzA2, |
| | | YLZA3 = ylzA3, |
| | | YLZA = ylzA, |
| | | YLZB1 = ylzB1, |
| | | YLZB2 = ylzB2, |
| | | YLZB3 = ylzB3, |
| | | YLZB = ylzB, |
| | | YLZC1 = ylzC1, |
| | | YLZC2 = ylzC2, |
| | | YLZC3 = ylzC3, |
| | | YLZC = ylzC, |
| | | ZLZZJ = zlzzj, |
| | | YLZZJ = ylzzj, |
| | | ZLZDJ = leftLevel, |
| | | YLZDJ = rightLevel, |
| | | WXRW = wxrw |
| | | }; |
| | | |
| | | //å·¦åºåºè½¦è½® |
| | | Dt_WheelsStock leftContainer = null; |
| | | //å³åºåºè½¦è½® |
| | | Dt_WheelsStock rightContainer = null; |
| | | |
| | | //å·¦åºåºè½¦è½® |
| | | Dt_WheelsStock_Old leftContainer2 = null; |
| | | //å³åºåºè½¦è½® |
| | | Dt_WheelsStock_Old rightContainer2 = null; |
| | | |
| | | |
| | | //忏©æ¶é´ |
| | | var hourpara = _configService.GetByConfigKey(CateGoryConst.CONFIG_SYS_Parameters, SysConfigConst.TempHour); |
| | | int hour = hourpara.ConfigValue.ObjToInt(); |
| | | |
| | | int knum = 1; |
| | | |
| | | |
| | | //æ¾åºææç¬¦åæ¡ä»¶çåºå车轮 |
| | | var WheelsList = _WheelsStockRepository.QueryData(x => x.Wheels_CurrentStatue == 1 && x.Wheels_mttype == CZInfo_Mes.MTTYPE && x.Wheels_ldxh == clxh && x.Wheels_NewOrOld == newOrOld && x.CreateDate.AddHours(hour) <= DateTime.Now); |
| | | if (null != WheelsList && WheelsList.Count > 0) |
| | | { |
| | | knum = 2; |
| | | } |
| | | var Wheelsdata=dt_WheelsStock_OldRepository.QueryData(x => x.Wheels_CurrentStatue == 1 && x.dqtz_state == CZInfo_Mes.MTTYPE && x.axes_type == clxh && x.repair_item == newOrOld); |
| | | if (null != Wheelsdata && Wheelsdata.Count > 0) |
| | | { |
| | | knum = 3; |
| | | } |
| | | |
| | | |
| | | //x.Wheels_CarType == CZInfo_Mes.CHEXING && x.Wheels_ldtm == CZInfo_Mes.LDTM && selectionStandards.CarType.Contains(x.Wheels_CarType) |
| | | if (knum!=1) |
| | | { |
| | | if ("all".Equals(wheelsPosition) || string.IsNullOrEmpty(wheelsPosition)) |
| | | { |
| | | if (null == leftContainer) |
| | | { |
| | | if(knum==2) |
| | | { |
| | | leftContainer = _WheelsStockService.GetSelectionWheelsStock(WheelsList, selectionStandards, CZInfo_Mes, "left", newOrOld); |
| | | if (null != leftContainer) |
| | | WheelsList.Remove(leftContainer); |
| | | } |
| | | |
| | | if (knum == 3) |
| | | { |
| | | leftContainer2 = _WheelsStockService.GetSelectionWheels(Wheelsdata, selectionStandards, CZInfo_Mes, "left", newOrOld); |
| | | if (null != leftContainer2) |
| | | Wheelsdata.Remove(leftContainer2); |
| | | } |
| | | |
| | | } |
| | | if (null == rightContainer) |
| | | { |
| | | if(knum ==2) |
| | | { |
| | | rightContainer = _WheelsStockService.GetSelectionWheelsStock(WheelsList, selectionStandards, CZInfo_Mes, "right", newOrOld); |
| | | if (null != rightContainer) |
| | | WheelsList.Remove(rightContainer); |
| | | } |
| | | |
| | | if(knum == 3) |
| | | { |
| | | rightContainer2 = _WheelsStockService.GetSelectionWheels(Wheelsdata, selectionStandards, CZInfo_Mes, "right", newOrOld); |
| | | if (null != rightContainer2) |
| | | Wheelsdata.Remove(rightContainer2); |
| | | } |
| | | |
| | | } |
| | | //if (null == leftContainer || null == rightContainer) |
| | | } |
| | | else if ("left".Equals(wheelsPosition)) |
| | | { |
| | | if (knum == 2) |
| | | { |
| | | leftContainer = _WheelsStockService.GetSelectionWheelsStock(WheelsList, selectionStandards, CZInfo_Mes, "left", newOrOld); |
| | | } |
| | | if (knum == 3) |
| | | { |
| | | leftContainer2 = _WheelsStockService.GetSelectionWheels(Wheelsdata, selectionStandards, CZInfo_Mes, "left", newOrOld); |
| | | } |
| | | |
| | | //if (null == leftContainer) |
| | | } |
| | | else if ("right".Equals(wheelsPosition)) |
| | | { |
| | | if (knum == 2) |
| | | { |
| | | rightContainer = _WheelsStockService.GetSelectionWheelsStock(WheelsList, selectionStandards, CZInfo_Mes, "right", newOrOld); |
| | | } |
| | | if (knum == 3) |
| | | { |
| | | rightContainer2 = _WheelsStockService.GetSelectionWheels(Wheelsdata, selectionStandards, CZInfo_Mes, "right", newOrOld); |
| | | } |
| | | //if (null == rightContainer) |
| | | } |
| | | } |
| | | |
| | | if ("all".Equals(wheelsPosition)) |
| | | { |
| | | if (knum == 2) |
| | | { |
| | | if (null == leftContainer || null == rightContainer) |
| | | return content.Error("æªæ¾å°ä¸¤ä¾§å¯å¹é
çåºåºè½¦è½®,车åï¼" + Cartype); |
| | | } |
| | | if (knum == 3) |
| | | { |
| | | if (null == leftContainer2 || null == rightContainer2) |
| | | return content.Error("æªæ¾å°ä¸¤ä¾§å¯å¹é
çåºåºè½¦è½®,车åï¼" + Cartype); |
| | | } |
| | | } |
| | | |
| | | if (knum == 2) |
| | | { |
| | | if (null != leftContainer || null != rightContainer) |
| | | { |
| | | List<Dt_WheelsStock> wheelsStocks = new List<Dt_WheelsStock>(); |
| | | if (null != leftContainer) |
| | | { |
| | | leftContainer.Wheels_CurrentStatue = 3; |
| | | |
| | | wheelsStocks.Add(leftContainer); |
| | | } |
| | | if (null != rightContainer) |
| | | { |
| | | rightContainer.Wheels_CurrentStatue = 3; |
| | | wheelsStocks.Add(rightContainer); |
| | | } |
| | | |
| | | _unitOfWorkManage.BeginTran(); //å¼å¯äºå¡ |
| | | |
| | | _WheelsStockRepository.UpdateData(wheelsStocks); //æ´æ°åºåæ°æ® |
| | | |
| | | return content; |
| | | } |
| | | else |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); //åæ»äºå¡ |
| | | return content.Error("æªæ¾å°å¯å¹é
çåºåºè½¦è½®,车åï¼" + Cartype); |
| | | } |
| | | } |
| | | else if (knum == 3) |
| | | { |
| | | if (null != leftContainer2 || null != rightContainer2) |
| | | { |
| | | List<Dt_WheelsStock_Old> wheelsStocks = new List<Dt_WheelsStock_Old>(); |
| | | if (null != leftContainer2) |
| | | { |
| | | leftContainer2.Wheels_CurrentStatue = 3; |
| | | |
| | | wheelsStocks.Add(leftContainer2); |
| | | } |
| | | if (null != rightContainer2) |
| | | { |
| | | rightContainer2.Wheels_CurrentStatue = 3; |
| | | wheelsStocks.Add(rightContainer2); |
| | | } |
| | | |
| | | _unitOfWorkManage.BeginTran(); //å¼å¯äºå¡ |
| | | |
| | | dt_WheelsStock_OldRepository.UpdateData(wheelsStocks); //æ´æ°åºåæ°æ® |
| | | |
| | | return content; |
| | | } |
| | | else |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); //åæ»äºå¡ |
| | | return content.Error("æªæ¾å°å¯å¹é
çåºåºè½¦è½®,车åï¼" + Cartype); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return content.Error("æªæ¾å°å¯å¹é
çåºåºè½¦è½®,车åï¼" + Cartype); |
| | | } |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return content.Error($"䏿¶å¤±è´¥:{ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | private Dt_Task CreateOutTask(Dt_WheelsStock wheelsStock, string CZTM) |
| | | { |
| | | CheckInfo checkInfo = new CheckInfo() |
| | |
| | | }; |
| | | return task; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | private readonly IDt_WheelsStockService _WheelsStockService; |
| | | private readonly IDt_CZInfo_mesRepository _CZInfo_MesRepository; |
| | | private readonly IDt_WheelsStock_OldRepository dt_WheelsStock_OldRepository; |
| | | private readonly ISelectionWheelsRepository _SelectionWheelsRepository; |
| | | private readonly IDt_AxleshelfService _AxleshelfService; |
| | | |
| | | |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | |
| | | public ToAPPService(ILocationInfoRepository locationRepository, IDt_TaskRepository taskRepository, ISys_ConfigService configService, IDt_InWheels_mesRepository inWheels_MesRepository, IDt_WheelsStockRepository wheelsStockRepository, IDt_SelectionStandardsRepository selectionStandardsRepository, IDt_WheelsStockService wheelsStockService, IDt_CZInfo_mesRepository cZInfo_MesRepository, IUnitOfWorkManage unitOfWorkManage, IDt_WheelsStock_OldRepository dt_WheelsStock_OldRepository) |
| | | public ToAPPService(ILocationInfoRepository locationRepository, IDt_TaskRepository taskRepository, ISys_ConfigService configService, IDt_InWheels_mesRepository inWheels_MesRepository, IDt_WheelsStockRepository wheelsStockRepository, IDt_SelectionStandardsRepository selectionStandardsRepository, IDt_WheelsStockService wheelsStockService, IDt_CZInfo_mesRepository cZInfo_MesRepository, IUnitOfWorkManage unitOfWorkManage, IDt_WheelsStock_OldRepository dt_WheelsStock_OldRepository, ISelectionWheelsRepository selectionWheelsRepository, IDt_AxleshelfService axleshelfService) |
| | | { |
| | | _InWheels_MesRepository = inWheels_MesRepository; |
| | | _locationRepository = locationRepository; |
| | |
| | | _CZInfo_MesRepository = cZInfo_MesRepository; |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | this.dt_WheelsStock_OldRepository = dt_WheelsStock_OldRepository; |
| | | _SelectionWheelsRepository = selectionWheelsRepository; |
| | | _AxleshelfService = axleshelfService; |
| | | } |
| | | } |
| | | } |
| | |
| | | using WIDESEA_Common.ZY; |
| | | using Autofac.Core; |
| | | using NetTaste; |
| | | using AngleSharp.Io; |
| | | |
| | | namespace WIDESEA_StorageBasicService; |
| | | |
| | |
| | | |
| | | public Dt_WheelsStock_Old GetSelectionWheels(List<Dt_WheelsStock_Old> wheelsStocks, Dt_SelectionStandards selectionStandards, Dt_CZInfo_mes CZInfo_Mes, string wheelsPosition, string newOrOld) |
| | | { |
| | | //è¿çéä¸é |
| | | decimal selectionUpperValue = selectionStandards.upperValue; |
| | | //è¿çéä¸é |
| | | decimal selectionLowerValue = selectionStandards.lowerValue; |
| | | |
| | | decimal mesStand = 0; |
| | | string level = string.Empty; |
| | | |
| | | |
| | | if ("left".Equals(wheelsPosition)) //å¹é
左轮座轮å |
| | | try |
| | | { |
| | | mesStand = decimal.Parse(CZInfo_Mes.ZLZZJ); |
| | | level = LevelChangeHelper.LevelChangeType(CZInfo_Mes.ZLZDJ); |
| | | wheelsStocks = wheelsStocks.Where(x => x.venderno == level && x.repair_item == newOrOld).ToList(); |
| | | } |
| | | else //å¦åå¹é
å³è½®åº§è½®å |
| | | { |
| | | mesStand = decimal.Parse(CZInfo_Mes.YLZZJ); |
| | | level = LevelChangeHelper.LevelChangeType(CZInfo_Mes.YLZDJ); |
| | | wheelsStocks = wheelsStocks.Where(x => x.venderno == level && x.repair_item == newOrOld).ToList(); |
| | | } |
| | | foreach (var item in wheelsStocks) |
| | | { |
| | | string Wheels_gkcc = ""; |
| | | string Wheels_gkzja = ""; |
| | | string Wheels_gkzjb = ""; |
| | | string Wheels_gkzjc = ""; |
| | | //è¿çéä¸é |
| | | decimal selectionUpperValue = selectionStandards.upperValue; |
| | | //è¿çéä¸é |
| | | decimal selectionLowerValue = selectionStandards.lowerValue; |
| | | |
| | | SaveModel saveModel = new SaveModel(); |
| | | saveModel.MainData = new Dictionary<string, object> |
| | | decimal mesStand = 0; |
| | | string level = string.Empty; |
| | | |
| | | |
| | | if ("left".Equals(wheelsPosition)) //å¹é
左轮座轮å |
| | | { |
| | | mesStand = decimal.Parse(CZInfo_Mes.ZLZZJ); |
| | | level = LevelChangeHelper.JkChangeType(CZInfo_Mes.YLZDJ); |
| | | wheelsStocks = wheelsStocks.Where(x => x.venderno== level && x.repair_item == newOrOld).ToList(); |
| | | } |
| | | else //å¦åå¹é
å³è½®åº§è½®å |
| | | { |
| | | mesStand = decimal.Parse(CZInfo_Mes.YLZZJ); |
| | | level = LevelChangeHelper.JkChangeType(CZInfo_Mes.YLZDJ); |
| | | |
| | | wheelsStocks = wheelsStocks.Where(x => x.venderno== level && x.repair_item == newOrOld).ToList(); |
| | | } |
| | | foreach (var item in wheelsStocks) |
| | | { |
| | | string Wheels_gkcc = ""; |
| | | string Wheels_gkzja = ""; |
| | | string Wheels_gkzjb = ""; |
| | | string Wheels_gkzjc = ""; |
| | | |
| | | SaveModel saveModel = new SaveModel(); |
| | | saveModel.MainData = new Dictionary<string, object> |
| | | { |
| | | { "cltm", item.wheel_code } |
| | | }; |
| | | WebResponseContent webResponse= _toZYService.ZY_GetCLInfo(saveModel); |
| | | if (webResponse.Status) |
| | | { |
| | | var dta = JsonConvert.DeserializeObject<CLInfo_ZY>(webResponse.Data.ToString()); |
| | | |
| | | Wheels_gkcc = dta.gkcc; |
| | | // æ¯åaçé¢åå¼ |
| | | Wheels_gkzja = dta.GKZJA; |
| | | //æ¯åbçé¢åå¼ |
| | | Wheels_gkzjb = dta.GKZJB; |
| | | //æ¯åcçé¢åå¼ |
| | | Wheels_gkzjc = dta.GKZJC; |
| | | } |
| | | |
| | | if(Wheels_gkcc !="" && Wheels_gkzja!="" && Wheels_gkzjb !="" && Wheels_gkzjc != "") |
| | | { |
| | | //æ¥åºæ¥å¨èå´ä¹å¤çè¿è¡å é¤ |
| | | if (mesStand - (decimal.Parse(Wheels_gkcc)) < selectionLowerValue && mesStand - (decimal.Parse(Wheels_gkcc)) > selectionUpperValue) |
| | | WebResponseContent webResponse = _toZYService.ZY_GetCLInfo(saveModel); |
| | | if (webResponse.Status) |
| | | { |
| | | CLInfo_ZY data = (CLInfo_ZY)webResponse.Data; |
| | | |
| | | wheelsStocks.Remove(item); |
| | | Wheels_gkcc = data.gkcc; |
| | | // æ¯åaçé¢åå¼ |
| | | Wheels_gkzja = data.GKZJA; |
| | | //æ¯åbçé¢åå¼ |
| | | Wheels_gkzjb = data.GKZJB; |
| | | //æ¯åcçé¢åå¼ |
| | | Wheels_gkzjc = data.GKZJC; |
| | | } |
| | | if (selectionStandards.isCantainGK) |
| | | |
| | | if (Wheels_gkcc != "" && Wheels_gkzja != "" && Wheels_gkzjb != "" && Wheels_gkzjc != "") |
| | | { |
| | | //æªé¢è¿çéä¸é |
| | | decimal selectionUpperValue_gk = selectionStandards.upperValue_gk; |
| | | //æªé¢è¿çéä¸é |
| | | decimal selectionLowerValue_gk = selectionStandards.lowerValue_gk; |
| | | |
| | | if ("left".Equals(wheelsPosition)) |
| | | //æ¥åºæ¥å¨èå´ä¹å¤çè¿è¡å é¤ |
| | | if (mesStand - (decimal.Parse(Wheels_gkcc)) < selectionLowerValue && mesStand - (decimal.Parse(Wheels_gkcc)) > selectionUpperValue) |
| | | { |
| | | decimal ZLZA = decimal.Parse(CZInfo_Mes.ZLZA); |
| | | decimal ZLZB = decimal.Parse(CZInfo_Mes.ZLZB); |
| | | decimal ZLZC = decimal.Parse(CZInfo_Mes.ZLZC); |
| | | |
| | | //夿ååï¼è¿è¡å é¤ |
| | | if (ZLZA - (decimal.Parse(Wheels_gkzja)) < selectionLowerValue_gk && ZLZA - (decimal.Parse(Wheels_gkzja)) > selectionUpperValue_gk |
| | | && ZLZB - (decimal.Parse(Wheels_gkzjb)) < selectionLowerValue_gk && ZLZB - (decimal.Parse(Wheels_gkzjb)) > selectionUpperValue_gk |
| | | && ZLZC - (decimal.Parse(Wheels_gkzjc)) < selectionLowerValue_gk && ZLZC - (decimal.Parse(Wheels_gkzjc)) > selectionUpperValue_gk) |
| | | wheelsStocks.Remove(item); |
| | | } |
| | | if (selectionStandards.isCantainGK) |
| | | { |
| | | //æªé¢è¿çéä¸é |
| | | decimal selectionUpperValue_gk = selectionStandards.upperValue_gk; |
| | | //æªé¢è¿çéä¸é |
| | | decimal selectionLowerValue_gk = selectionStandards.lowerValue_gk; |
| | | |
| | | if ("left".Equals(wheelsPosition)) |
| | | { |
| | | wheelsStocks.Remove(item); |
| | | decimal ZLZA = decimal.Parse(CZInfo_Mes.ZLZA); |
| | | decimal ZLZB = decimal.Parse(CZInfo_Mes.ZLZB); |
| | | decimal ZLZC = decimal.Parse(CZInfo_Mes.ZLZC); |
| | | |
| | | //夿ååï¼è¿è¡å é¤ |
| | | if (ZLZA - (decimal.Parse(Wheels_gkzja)) < selectionLowerValue_gk && ZLZA - (decimal.Parse(Wheels_gkzja)) > selectionUpperValue_gk |
| | | && ZLZB - (decimal.Parse(Wheels_gkzjb)) < selectionLowerValue_gk && ZLZB - (decimal.Parse(Wheels_gkzjb)) > selectionUpperValue_gk |
| | | && ZLZC - (decimal.Parse(Wheels_gkzjc)) < selectionLowerValue_gk && ZLZC - (decimal.Parse(Wheels_gkzjc)) > selectionUpperValue_gk) |
| | | { |
| | | wheelsStocks.Remove(item); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | decimal YLZA = decimal.Parse(CZInfo_Mes.YLZA); |
| | | decimal YLZB = decimal.Parse(CZInfo_Mes.YLZB); |
| | | decimal YLZC = decimal.Parse(CZInfo_Mes.YLZC); |
| | | |
| | | if (YLZA - (decimal.Parse(Wheels_gkzja)) >= selectionLowerValue_gk && YLZA - (decimal.Parse(Wheels_gkzja)) <= selectionUpperValue_gk |
| | | && YLZB - (decimal.Parse(Wheels_gkzjb)) >= selectionLowerValue_gk && YLZB - (decimal.Parse(Wheels_gkzjb)) <= selectionUpperValue_gk |
| | | && YLZC - (decimal.Parse(Wheels_gkzjc)) >= selectionLowerValue_gk && YLZC - (decimal.Parse(Wheels_gkzjc)) <= selectionUpperValue_gk) |
| | | { |
| | | wheelsStocks.Remove(item); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | else |
| | | { |
| | | decimal YLZA = decimal.Parse(CZInfo_Mes.YLZA); |
| | | decimal YLZB = decimal.Parse(CZInfo_Mes.YLZB); |
| | | decimal YLZC = decimal.Parse(CZInfo_Mes.YLZC); |
| | | |
| | | if (YLZA - (decimal.Parse(Wheels_gkzja)) >= selectionLowerValue_gk && YLZA - (decimal.Parse(Wheels_gkzja)) <= selectionUpperValue_gk |
| | | && YLZB - (decimal.Parse(Wheels_gkzjb)) >= selectionLowerValue_gk && YLZB - (decimal.Parse(Wheels_gkzjb)) <= selectionUpperValue_gk |
| | | && YLZC - (decimal.Parse(Wheels_gkzjc)) >= selectionLowerValue_gk && YLZC - (decimal.Parse(Wheels_gkzjc)) <= selectionUpperValue_gk) |
| | | { |
| | | wheelsStocks.Remove(item); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | return wheelsStocks.OrderBy(x => x.dt_ins).FirstOrDefault(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | return wheelsStocks.OrderBy(x => x.dt_ins).FirstOrDefault(); |
| | | throw; |
| | | } |
| | | } |
| | | |
| | | |