| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | //LogService.Write("msg1:" + msg1); |
| | | //LogService.Write("msg2:" + msg2); |
| | | //LogService.Write("msg3:" + msg3); |
| | | |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (FCusName == "安瑞医疗") //系统参数 客户定制化名称 空白为通用 |
| | | { |
| | | if (DBUtility.ClsPub.isStrNull(oItemSub.HBatChNo) == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!第" + i.ToString() + "行未填写批号!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | oItemSub.HEntryID = i; |
| | | oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | oItemSub.HRemark = ""; |
| | | oItemSub.HCloseMan = ""; |
| | | oItemSub.HCloseType = false; |
| | | oBill.DetailColl.Add(oItemSub); |
| | | |
| | | } |
| | | //保存前判断(单据号重复,笔录项目) |
| | | //保存 |
| | |
| | | bool bResult; |
| | | if (oBill.omodel.HInterID == 0) |
| | | { |
| | | // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | try |
| | | { |
| | | //采购订单下推生成送货单 时候 判断是否有生成采购订单变更单 如果有且变更单状态不为已审核 限制下推 |
| | |
| | | if (objJsonResult.code == "0") |
| | | return objJsonResult; |
| | | |
| | | string HinterID = ""; |
| | | for (int i = 0; i < mylist.Count; i++) |
| | | { |
| | | //更新关联数量 |
| | | HinterID = mylist[i].ToString(); |
| | | oCn.RunProc("exec h_p_SRM_UpDatePPBomRelationQty '" + HinterID + "'"); |
| | | var HinterID = mylist[i].ToString(); |
| | | oCn.RunProc($"exec h_p_SRM_UpDatePPBomRelationQty {HinterID}"); |
| | | //判断未关联数量是否为0 |
| | | DataSet ds = oCn.RunProcReturn("select * from H_v_SRM_POOrderBillList where hmainid='" + HinterID + "'", "H_v_SRM_POOrderBillList"); |
| | | if (ds != null || ds.Tables[0].Rows.Count > 0) |
| | | DataSet ds = oCn.RunProcReturn("select * from H_v_SRM_POOrderBillList where hmainid='" + HinterID + "'", "H_v_SRM_POOrderBillList"); |
| | | DataTable dt = ds.Tables[0]; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["未关联数量"].ToString() == "0") |
| | | DataRow[] dr = dt.Select("未关联数量 = " + 0); |
| | | if (dr.Count() > 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据号:" + ds.Tables[0].Rows[0]["单据号"].ToString() + "已全部生成送货单!"; |
| | | objJsonResult.Message = "单据号:" + dr[0]["单据号"].ToString() + "未关联数量为0,已全部生成送货单!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "操作成功!"; |