| | |
| | | /// </summary> |
| | | public class OracleSQLHelper |
| | | { |
| | | private readonly string ConnectionString =AppsettingsUtility.Settings.DataBaseConn; |
| | | |
| | | private readonly string _connectionString; |
| | | |
| | | private readonly string ConnectionString = |
| | | AppsettingsUtility.Settings.DataBaseConn; |
| | | |
| | | public OracleSQLHelper() |
| | | { |
| | | _connectionString = ConnectionString; |
| | |
| | | |
| | | public class MaterialReceipt |
| | | { |
| | | |
| | | |
| | | public List<MesInvItemOutItems>? ItemsList { get; set; } |
| | | |
| | | public List<MesInvItemOutCDetails>? InvItemoutCDetails { get; set; } |
| | | |
| | | public MesInvItemOuts? ItemOuts { get; set; } |
| | | |
| | | |
| | | } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using SqlSugar; |
| | | namespace MES.Service.Modes |
| | | { |
| | | using SqlSugar; |
| | | |
| | | namespace MES.Service.Modes; |
| | | |
| | | /// <summary> |
| | | /// æ¡ç ç±»å表 |
| | | ///</summary> |
| | |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="ID" ,IsPrimaryKey = true )] |
| | | public decimal Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 使ç¨åºæ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="USE_SITE" )] |
| | | public string UseSite { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç ç±»ååç§° |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="BARCODE_TYPE_NAME" )] |
| | | public string BarcodeTypeName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç å¶ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="CODE" )] |
| | | public string Code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç 纸宽 |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="PAPER_WIDTH" )] |
| | | public decimal? PaperWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç çº¸é« |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="PAPER_HEIGHT" )] |
| | | public decimal? PaperHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç å¼å§ä½ç½®X |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="BARCODE_BEGIN_POSITION_X" )] |
| | | public decimal? BarcodeBeginPositionX { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç å¼å§ä½ç½®Y |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="BARCODE_BEGIN_POSITION_Y" )] |
| | | public decimal? BarcodeBeginPositionY { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¸å¼ æ¡ç çº¸ä¸æ¡ç ä¸ªæ° |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="PAPER_NUM" )] |
| | | public decimal? PaperNum { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¸å¼ æ¡ç çº¸ä¸æ¯è¡æ¡ç ä¸ªæ° |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="PAPER_ROW_NUM" )] |
| | | public decimal? PaperRowNum { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¸å¼ æ¡ç çº¸ä¸æ¡ç åæ° |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="PAPER_COLUMN_NUM" )] |
| | | public decimal? PaperColumnNum { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç æµæ°´å·å¾ªç¯ç±»å(æ§å¶æ¡ç æµæ°´å·) |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="CYCLE_TYPE" )] |
| | | public string CycleType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ææ(0-æ æ,1-ææ) |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="AVAILABLE_FLAG" )] |
| | | public decimal? AvailableFlag { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç é«åº¦ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="BARCODE_HEIGHT" )] |
| | | public decimal? BarcodeHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç å使¹å |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="BARCODE_ORIENTATION" )] |
| | | public string BarcodeOrientation { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç æå°æ³¨éè¡(1-æå°ï¼0-䏿å°) |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="BARCODE_INTERPRETATION" )] |
| | | public decimal? BarcodeInterpretation { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç æå°æ³¨éè¡æå¨æ¡ç 䏿¹(1-æå°å¨æ¡ç 䏿¹ï¼0-䏿å°å¨æ¡ç 䏿¹) |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="BARCODE_INTERPRETATION_ABOVE" )] |
| | | public decimal? BarcodeInterpretationAbove { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建人 |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="CREATE_BY" )] |
| | | public string CreateBy { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建æ¶é´ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="CREATE_DATE" )] |
| | | public DateTime? CreateDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåæ´æ°äºº |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="LASTUPDATE_BY" )] |
| | | public string LastupdateBy { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåæ´æ°æ¶é´ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="LASTUPDATE_DATE" )] |
| | | public DateTime? LastupdateDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç 宽度 |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="BARCODE_WIDTH" )] |
| | | public decimal? BarcodeWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// [æ¹åæ¡ç é»è®¤åæ°]模åï¼çªæ¡ï¼å®½ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="BY_W" )] |
| | | public decimal? ByW { get; set; } |
| | | |
| | | /// <summary> |
| | | /// [æ¹åæ¡ç é»è®¤åæ°]宽æ¡ä¸çªæ¡çæ¯ä¾ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="BY_R" )] |
| | | public decimal? ByR { get; set; } |
| | | |
| | | /// <summary> |
| | | /// [æ¹åæ¡ç é»è®¤åæ°]æ¡ç é«åº¦ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="BY_H" )] |
| | | public decimal? ByH { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¹æ°/毫米 |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="JM" )] |
| | | public string Jm { get; set; } |
| | | |
| | | /// <summary> |
| | | /// èææ°æ®æ å¿(1-æ¯ï¼0ï¼å¦) |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="JVM_DATA_FLAG" )] |
| | | public decimal? JvmDataFlag { get; set; } |
| | | |
| | | /// <summary> |
| | | /// èææ°æ®æµæ°´å·ä½æ° |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="JVM_SERIAL_DIGIT" )] |
| | | public decimal? JvmSerialDigit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// èææ°æ®æ¡ç é¿åº¦ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="JVM_BARCODE_LENGTH" )] |
| | | public decimal? JvmBarcodeLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå°å½ä»¤ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="PRINT_COMMAND" )] |
| | | public string PrintCommand { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå°å½ä»¤å¼å§ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="PRINT_COMMAND_BEGIN" )] |
| | | public string PrintCommandBegin { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå°å½ä»¤ç»æ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="PRINT_COMMAND_END" )] |
| | | public string PrintCommandEnd { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç 注éè¡æ° |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="BARCODE_INTERPRETATION_ROW" )] |
| | | public decimal? BarcodeInterpretationRow { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç å¼å¸¦ç©æç¼ç |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="BARCODE_ITEM" )] |
| | | public decimal? BarcodeItem { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç ç±»åç¼ç |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="TYPE_CODE" )] |
| | | public decimal TypeCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ä½¿ç¨ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="ISUSED" )] |
| | | public short? Isused { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå°æ¨¡æ¿ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="MBTYPE" )] |
| | | public decimal? Mbtype { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ååç¼ç |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="FACTORY" )] |
| | | public string Factory { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
¬å¸ä»£ç |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="COMPANY" )] |
| | | public string Company { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æµæ°´å·ä½æ° |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="ORDER_NUM" )] |
| | | public decimal? OrderNum { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | |
| | | namespace MES.Service.Modes; |
| | | |
| | | /// <summary> |
| | | /// é¨é¨ç产订åä¿¡æ¯è¡¨ |
| | | /// </summary> |
| | | [SugarTable("MES_DEP_TASK_INFO")] |
| | | public class MesDepTaskInfo |
| | | { |
| | | /// <summary> |
| | | /// é¨é¨ç产订åID |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "ID", IsPrimaryKey = true)] |
| | | public decimal Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 订åç¼å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "TASK_NO")] |
| | | public string TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ERPç©æç¼å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "ERP_ITEM_NO")] |
| | | public string ErpItemNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 工忰é |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PLAN_QTY")] |
| | | public decimal? PlanQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·²ç产é |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "COMPLETE_QTY")] |
| | | public decimal? CompleteQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿æ°é |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "BACKUP_QTY")] |
| | | public decimal? BackupQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¸è½½æ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "DOWN_TIME")] |
| | | public DateTime? DownTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 计åå¼å§æ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PLAN_BEGIN_TIME")] |
| | | public DateTime? PlanBeginTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 计åç»ææ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PLAN_FINISH_TIME")] |
| | | public DateTime? PlanFinishTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å®é
å®å·¥æ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "REAL_FINISH_TIME")] |
| | | public DateTime? RealFinishTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// çäº§ç¶æ(å¾
产\ç产\æèµ·\å®å·¥) |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PRODUCE_STATE")] |
| | | public string ProduceState { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å®é
å¼å·¥æ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "REAL_BEGIN_TIME")] |
| | | public DateTime? RealBeginTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦æèµ· |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "HANG_UP")] |
| | | public string HangUp { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºç¼å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "DEPOT_CODE")] |
| | | public string DepotCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¥åºæ°é |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "DISCARD_QTY")] |
| | | public decimal? DiscardQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å§æ¶ææ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "FIRST_ITEM_RECEIPT_TIME")] |
| | | public DateTime? FirstItemReceiptTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å§é½ææ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "FIRST_ITEM_READY_TIME")] |
| | | public DateTime? FirstItemReadyTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 客æ·ç¼å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "CUST_NO")] |
| | | public string CustNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºè´§å
è£
æ¹å¼ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PACK_SHIP_TYPE")] |
| | | public string PackShipType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
è£
注æäºé¡¹ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PACK_SHIP_MEMO")] |
| | | public string PackShipMemo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦å·²æäº§ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "ISSCHEME")] |
| | | public short? Isscheme { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç ç±»åID |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "BARCODE_TYPE_ID")] |
| | | public decimal? BarcodeTypeId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå¸ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "ISSUE_STATUS")] |
| | | public short? IssueStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¶æï¼0=æäº§æªåå¸ã1=æäº§å·²åå¸ã2=已颿ã3=å·²ç产ã4=æåã8=å·²å®å·¥ã9=å¼å¸¸ï¼ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "FLAG")] |
| | | public short? Flag { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 颿æ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "MAT_DATE")] |
| | | public DateTime? MatDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·¥ä½ä¸å¿ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "WORKCENTER_NO")] |
| | | public string WorkcenterNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·²ä¸è½½è®¢åæ è¯Y-å·²ä¸è½½,N-æªä¸è½½ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "DOWN_FLAG")] |
| | | public short? DownFlag { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¯ä¿ä»£ç |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "ROHSE_CODE")] |
| | | public string RohseCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 客æ·PO |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "CUST_PO")] |
| | | public string CustPo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 客æ·åå· |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "CUST_STYLE")] |
| | | public string CustStyle { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 产åæå°åºå®å¼ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PROC_PRINT_VALUE")] |
| | | public string ProcPrintValue { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建人 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "CREATE_BY")] |
| | | public string CreateBy { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建æ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "CREATE_DATE")] |
| | | public DateTime? CreateDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ´æ°äºº |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "LASTUPDATE_BY")] |
| | | public string LastupdateBy { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ´æ°æ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "LASTUPDATE_DATE")] |
| | | public DateTime? LastupdateDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "MEMO")] |
| | | public string Memo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 审æ¹ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "FCHECK_STATUS")] |
| | | public string FcheckStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å®¡æ ¸äºº |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "FCHECK_BY")] |
| | | public string FcheckBy { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å®¡æ ¸æ¥æ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "FCHECK_DATE")] |
| | | public DateTime? FcheckDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·¥å |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "FACTORY")] |
| | | public string Factory { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
¬å¸ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "COMPANY")] |
| | | public string Company { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ°æ®æ¥æº |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "DATA_FROM")] |
| | | public string DataFrom { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç产订å表头ID |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "MOID")] |
| | | public decimal? Moid { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æID |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PARTID")] |
| | | public decimal? Partid { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ERPå·¥åç¶æ ç¶æï¼NA-å¼ç«/FM-éå®/OP-å®¡æ ¸/CL-å
³éï¼ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "STATUS")] |
| | | public string Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç产工å |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "MOCODE")] |
| | | public string Mocode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå»ºæ¥æ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "CREATEDATE")] |
| | | public DateTime? Createdate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¢è² |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "COLOR_NAME")] |
| | | public string ColorName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
³éæ¶é´ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "CLOSETIME")] |
| | | public DateTime? Closetime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç¼å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "ITEM_NO")] |
| | | public string ItemNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»è¡¨ID |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "MODID")] |
| | | public decimal? Modid { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ææ°ä¸è½½æ´æ°æ è¯ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "UPDATE_FLG")] |
| | | public decimal? UpdateFlg { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç产工åè¡å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "MOCODE_LINE")] |
| | | public decimal? MocodeLine { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¸å°æ»æ° |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "SILK_QTY")] |
| | | public decimal? SilkQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¸å°åä»· |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "SILK_PRICE")] |
| | | public decimal? SilkPrice { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æID |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "ITEM_ID")] |
| | | public decimal? ItemId { get; set; } |
| | | } |
| | |
| | | public decimal? LineK3id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "ITEM_ID")] |
| | | public decimal? ItemId { get; set; } |
| | |
| | | [SugarColumn(IsIgnore = true)] public string? ItemName { get; set; } |
| | | [SugarColumn(IsIgnore = true)] public string? ItemModel { get; set; } |
| | | [SugarColumn(IsIgnore = true)] public string? Unit { get; set; } |
| | | |
| | | [SugarColumn(IsIgnore = true)] public string DepotSectionName { get; set; } |
| | | } |
| | |
| | | public string? TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å°è´§åå· |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "WORK_NO")] |
| | | public string? WorkNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å°è´§åè¡å· |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "WORK_LINE")] |
| | | public decimal? WorkLine { get; set; } |
| | |
| | | public decimal? Allocateid { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 颿ç¼å· |
| | | /// 颿ç¼å·/ç产工å |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PBILL_NO")] |
| | | public string? PbillNo { get; set; } |
| | |
| | | [SugarColumn(ColumnName = "TL_QTY")] |
| | | public decimal? TlQty { get; set; } |
| | | |
| | | [SugarColumn(ColumnName = "ITEM_ID")] public decimal? ItemId { get; set; } |
| | | /// <summary> |
| | | /// ç©æID |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "ITEM_ID")] |
| | | public decimal? ItemId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æææåID |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "ITEM_DABID")] |
| | | public decimal? ItemDabid { get; set; } |
| | | |
| | | [SugarColumn(IsIgnore = true)] public string? ItemName { get; set; } |
| | | [SugarColumn(IsIgnore = true)] public string? ItemModel { get; set; } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using SqlSugar; |
| | | namespace MES.Service.Modes |
| | | { |
| | | using SqlSugar; |
| | | |
| | | namespace MES.Service.Modes; |
| | | |
| | | /// <summary> |
| | | /// åºåäºå¡å¤ç表 |
| | | ///</summary> |
| | |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="ID" ,IsPrimaryKey = true )] |
| | | public decimal Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// äºå¡ç±»å |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="TRANSACTION_NAME" )] |
| | | public string TransactionName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="REMARK" )] |
| | | public string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建人 |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="CREATE_BY" )] |
| | | public string CreateBy { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建æ¶é´ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="CREATE_DATE" )] |
| | | public DateTime? CreateDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåæ´æ°äºº |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="LASTUPDATE_BY" )] |
| | | public string LastupdateBy { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåæ´æ°æ¶é´ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="LASTUPDATE_DATE" )] |
| | | public DateTime? LastupdateDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 忮ID |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="BUSINESS_ID" )] |
| | | public decimal? BusinessId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 交æç±»å|1-å
¥åº0-转åº-1åºåº |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="BUSINESS_TYPE" )] |
| | | public decimal? BusinessType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// äºå¡ç¼ç |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="TRANSACTION_NO" )] |
| | | public decimal? TransactionNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ååç¼ç |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="FACTORY" )] |
| | | public string Factory { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
¬å¸ä»£ç |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="COMPANY" )] |
| | | public string Company { get; set; } |
| | | } |
| | | } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using SqlSugar; |
| | | using SqlSugar; |
| | | |
| | | namespace MES.Service.Modes |
| | | { |
| | | namespace MES.Service.Modes; |
| | | |
| | | /// <summary> |
| | | /// ç©æä¿¡æ¯ |
| | | ///</summary> |
| | |
| | | public decimal? ItemId { get; set; } |
| | | |
| | | [SugarColumn(IsIgnore = true)] public string? Type { get; set; } |
| | | } |
| | | } |
| | |
| | | using SqlSugar; |
| | | |
| | | namespace MES.Service.Modes |
| | | { |
| | | namespace MES.Service.Modes; |
| | | |
| | | /// <summary> |
| | | /// æææ¡ç æå°æå表 |
| | | ///</summary> |
| | |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "CREATE_DATE")] |
| | | public DateTime? CreateDate { get; set; } |
| | | } |
| | | } |
| | |
| | | public class Organize |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "ID")] |
| | | public decimal? Id { get; set; } |
| | |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.ComponentModel.DataAnnotations.Schema; |
| | | using SqlSugar; |
| | | |
| | |
| | | public DateTime? LastupdateDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "MODIFY1_BY")] |
| | | public string? Modify1By { get; set; } |
| | |
| | | public DateTime? LastupdateDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "MODIFY1_BY")] |
| | | public string? Modify1By { get; set; } |
| | |
| | | public string? MoidNum { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "FSUBMIT_BY")] |
| | | public string? FsubmitBy { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "FSUBMIT_DATE")] |
| | | public DateTime? FsubmitDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | ///</summary> |
| | | [SugarColumn(ColumnName = "FSUBMIT")] |
| | | public decimal? Fsubmit { get; set; } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using SqlSugar; |
| | | namespace MES.Service.Modes |
| | | { |
| | | using SqlSugar; |
| | | |
| | | namespace MES.Service.Modes; |
| | | |
| | | /// <summary> |
| | | /// å·¥åå表 |
| | | ///</summary> |
| | |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="ID" )] |
| | | public decimal? Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// PID |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="PID" )] |
| | | public decimal? Pid { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·¥ååå· |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB001" )] |
| | | public string Dab001 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºå· |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB002" )] |
| | | public string Dab002 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ææç¼ç |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB003" )] |
| | | public string Dab003 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ææåç§° |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB004" )] |
| | | public string Dab004 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ææè§æ ¼ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB005" )] |
| | | public string Dab005 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé¢ç¨é |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB006" )] |
| | | public decimal? Dab006 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·²é¢ç¨é |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB007" )] |
| | | public decimal? Dab007 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·¥èº |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB008" )] |
| | | public string Dab008 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB009" )] |
| | | public string Dab009 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ææç±»å |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB010" )] |
| | | public string Dab010 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 主æ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB011" )] |
| | | public string Dab011 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç»æç¨é |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB012" )] |
| | | public decimal? Dab012 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºæ° |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB013" )] |
| | | public decimal? Dab013 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦æ¿æ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB014" )] |
| | | public string Dab014 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¹ä½ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB015" )] |
| | | public string Dab015 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ææåå· |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB016" )] |
| | | public string Dab016 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºç¼ç |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB017" )] |
| | | public string Dab017 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºåç§° |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB018" )] |
| | | public string Dab018 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 颿æ¹å¼ |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="DAB019" )] |
| | | public string Dab019 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºå®æè |
| | | ///</summary> |
| | | [SugarColumn(ColumnName="SCRAPQTY" )] |
| | | public decimal? Scrapqty { get; set; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "ERP_ID")] |
| | | public decimal? ErpId { get; set; } |
| | | } |
| | |
| | | Id = b.Id, |
| | | ItemNo = b.ItemNo, |
| | | ItemName = b.ItemName, |
| | | ItemModel = b.ItemModel, |
| | | ItemModel = b.ItemModel |
| | | }).ToList(); |
| | | } |
| | | |
| | |
| | | c.ItemNo == t.ItemNo && c.Company == t.Company && |
| | | c.Factory == t.Factory, |
| | | JoinType.Left, |
| | | t.Fpurchaseunitid == u.Id.ToString() && t.Factory == u.Factory && |
| | | t.Fpurchaseunitid == u.Id.ToString() && |
| | | t.Factory == u.Factory && |
| | | t.Company == u.Company |
| | | }) |
| | | .Where((c, t, u) => c.Mid == query.id) |
| | |
| | | |
| | | public MesInvItemOutCDetails GetOutList(WarehouseQuery query) |
| | | { |
| | | |
| | | |
| | | |
| | | var mesInvItemBarcodes = Db.Queryable<MesInvItemBarcodes>() |
| | | .Where(s => s.ItemBarcode == query.barcode).Count(); |
| | | |
| | | if (mesInvItemBarcodes <= 0) |
| | | { |
| | | throw new Exception("æ¡ç ä¸åå¨"); |
| | | } |
| | | if (mesInvItemBarcodes <= 0) throw new Exception("æ¡ç ä¸åå¨"); |
| | | |
| | | var mesInvItemOutCDetails = Db.Queryable<MesInvItemOutCDetails>() |
| | | .Where(s => s.ItemBarcode == query.barcode && s.Receive == 0).Count(); |
| | | .Where(s => s.ItemBarcode == query.barcode && s.Receive == 0) |
| | | .Count(); |
| | | |
| | | |
| | | |
| | | if (mesInvItemOutCDetails <= 0) |
| | | { |
| | | throw new Exception("æ¡ç ä¸ç¬¦åæ¥æ¶æ¡ä»¶,è¯·æ£æ¥ï¼"); |
| | | } |
| | | if (mesInvItemOutCDetails <= 0) throw new Exception("æ¡ç ä¸ç¬¦åæ¥æ¶æ¡ä»¶,è¯·æ£æ¥ï¼"); |
| | | |
| | | |
| | | |
| | | var entity = Db.Queryable<MesInvItemOutCDetails, MesInvItemOuts, MesItems>((a, b, c) => |
| | | var entity = Db |
| | | .Queryable<MesInvItemOutCDetails, MesInvItemOuts, MesItems>( |
| | | (a, b, c) => |
| | | new JoinQueryInfos(JoinType.Left, a.ItemOutId == b.Id, |
| | | JoinType.Left, a.ItemNo == c.ItemNo)) |
| | | .Where((a, b, c) => a.ItemBarcode == query.barcode) |
| | |
| | | }).First(); |
| | | |
| | | if (entity == null) |
| | | { |
| | | throw new Exception("åºåºæ¡ç " + query.barcode + " ä¸åå¨ï¼è¯·ç¡®è®¤!"); |
| | | } |
| | | |
| | | |
| | | return entity; |
| | |
| | | var mesInvItemBarcodes = Db.Queryable<MesInvItemBarcodes>() |
| | | .Where(s => s.ItemBarcode == query.barcode).Count(); |
| | | |
| | | if (mesInvItemBarcodes <= 0) |
| | | { |
| | | throw new Exception("æ¡ç ä¸åå¨"); |
| | | } |
| | | if (mesInvItemBarcodes <= 0) throw new Exception("æ¡ç ä¸åå¨"); |
| | | |
| | | var mesInvItemOutCDetails = Db.Queryable<MesInvItemOutCDetails>() |
| | | .Where(s => s.ItemBarcode == query.barcode).First(); |
| | | |
| | | MaterialReceipt entity = new MaterialReceipt |
| | | var entity = new MaterialReceipt |
| | | { |
| | | InvItemoutCDetails = GetMesInvItemOutCDetails(mesInvItemOutCDetails.PbillNo), |
| | | InvItemoutCDetails = |
| | | GetMesInvItemOutCDetails(mesInvItemOutCDetails.PbillNo), |
| | | ItemOuts = GetMesInvItemOuts(mesInvItemOutCDetails.PbillNo) |
| | | |
| | | }; |
| | | |
| | | return entity; |
| | |
| | | public MesInvItemOutCDetails confirmReceipt(WarehouseQuery query) |
| | | { |
| | | if (string.IsNullOrWhiteSpace(query.barcode)) |
| | | { |
| | | throw new Exception("请æ«åºåºæ¡ç ï¼"); |
| | | } |
| | | |
| | | if (string.IsNullOrWhiteSpace(query.billNo)) |
| | | { |
| | | throw new Exception("åºåºåæ®ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | var barcodeInfo = GetBarcodeInfo(query.barcode); |
| | | |
| | | |
| | | if (barcodeInfo.Receive == 1) |
| | | { |
| | | throw new Exception("æ¤æ¡ç å·²ç»æ¥æ¶,è¯·æ£æ¥ï¼"); |
| | | } |
| | | if (barcodeInfo.Receive == 1) throw new Exception("æ¤æ¡ç å·²ç»æ¥æ¶,è¯·æ£æ¥ï¼"); |
| | | |
| | | |
| | | UseTransaction(db => |
| | | { |
| | | |
| | | var count = db.Updateable<MesInvItemOutCDetails>() |
| | | .SetColumns(s => s.Receive == 1) |
| | | .Where(s => s.ItemBarcode == barcodeInfo.ItemBarcode).ExecuteCommand(); |
| | | .Where(s => s.ItemBarcode == barcodeInfo.ItemBarcode) |
| | | .ExecuteCommand(); |
| | | |
| | | return 1; |
| | | }); |
| | | |
| | | return barcodeInfo; |
| | | } |
| | | |
| | | |
| | | |
| | | public List<MesInvItemOutCDetails> GetMesInvItemOutCDetails(string billno) |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | private MesInvItemOutCDetails GetBarcodeInfo(string itemBarcode) |
| | | { |
| | | // Get barcode information |
| | | return Db.Queryable<MesInvItemOutCDetails>() |
| | | .First(b => b.ItemBarcode == itemBarcode); |
| | | } |
| | | |
| | | } |
| | |
| | | using MES.Service.Dto.service; |
| | | using MES.Service.Modes; |
| | | using MES.Service.util; |
| | | using Newtonsoft.Json; |
| | | using SqlSugar; |
| | | using DbType = System.Data.DbType; |
| | | |
| | |
| | | { |
| | | //å½å类已ç»ç»§æ¿äº Repository å¢ãå ãæ¥ãæ¹çæ¹æ³ |
| | | //è¿éé¢åç代ç ä¸ä¼ç»è¦ç,妿è¦éæ°çæè¯·å é¤ MesInvItemOutsManager.cs |
| | | |
| | | public List<MesInvItemOuts> GetProductionPickPage(WarehouseQuery query) |
| | | { |
| | | return Db.Queryable<MesInvItemOuts, MesDepots>((a, o) => |
| | | new JoinQueryInfos( |
| | | JoinType.Left, |
| | | o.DepotCode == a.DepotCode && a.Company == o.Company && |
| | | a.Factory == o.Factory |
| | | )) |
| | | .Where((a, o) => a.BillTypeId == 200 && |
| | | a.TransactionNo == 201 && |
| | | a.Factory == "1000" && |
| | | a.Company == "1000" && |
| | | a.IsVisual == 1) |
| | | .WhereIF(query.status != null, (a, o) => a.Status == query.status) |
| | | .WhereIF(query.id != null, (a, o) => a.Id == query.id) |
| | | .Select((a, o) => new MesInvItemOuts |
| | | { |
| | | Id = a.Id, |
| | | Sapstatus = a.Sapstatus, |
| | | OutDate = a.OutDate, |
| | | CheckDate = a.CheckDate, |
| | | BoardItem = a.BoardItem, |
| | | WorkNo = a.WorkNo, |
| | | OutPart = a.OutPart, |
| | | PbillNo = a.PbillNo, |
| | | OutType = a.OutType, |
| | | CreateBy = a.CreateBy, |
| | | Status = a.Status, |
| | | CheckUser = a.CheckUser, |
| | | ItemOutNo = a.ItemOutNo, |
| | | DepotName = o.DepotName // éè¦å¨ææ·»å çåæ®µ |
| | | }) |
| | | .ToPageList(query.PageIndex, query.Limit); |
| | | } |
| | | |
| | | public MaterialReceipt GetProductionPick(WarehouseQuery query) |
| | | { |
| | | var form = new MaterialReceipt(); |
| | | if (query.id != null) |
| | | { |
| | | var mesInvItemOutsList = GetProductionPickPage(query); |
| | | if (mesInvItemOutsList.Count <= 0) return form; |
| | | |
| | | form.ItemOuts = mesInvItemOutsList[0]; |
| | | form.ItemsList = getProductionItemsList(query); |
| | | form.InvItemoutCDetails = GetProductionDetails(query); |
| | | } |
| | | |
| | | return form; |
| | | } |
| | | |
| | | private List<MesInvItemOutItems> getProductionItemsList( |
| | | WarehouseQuery query) |
| | | { |
| | | return Db.Queryable<MesInvItemOutItems, MesItems, MesDepTaskInfo>( |
| | | (c, s, f) => new JoinQueryInfos( |
| | | JoinType.Inner, c.ItemNo == s.ItemNo, |
| | | JoinType.Left, f.TaskNo == c.TaskNo && f.ItemNo == c.ItemNo |
| | | )) |
| | | .Where((c, s, f) => c.ItemOutId == query.id) |
| | | .OrderBy(c => c.Id) |
| | | .Select((c, s, f) => new MesInvItemOutItems |
| | | { |
| | | Id = c.Id, |
| | | ItemNo = c.ItemNo, |
| | | Quantity = c.Quantity, |
| | | TaskNo = c.TaskNo, |
| | | Remark = c.Remark, |
| | | ItemName = s.ItemName, // 卿忮µ |
| | | ItemModel = s.ItemModel, // 卿忮µ |
| | | ItemUnit = SqlFunc.Subqueryable<MesItems>() |
| | | .Where(si => si.ItemUnit == s.ItemUnit) |
| | | .Select(si => |
| | | SqlFunc.MappingColumn<string>( |
| | | "F_GETUNITNAME(si.Item_Unit)")) // 卿忮µ |
| | | }) |
| | | .ToList(); |
| | | } |
| | | |
| | | private List<MesInvItemOutCDetails> GetProductionDetails( |
| | | WarehouseQuery query) |
| | | { |
| | | return Db |
| | | .Queryable<MesInvItemOutCDetails, MesItems, MesDepots>( |
| | | (b, c, d) => new JoinQueryInfos( |
| | | JoinType.Left, |
| | | b.ItemNo == c.ItemNo && b.Company == c.Company && |
| | | b.Factory == c.Factory, |
| | | JoinType.Left, |
| | | d.DepotCode == b.DepotCode && b.Company == d.Company && |
| | | b.Factory == d.Factory |
| | | )) |
| | | .Where((b, c, d) => b.ItemOutId == query.id) |
| | | .Select((b, c, d) => new MesInvItemOutCDetails |
| | | { |
| | | ForceOutFlag = b.ForceOutFlag, |
| | | DepotSectionCode = b.DepotSectionCode, |
| | | ItemNo = b.ItemNo, |
| | | Quantity = b.Quantity, |
| | | ItemBarcode = b.ItemBarcode, |
| | | ItemName = c.ItemName, |
| | | ItemModel = c.ItemModel, |
| | | DepotName = d.DepotName, |
| | | DepotCode = b.DepotCode |
| | | }) |
| | | .ToList(); |
| | | } |
| | | |
| | | public bool ScanCode(WarehouseQuery query) |
| | | { |
| | |
| | | |
| | | return ItemOutNos; |
| | | } |
| | | //çäº§é¢æåå®¡æ ¸åæ ¡éª |
| | | |
| | | |
| | | public MessageCenter SaveProductionMessageCenter(WarehouseQuery entity) |
| | | { |
| | | var message = ProductionMesToErpParam(entity); |
| | | |
| | | var executeReturnIdentity = |
| | | Db.Insertable(message).ExecuteReturnIdentity(); |
| | | if (executeReturnIdentity > 0) |
| | | { |
| | | message.Id = executeReturnIdentity; |
| | | message.Pid = executeReturnIdentity; |
| | | return message; |
| | | } |
| | | |
| | | throw new Exception("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | private MessageCenter ProductionMesToErpParam(WarehouseQuery query) |
| | | { |
| | | var erpParameters = ""; |
| | | var title = ""; |
| | | var tableName = "INV_ITEM_OUTS_" + query.Type; |
| | | if ("A".Equals(query.Type)) |
| | | { |
| | | erpParameters = |
| | | GetProductionErpParameters(query.billNo, query.userName); |
| | | title = "çäº§é¢æå" + query.billNo + "å®¡æ ¸"; |
| | | } |
| | | |
| | | var ErpUrl = AppsettingsUtility.Settings.ProductionErpUrl; |
| | | var message = new MessageCenter |
| | | { |
| | | TableName = tableName, |
| | | Url = ErpUrl, |
| | | Status = 1, |
| | | CreateBy = query.userName, |
| | | Route = query.billNo, |
| | | Title = title, |
| | | PageName = "Warehouse/ProductionPick/Add?id=" + query.id + |
| | | "&itemOutNo=" + query.billNo, |
| | | CreateDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), |
| | | Method = "POST", |
| | | Seq = 1, |
| | | Data = erpParameters, |
| | | IsMessage = 0, |
| | | ContentType = "application/x-www-form-urlencoded" |
| | | }; |
| | | return message; |
| | | } |
| | | |
| | | private string GetProductionErpParameters(string? queryBillNo, |
| | | string? userName) |
| | | { |
| | | userName ??= "system"; |
| | | var mesInvItemOuts = Db.Queryable<MesInvItemOuts>() |
| | | .Where(it => it.ItemOutNo == queryBillNo) |
| | | .First(); |
| | | |
| | | if (mesInvItemOuts == null) throw new Exception("颿åå·ä¸åå¨"); |
| | | |
| | | var womcaa = Db.Queryable<Womcaa>() |
| | | .Where(it => it.Caa020 == mesInvItemOuts.WorkNo) |
| | | .First(); |
| | | |
| | | if (womcaa == null) throw new Exception("ä»»å¡åå·ä¸åå¨"); |
| | | |
| | | var Departmentcode = Db.Queryable<SysDepartment, MesInvItemOuts>( |
| | | (a, b) => |
| | | new JoinQueryInfos(JoinType.Left, |
| | | a.Departmentname == b.OutPart |
| | | )).Where((a, b) => |
| | | b.OutPart == mesInvItemOuts.OutPart && |
| | | b.ItemOutNo == queryBillNo).Select(a => a.Departmentcode) |
| | | .First(); |
| | | |
| | | if (string.IsNullOrEmpty(Departmentcode)) |
| | | throw new Exception("é¨é¨ä¿¡æ¯ä¸åå¨"); |
| | | |
| | | // æ£æ¥é¢æåç¶æ |
| | | if (mesInvItemOuts.Status == 1) throw new Exception("颿åå·²å®¡æ ¸ï¼ä¸è½é夿¨é"); |
| | | |
| | | var C_OUT_ITEMS = Db |
| | | .Queryable<MesInvItemOutItems, Womdab, Womdaa, Womcaa, Womcab>( |
| | | (c, b, d, e, f) => |
| | | new JoinQueryInfos( |
| | | JoinType.Left, b.Id == c.ItemDabid, |
| | | JoinType.Left, d.Id == b.Pid, |
| | | JoinType.Left, e.Caa001 == d.Daa021, |
| | | JoinType.Left, f.Eid == e.Erpid |
| | | )) |
| | | .Where((c, b, d, e, f) => c.ItemOutId == mesInvItemOuts.Id) |
| | | .Select((c, b, d, e, f) => new |
| | | { |
| | | c.Id, |
| | | c.ItemNo, |
| | | c.Quantity, |
| | | c.DepotCode, |
| | | c.DepotSectionCode, |
| | | c.ItemId, |
| | | erpId = b.ErpId, |
| | | e.Caa015, |
| | | f.PositionNo |
| | | }).ToList(); |
| | | |
| | | var scllentryList = new List<dynamic>(); |
| | | |
| | | foreach (var item in C_OUT_ITEMS) |
| | | { |
| | | var sql = |
| | | "SELECT FNAME FROM MES_UNIT WHERE ID = (SELECT ITEM_UNIT FROM MES_ITEMS WHERE ID = '" + |
| | | item.ItemId + "')"; |
| | | var C_ITEM_UNIT = Db.Ado.SqlQuerySingle<string>(sql); |
| | | |
| | | scllentryList.Add(new |
| | | { |
| | | FMaterialId = item.ItemNo, |
| | | FUnitID = C_ITEM_UNIT, |
| | | FAppQty = item.Quantity, |
| | | FActualQty = item.Quantity, |
| | | FStockId = item.DepotCode, |
| | | FPPBomEntryId = item.erpId, |
| | | F_UNW_Text_xsddh = item.Caa015, |
| | | F_UNW_TEXT_WZH = item.PositionNo, |
| | | F_MES_ENTRYID = item.Id |
| | | }); |
| | | } |
| | | |
| | | var dataJson = new |
| | | { |
| | | F_MES_ID = mesInvItemOuts.Id, |
| | | FDate = mesInvItemOuts.CreateBy, |
| | | FPickerId = userName, |
| | | F_UNW_LargeText_BZ = " ", |
| | | F_UNW_KH = " ", |
| | | F_UNW_DDSL = womcaa.Caa012, |
| | | F_UNW_Text_CZG = userName, |
| | | scllentry = scllentryList |
| | | }; |
| | | |
| | | return "taskname=SCLL&mesid=" + mesInvItemOuts.Id + |
| | | "&optype=create&datajson=" + |
| | | JsonConvert.SerializeObject( |
| | | dataJson); |
| | | } |
| | | |
| | | public bool AuditProduction(WarehouseQuery query) |
| | | { |
| | | query.status = 1; |
| | | //å®¡æ ¸ |
| | | return Update(query); |
| | | } |
| | | } |
| | |
| | | using System.Data; |
| | | using System.Dynamic; |
| | | using MES.Service.DB; |
| | | using MES.Service.Dto.service; |
| | | using MES.Service.Modes; |
| | |
| | | var printCommandResult = Db.Queryable<MesBarcodeType>() |
| | | .Where(t => t.TypeCode == 108) |
| | | .First(); |
| | | if (printCommandResult == null) |
| | | { |
| | | throw new Exception("模çID为空ï¼è¯·è®¾ç½®æå°æ ¼å¼ï¼"); |
| | | } |
| | | if (printCommandResult == null) throw new Exception("模çID为空ï¼è¯·è®¾ç½®æå°æ ¼å¼ï¼"); |
| | | |
| | | var cPrintCommand = printCommandResult.Mbtype; |
| | | var cBid = printCommandResult.Id; |
| | |
| | | s.ItemNo == query.ItemNo && s.Factory == "1000" && |
| | | s.Company == "1000") |
| | | .First(); |
| | | if (cMesItems == null) |
| | | { |
| | | throw new Exception("ç©æä¿¡æ¯ä¸åå¨è¯¥ç©æç¼ç ï¼è¯·ç»´æ¤ï¼"); |
| | | } |
| | | if (cMesItems == null) throw new Exception("ç©æä¿¡æ¯ä¸åå¨è¯¥ç©æç¼ç ï¼è¯·ç»´æ¤ï¼"); |
| | | |
| | | if (string.IsNullOrEmpty(query.ItemNo)) |
| | | { |
| | | throw new Exception("请å½å
¥ç©æç¼ç "); |
| | | } |
| | | if (string.IsNullOrEmpty(query.ItemNo)) throw new Exception("请å½å
¥ç©æç¼ç "); |
| | | |
| | | if (string.IsNullOrEmpty(query.ItemModel)) |
| | | { |
| | | throw new Exception("请è¾å
¥å®ç©æç¼ç åï¼ç¹å»ç¡®è®¤çæè§æ ¼ï¼"); |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(query.OrgName)) |
| | | { |
| | | throw new Exception("请å½å
¥ç»ç»"); |
| | | } |
| | | if (string.IsNullOrEmpty(query.OrgName)) throw new Exception("请å½å
¥ç»ç»"); |
| | | |
| | | if (string.IsNullOrEmpty(query.OrgOwner)) |
| | | { |
| | | throw new Exception("请å½å
¥è´§ä¸»"); |
| | | } |
| | | if (string.IsNullOrEmpty(query.OrgOwner)) throw new Exception("请å½å
¥è´§ä¸»"); |
| | | |
| | | if (string.IsNullOrEmpty(query.ItemNum)) |
| | | { |
| | | throw new Exception("请å½å
¥ç©ææ°é"); |
| | | } |
| | | if (string.IsNullOrEmpty(query.ItemNum)) throw new Exception("请å½å
¥ç©ææ°é"); |
| | | |
| | | if (string.IsNullOrEmpty(query.Printnumn)) |
| | | { |
| | | throw new Exception("请å½å
¥æ¡ç æ°é"); |
| | | } |
| | | |
| | | var cId = |
| | | Db.Ado.GetInt( |
| | |
| | | .Where(it => it.CreateDate < DateTime.Now.AddDays(-10)) |
| | | .ExecuteCommand(); |
| | | |
| | | for (int i = 1; i <= int.Parse(query.Printnumn); i++) |
| | | for (var i = 1; i <= int.Parse(query.Printnumn); i++) |
| | | { |
| | | var cIndate = DateTime.Now.ToString("yyyyMMdd"); |
| | | |
| | |
| | | query.ItemNo + cIndate, query.ItemNo + cIndate, 0); |
| | | serial = barcodeResult.Value; |
| | | poBarcodeComand = barcodeResult.Msg; |
| | | if (!string.IsNullOrEmpty(poBarcodeComand)) |
| | | { |
| | | return null; |
| | | } |
| | | if (!string.IsNullOrEmpty(poBarcodeComand)) return null; |
| | | |
| | | if (string.IsNullOrEmpty(serial)) |
| | | { |
| | | cBarcode2 = "9"; |
| | | } |
| | | else |
| | | { |
| | | cBarcode2 = "9" + serial[1..]; |
| | | } |
| | | itemBarcode = query.ItemNo + cIndate + cBarcode2; |
| | | } |
| | | else |
| | |
| | | query.ItemNo + cIndate, query.ItemNo + cIndate, 0); |
| | | serial = barcodeResult.Value; |
| | | poBarcodeComand = barcodeResult.Msg; |
| | | if (!string.IsNullOrEmpty(poBarcodeComand)) |
| | | { |
| | | return null; |
| | | } |
| | | if (!string.IsNullOrEmpty(poBarcodeComand)) return null; |
| | | |
| | | cBarcode2 = "9" + serial.Substring(1); |
| | | itemBarcode = query.ItemNo + cIndate + |
| | |
| | | s.Company == "1000") |
| | | .Count(); |
| | | if (cCount == 0) |
| | | { |
| | | // Insert new barcode |
| | | Db.Insertable(new MesInvItemBarcodes |
| | | { |
| | |
| | | OrgName = query.OrgName, |
| | | OrgOwner = query.OrgOwner |
| | | }).ExecuteCommand(); |
| | | } |
| | | |
| | | // Insert record into MES_RF_PRNBARCODE |
| | | Db.Insertable(new MesRfPrnbarcode |
| | |
| | | Strp11 = poBarcode, |
| | | Strp12 = query.ItemName ?? " ", |
| | | Strp15 = query.OrgName ?? " ", |
| | | Strp16 = query.OrgOwner ?? " ", |
| | | Strp16 = query.OrgOwner ?? " " |
| | | }).ExecuteCommand(); |
| | | } |
| | | |
| | |
| | | var resultValue = outputResult.Value?.ToString(); |
| | | var messageValue = outputMessage.Value?.ToString(); |
| | | |
| | | dynamic m = new System.Dynamic.ExpandoObject(); |
| | | dynamic m = new ExpandoObject(); |
| | | m.Value = resultValue; |
| | | m.Msg = messageValue; |
| | | |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("GetOutItemList")] |
| | | |
| | | public ResponseResult GetOutItemList(WarehouseQuery query) |
| | | { |
| | | |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <returns></returns> |
| | | |
| | | [HttpPost("GetFormList")] |
| | | public ResponseResult GetFormList(WarehouseQuery query) |
| | | { |
| | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /***è¿å
¥æ¨¡ç管çå¯ä»¥ä¿®æ¹æ¨¡ç***/ |
| | |
| | | { |
| | | private readonly MesInvItemOutsManager m = new(); |
| | | |
| | | //GetProductionPick |
| | | [HttpPost("GetProductionPick")] |
| | | public ResponseResult GetProductionPick(WarehouseQuery entity) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetProductionPick(entity); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | //GetProductionPickPage |
| | | [HttpPost("GetProductionPickPage")] |
| | | public ResponseResult GetProductionPickPage(WarehouseQuery entity) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetProductionPickPage(entity); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | //AuditProduction |
| | | [HttpPost("AuditProduction")] |
| | | public ResponseResult AuditProduction(WarehouseQuery query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.AuditProduction(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | //MesToErp |
| | | [HttpPost("SaveProductionMessageCenter")] |
| | | public ResponseResult SaveProductionMessageCenter(WarehouseQuery entity) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.SaveProductionMessageCenter(entity); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | [HttpPost("ScanCode")] |
| | | public ResponseResult ScanCode(WarehouseQuery entity) |