/// <summary> /// /// </summary> /// <param name="strTyep"></param> /// <param name="model"></param> /// <returns></returns> public async Task <bool> wip_QTY(CloseParam model) { //添加 string strAddUpdate = ""; strAddUpdate = string.Format("update T_MES_WIP_QTY w set w.qty_out='{0}' where w.mo_number='{1}' and w.station_name='{2}'and w.shipt_no='{3}' and w.statue=0", model.out_qty, model.moNumber, model.device_sn, model.shipment_no); return(await base.ExecuteCommand(strAddUpdate, new { }) > 0); }
/// <summary> /// 关结 /// </summary> /// <param name="model"></param> /// <returns></returns> public async Task <MessageModel <string> > Close(CloseParam model) { string[] currenStep = { "正极打胶", "正极搅拌", "正极单面涂布", "正极双面涂布", "正极辊压", "正极分条", "正极模切", "正极裁片", "负极打胶", "负极搅拌", "负极单面涂布", "负极双面涂布", "负极辊压", "负极分条", "负极模切", "负极裁片" }; MessageModel <string> message = new MessageModel <string>(); //if (model.device_sn.Substring(0, 2) != "ZJ" && model.device_sn.Substring(0, 2) != "FJ") //{ // message.msg = model.device_sn.Substring(0, 2) + "该设备号不符合规范,命名必须是ZJ或FJ开头,不允许操作!"; // return message; //} if (model.out_qty.ObjToInt() > model.input_Sum.ObjToInt()) { message.msg = "出货数量不能大于投入数量"; return(message); } if (string.IsNullOrEmpty(model.out_qty) || model.out_qty.ObjToInt() <= 0) { message.msg = "请输入有效的出货数量"; return(message); } //查找下一步骤名称 int currenNumber = Array.IndexOf(currenStep, model.productType); string nextStep = currenStep[currenNumber + 1]; AgitationModel dbModel = new AgitationModel(); dbModel = _mapper.Map <AgitationModel>(model); dbModel.productItem = nextStep; await _dal.UpdateShipCartState(dbModel); await _dal.wip_QTY(model); message.success = true; message.msg = "关结成功"; await _dal.wip_QTY(model); return(message); }
public async Task <MessageModel <string> > Close(CloseParam jsondata) { return(await _agitationServices.Close(jsondata)); }