chenhaozhe
2026-04-16 59708a79ef698d66de3cd4da04346afd373d1c5e
WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs
@@ -49,22 +49,11 @@
                    ds = oCN.RunProcReturn(sql + sWhere+ " order by hmainid desc ", "h_v_Sb_EquipRepairSendWorkBill_Edit");
                }
                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
                //{
                objJsonResult.code = "1";
                objJsonResult.count = ds.Tables[0].Rows.Count;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
                //}
                //else
                //{
                //objJsonResult.code = "0";
                //objJsonResult.count = 0;
                //objJsonResult.Message = "无数据";
                //objJsonResult.data = null;
                //return objJsonResult;
                //}
            }
            catch (Exception e)
            {
@@ -223,15 +212,29 @@
              ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
              ",HEquipID,HExplanation,HInnerBillNo,HRepairID,HEmpID" +
              ",HManagerID,HDeptID,HRepairContent,HRepairPlanBeginDate,HRepairPlanEndDate" +
              ",HPlanTimes,HCycleUnit" +
              ",HPlanTimes,HCycleUnit,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" +
              ") " +
              " values('" + BillType + "','" + BillType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
              ", Year(getdate()),Month(getdate()),'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
              ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
              ", " + omodel.HEquipID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HRepairID.ToString() + "," + omodel.HEmpID.ToString() +
              "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HRepairContent + "','" + omodel.HRepairPlanBeginDate + "','" + omodel.HRepairPlanEndDate + "'" +
              "," + omodel.HPlanTimes.ToString() + ",'" + omodel.HCycleUnit + "'" +
              "," + omodel.HPlanTimes.ToString() + ",'" + omodel.HCycleUnit + "','" + omodel.HMainSourceBillType + "','" + omodel.HMainSourceInterID + "','" + omodel.HMainSourceEntryID + "'" +
              ") ");
              //       "Insert Into Sb_EquipRepairSendWorkBillMain" +
              //  "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
              // ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
              // ",HEquipID,HExplanation,HInnerBillNo,HRepairID,HEmpID" +
              // ",HManagerID,HDeptID,HRepairContent,HRepairPlanBeginDate,HRepairPlanEndDate" +
              // ",HPlanTimes,HCycleUnit" +
              // ") " +
              // " values('" + BillType + "','" + BillType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
              // ", Year(getdate()),Month(getdate()),'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
              // ", " + omodel.HEquipID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HRepairID.ToString() + "," + omodel.HEmpID.ToString() +
              // "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HRepairContent + "','" + omodel.HRepairPlanBeginDate + "','" + omodel.HRepairPlanEndDate + "'" +
              // "," + omodel.HPlanTimes.ToString() + ",'" + omodel.HCycleUnit + "'" +
              // ") "
                }
                else if (OperationType == 3)
                {
@@ -262,7 +265,7 @@
                    oCN.RunProc("delete from Sb_EquipRepairSendWorkBillSub where HInterID='" + omodel.HInterID + "' and HEntryID='" + hentryid + "'");
                }
                //保存子表
                objJsonResult = AddBillSub(msg3, hentryid);
                objJsonResult = AddBillSub(msg3, hentryid, OperationType);
                if (objJsonResult.code == "0")
                {
                    objJsonResult.code = "0";
@@ -288,7 +291,7 @@
            }
        }
        public json AddBillSub(string msg3, int hentryid)
        public json AddBillSub(string msg3, int hentryid,int OperationType)
        {
            DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSb_EquipRepairSendWorkBillSub>>(msg3);
            int i = 1;
@@ -317,7 +320,7 @@
            }
            //保存后控制=========================================
            DataSet ds = oCN.RunProcReturn("Exec h_p_Sb_EquipRepairSendWorkBill_AfterSaveCtrl " + omodel.HInterID + ",'" + omodel.HBillNo + "','',1", "h_p_Sb_EquipRepairSendWorkBill_AfterSaveCtrl");
            DataSet ds = oCN.RunProcReturn("Exec h_p_Sb_EquipRepairSendWorkBill_AfterSaveCtrl " + omodel.HInterID + ",'" + omodel.HBillNo + "','','"+ OperationType + "'", "h_p_Sb_EquipRepairSendWorkBill_AfterSaveCtrl");
            if (ds == null)
            {
                objJsonResult.code = "0";