/// <summary> /// 新增出牌参数信息 /// </summary> /// <param name="model"></param> /// <returns></returns> public async Task <bool> InsertShipCartinfo(AgitationUpdateShipCartParam model) { string strUpdate = string.Format(@"insert into t_mes_stir_info (SHIPMENT_NO, STEP_NAME, ITEM_NAME, ITEM_VALUE, DATE_TIME, USERNAME ) values ('{1}', '粘度-更新', '粘度', '{0}', sysdate, '{2}')", model.viscosity, model.shipment_no, model.USER_NAME); return(await base.ExecuteCommand(strUpdate, new { }) > 0); }
/// <summary> /// 更新 /// </summary> /// <param name="model">{shipment_no}</param> /// <returns></returns> public async Task <MessageModel <AgitationUpdateShipCartParam> > UpdateShipCart(AgitationUpdateShipCartParam model) { MessageModel <AgitationUpdateShipCartParam> message = new MessageModel <AgitationUpdateShipCartParam>(); if (string.IsNullOrEmpty(model.solid_content)) { message.success = false; message.msg = "固含量不能为空,请重新输入"; return(message); } if (string.IsNullOrEmpty(model.viscosity)) { message.success = false; message.msg = "调节粘度不能为空,请重新输入"; return(message); } var result = await _dal.GetShipCartInfo(model); if (result != null) { //更新固含量 if (!string.IsNullOrEmpty(model.shipment_no)) { await _dal.UpdateShipCartBySolid_content(model); } //更新调节粘度 if (!string.IsNullOrEmpty(model.viscosity)) { await _dal.InsertShipCartinfo(model); } message.msg = "更新成功!"; message.success = true; message.response = model; } else { message.msg = "出货牌不存在"; } return(message); }
public async Task <MessageModel <AgitationUpdateShipCartParam> > UpdateShipCart(AgitationUpdateShipCartParam jsondata) { return(await _agitationServices.UpdateShipCart(jsondata)); }
/// <summary> /// 获取出货牌信息 /// </summary> /// <param name="model"></param> /// <returns></returns> public async Task <AgitationModel> GetShipCartInfo(AgitationUpdateShipCartParam model) { string strQTY = string.Format(@"select 1 from T_MES_MACHINE_USEINFO c where c.shipment_no='{0}' ", model.shipment_no); return(await base.SqlQuerySingleAsync <AgitationModel>(strQTY, new { })); }
/// <summary> /// 更新出货牌固含量 /// </summary> /// <param name="model"></param> /// <returns></returns> public async Task <bool> UpdateShipCartBySolid_content(AgitationUpdateShipCartParam model) { string strUpdate = string.Format(@"update T_MES_MACHINE_USEINFO t set t.solid_content='{0}',t.update_date=sysdate where t.shipment_no='{1}'", model.solid_content, model.shipment_no); return(await base.ExecuteCommand(strUpdate, new { }) > 0); }