WebAPI/DLL/ClsSc_ICMOBillWorkQtyStatus_Tmp.cs
@@ -81,8 +81,20 @@
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //主表
                DataSet ds;
                //保存前控制=========================================
                ds = oCn.RunProcReturn("exec h_p_Sc_ICMOBillWorkQtyStatus_BeforeSaveCtrl " + omodel.HInterID + "," + omodel.HSourceInterID + "," + omodel.HSourceEntryID + ",'" + omodel.HSourceBillNo + "'", "h_p_Sc_ICMOBillWorkQtyStatus_BeforeSaveCtrl");
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1")
                {
                    sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //=========================================================
                //主表
                oCn.RunProc("Insert Into Sc_ICMOBillWorkQtyStatus_Tmp   " +   
               "(HInterID,HBillType,HSourceID,HReportType,HPieceQty" +
               ",HMaterID,HGroupID,HWorkManID,HWorkReportDate,HDate" +
@@ -103,7 +115,7 @@
                oCn.RunProc("update Sc_ICMOBillStatus_Tmp set HSplitRelationQty=HSplitRelationQty+" + sumqty + "  where HICMOBillNo='" + omodel.HICMOBillNo + "'  and HSourceID='" + omodel.HSourceID + "' and  HICMOInterID='" + omodel.HICMOInterID + "' and HICMOEntryID='" + omodel.HICMOEntryID + "' and HInterID="+ omodel.HSourceInterID.ToString());
                //再次验证 保存是否 合理
                DataSet ds = oCn.RunProcReturn("exec h_p_JIT_ICMOBillWorkQtyStatus_SaveCtrl @HInterId=" + omodel.HInterID + "", "h_p_JIT_ICMOBillWorkQtyStatus_SaveCtrl");
                ds = oCn.RunProcReturn("exec h_p_JIT_ICMOBillWorkQtyStatus_SaveCtrl @HInterId=" + omodel.HInterID + "", "h_p_JIT_ICMOBillWorkQtyStatus_SaveCtrl");
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    sReturn = "无验证数据!";
@@ -116,6 +128,18 @@
                    oCn.RollBack();
                    return false;
                }
                //保存后控制=========================================
                ds = oCn.RunProcReturn("exec h_p_Sc_ICMOBillWorkQtyStatus_AfterSaveCtrl " + omodel.HInterID + "," + omodel.HSourceInterID + "," + omodel.HSourceEntryID + ",'" + omodel.HSourceBillNo + "'", "h_p_Sc_ICMOBillWorkQtyStatus_BeforeSaveCtrl");
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1")
                {
                    sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //=========================================================
                sReturn = omodel.HInterID.ToString();
                oCn.Commit();