¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareCommon.Common.Dao; |
| | | using iWareLog.LOG.Entity; |
| | | using iWareLog.ORM; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | |
| | | namespace iWareLog.LOG.Dao |
| | | { |
| | | public class AlertDao : CommonDao<AlertEntity, DEVAlert> |
| | | { |
| | | private static object Lock = new object(); |
| | | |
| | | private AlertDao() { } |
| | | |
| | | private static AlertDao Instance = null; |
| | | |
| | | /// <summary> |
| | | /// è·ååä¾çæ¹æ³ |
| | | /// </summary> |
| | | /// <returns>logæå¡çåä¾å®ä½</returns> |
| | | public static AlertDao GetInstance() |
| | | { |
| | | |
| | | if (Instance == null) |
| | | { |
| | | lock (Lock) |
| | | { |
| | | if (Instance == null) |
| | | { |
| | | Instance = new AlertDao(); |
| | | } |
| | | } |
| | | } |
| | | return Instance; |
| | | } |
| | | |
| | | |
| | | protected override string GetColumnName(string name) |
| | | { |
| | | return AlertEntity.GetColumnName(name); |
| | | } |
| | | |
| | | protected override string GetTableName() |
| | | { |
| | | return AlertEntity.GetTableName(); |
| | | } |
| | | |
| | | protected override AlertEntity ToEntity(DEVAlert receive) |
| | | { |
| | | return new AlertEntity(receive); |
| | | } |
| | | |
| | | protected override DEVAlert ToOrm(AlertEntity receive) |
| | | { |
| | | return receive.ToOrm(); |
| | | } |
| | | |
| | | protected override List<string> GetColumnNames() |
| | | { |
| | | return AlertEntity.GetColumnMap().Keys.ToList(); |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareCommon.Common.Dao; |
| | | using iWareLog.LOG.Entity; |
| | | using iWareLog.ORM; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | |
| | | namespace iWareLog.LOG.Dao |
| | | { |
| | | public class FailSentMessageDao : CommonDao<FailSentMessageEntity, LOGERRORFailSentMessage> |
| | | { |
| | | private static object Lock = new object(); |
| | | |
| | | private FailSentMessageDao() { } |
| | | |
| | | private static FailSentMessageDao Instance = null; |
| | | |
| | | /// <summary> |
| | | /// è·ååä¾çæ¹æ³ |
| | | /// </summary> |
| | | /// <returns>logæå¡çåä¾å®ä½</returns> |
| | | public static FailSentMessageDao GetInstance() |
| | | { |
| | | |
| | | if (Instance == null) |
| | | { |
| | | lock (Lock) |
| | | { |
| | | if (Instance == null) |
| | | { |
| | | Instance = new FailSentMessageDao(); |
| | | } |
| | | } |
| | | } |
| | | return Instance; |
| | | } |
| | | |
| | | |
| | | protected override string GetColumnName(string name) |
| | | { |
| | | return FailSentMessageEntity.GetColumnName(name); |
| | | } |
| | | |
| | | protected override string GetTableName() |
| | | { |
| | | return FailSentMessageEntity.GetTableName(); |
| | | } |
| | | |
| | | protected override FailSentMessageEntity ToEntity(LOGERRORFailSentMessage receive) |
| | | { |
| | | return new FailSentMessageEntity(receive); |
| | | } |
| | | |
| | | protected override LOGERRORFailSentMessage ToOrm(FailSentMessageEntity receive) |
| | | { |
| | | return receive.ToOrm(); |
| | | } |
| | | |
| | | protected override List<string> GetColumnNames() |
| | | { |
| | | return FailSentMessageEntity.GetColumnMap().Keys.ToList(); |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareCommon.Common.Dao; |
| | | using iWareLog.LOG.Entity; |
| | | using iWareLog.ORM; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | |
| | | namespace iWareLog.LOG.Dao |
| | | { |
| | | public class InOutStorageDetailDao : CommonDao<InOutStorageDetailEntity, InOutStorageDetail> |
| | | { |
| | | private static object Lock = new object(); |
| | | |
| | | private InOutStorageDetailDao() { } |
| | | |
| | | private static InOutStorageDetailDao Instance = null; |
| | | |
| | | /// <summary> |
| | | /// è·ååä¾çæ¹æ³ |
| | | /// </summary> |
| | | /// <returns>logæå¡çåä¾å®ä½</returns> |
| | | public static InOutStorageDetailDao GetInstance() |
| | | { |
| | | |
| | | if (Instance == null) |
| | | { |
| | | lock (Lock) |
| | | { |
| | | if (Instance == null) |
| | | { |
| | | Instance = new InOutStorageDetailDao(); |
| | | } |
| | | } |
| | | } |
| | | return Instance; |
| | | } |
| | | |
| | | |
| | | protected override string GetColumnName(string name) |
| | | { |
| | | return InOutStorageDetailEntity.GetColumnName(name); |
| | | } |
| | | |
| | | protected override string GetTableName() |
| | | { |
| | | return InOutStorageDetailEntity.GetTableName(); |
| | | } |
| | | |
| | | protected override InOutStorageDetailEntity ToEntity(InOutStorageDetail receive) |
| | | { |
| | | return new InOutStorageDetailEntity(receive); |
| | | } |
| | | |
| | | protected override InOutStorageDetail ToOrm(InOutStorageDetailEntity receive) |
| | | { |
| | | return receive.ToOrm(); |
| | | } |
| | | |
| | | protected override List<string> GetColumnNames() |
| | | { |
| | | return InOutStorageDetailEntity.GetColumnMap().Keys.ToList(); |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareCommon.Common.Dao; |
| | | using iWareLog.LOG.Entity; |
| | | using iWareLog.ORM; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | |
| | | namespace iWareLog.LOG.Dao |
| | | { |
| | | public class OperationDao : CommonDao<OperationEntity, LOGOperation> |
| | | { |
| | | private static object Lock = new object(); |
| | | |
| | | private OperationDao() { } |
| | | |
| | | private static OperationDao Instance = null; |
| | | |
| | | /// <summary> |
| | | /// è·ååä¾çæ¹æ³ |
| | | /// </summary> |
| | | /// <returns>logæå¡çåä¾å®ä½</returns> |
| | | public static OperationDao GetInstance() |
| | | { |
| | | |
| | | if (Instance == null) |
| | | { |
| | | lock (Lock) |
| | | { |
| | | if (Instance == null) |
| | | { |
| | | Instance = new OperationDao(); |
| | | } |
| | | } |
| | | } |
| | | return Instance; |
| | | } |
| | | |
| | | |
| | | protected override string GetColumnName(string name) |
| | | { |
| | | return OperationEntity.GetColumnName(name); |
| | | } |
| | | |
| | | protected override string GetTableName() |
| | | { |
| | | return OperationEntity.GetTableName(); |
| | | } |
| | | |
| | | protected override OperationEntity ToEntity(LOGOperation receive) |
| | | { |
| | | return new OperationEntity(receive); |
| | | } |
| | | |
| | | protected override LOGOperation ToOrm(OperationEntity receive) |
| | | { |
| | | return receive.ToOrm(); |
| | | } |
| | | |
| | | protected override List<string> GetColumnNames() |
| | | { |
| | | return OperationEntity.GetColumnMap().Keys.ToList(); |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareCommon.Common.Dao; |
| | | using iWareLog.LOG.Entity; |
| | | using iWareLog.ORM; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | |
| | | namespace iWareLog.LOG.Dao |
| | | { |
| | | public class ReceiveMsgLogDao : CommonDao<ReceiveMsgLogEntity, LOGReceiveMsgLog> |
| | | { |
| | | private static object Lock = new object(); |
| | | |
| | | private ReceiveMsgLogDao() { } |
| | | |
| | | private static ReceiveMsgLogDao Instance = null; |
| | | |
| | | /// <summary> |
| | | /// è·ååä¾çæ¹æ³ |
| | | /// </summary> |
| | | /// <returns>logæå¡çåä¾å®ä½</returns> |
| | | public static ReceiveMsgLogDao GetInstance() |
| | | { |
| | | |
| | | if (Instance == null) |
| | | { |
| | | lock (Lock) |
| | | { |
| | | if (Instance == null) |
| | | { |
| | | Instance = new ReceiveMsgLogDao(); |
| | | } |
| | | } |
| | | } |
| | | return Instance; |
| | | } |
| | | |
| | | |
| | | protected override string GetColumnName(string name) |
| | | { |
| | | return ReceiveMsgLogEntity.GetColumnName(name); |
| | | } |
| | | |
| | | protected override string GetTableName() |
| | | { |
| | | return ReceiveMsgLogEntity.GetTableName(); |
| | | } |
| | | |
| | | protected override ReceiveMsgLogEntity ToEntity(LOGReceiveMsgLog receive) |
| | | { |
| | | return new ReceiveMsgLogEntity(receive); |
| | | } |
| | | |
| | | protected override LOGReceiveMsgLog ToOrm(ReceiveMsgLogEntity receive) |
| | | { |
| | | return receive.ToOrm(); |
| | | } |
| | | |
| | | protected override List<string> GetColumnNames() |
| | | { |
| | | return ReceiveMsgLogEntity.GetColumnMap().Keys.ToList(); |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareCommon.Common.Dao; |
| | | using iWareLog.LOG.Entity; |
| | | using iWareLog.ORM; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | |
| | | namespace iWareLog.LOG.Dao |
| | | { |
| | | public class SendMsgLogDao: CommonDao<SendMsgLogEntity, LOGSendMsgLog> |
| | | { |
| | | private static object Lock = new object(); |
| | | |
| | | private SendMsgLogDao() { } |
| | | |
| | | private static SendMsgLogDao Instance = null; |
| | | |
| | | /// <summary> |
| | | /// è·ååä¾çæ¹æ³ |
| | | /// </summary> |
| | | /// <returns>LOGæå¡çåä¾å®ä½</returns> |
| | | public static SendMsgLogDao GetInstance() |
| | | { |
| | | |
| | | if (Instance == null) |
| | | { |
| | | lock (Lock) |
| | | { |
| | | if (Instance == null) |
| | | { |
| | | Instance = new SendMsgLogDao(); |
| | | } |
| | | } |
| | | } |
| | | return Instance; |
| | | } |
| | | |
| | | |
| | | protected override string GetColumnName(string name) |
| | | { |
| | | return SendMsgLogEntity.GetColumnName(name); |
| | | } |
| | | |
| | | protected override string GetTableName() |
| | | { |
| | | return SendMsgLogEntity.GetTableName(); |
| | | } |
| | | |
| | | protected override SendMsgLogEntity ToEntity(LOGSendMsgLog send) |
| | | { |
| | | return new SendMsgLogEntity(send); |
| | | } |
| | | |
| | | protected override LOGSendMsgLog ToOrm(SendMsgLogEntity send) |
| | | { |
| | | return send.ToOrm(); |
| | | } |
| | | |
| | | protected override List<string> GetColumnNames() |
| | | { |
| | | return SendMsgLogEntity.GetColumnMap().Keys.ToList(); |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareCommon.Utils; |
| | | using iWareLog.ORM; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using iWareCommon.Common.Entity; |
| | | |
| | | |
| | | namespace iWareLog.LOG.Entity |
| | | { |
| | | public class AlertEntity : ICommonEntity<DEVAlert> |
| | | { |
| | | /// <summary> |
| | | /// 1ä¸»é® |
| | | /// </summary> |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 2å°è½¦åç§° |
| | | /// </summary> |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 3æç¤ºç±»å |
| | | /// </summary> |
| | | public int Type { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 4设å¤id |
| | | /// </summary> |
| | | public string EquipId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 5æç¤ºä»£ç |
| | | /// </summary> |
| | | public string AlertCode{ get; set; } |
| | | |
| | | /// <summary> |
| | | /// 6æç¤ºåç§° |
| | | /// </summary> |
| | | public string AlertName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 7æ¯å¦æ¶è¦ |
| | | /// </summary> |
| | | public int IsFinished { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 8äºä»¶ä»£ç |
| | | /// </summary> |
| | | public int EventCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 9å建æ¶é´ |
| | | /// </summary> |
| | | public DateTime CreateTime { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 10ç»æäºä»¶ |
| | | /// </summary> |
| | | public DateTime FinishTime { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ åæé |
| | | /// </summary> |
| | | public AlertEntity() { } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æåæé |
| | | /// </summary> |
| | | /// <param name="alert">ormå°å°çç±»</param> |
| | | public AlertEntity(DEVAlert alert) |
| | | { |
| | | EntityPropHelper<AlertEntity, DEVAlert>.CopyProp(alert, this, GetColumnMap()); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// å°å¯¹è±¡è½¬æ¢æORMä¸çç±»å |
| | | /// </summary> |
| | | /// <returns>Ormä¸çBASEShiftç±»å</returns> |
| | | public DEVAlert ToOrm() |
| | | { |
| | | DEVAlert alert = new DEVAlert(); |
| | | EntityPropHelper<AlertEntity, DEVAlert>.CopyProp(this, alert, GetColumnMap()); |
| | | |
| | | return alert; |
| | | } |
| | | |
| | | ///<summary> |
| | | /// è·åèªå®ä¹è§è²ç±»ä¸çåæ®µå为é®ï¼ormä¸å¯¹è±¡çåæ®µå为å¼çåæ®µ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static Dictionary<string, string> GetColumnMap() |
| | | { |
| | | return new Dictionary<string, string>() |
| | | { |
| | | {"Id", "id"}, |
| | | {"Name", "name"}, |
| | | {"Type", "type"}, |
| | | {"EquipId", "equipid"}, |
| | | {"AlertCode", "alertcode"}, |
| | | {"AlertName", "alertname"}, |
| | | {"IsFinished", "isfinished"}, |
| | | {"EventCode","eventcode"}, |
| | | {"CreateTime","createtime"}, |
| | | {"FinishTime","finishtime"} |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®ShiftEntityçåæ®µè½¬BASEShiftçåæ®µ |
| | | /// </summary> |
| | | /// <param name="name">ShiftEntityçåæ®µ</param> |
| | | /// <returns>BASEShift</returns> |
| | | public static string GetColumnName(string name) |
| | | { |
| | | var columnMap = GetColumnMap(); |
| | | return columnMap.ContainsKey(name) ? columnMap[name] : name; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åShiftEntity对åºç表å |
| | | /// </summary> |
| | | /// <returns>表å</returns> |
| | | public static string GetTableName() |
| | | { |
| | | return "[dbo].[DEVAlert]"; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareCommon.Utils; |
| | | using iWareLog.ORM; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using iWareCommon.Common.Entity; |
| | | |
| | | |
| | | namespace iWareLog.LOG.Entity |
| | | { |
| | | public class FailSentMessageEntity : ICommonEntity<LOGERRORFailSentMessage> |
| | | { |
| | | /// <summary> |
| | | /// 1ä¸»é® |
| | | /// </summary> |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 2æäº¤å°å |
| | | /// </summary> |
| | | public string Url { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 3请æ±å符串 |
| | | /// </summary> |
| | | public string RequestStr { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 4éè¯æ¬¡æ° |
| | | /// </summary> |
| | | public int RetryTimes { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 5æ¯å¦ok,0ä¸ºæªæåï¼1为æå |
| | | /// </summary> |
| | | public int IsOk { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 6æ¯å¦åéé®ä»¶ï¼0为æªåéï¼1为已åé |
| | | /// </summary> |
| | | public int IsMailed { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 7å建æ¶é´ |
| | | /// </summary> |
| | | public DateTime CreateTime { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 8ç»æäºä»¶ |
| | | /// </summary> |
| | | public DateTime FinishTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 9éè¯¯æ¶æ¯ |
| | | /// </summary> |
| | | public string ResMsg { get; set; } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ åæé |
| | | /// </summary> |
| | | public FailSentMessageEntity() { } |
| | | |
| | | /// <summary> |
| | | /// æåæé |
| | | /// </summary> |
| | | /// <param name="alert">ormå°å°çç±»</param> |
| | | public FailSentMessageEntity(LOGERRORFailSentMessage alert) |
| | | { |
| | | EntityPropHelper<FailSentMessageEntity, LOGERRORFailSentMessage>.CopyProp(alert, this, GetColumnMap()); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// å°å¯¹è±¡è½¬æ¢æORMä¸çç±»å |
| | | /// </summary> |
| | | /// <returns>Ormä¸çBASEShiftç±»å</returns> |
| | | public LOGERRORFailSentMessage ToOrm() |
| | | { |
| | | LOGERRORFailSentMessage alert = new LOGERRORFailSentMessage(); |
| | | EntityPropHelper<FailSentMessageEntity, LOGERRORFailSentMessage>.CopyProp(this, alert, GetColumnMap()); |
| | | |
| | | return alert; |
| | | } |
| | | |
| | | ///<summary> |
| | | /// è·åèªå®ä¹è§è²ç±»ä¸çåæ®µå为é®ï¼ormä¸å¯¹è±¡çåæ®µå为å¼çåæ®µ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static Dictionary<string, string> GetColumnMap() |
| | | { |
| | | return new Dictionary<string, string>() |
| | | { |
| | | {"Id", "id"}, |
| | | {"Url", "url"}, |
| | | {"RequestStr", "requeststr"}, |
| | | {"RetryTimes", "retrytimes"}, |
| | | {"IsOk", "isok"}, |
| | | {"IsMailed", "ismailed"}, |
| | | {"CreateTime", "createtime"}, |
| | | {"UpdateTime","updatetime"}, |
| | | {"ResMsg","resmsg"} |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®ShiftEntityçåæ®µè½¬BASEShiftçåæ®µ |
| | | /// </summary> |
| | | /// <param name="name">ShiftEntityçåæ®µ</param> |
| | | /// <returns>BASEShift</returns> |
| | | public static string GetColumnName(string name) |
| | | { |
| | | var columnMap = GetColumnMap(); |
| | | return columnMap.ContainsKey(name) ? columnMap[name] : name; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åShiftEntity对åºç表å |
| | | /// </summary> |
| | | /// <returns>表å</returns> |
| | | public static string GetTableName() |
| | | { |
| | | return "[dbo].[LOGERRORFailSentMessage]"; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareCommon.Utils; |
| | | using iWareLog.ORM; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using iWareCommon.Common.Entity; |
| | | |
| | | |
| | | namespace iWareLog.LOG.Entity |
| | | { |
| | | public class InOutStorageDetailEntity : ICommonEntity<InOutStorageDetail> |
| | | { |
| | | /// <summary> |
| | | /// 1ä¸»é® |
| | | /// </summary> |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 2åºä½ç±»åid |
| | | /// </summary> |
| | | public int FormPlaceId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 3åºä½ä»£ç |
| | | /// </summary> |
| | | public string FromPlaceCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 4åºä½ç±»åid |
| | | /// </summary> |
| | | public int ToPlaceId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 5åºä½ä»£ç |
| | | /// </summary> |
| | | public string ToPlaceCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 6åºå
¥åºæ¶é´ |
| | | /// </summary> |
| | | public DateTime CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 7ä¿®æ¹æ¶é´ |
| | | /// </summary> |
| | | public DateTime UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 8æä½ç±»åï¼1为å
¥åºï¼2为åºåº |
| | | /// </summary> |
| | | public int Type { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 9设å¤id |
| | | /// </summary> |
| | | public int EquipId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 10设å¤åç§° |
| | | /// </summary> |
| | | public string EquipName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 11ç©æid |
| | | /// </summary> |
| | | public int MaterialId { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 12ç©æå· |
| | | /// </summary> |
| | | public string MaterialCode { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ åæé |
| | | /// </summary> |
| | | public InOutStorageDetailEntity() { } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æåæé |
| | | /// </summary> |
| | | /// <param name="alert">ormå°å°çç±»</param> |
| | | public InOutStorageDetailEntity(InOutStorageDetail alert) |
| | | { |
| | | EntityPropHelper<InOutStorageDetailEntity, InOutStorageDetail>.CopyProp(alert, this, GetColumnMap()); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// å°å¯¹è±¡è½¬æ¢æORMä¸çç±»å |
| | | /// </summary> |
| | | /// <returns>Ormä¸çBASEShiftç±»å</returns> |
| | | public InOutStorageDetail ToOrm() |
| | | { |
| | | InOutStorageDetail alert = new InOutStorageDetail(); |
| | | EntityPropHelper<InOutStorageDetailEntity, InOutStorageDetail>.CopyProp(this, alert, GetColumnMap()); |
| | | |
| | | return alert; |
| | | } |
| | | |
| | | ///<summary> |
| | | /// è·åèªå®ä¹è§è²ç±»ä¸çåæ®µå为é®ï¼ormä¸å¯¹è±¡çåæ®µå为å¼çåæ®µ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static Dictionary<string, string> GetColumnMap() |
| | | { |
| | | return new Dictionary<string, string>() |
| | | { |
| | | {"Id", "id"}, |
| | | {"FormPlaceId", "formplaceid"}, |
| | | {"FromPlaceCode", "fromplacecode"}, |
| | | {"ToPlaceId", "toplaceid"}, |
| | | {"ToPlaceCode", "toplacecode"}, |
| | | {"CreateTime", "createtime"}, |
| | | {"UpdateTime", "updatetime"}, |
| | | {"EquipId","equipid"}, |
| | | {"EquipName","equipname"}, |
| | | {"MaterialId", "materialid"}, |
| | | {"MaterialCode","materialcode"}, |
| | | {"Type","type"} |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®ShiftEntityçåæ®µè½¬BASEShiftçåæ®µ |
| | | /// </summary> |
| | | /// <param name="name">ShiftEntityçåæ®µ</param> |
| | | /// <returns>BASEShift</returns> |
| | | public static string GetColumnName(string name) |
| | | { |
| | | var columnMap = GetColumnMap(); |
| | | return columnMap.ContainsKey(name) ? columnMap[name] : name; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åShiftEntity对åºç表å |
| | | /// </summary> |
| | | /// <returns>表å</returns> |
| | | public static string GetTableName() |
| | | { |
| | | return "[dbo].[InOutStorageDetail]"; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareCommon.Utils; |
| | | using iWareLog.ORM; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using iWareCommon.Common.Entity; |
| | | |
| | | |
| | | namespace iWareLog.LOG.Entity |
| | | { |
| | | public class OperationEntity : ICommonEntity<LOGOperation> |
| | | { |
| | | /// <summary> |
| | | /// 1ä¸»é® |
| | | /// </summary> |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 2 |
| | | /// </summary> |
| | | public int WbLogType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 3 |
| | | /// </summary> |
| | | public DateTime WbLogDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 4 |
| | | /// </summary> |
| | | public string WbLogacCount { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 5 |
| | | /// </summary> |
| | | public string WbUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 6 |
| | | /// </summary> |
| | | public string WbUserIpaddress { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 7 |
| | | /// </summary> |
| | | public string WbLogTxt { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 8 |
| | | /// </summary> |
| | | public string Log_backup1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 9 |
| | | /// </summary> |
| | | public string Log_backup2 { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 10 |
| | | /// </summary> |
| | | public string Log_backup3 { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ åæé |
| | | /// </summary> |
| | | public OperationEntity() { } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æåæé |
| | | /// </summary> |
| | | /// <param name="alert">ormå°å°çç±»</param> |
| | | public OperationEntity(LOGOperation alert) |
| | | { |
| | | EntityPropHelper<OperationEntity, LOGOperation>.CopyProp(alert, this, GetColumnMap()); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// å°å¯¹è±¡è½¬æ¢æORMä¸çç±»å |
| | | /// </summary> |
| | | /// <returns>Ormä¸çBASEShiftç±»å</returns> |
| | | public LOGOperation ToOrm() |
| | | { |
| | | LOGOperation alert = new LOGOperation(); |
| | | EntityPropHelper<OperationEntity, LOGOperation>.CopyProp(this, alert, GetColumnMap()); |
| | | |
| | | return alert; |
| | | } |
| | | |
| | | ///<summary> |
| | | /// è·åèªå®ä¹è§è²ç±»ä¸çåæ®µå为é®ï¼ormä¸å¯¹è±¡çåæ®µå为å¼çåæ®µ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static Dictionary<string, string> GetColumnMap() |
| | | { |
| | | return new Dictionary<string, string>() |
| | | { |
| | | {"Id", "wbdatalogid"}, |
| | | {"WbLogType", "wblogtype"}, |
| | | {"WbLogDate", "wblogdate"}, |
| | | {"WbLogacCount", "wblogaccount"}, |
| | | {"WbUserName", "wbusername"}, |
| | | {"WbUserIpaddress", "wbuseripaddress"}, |
| | | {"WbLogTxt", "wblogtxt"}, |
| | | {"Log_backup1","log_backup1"}, |
| | | {"Log_backup2","log_backup2"}, |
| | | {"Log_backup3","log_backup3"} |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®ShiftEntityçåæ®µè½¬BASEShiftçåæ®µ |
| | | /// </summary> |
| | | /// <param name="name">ShiftEntityçåæ®µ</param> |
| | | /// <returns>BASEShift</returns> |
| | | public static string GetColumnName(string name) |
| | | { |
| | | var columnMap = GetColumnMap(); |
| | | return columnMap.ContainsKey(name) ? columnMap[name] : name; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åShiftEntity对åºç表å |
| | | /// </summary> |
| | | /// <returns>表å</returns> |
| | | public static string GetTableName() |
| | | { |
| | | return "[dbo].[LOGOperation]"; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareCommon.Common.Entity; |
| | | using iWareCommon.Utils; |
| | | using iWareLog.ORM; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace iWareLog.LOG.Entity |
| | | { |
| | | public class ReceiveMsgLogEntity : ICommonEntity<LOGReceiveMsgLog> |
| | | { |
| | | /// <summary> |
| | | /// æ¥åä¿¡æ¯æ¥å¿ä¸»é® |
| | | /// </summary> |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¥åç±»åï¼0为wipï¼1为rcs, 2为人工åé |
| | | /// </summary> |
| | | public int Type { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è°ç¨æ¥å£åç§° |
| | | /// </summary> |
| | | public string InterfaceName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 请æ±å符串 |
| | | /// </summary> |
| | | public string RequestStr { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºçå符串 |
| | | /// </summary> |
| | | public string ResponseStr { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¯·æ±æ¶é´ |
| | | /// </summary> |
| | | public DateTime ReceiveTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æé 彿° |
| | | /// </summary> |
| | | public ReceiveMsgLogEntity() { } |
| | | |
| | | /// <summary> |
| | | /// æé 彿° |
| | | /// </summary> |
| | | /// <param name="receive">ormä¸ç模å</param> |
| | | public ReceiveMsgLogEntity(LOGReceiveMsgLog receive) |
| | | { |
| | | EntityPropHelper<ReceiveMsgLogEntity, LOGReceiveMsgLog>.CopyProp(receive, this, GetColumnMap()); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åèªå®ä¹ç±»ReceiveMsgLogEntityçåæ®µå为é®ï¼ORM对象ä¸å段å为å¼çåæ®µ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static Dictionary<string, string> GetColumnMap() |
| | | { |
| | | return new Dictionary<string, string>() |
| | | { |
| | | {"Id", "id"}, |
| | | {"Type", "type"}, |
| | | {"InterfaceName", "interfacename"}, |
| | | {"RequestStr", "requeststr"}, |
| | | {"ResponseStr", "responsestr"}, |
| | | {"ReceiveTime","receivetime"}, |
| | | {"Remark","remark"} |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å°ReceiveMsgLogEntityå®ä½è½¬å为orméé¢çLOGReceiveMsgLog模å |
| | | /// </summary> |
| | | /// <returns>ormä¸çLOGReceiveMsgLog模å</returns> |
| | | public LOGReceiveMsgLog ToOrm() |
| | | { |
| | | var receive = new LOGReceiveMsgLog(); |
| | | EntityPropHelper<ReceiveMsgLogEntity, LOGReceiveMsgLog>.CopyProp(this, receive, GetColumnMap()); |
| | | return receive; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®ReceiveMsgLogEntityçåæ®µè½¬LOGReceiveMsgLogçåæ®µ |
| | | /// </summary> |
| | | /// <param name="name">ReceiveMsgLogEntityçåæ®µ</param> |
| | | /// <returns>LOGReceiveMsgLog</returns> |
| | | public static string GetColumnName(string name) |
| | | { |
| | | var columnMap = GetColumnMap(); |
| | | return columnMap.ContainsKey(name) ? columnMap[name] : name; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åReceiveMsgLogEntity对åºç表å |
| | | /// </summary> |
| | | /// <returns>LOGReceiveMsgLog</returns> |
| | | public static string GetTableName() |
| | | { |
| | | return "[dbo].[LOGReceiveMsgLog]"; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareCommon.Common.Entity; |
| | | using iWareCommon.Utils; |
| | | using iWareLog.ORM; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace iWareLog.LOG.Entity |
| | | { |
| | | public class SendMsgLogEntity : ICommonEntity<LOGSendMsgLog> |
| | | { |
| | | /// <summary> |
| | | /// æ¥åä¿¡æ¯æ¥å¿ä¸»é® |
| | | /// </summary> |
| | | public int Id { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è°ç¨æ¥å£åç§° |
| | | /// </summary> |
| | | public string InterfaceName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 请æ±å符串 |
| | | /// </summary> |
| | | public string RequestStr { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºçå符串 |
| | | /// </summary> |
| | | public string ResponseStr { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åéæ¶é´ |
| | | /// </summary> |
| | | public DateTime SendTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æé 彿° |
| | | /// </summary> |
| | | public SendMsgLogEntity() { } |
| | | |
| | | /// <summary> |
| | | /// æ¥åç±»åï¼0为wipï¼1为rcs, 2为人工åé |
| | | /// </summary> |
| | | public int Type { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æé 彿° |
| | | /// </summary> |
| | | /// <param name="receive">ormä¸ç模å</param> |
| | | public SendMsgLogEntity(LOGSendMsgLog send) |
| | | { |
| | | EntityPropHelper<SendMsgLogEntity, LOGSendMsgLog>.CopyProp(send, this, GetColumnMap()); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åèªå®ä¹ç±»SendMsgLogEntityçåæ®µå为é®ï¼ORM对象ä¸å段å为å¼çåæ®µ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static Dictionary<string, string> GetColumnMap() |
| | | { |
| | | return new Dictionary<string, string>() |
| | | { |
| | | {"Id", "id"}, |
| | | {"Type", "type"}, |
| | | {"InterfaceName", "interfacename"}, |
| | | {"RequestStr", "requeststr"}, |
| | | {"ResponseStr", "responsestr"}, |
| | | {"SendTime","sendtime"}, |
| | | {"Remark","remark"} |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å°SendMsgLogEntityå®ä½è½¬å为orméé¢çLOGSendMsgLog模å |
| | | /// </summary> |
| | | /// <returns>ormä¸çLOGReceiveMsgLog模å</returns> |
| | | public LOGSendMsgLog ToOrm() |
| | | { |
| | | var send = new LOGSendMsgLog(); |
| | | EntityPropHelper<SendMsgLogEntity, LOGSendMsgLog>.CopyProp(this, send, GetColumnMap()); |
| | | return send; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®SendMsgLogEntityçåæ®µè½¬LOGSendMsgLogçåæ®µ |
| | | /// </summary> |
| | | /// <param name="name">SendMsgLogEntityçåæ®µ</param> |
| | | /// <returns>LOGSendMsgLog</returns> |
| | | public static string GetColumnName(string name) |
| | | { |
| | | var columnMap = GetColumnMap(); |
| | | return columnMap.ContainsKey(name) ? columnMap[name] : name; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åSendMsgLogEntity对åºç表å |
| | | /// </summary> |
| | | /// <returns>LOGSendMsgLog</returns> |
| | | public static string GetTableName() |
| | | { |
| | | return "[dbo].[LOGSendMsgLog]"; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace iWareLog.LOG.EnumType |
| | | { |
| | | public enum EInOutStorageType |
| | | { |
| | | å
¥åº = 0, |
| | | åºåº = 1, |
| | | ç§»åº = 2, |
| | | éåº = 3 |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace iWareLog.LOG.EnumType |
| | | { |
| | | public enum EReceiveType |
| | | { |
| | | wip, |
| | | rcs, |
| | | 人工åé |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareLog.ORM; |
| | | using iWareLog.LOG.Entity; |
| | | using iWareLog.LOG.Dao; |
| | | using iWareCommon.Common.Service; |
| | | |
| | | namespace iWareLog.LOG.Service |
| | | { |
| | | public class AlertService : CommonService<AlertEntity, DEVAlert, DbModelLog> |
| | | { |
| | | private static object Lock = new object(); |
| | | |
| | | private AlertService() : base(AlertDao.GetInstance()) { } |
| | | |
| | | private static AlertService Instance = null; |
| | | |
| | | /// <summary> |
| | | /// è·ååä¾çæ¹æ³ |
| | | /// </summary> |
| | | /// <returns>logæå¡çåä¾å®ä½</returns> |
| | | public static AlertService GetInstance() |
| | | { |
| | | |
| | | if (Instance == null) |
| | | { |
| | | lock (Lock) |
| | | { |
| | | if (Instance == null) |
| | | { |
| | | Instance = new AlertService(); |
| | | } |
| | | } |
| | | } |
| | | return Instance; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareLog.ORM; |
| | | using iWareLog.LOG.Entity; |
| | | using iWareLog.LOG.Dao; |
| | | using iWareCommon.Common.Service; |
| | | using iWareCommon.Utils; |
| | | using System; |
| | | using iWareCommon.Common.EnumType; |
| | | using Newtonsoft.Json; |
| | | using iWareLog.Properties; |
| | | using iWareCommon.Common.Entity; |
| | | using System.Linq; |
| | | |
| | | namespace iWareLog.LOG.Service |
| | | { |
| | | public class FailSentMessageService : CommonService<FailSentMessageEntity, LOGERRORFailSentMessage, DbModelLog> |
| | | { |
| | | private static object Lock = new object(); |
| | | |
| | | private FailSentMessageService() : base(FailSentMessageDao.GetInstance()) { } |
| | | |
| | | private static FailSentMessageService Instance = null; |
| | | |
| | | /// <summary> |
| | | /// è·ååä¾çæ¹æ³ |
| | | /// </summary> |
| | | /// <returns>logæå¡çåä¾å®ä½</returns> |
| | | public static FailSentMessageService GetInstance() |
| | | { |
| | | |
| | | if (Instance == null) |
| | | { |
| | | lock (Lock) |
| | | { |
| | | if (Instance == null) |
| | | { |
| | | Instance = new FailSentMessageService(); |
| | | } |
| | | } |
| | | } |
| | | return Instance; |
| | | } |
| | | /// <summary> |
| | | /// éæ°åé |
| | | /// </summary> |
| | | /// <param name="message"></param> |
| | | /// <param name="msg"></param> |
| | | /// <returns></returns> |
| | | public bool ReSend(int id, out string msg) |
| | | { |
| | | using (var dbModel = new DbModelLog()) |
| | | { |
| | | try |
| | | { |
| | | msg = ""; |
| | | var url = ""; |
| | | |
| | | var message = dbModel.LOGERRORFailSentMessages.FirstOrDefault(x => x.id == id); |
| | | |
| | | if (message == null) |
| | | { |
| | | msg = string.Format("æ²¡ææ¾å°id为{0}çè®°å½", id); |
| | | return false; |
| | | } |
| | | |
| | | switch (message.url) |
| | | { |
| | | case "pushstatusforpreheating": |
| | | case "pushstatusforheatstorage": |
| | | case "pushstatusforbufferfeed": |
| | | case "preheatstoragefinish": |
| | | case "pushstatusforft": |
| | | case "pushstatusforecmfeedbyrcs": |
| | | case "pushstatusforecmblankingbyrcs": |
| | | case "pushstatusforheattrans": |
| | | case "pushstatusforartificialqualityinspection": |
| | | case "heatstoroutbindrfid": |
| | | case "heatstoroutbindfinish": |
| | | case "pushstatusforbuffertrans": |
| | | url = Resources.WipUrl + @"/"; |
| | | break; |
| | | case "syncmaterialinfo": |
| | | case "materialstatemodify": |
| | | case "getloadingtablestatus": |
| | | case "getecmtablestatus": |
| | | case "businessexception": |
| | | case "equipwarn": |
| | | case "equipstatus": |
| | | case "agvrealtimelocation": |
| | | case "outstoragecompleted": |
| | | case "movestoragecompleted": |
| | | case "bufferlayingoffcompleted": |
| | | case "artificialwarehousing": |
| | | case "processcardforwcs": |
| | | case "resetprocesscardprintqueue": |
| | | url = Resources.WipUrl2 + @"/"; |
| | | break; |
| | | case "reparsetask": |
| | | break; |
| | | |
| | | |
| | | } |
| | | |
| | | var responseStr = HttpHelper.GetHttpResponse(url + message.url, JsonConvert.DeserializeObject(message.requeststr), 5000); |
| | | var resFormat = JsonConvert.DeserializeObject<ResEntity>(responseStr); |
| | | |
| | | message.isok = resFormat.resCode == "00000" ? (int)EYesOrNo.æ¯ : (int)EYesOrNo.å¦; |
| | | |
| | | message.updatetime = DateTime.Now; |
| | | |
| | | message.retrytimes += 1; |
| | | |
| | | dbModel.SaveChanges(); |
| | | |
| | | if (message.isok == (int)EYesOrNo.å¦) |
| | | { |
| | | msg = resFormat.resMsg; |
| | | } |
| | | |
| | | return message.isok == (int)EYesOrNo.æ¯; |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | msg = ex.Message; |
| | | var message = dbModel.LOGERRORFailSentMessages.FirstOrDefault(x => x.id == id); |
| | | message.isok = (int)EYesOrNo.å¦; |
| | | |
| | | message.updatetime = DateTime.Now; |
| | | |
| | | message.retrytimes += 1; |
| | | |
| | | dbModel.SaveChanges(); |
| | | LogTextHelper.WriteLog(Resources.LogDir, this.ToString(), "ReSend", msg); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public bool PushBusinessException(int id, out string msg) |
| | | { |
| | | using (var dbModel2 = new DbModelLog()) |
| | | { |
| | | try |
| | | { |
| | | msg = ""; |
| | | |
| | | var message = dbModel2.LOGERRORFailSentMessages.FirstOrDefault(x => x.id == id); |
| | | |
| | | if (message == null) |
| | | { |
| | | msg = string.Format("æ²¡ææ¾å°id为{0}çè®°å½", id); |
| | | return false; |
| | | } |
| | | |
| | | var requestBody = new |
| | | { |
| | | sysCode = "WCS", |
| | | taskNo = StringHelper.GetValue(message.requeststr, "taskNo"), |
| | | processCardNumber = StringHelper.GetValue(message.requeststr, "processCardNumber"), |
| | | exceptionCode = "001", |
| | | exceptionMsg = message.resmsg, |
| | | timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") |
| | | }; |
| | | |
| | | var responseStr = HttpHelper.GetHttpResponse(Resources.WipUrl2 + @"/businessexception", requestBody, 5000); |
| | | |
| | | LogTextHelper.WriteLine(Resources.LogDir, "PushBusinessException:responseStr = {0}", responseStr); |
| | | |
| | | return true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | msg = ex.Message; |
| | | |
| | | LogTextHelper.WriteLog(Resources.LogDir, this.ToString(), "PushBusinessException", msg); |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareLog.ORM; |
| | | using iWareLog.LOG.Entity; |
| | | using iWareLog.LOG.Dao; |
| | | using iWareCommon.Common.Service; |
| | | |
| | | namespace iWareLog.LOG.Service |
| | | { |
| | | public class InOutStorageDetailService : CommonService<InOutStorageDetailEntity, InOutStorageDetail, DbModelLog> |
| | | { |
| | | private static object Lock = new object(); |
| | | |
| | | private InOutStorageDetailService() : base(InOutStorageDetailDao.GetInstance()) { } |
| | | |
| | | private static InOutStorageDetailService Instance = null; |
| | | |
| | | /// <summary> |
| | | /// è·ååä¾çæ¹æ³ |
| | | /// </summary> |
| | | /// <returns>logæå¡çåä¾å®ä½</returns> |
| | | public static InOutStorageDetailService GetInstance() |
| | | { |
| | | |
| | | if (Instance == null) |
| | | { |
| | | lock (Lock) |
| | | { |
| | | if (Instance == null) |
| | | { |
| | | Instance = new InOutStorageDetailService(); |
| | | } |
| | | } |
| | | } |
| | | return Instance; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareLog.ORM; |
| | | using iWareLog.LOG.Entity; |
| | | using iWareLog.LOG.Dao; |
| | | using iWareCommon.Common.Service; |
| | | using iWareCommon.Utils; |
| | | using iWareLog.Properties; |
| | | using System; |
| | | |
| | | namespace iWareLog.LOG.Service |
| | | { |
| | | public class OperationService : CommonService<OperationEntity, LOGOperation, DbModelLog> |
| | | { |
| | | private static object Lock = new object(); |
| | | |
| | | private OperationService() : base(OperationDao.GetInstance()) { } |
| | | |
| | | private static OperationService Instance = null; |
| | | |
| | | /// <summary> |
| | | /// è·ååä¾çæ¹æ³ |
| | | /// </summary> |
| | | /// <returns>logæå¡çåä¾å®ä½</returns> |
| | | public static OperationService GetInstance() |
| | | { |
| | | |
| | | if (Instance == null) |
| | | { |
| | | lock (Lock) |
| | | { |
| | | if (Instance == null) |
| | | { |
| | | Instance = new OperationService(); |
| | | } |
| | | } |
| | | } |
| | | return Instance; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åå
¥æ¥å¿ |
| | | /// </summary> |
| | | /// <param name="tt_new"></param> |
| | | /// <returns></returns> |
| | | public void Save(OperationEntity dateLog) |
| | | { |
| | | try |
| | | { |
| | | using (DbModelLog ml = new DbModelLog()) |
| | | { |
| | | ml.LOGOperations.Add(dateLog.ToOrm()); |
| | | ml.SaveChanges(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogTextHelper.WriteLog(Resources.LogDir, this.ToString(), "Save", ex.Message); |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareLog.ORM; |
| | | using iWareLog.LOG.Entity; |
| | | using iWareLog.LOG.Dao; |
| | | using iWareCommon.Common.Service; |
| | | |
| | | namespace iWareLog.LOG.Service |
| | | { |
| | | public class ReceiveMsgLogService : CommonService<ReceiveMsgLogEntity, LOGReceiveMsgLog, DbModelLog> |
| | | { |
| | | private static object Lock = new object(); |
| | | |
| | | private ReceiveMsgLogService() : base(ReceiveMsgLogDao.GetInstance()) { } |
| | | |
| | | private static ReceiveMsgLogService Instance = null; |
| | | |
| | | /// <summary> |
| | | /// è·ååä¾çæ¹æ³ |
| | | /// </summary> |
| | | /// <returns>logæå¡çåä¾å®ä½</returns> |
| | | public static ReceiveMsgLogService GetInstance() |
| | | { |
| | | |
| | | if (Instance == null) |
| | | { |
| | | lock (Lock) |
| | | { |
| | | if (Instance == null) |
| | | { |
| | | Instance = new ReceiveMsgLogService(); |
| | | } |
| | | } |
| | | } |
| | | return Instance; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using iWareLog.LOG.Dao; |
| | | using iWareLog.LOG.Entity; |
| | | using iWareLog.ORM; |
| | | using iWareCommon.Common.Service; |
| | | |
| | | namespace iWareLog.LOG.Service |
| | | { |
| | | public class SendMsgLogService : CommonService<SendMsgLogEntity, LOGSendMsgLog, DbModelLog> |
| | | { |
| | | private static object Lock = new object(); |
| | | |
| | | private SendMsgLogService() : base(SendMsgLogDao.GetInstance()) { } |
| | | |
| | | private static SendMsgLogService Instance = null; |
| | | |
| | | /// <summary> |
| | | /// è·ååä¾çæ¹æ³ |
| | | /// </summary> |
| | | /// <returns>logæå¡çåä¾å®ä½</returns> |
| | | public static SendMsgLogService GetInstance() |
| | | { |
| | | |
| | | if (Instance == null) |
| | | { |
| | | lock (Lock) |
| | | { |
| | | if (Instance == null) |
| | | { |
| | | Instance = new SendMsgLogService(); |
| | | } |
| | | } |
| | | } |
| | | return Instance; |
| | | } |
| | | |
| | | } |
| | | } |