From 421d32dae99f5c4f4c52bed4b4369d350173117e Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 07 三月 2024 11:22:24 +0800
Subject: [PATCH] 优化产品器具清单,产品工艺参数清单,项目费用单,项目需求及问题清单 ,月度阶段计划列表,工作周总结表审核反审核 修改 设备报表: 设备履历表 增加 配件更换清单 1个页签
---
WebAPI/Controllers/项目管理/工作周计划/PM_WorkTaskWeekBillController.cs | 155 +++
DAL/ClsPM_ProjectMoneyBillMain.cs | 159 ++--
WebAPI/Controllers/MJGL/Sc_MouldinventoryBillController.cs | 155 +++
DAL/计划管理/ClsGy_MaterialTechParamBillMain.cs | 160 ++--
DAL/ClsGy_MaterialMouldBillMain.cs | 160 ++--
WebAPI/Controllers/XSGL/YF_PayMentOtherBillController.cs | 25
WebAPI/Controllers/JHGL/Gy_MaterialTechParamBillController.cs | 155 +++
WebAPI/Controllers/项目管理/工程项目/PM_ProjectBillController.cs | 550 ++++++++++++---
DAL/ClsPM_CustomerTaskBillMain.cs | 159 ++--
DAL/ClsPM_WorkPlanMonthBillMain.cs | 165 ++--
DAL/项目管理/ClsPM_WorkReportWeekBillMain.cs | 168 ++--
WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs | 4
12 files changed, 1,292 insertions(+), 723 deletions(-)
diff --git a/DAL/ClsGy_MaterialMouldBillMain.cs b/DAL/ClsGy_MaterialMouldBillMain.cs
index 0e61617..8841048 100644
--- a/DAL/ClsGy_MaterialMouldBillMain.cs
+++ b/DAL/ClsGy_MaterialMouldBillMain.cs
@@ -185,94 +185,86 @@
#endregion
#region 鏄剧ず鍗曟嵁
- //public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
- //{
- // try
- // {
- // //鏌ヨ涓昏〃
- // DataSet Ds ;
- // Ds = oCn.RunProcReturn("select * from PM_WorkReportWeekBillMain Where HInterID = " + lngBillKey.ToString(), "PM_WorkReportWeekBillMain");
- // if(Ds.Tables[0].Rows.Count==0)
- // {
- // sReturn = "鍗曟嵁鏈壘鍒帮紒";
- // return false;
- // }
+ public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //鏌ヨ涓昏〃
+ DataSet Ds;
+ Ds = oCn.RunProcReturn("select * from Gy_MaterialMouldBillMain Where HInterID = " + lngBillKey.ToString(), "Gy_MaterialMouldBillMain");
+ if (Ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "鍗曟嵁鏈壘鍒帮紒";
+ return false;
+ }
- // //鍥哄畾璧嬪��===========================================
- // omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
- // omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
- // omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
- // omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
- // omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
- // omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
- // omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
- // omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
- // omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
- // omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
- // omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
- // omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
- // omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
- // omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
- // omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
- // omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
- // omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
- // omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
- // omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
- // omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
- // omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
- // omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
- // omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
- // omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
- // omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
- // //========================================================
+ //鍥哄畾璧嬪��===========================================
+ omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+ omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+ omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+ omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+ omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+ omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+ omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+ omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+ omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+ omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+ omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+ omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+ omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+ omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+ omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+ omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+ omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+ omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+ omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+ omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+ omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+ omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+ omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
+ omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+ omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+ //========================================================
- // omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
- // omodel.HWeek = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWeek"]);
- // omodel.HBeginDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBeginDate"]);
- // omodel.HEndDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HEndDate"]);
- // omodel.HPlanEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPlanEmpID"]);
+ omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
+
- // //
-
- // //寰幆
- // DataSet DsSub ;
- // DsSub = oCn.RunProcReturn("select * from PM_WorkTaskWeekBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "PM_WorkTaskWeekBillSub");
- // DetailColl.Clear();//娓呯┖
- // for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
- // {
- // Model.ClsPM_WorkTaskWeekBillSub oSub = new Model.ClsPM_WorkTaskWeekBillSub();
- // // 鍥哄畾璧嬪��===============================================
- // oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
- // oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
- // oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
- // oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
- // oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
- // oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
- // oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
- // oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
- // oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
- // oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
- // oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
- // oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
- // //===================================================
- // oSub.HWeekDay = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWeekDay"]);
- // oSub.HSno = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSno"]);
- // oSub.HProjectID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectID"]);
- // oSub.HProjectStageID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectStageID"]);
- // oSub.HTaskNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HTaskNote"]);
- // oSub.HPlanTimes = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPlanTimes"]);
+ //
- // DetailColl.Add(oSub);
- // }
- // sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
- // return true;
- // }
- // catch (Exception e)
- // {
- // sReturn = e.Message;
- // throw (e);
- // }
- //}
+ //寰幆
+ DataSet DsSub;
+ DsSub = oCn.RunProcReturn("select * from Gy_MaterialMouldBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "Gy_MaterialMouldBillSub");
+ DetailColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ {
+ Model.ClsGy_MaterialMouldBillSub oSub = new Model.ClsGy_MaterialMouldBillSub();
+ // 鍥哄畾璧嬪��===============================================
+ oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+ oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+ oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
+ oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
+ oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+ oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+ oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+ oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
+ oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+ oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+ oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+ oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+ //===================================================
+
+
+ DetailColl.Add(oSub);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
#endregion
}
diff --git a/DAL/ClsPM_CustomerTaskBillMain.cs b/DAL/ClsPM_CustomerTaskBillMain.cs
index 860a8b7..e8cb133 100644
--- a/DAL/ClsPM_CustomerTaskBillMain.cs
+++ b/DAL/ClsPM_CustomerTaskBillMain.cs
@@ -151,94 +151,85 @@
#endregion
#region 鏄剧ず鍗曟嵁
- //public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
- //{
- // try
- // {
- // //鏌ヨ涓昏〃
- // DataSet Ds ;
- // Ds = oCn.RunProcReturn("select * from PM_WorkReportWeekBillMain Where HInterID = " + lngBillKey.ToString(), "PM_WorkReportWeekBillMain");
- // if(Ds.Tables[0].Rows.Count==0)
- // {
- // sReturn = "鍗曟嵁鏈壘鍒帮紒";
- // return false;
- // }
+ public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //鏌ヨ涓昏〃
+ DataSet Ds;
+ Ds = oCn.RunProcReturn("select * from PM_CustomerTaskBillMain Where HInterID = " + lngBillKey.ToString(), "PM_CustomerTaskBillMain");
+ if (Ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "鍗曟嵁鏈壘鍒帮紒";
+ return false;
+ }
- // //鍥哄畾璧嬪��===========================================
- // omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
- // omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
- // omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
- // omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
- // omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
- // omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
- // omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
- // omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
- // omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
- // omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
- // omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
- // omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
- // omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
- // omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
- // omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
- // omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
- // omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
- // omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
- // omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
- // omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
- // omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
- // omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
- // omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
- // omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
- // omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
- // //========================================================
+ //鍥哄畾璧嬪��===========================================
+ omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+ omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+ omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+ omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+ omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+ omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+ omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+ omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+ omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+ omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+ omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+ omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+ omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+ omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+ omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+ omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+ omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+ omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+ omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+ omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+ omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+ omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+ omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
+ omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+ omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+ //========================================================
- // omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
- // omodel.HWeek = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWeek"]);
- // omodel.HBeginDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBeginDate"]);
- // omodel.HEndDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HEndDate"]);
- // omodel.HPlanEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPlanEmpID"]);
+
- // //
-
- // //寰幆
- // DataSet DsSub ;
- // DsSub = oCn.RunProcReturn("select * from PM_WorkTaskWeekBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "PM_WorkTaskWeekBillSub");
- // DetailColl.Clear();//娓呯┖
- // for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
- // {
- // Model.ClsPM_WorkTaskWeekBillSub oSub = new Model.ClsPM_WorkTaskWeekBillSub();
- // // 鍥哄畾璧嬪��===============================================
- // oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
- // oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
- // oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
- // oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
- // oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
- // oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
- // oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
- // oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
- // oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
- // oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
- // oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
- // oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
- // //===================================================
- // oSub.HWeekDay = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWeekDay"]);
- // oSub.HSno = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSno"]);
- // oSub.HProjectID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectID"]);
- // oSub.HProjectStageID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectStageID"]);
- // oSub.HTaskNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HTaskNote"]);
- // oSub.HPlanTimes = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPlanTimes"]);
+ //
- // DetailColl.Add(oSub);
- // }
- // sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
- // return true;
- // }
- // catch (Exception e)
- // {
- // sReturn = e.Message;
- // throw (e);
- // }
- //}
+ //寰幆
+ DataSet DsSub;
+ DsSub = oCn.RunProcReturn("select * from PM_CustomerTaskBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "PM_CustomerTaskBillSub");
+ DetailColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ {
+ Model.ClsPM_CustomerTaskBillSub oSub = new Model.ClsPM_CustomerTaskBillSub();
+ // 鍥哄畾璧嬪��===============================================
+ oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+ oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+ oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
+ oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
+ oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+ oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+ oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+ oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
+ oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+ oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+ oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+ oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+ //===================================================
+
+
+ DetailColl.Add(oSub);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
#endregion
}
diff --git a/DAL/ClsPM_ProjectMoneyBillMain.cs b/DAL/ClsPM_ProjectMoneyBillMain.cs
index af86b4d..e0edb14 100644
--- a/DAL/ClsPM_ProjectMoneyBillMain.cs
+++ b/DAL/ClsPM_ProjectMoneyBillMain.cs
@@ -191,94 +191,85 @@
#endregion
#region 鏄剧ず鍗曟嵁
- //public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
- //{
- // try
- // {
- // //鏌ヨ涓昏〃
- // DataSet Ds ;
- // Ds = oCn.RunProcReturn("select * from PM_WorkReportWeekBillMain Where HInterID = " + lngBillKey.ToString(), "PM_WorkReportWeekBillMain");
- // if(Ds.Tables[0].Rows.Count==0)
- // {
- // sReturn = "鍗曟嵁鏈壘鍒帮紒";
- // return false;
- // }
+ public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //鏌ヨ涓昏〃
+ DataSet Ds;
+ Ds = oCn.RunProcReturn("select * from PM_ProjectMoneyBillMain Where HInterID = " + lngBillKey.ToString(), "PM_ProjectMoneyBillMain");
+ if (Ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "鍗曟嵁鏈壘鍒帮紒";
+ return false;
+ }
- // //鍥哄畾璧嬪��===========================================
- // omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
- // omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
- // omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
- // omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
- // omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
- // omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
- // omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
- // omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
- // omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
- // omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
- // omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
- // omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
- // omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
- // omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
- // omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
- // omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
- // omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
- // omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
- // omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
- // omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
- // omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
- // omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
- // omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
- // omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
- // omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
- // //========================================================
+ //鍥哄畾璧嬪��===========================================
+ omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+ omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+ omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+ omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+ omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+ omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+ omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+ omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+ omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+ omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+ omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+ omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+ omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+ omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+ omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+ omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+ omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+ omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+ omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+ omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+ omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+ omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+ omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
+ omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+ omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+ //========================================================
- // omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
- // omodel.HWeek = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWeek"]);
- // omodel.HBeginDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBeginDate"]);
- // omodel.HEndDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HEndDate"]);
- // omodel.HPlanEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPlanEmpID"]);
+ omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
+
- // //
-
- // //寰幆
- // DataSet DsSub ;
- // DsSub = oCn.RunProcReturn("select * from PM_WorkTaskWeekBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "PM_WorkTaskWeekBillSub");
- // DetailColl.Clear();//娓呯┖
- // for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
- // {
- // Model.ClsPM_WorkTaskWeekBillSub oSub = new Model.ClsPM_WorkTaskWeekBillSub();
- // // 鍥哄畾璧嬪��===============================================
- // oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
- // oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
- // oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
- // oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
- // oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
- // oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
- // oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
- // oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
- // oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
- // oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
- // oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
- // oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
- // //===================================================
- // oSub.HWeekDay = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWeekDay"]);
- // oSub.HSno = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSno"]);
- // oSub.HProjectID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectID"]);
- // oSub.HProjectStageID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectStageID"]);
- // oSub.HTaskNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HTaskNote"]);
- // oSub.HPlanTimes = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPlanTimes"]);
+ //
- // DetailColl.Add(oSub);
- // }
- // sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
- // return true;
- // }
- // catch (Exception e)
- // {
- // sReturn = e.Message;
- // throw (e);
- // }
- //}
+ //寰幆
+ DataSet DsSub;
+ DsSub = oCn.RunProcReturn("select * from PM_ProjectMoneyBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "PM_ProjectMoneyBillSub");
+ DetailColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ {
+ Model.ClsPM_ProjectMoneyBillSub oSub = new Model.ClsPM_ProjectMoneyBillSub();
+ // 鍥哄畾璧嬪��===============================================
+ oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+ oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+ oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
+ oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
+ oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+ oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+ oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+ oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
+ oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+ oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+ oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+ oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+ //===================================================
+
+ DetailColl.Add(oSub);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
#endregion
}
diff --git a/DAL/ClsPM_WorkPlanMonthBillMain.cs b/DAL/ClsPM_WorkPlanMonthBillMain.cs
index a853518..d353224 100644
--- a/DAL/ClsPM_WorkPlanMonthBillMain.cs
+++ b/DAL/ClsPM_WorkPlanMonthBillMain.cs
@@ -185,94 +185,91 @@
#endregion
#region 鏄剧ず鍗曟嵁
- //public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
- //{
- // try
- // {
- // //鏌ヨ涓昏〃
- // DataSet Ds ;
- // Ds = oCn.RunProcReturn("select * from PM_WorkReportWeekBillMain Where HInterID = " + lngBillKey.ToString(), "PM_WorkReportWeekBillMain");
- // if(Ds.Tables[0].Rows.Count==0)
- // {
- // sReturn = "鍗曟嵁鏈壘鍒帮紒";
- // return false;
- // }
+ public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //鏌ヨ涓昏〃
+ DataSet Ds;
+ Ds = oCn.RunProcReturn("select * from PM_WorkPlanMonthBillMain Where HInterID = " + lngBillKey.ToString(), "PM_WorkPlanMonthBillMain");
+ if (Ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "鍗曟嵁鏈壘鍒帮紒";
+ return false;
+ }
- // //鍥哄畾璧嬪��===========================================
- // omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
- // omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
- // omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
- // omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
- // omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
- // omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
- // omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
- // omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
- // omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
- // omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
- // omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
- // omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
- // omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
- // omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
- // omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
- // omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
- // omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
- // omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
- // omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
- // omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
- // omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
- // omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
- // omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
- // omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
- // omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
- // //========================================================
+ //鍥哄畾璧嬪��===========================================
+ omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+ omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+ omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+ omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+ omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+ omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+ omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+ omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+ omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+ omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+ omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+ omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+ omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+ omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+ omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+ omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+ omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+ omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+ omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+ omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+ omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+ omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+ omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
+ omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+ omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+ //========================================================
- // omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
- // omodel.HWeek = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWeek"]);
- // omodel.HBeginDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBeginDate"]);
- // omodel.HEndDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HEndDate"]);
- // omodel.HPlanEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPlanEmpID"]);
+ omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
+
+ omodel.HBeginDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBeginDate"]);
+ omodel.HEndDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HEndDate"]);
+ omodel.HPlanEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPlanEmpID"]);
- // //
-
- // //寰幆
- // DataSet DsSub ;
- // DsSub = oCn.RunProcReturn("select * from PM_WorkTaskWeekBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "PM_WorkTaskWeekBillSub");
- // DetailColl.Clear();//娓呯┖
- // for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
- // {
- // Model.ClsPM_WorkTaskWeekBillSub oSub = new Model.ClsPM_WorkTaskWeekBillSub();
- // // 鍥哄畾璧嬪��===============================================
- // oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
- // oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
- // oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
- // oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
- // oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
- // oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
- // oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
- // oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
- // oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
- // oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
- // oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
- // oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
- // //===================================================
- // oSub.HWeekDay = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWeekDay"]);
- // oSub.HSno = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSno"]);
- // oSub.HProjectID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectID"]);
- // oSub.HProjectStageID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectStageID"]);
- // oSub.HTaskNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HTaskNote"]);
- // oSub.HPlanTimes = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPlanTimes"]);
+ //
- // DetailColl.Add(oSub);
- // }
- // sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
- // return true;
- // }
- // catch (Exception e)
- // {
- // sReturn = e.Message;
- // throw (e);
- // }
- //}
+ //寰幆
+ DataSet DsSub;
+ DsSub = oCn.RunProcReturn("select * from PM_WorkPlanMonthBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "PM_WorkPlanMonthBillSub");
+ DetailColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ {
+ Model.ClsPM_WorkPlanMonthBillSub oSub = new Model.ClsPM_WorkPlanMonthBillSub();
+ // 鍥哄畾璧嬪��===============================================
+ oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+ oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+ oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
+ oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
+ oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+ oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+ oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+ oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
+ oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+ oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+ oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+ oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+ //===================================================
+
+ oSub.HProjectID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectID"]);
+ oSub.HProjectStageID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectStageID"]);
+
+ DetailColl.Add(oSub);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
#endregion
}
diff --git "a/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_MaterialTechParamBillMain.cs" "b/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_MaterialTechParamBillMain.cs"
index 1fe62dc..6f19739 100644
--- "a/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_MaterialTechParamBillMain.cs"
+++ "b/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_MaterialTechParamBillMain.cs"
@@ -189,94 +189,84 @@
#endregion
#region 鏄剧ず鍗曟嵁
- //public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
- //{
- // try
- // {
- // //鏌ヨ涓昏〃
- // DataSet Ds ;
- // Ds = oCn.RunProcReturn("select * from PM_WorkReportWeekBillMain Where HInterID = " + lngBillKey.ToString(), "PM_WorkReportWeekBillMain");
- // if(Ds.Tables[0].Rows.Count==0)
- // {
- // sReturn = "鍗曟嵁鏈壘鍒帮紒";
- // return false;
- // }
+ public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //鏌ヨ涓昏〃
+ DataSet Ds;
+ Ds = oCn.RunProcReturn("select * from Gy_MaterialTechParamBillMain Where HInterID = " + lngBillKey.ToString(), "Gy_MaterialTechParamBillMain");
+ if (Ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "鍗曟嵁鏈壘鍒帮紒";
+ return false;
+ }
- // //鍥哄畾璧嬪��===========================================
- // omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
- // omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
- // omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
- // omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
- // omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
- // omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
- // omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
- // omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
- // omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
- // omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
- // omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
- // omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
- // omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
- // omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
- // omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
- // omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
- // omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
- // omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
- // omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
- // omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
- // omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
- // omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
- // omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
- // omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
- // omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
- // //========================================================
+ //鍥哄畾璧嬪��===========================================
+ omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+ omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+ omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+ omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+ omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+ omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+ omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+ omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+ omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+ omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+ omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+ omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+ omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+ omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+ omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+ omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+ omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+ omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+ omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+ omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+ omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+ omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+ omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
+ omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+ omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+ //========================================================
- // omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
- // omodel.HWeek = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWeek"]);
- // omodel.HBeginDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBeginDate"]);
- // omodel.HEndDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HEndDate"]);
- // omodel.HPlanEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPlanEmpID"]);
+ omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
+
+ //
- // //
-
- // //寰幆
- // DataSet DsSub ;
- // DsSub = oCn.RunProcReturn("select * from PM_WorkTaskWeekBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "PM_WorkTaskWeekBillSub");
- // DetailColl.Clear();//娓呯┖
- // for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
- // {
- // Model.ClsPM_WorkTaskWeekBillSub oSub = new Model.ClsPM_WorkTaskWeekBillSub();
- // // 鍥哄畾璧嬪��===============================================
- // oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
- // oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
- // oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
- // oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
- // oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
- // oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
- // oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
- // oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
- // oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
- // oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
- // oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
- // oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
- // //===================================================
- // oSub.HWeekDay = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWeekDay"]);
- // oSub.HSno = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSno"]);
- // oSub.HProjectID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectID"]);
- // oSub.HProjectStageID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectStageID"]);
- // oSub.HTaskNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HTaskNote"]);
- // oSub.HPlanTimes = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPlanTimes"]);
-
- // DetailColl.Add(oSub);
- // }
- // sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
- // return true;
- // }
- // catch (Exception e)
- // {
- // sReturn = e.Message;
- // throw (e);
- // }
- //}
+ //寰幆
+ DataSet DsSub;
+ DsSub = oCn.RunProcReturn("select * from Gy_MaterialTechParamBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "Gy_MaterialTechParamBillSub");
+ DetailColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ {
+ Model.ClsGy_MaterialTechParamBillSub oSub = new Model.ClsGy_MaterialTechParamBillSub();
+ // 鍥哄畾璧嬪��===============================================
+ oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+ oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+ oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
+ oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
+ oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+ oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+ oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+ oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
+ oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+ oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+ oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+ oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+ //===================================================
+
+ DetailColl.Add(oSub);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
#endregion
}
diff --git "a/DAL/\351\241\271\347\233\256\347\256\241\347\220\206/ClsPM_WorkReportWeekBillMain.cs" "b/DAL/\351\241\271\347\233\256\347\256\241\347\220\206/ClsPM_WorkReportWeekBillMain.cs"
index 2a8836e..6308bda 100644
--- "a/DAL/\351\241\271\347\233\256\347\256\241\347\220\206/ClsPM_WorkReportWeekBillMain.cs"
+++ "b/DAL/\351\241\271\347\233\256\347\256\241\347\220\206/ClsPM_WorkReportWeekBillMain.cs"
@@ -204,94 +204,94 @@
#endregion
#region 鏄剧ず鍗曟嵁
- //public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
- //{
- // try
- // {
- // //鏌ヨ涓昏〃
- // DataSet Ds ;
- // Ds = oCn.RunProcReturn("select * from PM_WorkReportWeekBillMain Where HInterID = " + lngBillKey.ToString(), "PM_WorkReportWeekBillMain");
- // if(Ds.Tables[0].Rows.Count==0)
- // {
- // sReturn = "鍗曟嵁鏈壘鍒帮紒";
- // return false;
- // }
+ public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //鏌ヨ涓昏〃
+ DataSet Ds;
+ Ds = oCn.RunProcReturn("select * from PM_WorkReportWeekBillMain Where HInterID = " + lngBillKey.ToString(), "PM_WorkReportWeekBillMain");
+ if (Ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "鍗曟嵁鏈壘鍒帮紒";
+ return false;
+ }
- // //鍥哄畾璧嬪��===========================================
- // omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
- // omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
- // omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
- // omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
- // omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
- // omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
- // omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
- // omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
- // omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
- // omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
- // omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
- // omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
- // omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
- // omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
- // omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
- // omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
- // omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
- // omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
- // omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
- // omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
- // omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
- // omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
- // omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
- // omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
- // omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
- // //========================================================
+ //鍥哄畾璧嬪��===========================================
+ omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+ omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+ omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+ omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+ omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+ omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+ omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+ omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+ omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+ omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+ omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+ omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+ omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+ omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+ omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+ omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+ omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+ omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+ omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+ omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+ omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+ omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+ omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
+ omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+ omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+ //========================================================
- // omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
- // omodel.HWeek = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWeek"]);
- // omodel.HBeginDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBeginDate"]);
- // omodel.HEndDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HEndDate"]);
- // omodel.HPlanEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPlanEmpID"]);
+ omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
+ omodel.HWeek = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWeek"]);
+ omodel.HBeginDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBeginDate"]);
+ omodel.HEndDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HEndDate"]);
- // //
-
- // //寰幆
- // DataSet DsSub ;
- // DsSub = oCn.RunProcReturn("select * from PM_WorkTaskWeekBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "PM_WorkTaskWeekBillSub");
- // DetailColl.Clear();//娓呯┖
- // for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
- // {
- // Model.ClsPM_WorkTaskWeekBillSub oSub = new Model.ClsPM_WorkTaskWeekBillSub();
- // // 鍥哄畾璧嬪��===============================================
- // oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
- // oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
- // oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
- // oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
- // oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
- // oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
- // oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
- // oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
- // oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
- // oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
- // oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
- // oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
- // //===================================================
- // oSub.HWeekDay = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWeekDay"]);
- // oSub.HSno = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSno"]);
- // oSub.HProjectID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectID"]);
- // oSub.HProjectStageID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectStageID"]);
- // oSub.HTaskNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HTaskNote"]);
- // oSub.HPlanTimes = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPlanTimes"]);
- // DetailColl.Add(oSub);
- // }
- // sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
- // return true;
- // }
- // catch (Exception e)
- // {
- // sReturn = e.Message;
- // throw (e);
- // }
- //}
+ //
+
+ //寰幆
+ DataSet DsSub;
+ DsSub = oCn.RunProcReturn("select * from PM_WorkReportWeekBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "PM_WorkReportWeekBillSub");
+ DetailColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ {
+ Model.ClsPM_WorkReportWeekBillSub oSub = new Model.ClsPM_WorkReportWeekBillSub();
+ // 鍥哄畾璧嬪��===============================================
+ oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+ //oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+ //oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
+ //oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
+ //oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+ //oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+ //oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+ //oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
+ //oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+ //oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+ //oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+ //oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+ ////===================================================
+ //oSub.HWeekDay = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWeekDay"]);
+ //oSub.HSno = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSno"]);
+ //oSub.HProjectID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectID"]);
+ //oSub.HProjectStageID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectStageID"]);
+ //oSub.HTaskNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HTaskNote"]);
+ //oSub.HPlanTimes = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPlanTimes"]);
+
+ DetailColl.Add(oSub);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
#endregion
}
diff --git a/WebAPI/Controllers/JHGL/Gy_MaterialTechParamBillController.cs b/WebAPI/Controllers/JHGL/Gy_MaterialTechParamBillController.cs
index ba7850a..a19588e 100644
--- a/WebAPI/Controllers/JHGL/Gy_MaterialTechParamBillController.cs
+++ b/WebAPI/Controllers/JHGL/Gy_MaterialTechParamBillController.cs
@@ -358,12 +358,13 @@
#region 浜у搧宸ヨ壓鍙傛暟娓呭崟鍒楄〃 瀹℃牳/鍙嶅鏍稿姛鑳�
[Route("Gy_MaterialTechParamBill/CheckGy_MaterialTechParamBillMain")]
[HttpGet]
- public object CheckGy_MaterialTechParamBillMain(string HInterID, int IsAudit, string user)
+ public object CheckGy_MaterialTechParamBillMain(int HInterID, int IsAudit, string CurUserName)
{
+ DBUtility.ClsPub.CurUserName = CurUserName;
try
{
//瀹℃牳鏉冮檺
- if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterialTechParamBillMain_Check", 1, false, user))
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterialTechParamBillMain_Check", 1, false, CurUserName))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -372,12 +373,43 @@
return objJsonResult;
}
- var ds = oCN.RunProcReturn("select * from Gy_MaterialTechParamBillMain where HInterID=" + HInterID, "Gy_MaterialTechParamBillMain ");
- if (ds.Tables[0].Rows.Count > 0)
+ //HInterID鏁版嵁鍒ゆ柇
+ if (HInterID <= 0)
{
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID灏忎簬0锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+ DAL.ClsGy_MaterialTechParamBillMain oBill = new DAL.ClsGy_MaterialTechParamBillMain(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+ //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+ {
+ if (oBill.omodel.HCloseMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HDeleteMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
if (IsAudit == 0) //瀹℃牳鍒ゆ柇
{
- if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ if (oBill.omodel.HChecker.Trim() != "")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -388,7 +420,7 @@
}
if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
{
- if (ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ if (oBill.omodel.HChecker.Trim() == "")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -402,38 +434,117 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
objJsonResult.data = null;
return objJsonResult;
}
- oCN.BeginTran();
- if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣�
+ if (IsAudit == 0) //瀹℃牳鎻愪氦
{
- oCN.RunProc("update Gy_MaterialTechParamBillMain set HChecker='" + user + "',HCheckDate=getdate() where HInterID=" + HInterID);
+ oCN.BeginTran();
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "瀹℃牳鎴愬姛";
- objJsonResult.data = null;
+ //璁板綍杩斿洖淇℃伅
+ string msg = "";
+
+
+
+ //瀹℃牳鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_Gy_MaterialTechParamBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Gy_MaterialTechParamBill_BeforeCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
+ //瀹℃牳鎻愪氦
+ if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Gy_MaterialTechParamBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛锛�" + msg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ oCN.RollBack();
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
- if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ if (IsAudit == 1) //鍙嶅鏍告彁浜�
{
- oCN.RunProc("update Gy_MaterialTechParamBillMain set HChecker='',HCheckDate=null where HInterID=" + HInterID);
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鍙嶅鏍告垚鍔�";
- objJsonResult.data = null;
+ //鍙嶅鏍稿墠鎺у埗=========================================
+ string sql1 = "exec h_p_Gy_MaterialTechParamBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Gy_MaterialTechParamBill_BeforeUnCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+ }
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //===========================================================
+
+ //鍙嶅鏍告彁浜bandonCheck
+ if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Gy_MaterialTechParamBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
- oCN.Commit();
-
return objJsonResult;
}
catch (Exception e)
{
oCN.RollBack();
+
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldinventoryBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldinventoryBillController.cs
index 1cca0a0..9a1c25d 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldinventoryBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldinventoryBillController.cs
@@ -358,12 +358,13 @@
#region 浜у搧鍣ㄥ叿娓呭崟鍒楄〃 瀹℃牳/鍙嶅鏍稿姛鑳�
[Route("Sc_MouldinventoryBill/CheckGy_MaterialMouldBillMain")]
[HttpGet]
- public object CheckGy_MaterialMouldBillMain(string HInterID, int IsAudit, string user)
+ public object CheckGy_MaterialMouldBillMain(int HInterID, int IsAudit, string CurUserName)
{
+ DBUtility.ClsPub.CurUserName = CurUserName;
try
{
//瀹℃牳鏉冮檺
- if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterialMouldBillMain_Check", 1, false, user))
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterialMouldBillMain_Check", 1, false, CurUserName))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -372,12 +373,43 @@
return objJsonResult;
}
- var ds = oCN.RunProcReturn("select * from Gy_MaterialMouldBillMain where HInterID=" + HInterID, "Gy_MaterialMouldBillMain ");
- if (ds.Tables[0].Rows.Count > 0)
+ //HInterID鏁版嵁鍒ゆ柇
+ if (HInterID <= 0)
{
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID灏忎簬0锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+ DAL.ClsGy_MaterialMouldBillMain oBill = new DAL.ClsGy_MaterialMouldBillMain(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+ //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+ {
+ if (oBill.omodel.HCloseMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HDeleteMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
if (IsAudit == 0) //瀹℃牳鍒ゆ柇
{
- if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ if (oBill.omodel.HChecker.Trim() != "")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -388,7 +420,7 @@
}
if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
{
- if (ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ if (oBill.omodel.HChecker.Trim() == "")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -402,38 +434,117 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
objJsonResult.data = null;
return objJsonResult;
}
- oCN.BeginTran();
- if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣�
+ if (IsAudit == 0) //瀹℃牳鎻愪氦
{
- oCN.RunProc("update Gy_MaterialMouldBillMain set HChecker='" + user + "',HCheckDate=getdate() where HInterID=" + HInterID);
+ oCN.BeginTran();
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "瀹℃牳鎴愬姛";
- objJsonResult.data = null;
+ //璁板綍杩斿洖淇℃伅
+ string msg = "";
+
+
+
+ //瀹℃牳鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_Gy_MaterialMouldBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Gy_MaterialMouldBill_BeforeCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
+ //瀹℃牳鎻愪氦
+ if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Gy_MaterialMouldBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛锛�" + msg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ oCN.RollBack();
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
- if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ if (IsAudit == 1) //鍙嶅鏍告彁浜�
{
- oCN.RunProc("update Gy_MaterialMouldBillMain set HChecker='',HCheckDate=null where HInterID=" + HInterID);
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鍙嶅鏍告垚鍔�";
- objJsonResult.data = null;
+ //鍙嶅鏍稿墠鎺у埗=========================================
+ string sql1 = "exec h_p_Gy_MaterialMouldBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Gy_MaterialMouldBill_BeforeUnCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+ }
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //===========================================================
+
+ //鍙嶅鏍告彁浜bandonCheck
+ if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Gy_MaterialMouldBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
- oCN.Commit();
-
return objJsonResult;
}
catch (Exception e)
{
oCN.RollBack();
+
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
diff --git a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
index 7882ae9..bf32590 100644
--- a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
+++ b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
@@ -397,7 +397,7 @@
public object Sb_EquipFileBillResumeDate(string HInterID)
{
- DataTable ds, ds1;
+ DataTable ds, ds1,ds2;
long HInterID1 = long.Parse(HInterID);
List<object> list = new List<object>();
try
@@ -407,9 +407,11 @@
string sql1 = string.Format($"exec h_p_Gy_EquipRecord {HInterID1}");
ds = oCN.RunProcReturn(sql1, "h_p_Gy_EquipRecord").Tables[0];
ds1 = oCN.RunProcReturn(sql1, "h_p_Gy_EquipRecord").Tables[1];
+ ds2 = oCN.RunProcReturn(sql1, "h_p_Gy_EquipRecord").Tables[2];
list.Add(ds);//鏃ュ父璁板綍
list.Add(ds1);//缁翠慨璁板綍
+ list.Add(ds2);//閰嶄欢鏇存崲娓呭崟
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
diff --git a/WebAPI/Controllers/XSGL/YF_PayMentOtherBillController.cs b/WebAPI/Controllers/XSGL/YF_PayMentOtherBillController.cs
index 302af3d..21bd369 100644
--- a/WebAPI/Controllers/XSGL/YF_PayMentOtherBillController.cs
+++ b/WebAPI/Controllers/XSGL/YF_PayMentOtherBillController.cs
@@ -491,30 +491,7 @@
//璁板綍杩斿洖淇℃伅
string msg = "";
- if(oBill.omodel.HMainSourceInterID != 0)
- {
- //妫�楠屾簮鍗曟槸鍚﹀瓨鍦ㄥ強鍗曟嵁鐘舵��
- string sql = "select * from YF_PayMentOtherBillMain where HInterID = " + oBill.omodel.HMainSourceInterID;
- ds = oCN.RunProcReturn(sql, "YF_PayMentOtherBillMain");
- if (ds == null || ds.Tables[0].Rows.Count == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-鐗规壒鐢宠鍗曚笉瀛樺湪!";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else if (ds.Tables[0].Rows[0]["HBillStatus"].ToString() != "2")
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-鐗规壒鐢宠鍗曟湭澶勪簬宸插鏍哥姸鎬�!";
- objJsonResult.data = null;
- return objJsonResult;
- }
-
-
- }
+
//瀹℃牳鍓嶆帶鍒�=========================================
string sql1 = "exec h_p_YF_PayMentOtherBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\345\221\250\350\256\241\345\210\222/PM_WorkTaskWeekBillController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\345\221\250\350\256\241\345\210\222/PM_WorkTaskWeekBillController.cs"
index 0fab731..6ba54a2 100644
--- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\345\221\250\350\256\241\345\210\222/PM_WorkTaskWeekBillController.cs"
+++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\345\221\250\350\256\241\345\210\222/PM_WorkTaskWeekBillController.cs"
@@ -1195,12 +1195,13 @@
#region 宸ヤ綔鍛ㄦ�荤粨 瀹℃牳/鍙嶅鏍稿姛鑳�
[Route("PM_WorkTaskWeekBill/CheckPM_WorkReportWeekBillMain")]
[HttpGet]
- public object CheckPM_WorkReportWeekBillMain(string HInterID, int IsAudit, string user)
+ public object CheckPM_WorkReportWeekBillMain(int HInterID, int IsAudit, string CurUserName)
{
+ DBUtility.ClsPub.CurUserName = CurUserName;
try
{
//瀹℃牳鏉冮檺
- if (!DBUtility.ClsPub.Security_Log_second("PM_WorkReportWeekBillMain_Check", 1, false, user))
+ if (!DBUtility.ClsPub.Security_Log_second("PM_WorkReportWeekBillMain_Check", 1, false, CurUserName))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -1209,12 +1210,43 @@
return objJsonResult;
}
- var ds = oCn.RunProcReturn("select * from PM_WorkReportWeekBillMain where HInterID=" + HInterID, "PM_WorkReportWeekBillMain");
- if (ds.Tables[0].Rows.Count > 0)
+ //HInterID鏁版嵁鍒ゆ柇
+ if (HInterID <= 0)
{
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID灏忎簬0锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+ DAL.ClsPM_WorkReportWeekBillMain oBill = new DAL.ClsPM_WorkReportWeekBillMain(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+ //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+ {
+ if (oBill.omodel.HCloseMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HDeleteMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
if (IsAudit == 0) //瀹℃牳鍒ゆ柇
{
- if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ if (oBill.omodel.HChecker.Trim() != "")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -1225,7 +1257,7 @@
}
if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
{
- if (ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ if (oBill.omodel.HChecker.Trim() == "")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -1239,38 +1271,117 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
objJsonResult.data = null;
return objJsonResult;
}
- oCn.BeginTran();
- if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣�
+ if (IsAudit == 0) //瀹℃牳鎻愪氦
{
- oCn.RunProc("update PM_WorkReportWeekBillMain set HChecker='" + user + "',HCheckDate=getdate() where HInterID=" + HInterID);
+ oCn.BeginTran();
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "瀹℃牳鎴愬姛";
- objJsonResult.data = null;
+ //璁板綍杩斿洖淇℃伅
+ string msg = "";
+
+
+
+ //瀹℃牳鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_PM_WorkReportWeekBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+ ds = oCn.RunProcReturn(sql1, "h_p_PM_WorkReportWeekBill_BeforeCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ oCn.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCn.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
+ //瀹℃牳鎻愪氦
+ if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_PM_WorkReportWeekBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ oCn.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛锛�" + msg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ oCn.RollBack();
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
- if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ if (IsAudit == 1) //鍙嶅鏍告彁浜�
{
- oCn.RunProc("update PM_WorkReportWeekBillMain set HChecker='',HCheckDate=null where HInterID=" + HInterID);
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鍙嶅鏍告垚鍔�";
- objJsonResult.data = null;
+ //鍙嶅鏍稿墠鎺у埗=========================================
+ string sql1 = "exec h_p_PM_WorkReportWeekBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+ ds = oCn.RunProcReturn(sql1, "h_p_PM_WorkReportWeekBill_BeforeUnCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+ }
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //===========================================================
+
+ //鍙嶅鏍告彁浜bandonCheck
+ if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_PM_WorkReportWeekBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
- oCn.Commit();
-
return objJsonResult;
}
catch (Exception e)
{
oCn.RollBack();
+
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs"
index 8bc0e61..bceb379 100644
--- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs"
+++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs"
@@ -25,6 +25,15 @@
public DAL.ClsPM_WorkPlanMonthBillMain BillNew1 = new DAL.ClsPM_WorkPlanMonthBillMain(); //宸ヤ綔鍛ㄦ�荤粨瀵瑰簲鍗曟嵁绫�
public DAL.ClsPM_WorkPlanMonthBillMain BillOld1 = new DAL.ClsPM_WorkPlanMonthBillMain();
+ public DAL.ClsPM_WorkPlanMonthBillMain BillNew2 = new DAL.ClsPM_WorkPlanMonthBillMain(); //鏈堝害闃舵璁″垝瀵瑰簲鍗曟嵁绫�
+ public DAL.ClsPM_WorkPlanMonthBillMain BillOld2 = new DAL.ClsPM_WorkPlanMonthBillMain();
+
+ public DAL.ClsPM_CustomerTaskBillMain BillNew3 = new DAL.ClsPM_CustomerTaskBillMain(); //椤圭洰闇�姹傚強闂娓呭崟瀵瑰簲鍗曟嵁绫�
+ public DAL.ClsPM_CustomerTaskBillMain BillOld3 = new DAL.ClsPM_CustomerTaskBillMain();
+
+ public DAL.ClsPM_ProjectMoneyBillMain BillNew4 = new DAL.ClsPM_ProjectMoneyBillMain(); //椤圭洰璐圭敤鍗曞搴斿崟鎹被
+ public DAL.ClsPM_ProjectMoneyBillMain BillOld4 = new DAL.ClsPM_ProjectMoneyBillMain();
+
#region 宸ョ▼椤圭洰 鏂板/缂栬緫
#region 宸ョ▼椤圭洰 琛ㄥご鏁版嵁
public class PM_ProjectBill_Main
@@ -1244,7 +1253,7 @@
if (refSav == "Add")
{
//鍗曟嵁鍙锋槸鍚﹂噸澶�
- if (BillNew1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
+ if (BillNew2.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -1255,7 +1264,7 @@
}
if (refSav == "Update")
{
- if (BillOld1.ShowBill(oItem.HInterID, ref s) == false)
+ if (BillOld2.ShowBill(oItem.HInterID, ref s) == false)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -1264,7 +1273,7 @@
return objJsonResult;
}
//鍒ゆ柇鏄惁鍙紪杈�
- if (BillOld1.omodel.HChecker != "" && BillOld1.omodel.HChecker != null)
+ if (BillOld2.omodel.HChecker != "" && BillOld2.omodel.HChecker != null)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -1272,7 +1281,7 @@
objJsonResult.data = 1;
return objJsonResult;
}
- if (BillOld1.omodel.HBillStatus > 1)
+ if (BillOld2.omodel.HBillStatus > 1)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -1280,14 +1289,7 @@
objJsonResult.data = 1;
return objJsonResult;
}
- if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld, ref s))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = s + "锛屼笉鍏佽淇敼";
- objJsonResult.data = 1;
- return objJsonResult;
- }
+
}
UserName = oItem.HMaker; //鍒跺崟浜�
oItem.HBillType = "4758";
@@ -1382,12 +1384,13 @@
#region 鏈堝害闃舵璁″垝 瀹℃牳/鍙嶅鏍稿姛鑳�
[Route("PM_ProjectBill/CheckPM_WorkPlanMonthBillMain")]
[HttpGet]
- public object CheckPM_WorkPlanMonthBillMain(string HInterID, int IsAudit, string user)
+ public object CheckPM_WorkPlanMonthBillMain(int HInterID, int IsAudit, string CurUserName)
{
+ DBUtility.ClsPub.CurUserName = CurUserName;
try
{
//瀹℃牳鏉冮檺
- if (!DBUtility.ClsPub.Security_Log_second("PM_WorkPlanMonthBillMain_Check", 1, false, user))
+ if (!DBUtility.ClsPub.Security_Log_second("PM_WorkPlanMonthBillMain_Check", 1, false, CurUserName))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -1396,12 +1399,43 @@
return objJsonResult;
}
- var ds = oCN.RunProcReturn("select * from PM_WorkPlanMonthBillMain where HInterID=" + HInterID, "PM_WorkPlanMonthBillMain");
- if (ds.Tables[0].Rows.Count > 0)
+ //HInterID鏁版嵁鍒ゆ柇
+ if (HInterID <= 0)
{
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID灏忎簬0锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+ DAL.ClsPM_WorkPlanMonthBillMain oBill = new DAL.ClsPM_WorkPlanMonthBillMain(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+ //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+ {
+ if (oBill.omodel.HCloseMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HDeleteMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
if (IsAudit == 0) //瀹℃牳鍒ゆ柇
{
- if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ if (oBill.omodel.HChecker.Trim() != "")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -1412,7 +1446,7 @@
}
if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
{
- if (ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ if (oBill.omodel.HChecker.Trim() == "")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -1426,38 +1460,117 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
objJsonResult.data = null;
return objJsonResult;
}
- oCN.BeginTran();
- if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣�
+ if (IsAudit == 0) //瀹℃牳鎻愪氦
{
- oCN.RunProc("update PM_WorkPlanMonthBillMain set HChecker='" + user + "',HCheckDate=getdate() where HInterID=" + HInterID);
+ oCN.BeginTran();
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "瀹℃牳鎴愬姛";
- objJsonResult.data = null;
+ //璁板綍杩斿洖淇℃伅
+ string msg = "";
+
+
+
+ //瀹℃牳鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_PM_WorkPlanMonthBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_PM_WorkPlanMonthBill_BeforeCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
+ //瀹℃牳鎻愪氦
+ if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_PM_WorkPlanMonthBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛锛�" + msg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ oCN.RollBack();
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
- if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ if (IsAudit == 1) //鍙嶅鏍告彁浜�
{
- oCN.RunProc("update PM_WorkPlanMonthBillMain set HChecker='',HCheckDate=null where HInterID=" + HInterID);
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鍙嶅鏍告垚鍔�";
- objJsonResult.data = null;
+ //鍙嶅鏍稿墠鎺у埗=========================================
+ string sql1 = "exec h_p_PM_WorkPlanMonthBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_PM_WorkPlanMonthBill_BeforeUnCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+ }
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //===========================================================
+
+ //鍙嶅鏍告彁浜bandonCheck
+ if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_PM_WorkPlanMonthBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
- oCN.Commit();
-
return objJsonResult;
}
catch (Exception e)
{
oCN.RollBack();
+
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
@@ -1817,7 +1930,7 @@
if (refSav == "Add")
{
//鍗曟嵁鍙锋槸鍚﹂噸澶�
- if (BillNew1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
+ if (BillNew3.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -1828,7 +1941,7 @@
}
if (refSav == "Update")
{
- if (BillOld1.ShowBill(oItem.HInterID, ref s) == false)
+ if (BillOld3.ShowBill(oItem.HInterID, ref s) == false)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -1837,7 +1950,7 @@
return objJsonResult;
}
//鍒ゆ柇鏄惁鍙紪杈�
- if (BillOld1.omodel.HChecker != "" && BillOld1.omodel.HChecker != null)
+ if (BillOld3.omodel.HChecker != "" && BillOld3.omodel.HChecker != null)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -1845,7 +1958,7 @@
objJsonResult.data = 1;
return objJsonResult;
}
- if (BillOld1.omodel.HBillStatus > 1)
+ if (BillOld3.omodel.HBillStatus > 1)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -1853,14 +1966,7 @@
objJsonResult.data = 1;
return objJsonResult;
}
- if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld, ref s))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = s + "锛屼笉鍏佽淇敼";
- objJsonResult.data = 1;
- return objJsonResult;
- }
+
}
UserName = oItem.HMaker; //鍒跺崟浜�
oItem.HBillType = "4759";
@@ -2051,12 +2157,13 @@
#region 椤圭洰闇�姹傚強闂娓呭崟鍒楄〃 瀹℃牳/鍙嶅鏍稿姛鑳�
[Route("PM_ProjectBill/CheckPM_CustomerTaskBillMain")]
[HttpGet]
- public object CheckPM_CustomerTaskBillMain(string HInterID, int IsAudit, string user)
+ public object CheckPM_CustomerTaskBillMain(int HInterID, int IsAudit, string CurUserName)
{
+ DBUtility.ClsPub.CurUserName = CurUserName;
try
{
//瀹℃牳鏉冮檺
- if (!DBUtility.ClsPub.Security_Log_second("PM_CustomerTaskBillMain_Check", 1, false, user))
+ if (!DBUtility.ClsPub.Security_Log_second("PM_CustomerTaskBillMain_Check", 1, false, CurUserName))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -2065,12 +2172,43 @@
return objJsonResult;
}
- var ds = oCN.RunProcReturn("select * from PM_CustomerTaskBillMain where HInterID=" + HInterID, "PM_CustomerTaskBillMain ");
- if (ds.Tables[0].Rows.Count > 0)
+ //HInterID鏁版嵁鍒ゆ柇
+ if (HInterID <= 0)
{
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID灏忎簬0锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+ DAL.ClsPM_CustomerTaskBillMain oBill = new DAL.ClsPM_CustomerTaskBillMain(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+ //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+ {
+ if (oBill.omodel.HCloseMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HDeleteMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
if (IsAudit == 0) //瀹℃牳鍒ゆ柇
{
- if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ if (oBill.omodel.HChecker.Trim() != "")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -2081,7 +2219,7 @@
}
if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
{
- if (ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ if (oBill.omodel.HChecker.Trim() == "")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -2095,38 +2233,117 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
objJsonResult.data = null;
return objJsonResult;
}
- oCN.BeginTran();
- if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣�
+ if (IsAudit == 0) //瀹℃牳鎻愪氦
{
- oCN.RunProc("update PM_CustomerTaskBillMain set HChecker='" + user + "',HCheckDate=getdate() where HInterID=" + HInterID);
+ oCN.BeginTran();
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "瀹℃牳鎴愬姛";
- objJsonResult.data = null;
+ //璁板綍杩斿洖淇℃伅
+ string msg = "";
+
+
+
+ //瀹℃牳鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_PM_CustomerTaskBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_PM_CustomerTaskBill_BeforeCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
+ //瀹℃牳鎻愪氦
+ if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_PM_CustomerTaskBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛锛�" + msg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ oCN.RollBack();
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
- if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ if (IsAudit == 1) //鍙嶅鏍告彁浜�
{
- oCN.RunProc("update PM_CustomerTaskBillMain set HChecker='',HCheckDate=null where HInterID=" + HInterID);
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鍙嶅鏍告垚鍔�";
- objJsonResult.data = null;
+ //鍙嶅鏍稿墠鎺у埗=========================================
+ string sql1 = "exec h_p_PM_CustomerTaskBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_PM_CustomerTaskBill_BeforeUnCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+ }
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //===========================================================
+
+ //鍙嶅鏍告彁浜bandonCheck
+ if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_PM_CustomerTaskBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
- oCN.Commit();
-
return objJsonResult;
}
catch (Exception e)
{
oCN.RollBack();
+
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
@@ -2381,7 +2598,7 @@
if (refSav == "Add")
{
//鍗曟嵁鍙锋槸鍚﹂噸澶�
- if (BillNew1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
+ if (BillNew4.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -2392,7 +2609,7 @@
}
if (refSav == "Update")
{
- if (BillOld1.ShowBill(oItem.HInterID, ref s) == false)
+ if (BillOld4.ShowBill(oItem.HInterID, ref s) == false)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -2401,7 +2618,7 @@
return objJsonResult;
}
//鍒ゆ柇鏄惁鍙紪杈�
- if (BillOld1.omodel.HChecker != "" && BillOld1.omodel.HChecker != null)
+ if (BillOld4.omodel.HChecker != "" && BillOld4.omodel.HChecker != null)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -2409,7 +2626,7 @@
objJsonResult.data = 1;
return objJsonResult;
}
- if (BillOld1.omodel.HBillStatus > 1)
+ if (BillOld4.omodel.HBillStatus > 1)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -2417,14 +2634,7 @@
objJsonResult.data = 1;
return objJsonResult;
}
- if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld, ref s))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = s + "锛屼笉鍏佽淇敼";
- objJsonResult.data = 1;
- return objJsonResult;
- }
+
}
UserName = oItem.HMaker; //鍒跺崟浜�
oItem.HBillType = "4762";
@@ -2631,12 +2841,13 @@
#region 椤圭洰璐圭敤鍒楄〃 瀹℃牳/鍙嶅鏍稿姛鑳�
[Route("PM_ProjectBill/CheckPM_ProjectMoneyBillMain")]
[HttpGet]
- public object CheckPM_ProjectMoneyBillMain(string HInterID, int IsAudit, string user)
+ public object CheckPM_ProjectMoneyBillMain(int HInterID, int IsAudit, string CurUserName)
{
+ DBUtility.ClsPub.CurUserName = CurUserName;
try
{
//瀹℃牳鏉冮檺
- if (!DBUtility.ClsPub.Security_Log_second("PM_ProjectMoneyBillMain_Check", 1, false, user))
+ if (!DBUtility.ClsPub.Security_Log_second("PM_ProjectMoneyBillMain_Check", 1, false, CurUserName))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -2645,12 +2856,43 @@
return objJsonResult;
}
- var ds = oCN.RunProcReturn("select * from PM_ProjectMoneyBillMain where HInterID=" + HInterID, "PM_ProjectMoneyBillMain ");
- if (ds.Tables[0].Rows.Count > 0)
+ //HInterID鏁版嵁鍒ゆ柇
+ if (HInterID <= 0)
{
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID灏忎簬0锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+ DAL.ClsPM_ProjectMoneyBillMain oBill = new DAL.ClsPM_ProjectMoneyBillMain(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+ //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+ {
+ if (oBill.omodel.HCloseMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HDeleteMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
if (IsAudit == 0) //瀹℃牳鍒ゆ柇
{
- if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ if (oBill.omodel.HChecker.Trim() != "")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -2661,7 +2903,7 @@
}
if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
{
- if (ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ if (oBill.omodel.HChecker.Trim() == "")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -2675,38 +2917,117 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
objJsonResult.data = null;
return objJsonResult;
}
- oCN.BeginTran();
- if (IsAudit == 0) //瀹℃牳鍒ゆ柇
+ //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣�
+ if (IsAudit == 0) //瀹℃牳鎻愪氦
{
- oCN.RunProc("update PM_ProjectMoneyBillMain set HChecker='" + user + "',HCheckDate=getdate() where HInterID=" + HInterID);
+ oCN.BeginTran();
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "瀹℃牳鎴愬姛";
- objJsonResult.data = null;
+ //璁板綍杩斿洖淇℃伅
+ string msg = "";
+
+
+
+ //瀹℃牳鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_PM_ProjectMoneyBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_PM_ProjectMoneyBill_BeforeCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCN.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
+
+ //瀹℃牳鎻愪氦
+ if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_PM_ProjectMoneyBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛锛�" + msg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ oCN.RollBack();
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
- if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+ if (IsAudit == 1) //鍙嶅鏍告彁浜�
{
- oCN.RunProc("update PM_ProjectMoneyBillMain set HChecker='',HCheckDate=null where HInterID=" + HInterID);
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鍙嶅鏍告垚鍔�";
- objJsonResult.data = null;
+ //鍙嶅鏍稿墠鎺у埗=========================================
+ string sql1 = "exec h_p_PM_ProjectMoneyBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_PM_ProjectMoneyBill_BeforeUnCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+ }
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //===========================================================
+
+ //鍙嶅鏍告彁浜bandonCheck
+ if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_PM_ProjectMoneyBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
- oCN.Commit();
-
return objJsonResult;
}
catch (Exception e)
{
oCN.RollBack();
+
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
@@ -3864,31 +4185,6 @@
//璁板綍杩斿洖淇℃伅
string msg = "";
-
- if (oBill.omodel.HMainSourceInterID != 0)
- {
- //妫�楠屾簮鍗曟槸鍚﹀瓨鍦ㄥ強鍗曟嵁鐘舵��
- string sql = "select * from PM_ProjectEndBillMain where HInterID = " + oBill.omodel.HMainSourceInterID;
- ds = oCN.RunProcReturn(sql, "PM_ProjectEndBillMain");
- if (ds == null || ds.Tables[0].Rows.Count == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-鐗规壒鐢宠鍗曚笉瀛樺湪!";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else if (ds.Tables[0].Rows[0]["HBillStatus"].ToString() != "2")
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-鐗规壒鐢宠鍗曟湭澶勪簬宸插鏍哥姸鎬�!";
- objJsonResult.data = null;
- return objJsonResult;
- }
-
-
- }
//瀹℃牳鍓嶆帶鍒�=========================================
string sql1 = "exec h_p_PM_ProjectEndBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
--
Gitblit v1.9.1