| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化数据库 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [Route("CreateDatabase")] |
| | | public string CreateDatabase() { |
| | | try { |
| | | var db = new SqlHelper<object>().GetInstance(); |
| | | |
| | | var entityTypes = new Type[] { }; |
| | | |
| | | //db.CodeFirst.InitTables(entityTypes); |
| | | } |
| | | catch (Exception ex) { |
| | | LogHelper.Info($"发生了异常"); |
| | | return "初始化数据库错误" + ex.Message; |
| | | } |
| | | return "成功"; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// DEBUG:根据任务号设置物料重量 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | |
| | | return "找不到对应的任务号"; |
| | | } |
| | | |
| | | cgDetail.F_QTY = model.Weight; |
| | | cgDetail.F_WEIGHT = model.Weight; |
| | | task.F_WEIGHT = model.Weight; |
| | | |
| | | try { |
| | | using (var tran = db.Ado.UseTran()) { |
| | | if (db.Updateable<TN_CG_Detail>(cgDetail).UpdateColumns(it => it.F_QTY) |
| | | if (db.Updateable<TN_CG_Detail>(cgDetail).UpdateColumns(it => it.F_WEIGHT) |
| | | .ExecuteCommand() <= 0) { |
| | | tran.RollbackTran(); |
| | | return "修改失败"; |
| | |
| | | public List<GzResult> GzResultList { set; get; } |
| | | } |
| | | |
| | | public class LocCntrCg { |
| | | public string LocCode { get; set; } |
| | | public string LocArea { get; set; } |
| | | public string CntrCode { get; set; } |
| | | public string ItemCode { get; set; } |
| | | public string BatchNo { get; set; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 模拟 AGV 传递信号,用于更改任务状态 |
| | | /// </summary> |
| | |
| | | /// AGV 下一个状态 |
| | | /// </summary> |
| | | public int NextState { set; get; } |
| | | } |
| | | |
| | | public class CoverInfo { |
| | | public bool IsCover { set; get; } = true; |
| | | } |
| | | |
| | | public class SetTaskWeightInfo { |