From 4c7cb8434be52f1de8557c069ebf82dfbfd8d6ee Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期三, 05 十一月 2025 15:29:46 +0800
Subject: [PATCH] 增加凯贝装箱单
---
WebAPI/Controllers/项目管理/工程项目/PM_ProjectBillController.cs | 649 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 629 insertions(+), 20 deletions(-)
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 26184fa..8a7181d 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"
@@ -10,7 +10,7 @@
using System.Web.Http;
using System.Windows.Forms;
using WebAPI.Models;
-
+using SyntacticSugar.constant;
namespace WebAPI.Controllers.椤圭洰绠$悊.宸ョ▼椤圭洰
{
public class PM_ProjectBillController : ApiController
@@ -43,11 +43,14 @@
public DAL.ClsGy_ProjectMoneyBOMBill BillNew7 = new DAL.ClsGy_ProjectMoneyBOMBill(); //椤圭洰璐圭敤娓呭崟瀵瑰簲鍗曟嵁绫�
public DAL.ClsGy_ProjectMoneyBOMBill BillOld7 = new DAL.ClsGy_ProjectMoneyBOMBill();
+
+
#region 宸ョ▼椤圭洰 鏂板/缂栬緫
#region 宸ョ▼椤圭洰 琛ㄥご鏁版嵁
public class PM_ProjectBill_Main
{
public int HInterID;
+ public string HBillSubType;
public string HBillNo;
public string HProNumber;
public string HProName;
@@ -100,6 +103,7 @@
public string HProjectNote;
public string HContacts;
public string HContactNumber;
+ public int HDeptID;
public int HSupplierID; //鍒嗗寘鍗曚綅锛坓y_supllier锛�
public int HMangerEmpID; //绠$悊鍛橈紙gy_Employee锛�
@@ -114,6 +118,10 @@
public string HWaterSupplyDate; //閫氭按鏃ユ湡
public string HWorkNote; //绔e伐璧勬枡锛堝瘜鏂囨湰锛�
public string HWorkProcNote; //鏂藉伐瀹屾垚鎯呭喌锛堝瘜鏂囨湰锛�
+ public string HProBeginDate; //宸ョ▼寮�宸ユ棩鏈�
+ public string HProEndDate; //宸ョ▼瀹屽伐鏃ユ湡
+ public int HProPMEmpID; //宸ョ▼椤圭洰缁忕悊
+ public string HWorkPicNumber; //绔e伐鍥剧紪鍙�
public double HYuSuanMoney; //棰勭畻閫犱环
public double HHeTongMoney; //鍚堝悓閫犱环
@@ -123,8 +131,45 @@
public double HAnZhuangMoney; //瀹夎璐�
public double HBanZuMoney; //鐝粍宸ヨ垂
public double HYuShouKuanMoney; //棰勬敹娆�
- public double HGongFeiMoney; //宸ヨ垂缁撹处
- public double HJieZhangMoney; //缁撶畻缁撹处
+ public string HGongFeiMoney; //宸ヨ垂缁撹处
+ public string HJieZhangMoney; //缁撶畻缁撹处
+
+ public int HTaskClassID; //浠诲姟澶х被(Gy_TaskClass)
+ public int HTaskClassEntryID; //浠诲姟椤圭洰鍒嗙被(Gy_TaskClass)
+ public string HTaskAddress; //浠诲姟鍦扮偣
+ public string HBreakStatus; //鎹熷潖鎯呭喌
+ public string HWaterLeakage; //婕忔按閲�
+ public string HPipeDiameter; //绠″緞
+ public string HPipeMaterial; //绠¢亾鏉愯川
+ public string HAlarmEmp; //鎶ユ紡浜�
+ public string HAlarmLink; //鎶ユ紡浜鸿仈绯荤數璇�
+ public string HReceEmp; //鍙楃悊浜�
+ public string HReceTime; //鍙楃悊鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ public double HTaskMaterMoney; //浠诲姟鏉愭枡璐�
+ public double HTaskSetupMoney; //浠诲姟瀹夎璐�
+ public double HTaskOtherMoney; //浠诲姟闄勫睘璐�
+ public double HTaskExamMoney; //浠诲姟鑰冩牳璐�
+ public double HTaskWorkMoney; //浠诲姟宸ヨ垂
+ public bool HIsAccount; //鏄惁缁撹处(澶嶉�夋)
+ public string HAccountDate; //缁撶畻缁撹处鏃ユ湡
+ public string HAccountWorkMoneyDate; //宸ヨ垂缁撹处鏃ユ湡
+ public bool HIsCheckExam; //鏄惁瀹℃牳鑰冩牳璐�(澶嶉�夋)
+ public bool HIsCheckWorkMoney; //鏄惁瀹℃牳宸ヨ垂(澶嶉�夋)
+ public string HInfoBackTime; //鍥炲鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ public string HInfoBackMan; //鍥炲浜�
+ public string HInfoNote; //鍥炲鍐呭(瀵屾枃鏈級
+ public string HTaskBTime; //浠诲姟寮�濮嬫椂闂达紙骞存湀鏃ユ椂鍒嗙锛�
+ public string HTaskETime; //浠诲姟瀹屽伐鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ public string HTaskNote; //浠诲姟璇︾粏鍐呭锛堝瘜鏂囨湰锛�
+ public string HTaskWorkEmp; //宸ヤ綔浜哄憳锛堝瘜鏂囨湰锛�
+ public string HBeginCloseValveTime; //寮�濮嬪叧闃�鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ public string HEndCloseValveTime; //缁撴潫鍏抽榾鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ public long HCloseValveQty; //鍏抽榾鍙暟
+ public string HBeginOpenValveTime; //寮�濮嬪紑闃�鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ public string HEndOpenValveTime; //缁撴潫寮�闃�鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ public long HOpenValveQty; //寮�闃�鍙暟
+ public string HValveWorkEmp; //鎿嶄綔浜哄憳
+ public string HTaskRemark; //浠诲姟澶囨敞锛堝瘜鏂囨湰锛�
}
#endregion
@@ -240,7 +285,7 @@
int HYear = int.Parse(mainList[0].HDate.Split('-')[0]);
int HPeriod = int.Parse(mainList[0].HDate.Split('-')[1]);
string HBillType = "4750";
- string HBillSubType = "";
+ string HBillSubType = mainList[0].HBillSubType;
int HInterID = mainList[0].HInterID;
string HDate = mainList[0].HDate;
string HBillNo = mainList[0].HBillNo;
@@ -279,7 +324,7 @@
string HProjectNote = mainList[0].HProjectNote;
string HContacts = mainList[0].HContacts;
string HContactNumber = mainList[0].HContactNumber;
-
+ int HDeptID = mainList[0].HDeptID; //閮ㄩ棬
int HSupplierID = mainList[0].HSupplierID; //鍒嗗寘鍗曚綅锛坓y_supllier锛�
int HMangerEmpID = mainList[0].HMangerEmpID; //绠$悊鍛橈紙gy_Employee锛�
@@ -294,7 +339,10 @@
string HWaterSupplyDate = mainList[0].HWaterSupplyDate; //閫氭按鏃ユ湡
string HWorkNote = mainList[0].HWorkNote; //绔e伐璧勬枡锛堝瘜鏂囨湰锛�
string HWorkProcNote = mainList[0].HWorkProcNote; //鏂藉伐瀹屾垚鎯呭喌锛堝瘜鏂囨湰锛�
-
+ int HProPMEmpID = mainList[0].HProPMEmpID; //椤圭洰缁忕悊
+ string HWorkPicNumber = mainList[0].HWorkPicNumber; //绔e伐鍥剧紪鍙�
+ string HProBeginDate = mainList[0].HProBeginDate; //椤圭洰寮�宸ユ棩鏈�
+ string HProEndDate = mainList[0].HProEndDate; //椤圭洰瀹屽伐鏃ユ湡
double HYuSuanMoney = mainList[0].HYuSuanMoney; //棰勭畻閫犱环
double HHeTongMoney = mainList[0].HHeTongMoney; //鍚堝悓閫犱环
double HJieSuanMoney = mainList[0].HJieSuanMoney; //缁撶畻閫犱环
@@ -303,8 +351,45 @@
double HAnZhuangMoney = mainList[0].HAnZhuangMoney; //瀹夎璐�
double HBanZuMoney = mainList[0].HBanZuMoney; //鐝粍宸ヨ垂
double HYuShouKuanMoney = mainList[0].HYuShouKuanMoney; //棰勬敹娆�
- double HGongFeiMoney = mainList[0].HGongFeiMoney; //宸ヨ垂缁撹处
- double HJieZhangMoney = mainList[0].HJieZhangMoney; //缁撶畻缁撹处
+ string HGongFeiMoney = mainList[0].HGongFeiMoney; //宸ヨ垂缁撹处
+ string HJieZhangMoney = mainList[0].HJieZhangMoney; //缁撶畻缁撹处
+
+ int HTaskClassID = mainList[0].HTaskClassID; //浠诲姟澶х被(Gy_TaskClass)
+ int HTaskClassEntryID = mainList[0].HTaskClassEntryID; //浠诲姟椤圭洰鍒嗙被(Gy_TaskClass)
+ string HTaskAddress = mainList[0].HTaskAddress; //浠诲姟鍦扮偣
+ string HBreakStatus = mainList[0].HBreakStatus; //鎹熷潖鎯呭喌
+ string HWaterLeakage = mainList[0].HWaterLeakage; //婕忔按閲�
+ string HPipeDiameter = mainList[0].HPipeDiameter; //绠″緞
+ string HPipeMaterial = mainList[0].HPipeMaterial; //绠¢亾鏉愯川
+ string HAlarmEmp = mainList[0].HAlarmEmp; //鎶ユ紡浜�
+ string HAlarmLink = mainList[0].HAlarmLink; //鎶ユ紡浜鸿仈绯荤數璇�
+ string HReceEmp = mainList[0].HReceEmp; //鍙楃悊浜�
+ string HReceTime = mainList[0].HReceTime; //鍙楃悊鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ double HTaskMaterMoney = mainList[0].HTaskMaterMoney; //浠诲姟鏉愭枡璐�
+ double HTaskSetupMoney = mainList[0].HTaskSetupMoney; //浠诲姟瀹夎璐�
+ double HTaskOtherMoney = mainList[0].HTaskOtherMoney; //浠诲姟闄勫睘璐�
+ double HTaskExamMoney = mainList[0].HTaskExamMoney; //浠诲姟鑰冩牳璐�
+ double HTaskWorkMoney = mainList[0].HTaskWorkMoney; //浠诲姟宸ヨ垂
+ bool HIsAccount = mainList[0].HIsAccount; //鏄惁缁撹处(澶嶉�夋)
+ string HAccountDate = mainList[0].HAccountDate; //缁撶畻缁撹处鏃ユ湡
+ string HAccountWorkMoneyDate = mainList[0].HAccountWorkMoneyDate; //宸ヨ垂缁撹处鏃ユ湡
+ bool HIsCheckExam = mainList[0].HIsCheckExam; //鏄惁瀹℃牳鑰冩牳璐�(澶嶉�夋)
+ bool HIsCheckWorkMoney = mainList[0].HIsCheckWorkMoney; //鏄惁瀹℃牳宸ヨ垂(澶嶉�夋)
+ string HInfoBackTime = mainList[0].HInfoBackTime; //鍥炲鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ string HInfoBackMan = mainList[0].HInfoBackMan; //鍥炲浜�
+ string HInfoNote = mainList[0].HInfoNote; //鍥炲鍐呭(瀵屾枃鏈級
+ string HTaskBTime = mainList[0].HTaskBTime; //浠诲姟寮�濮嬫椂闂达紙骞存湀鏃ユ椂鍒嗙锛�
+ string HTaskETime = mainList[0].HTaskETime; //浠诲姟瀹屽伐鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ string HTaskNote = mainList[0].HTaskNote; //浠诲姟璇︾粏鍐呭锛堝瘜鏂囨湰锛�
+ string HTaskWorkEmp = mainList[0].HTaskWorkEmp; //宸ヤ綔浜哄憳锛堝瘜鏂囨湰锛�
+ string HBeginCloseValveTime = mainList[0].HBeginCloseValveTime; //寮�濮嬪叧闃�鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ string HEndCloseValveTime = mainList[0].HEndCloseValveTime; //缁撴潫鍏抽榾鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ long HCloseValveQty = mainList[0].HCloseValveQty; //鍏抽榾鍙暟
+ string HBeginOpenValveTime = mainList[0].HBeginOpenValveTime; //寮�濮嬪紑闃�鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ string HEndOpenValveTime = mainList[0].HEndOpenValveTime; //缁撴潫寮�闃�鏃堕棿锛堝勾鏈堟棩鏃跺垎绉掞級
+ long HOpenValveQty = mainList[0].HOpenValveQty; //寮�闃�鍙暟
+ string HValveWorkEmp = mainList[0].HValveWorkEmp; //鎿嶄綔浜哄憳
+ string HTaskRemark = mainList[0].HTaskRemark; //浠诲姟澶囨敞锛堝瘜鏂囨湰锛�
if (OperationType == 2)
@@ -327,7 +412,8 @@
string sql = "insert into PM_ProjectBillMain" +
"(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HBillStatus,HRemark,HMaker,HMakeDate,HProNumber,HProName,HCusID,HBeginDate,HEndDate,HSumMoney," +
"HProMoney,HWorkMoney,HOtherMoney,HProType,HPMEmpID,HWorkEmpID,HDepEmpID,HConWorkDays,HDepDays,HLastMoney,HPayCusID,HOrgID,HMaterID,HProjectClassID,HBuildComp,HBuildAddress,HWorkNo,HReDate,HPicNo,HWorkTask,HProjectNote,HContacts,HContactNumber" +
- ",HSupplierID,HMangerEmpID,HMaterPlanDate,HWorkerID,HPlanWorkTimes,HRelWorkTimes,HTestDate,HTestCheckerID,HTestNote,HSewageDate,HWaterSupplyDate,HWorkNote,HWorkProcNote,HYuSuanMoney,HHeTongMoney,HJieSuanMoney,HShenJiMoney,HCaiLiaoMoney,HAnZhuangMoney,HBanZuMoney,HYuShouKuanMoney,HGongFeiMoney,HJieZhangMoney) " +
+ ",HSupplierID,HMangerEmpID,HMaterPlanDate,HWorkerID,HPlanWorkTimes,HRelWorkTimes,HTestDate,HTestCheckerID,HTestNote,HSewageDate,HWaterSupplyDate,HWorkNote,HWorkProcNote,HYuSuanMoney,HHeTongMoney,HJieSuanMoney,HShenJiMoney,HCaiLiaoMoney,HAnZhuangMoney,HBanZuMoney,HYuShouKuanMoney,HGongFeiMoney,HJieZhangMoney," +
+ "HTaskClassID,HTaskClassEntryID,HTaskAddress,HBreakStatus,HWaterLeakage,HPipeDiameter,HPipeMaterial,HAlarmEmp,HAlarmLink,HReceEmp,HReceTime,HTaskMaterMoney,HTaskSetupMoney,HTaskOtherMoney,HTaskExamMoney,HTaskWorkMoney,HIsAccount,HAccountDate,HAccountWorkMoneyDate,HIsCheckExam,HIsCheckWorkMoney,HInfoBackTime,HInfoBackMan,HInfoNote,HTaskBTime,HTaskETime,HTaskNote,HTaskWorkEmp,HBeginCloseValveTime,HEndCloseValveTime,HCloseValveQty,HBeginOpenValveTime,HEndOpenValveTime,HOpenValveQty,HValveWorkEmp,HTaskRemark,HDeptID,HProPMEmpID,HWorkPicNumber,HProBeginDate,HProEndDate)" +
"values(" +
"" + HYear +
"," + HPeriod +
@@ -392,6 +478,12 @@
",'" + HYuShouKuanMoney + "'" +
",'" + HGongFeiMoney + "'" +
",'" + HJieZhangMoney + "'" +
+ ",'" + HTaskClassID + "'" + ",'" + HTaskClassEntryID + "'" + ",'" + HTaskAddress + "'" + ",'" + HBreakStatus + "'" + ",'" + HWaterLeakage + "'" + ",'" + HPipeDiameter + "'" + ",'" + HPipeMaterial + "'" +
+ ",'" + HAlarmEmp + "'" +",'" + HAlarmLink + "'" + ",'" + HReceEmp + "'" + ",'" + HReceTime + "'" + ",'" + HTaskMaterMoney + "'" + ",'" + HTaskSetupMoney + "'" + ",'" + HTaskOtherMoney + "'" +
+ ",'" + HTaskExamMoney + "'" + ",'" + HTaskWorkMoney + "'" + ",'" + (HIsAccount?1:0) + "'" + ",'" + HAccountDate + "'" + ",'" + HAccountWorkMoneyDate + "'" + ",'" + (HIsCheckExam ? 1 : 0) + "'" +
+ ",'" + (HIsCheckWorkMoney ? 1 : 0) + "'" + ",'" + HInfoBackTime + "'" + ",'" + HInfoBackMan + "'" + ",'" + HInfoNote + "'" + ",'" + HTaskBTime + "'" +
+ ",'" + HTaskETime + "'" + ",'" + HTaskNote + "'" + ",'" + HTaskWorkEmp + "'" + ",'" + HBeginCloseValveTime + "'" + ",'" + HEndCloseValveTime + "'" +
+ ",'" + HCloseValveQty + "'" + ",'" + HBeginOpenValveTime + "'" + ",'" + HEndOpenValveTime + "'" + ",'" + HOpenValveQty + "'" + ",'" + HValveWorkEmp + "'" + ",'" + HTaskRemark + "','" + HDeptID + "','" + HProPMEmpID + "','" + HWorkPicNumber + "','" + HProBeginDate + "','" + HProEndDate + "'"+
")";
//涓昏〃
@@ -402,14 +494,14 @@
else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) //缂栬緫
{
string sql = "update PM_ProjectBillMain set " +
- "HYear = " + HYear +
- ",HPeriod = " + HPeriod +
- ",HBillType = '" + HBillType +
- "',HBillSubType = '" + HBillSubType +
- "',HDate = '" + HDate +
- "',HBillNo = '" + HBillNo +
- "',HBillStatus = " + HBillStatus +
- ",HRemark = '" + HRemark +
+ //"HYear = " + HYear +
+ //",HPeriod = " + HPeriod +
+ //",HBillType = '" + HBillType +
+ //"',HBillSubType = '" + HBillSubType +
+ //"',HDate = '" + HDate +
+ "HBillNo = '" + HBillNo +
+ //"',HBillStatus = " + HBillStatus +
+ "',HRemark = '" + HRemark +
"',HUpdater = '" + HUpdater +
"',HUpdateDate = '" + HUpdaterDate +
"',HProNumber = '" + HProNumber +
@@ -465,10 +557,14 @@
"',HYuShouKuanMoney = '" + HYuShouKuanMoney +
"',HGongFeiMoney = '" + HGongFeiMoney +
"',HJieZhangMoney = '" + HJieZhangMoney +
-
-
+ "',HTaskClassID = '" + HTaskClassID + "',HTaskClassEntryID = '" + HTaskClassEntryID + "',HTaskAddress = '" + HTaskAddress + "',HBreakStatus = '" + HBreakStatus + "',HWaterLeakage = '" + HWaterLeakage + "',HPipeDiameter = '" + HPipeDiameter +
+ "',HPipeMaterial = '" + HPipeMaterial + "',HAlarmEmp = '" + HAlarmEmp + "',HAlarmLink = '" + HAlarmLink + "',HReceEmp = '" + HReceEmp + "',HReceTime = '" + HReceTime + "',HTaskMaterMoney = '" + HTaskMaterMoney +
+ "',HTaskSetupMoney = '" + HTaskSetupMoney + "',HTaskOtherMoney = '" + HTaskOtherMoney + "',HTaskExamMoney = '" + HTaskExamMoney + "',HTaskWorkMoney = '" + HTaskWorkMoney + "',HIsAccount = '" + (HIsAccount?1:0) + "',HAccountDate = '" + HAccountDate +
+ "',HAccountWorkMoneyDate = '" + HAccountWorkMoneyDate + "',HIsCheckExam = '" + (HIsCheckExam?1:0) + "',HIsCheckWorkMoney = '" + (HIsCheckWorkMoney?1:0) + "',HInfoBackTime = '" + HInfoBackTime + "',HInfoBackMan = '" + HInfoBackMan + "',HInfoNote = '" + HInfoNote +
+ "',HTaskBTime = '" + HTaskBTime + "',HTaskETime = '" + HTaskETime + "',HTaskNote = '" + HTaskNote + "',HTaskWorkEmp = '" + HTaskWorkEmp + "',HBeginCloseValveTime = '" + HBeginCloseValveTime + "',HEndCloseValveTime = '" + HEndCloseValveTime +
+ "',HCloseValveQty = '" + HCloseValveQty + "',HBeginOpenValveTime = '" + HBeginOpenValveTime + "',HEndOpenValveTime = '" + HEndOpenValveTime + "',HOpenValveQty = '" + HOpenValveQty + "',HValveWorkEmp = '" + HValveWorkEmp + "',HTaskRemark = '" + HTaskRemark + "',HDeptID = '" + HDeptID + "'" +
+ ",HProBeginDate = '" + HProBeginDate + "',HProEndDate = '" + HProEndDate + "',HProPMEmpID = '" + HProPMEmpID + "',HWorkPicNumber = '" + HWorkPicNumber +
"' where HInterID = " + HInterID;
-
oCN.RunProc(sql);
//鍒犻櫎瀛愯〃
@@ -640,6 +736,100 @@
string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
ds = oCN.RunProcReturn(sql, "h_v_PM_ProjectBillList");
}
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 宸ョ▼椤圭洰鍒嗛〉鍒楄〃
+ [Route("PM_ProjectBill/page")]
+ [HttpGet]
+ public object PM_ProjectBillPage(string sWhere, string user, int page, int size)
+ {
+ DataSet ds;
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鍒ゆ柇鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log("Cg_POInStockBillQuery", 1, false, user))
+ //{
+ // objJsonResult.code = CodeConstant.FAIL;
+ // objJsonResult.count = CountConstant.FAIL;
+ // objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("exec h_p_PM_ProjectBillList " + page + "," + size + ",''", "h_p_PM_ProjectBillList");
+ }
+ else
+ {
+ sWhere = sWhere.Replace("'", "''");
+ ds = oCN.RunProcReturn("exec h_p_PM_ProjectBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_PM_ProjectBillList");
+ }
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = CodeConstant.SUCCEED;
+ objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.list = columnNameList;
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region (浠诲姟绫伙級鐨勫伐绋嬮」鐩柊澧� 鏍规嵁浠诲姟澶х被 浠诲姟椤圭洰鍒嗙被 鏃ユ湡 鏇存柊 椤圭洰浠g爜
+ [Route("PM_ProjectBill/GetHProjectHNumber")]
+ [HttpGet]
+ public object GetHProjectHNumber( int HDeptID, DateTime HDate,int HTaskClassID,int HTaskClassEntryID,int HType)
+ {
+ DataSet ds;
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+
+ ds = oCN.RunProcReturn("exec h_p_Xt_GetMaxBillNo_SubType '4750','" + HDate + "','" + HTaskClassID + "','" + HTaskClassEntryID + "','" + HDeptID + "',"+HType, "h_p_Xt_GetMaxBillNo_SubType");
//娣诲姞鍒楀悕
foreach (DataColumn col in ds.Tables[0].Columns)
@@ -1359,6 +1549,44 @@
return objJsonResult;
}
}
+ #endregion
+
+ #region 宸ョ▼椤圭洰 浠诲姟瀹夎璐� 銆佷换鍔¤�冩牳璐广�佷换鍔¢檮灞炶垂銆佷换鍔″伐璐� 閫夋嫨椤圭洰璐圭敤鍒嗙被杩斿洖 瀵瑰簲鍒嗙被鐨勯」鐩垂鐢�
+ [Route("PM_ProjectBill/getGy_Project")]
+ [HttpGet]
+ public object getGy_Project(string HItemID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn("select top 1 * from Gy_ProjectMoney where HProjectMoneyClassID='"+HItemID+ "' and isnull(HCheckEmp,'') !='' and HStopflag=0 order by HItemID desc", "Gy_ProjectMoney");
+
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇ラ」鐩垂鐢ㄥ垎绫讳笅鐨勯」鐩垂鐢ㄦ棤鏁版嵁";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
#endregion
#region 鏈堝害闃舵璁″垝淇濆瓨/缂栬緫
@@ -5527,5 +5755,386 @@
}
#endregion
#endregion
+
+
+ #region 椤圭洰璐圭敤寰呭鏍稿垪琛�
+ #region 宸ョ▼椤圭洰璐圭敤寰呭鏍稿垪琛�
+ [Route("PM_ProjectBill/NeedCheckQuery")]
+ [HttpGet]
+ public object PM_ProjectBillNeedCheckQuery(string user,string sWhere)
+ {
+ DataSet ds;
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鍒ゆ柇鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log("Cg_POInStockBillQuery", 1, false, user))
+ //{
+ // objJsonResult.code = CodeConstant.FAIL;
+ // objJsonResult.count = CountConstant.FAIL;
+ // objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ //sWhere = sWhere.Replace("'", "''");
+ ds = oCN.RunProcReturn("exec h_p_PM_ProjectBillNeedCheckQuery " + sWhere, "h_p_PM_ProjectBillNeedCheckQuery");
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = CodeConstant.SUCCEED;
+ objJsonResult.count = CountConstant.SUCCEED;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.list = columnNameList;
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 宸ョ▼椤圭洰璐圭敤 瀹℃牳/鍙嶅鏍�
+
+ [Route("PM_ProjectBill/AuditTaskMoney")]
+ [HttpGet]
+ public object AuditTaskMoney(string HInterID, string Type, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夊鏍告潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Pm_ProjectBill_Check", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愬鏍�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "PM_ProjectBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //Type 浠诲姟瀹夎璐瑰鏍告爣璁�
+ if (Type == "SetupMoneyCheck")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskSetupMoneyCheckFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskSetupMoneyCheckFlag = 1 where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸插鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //浠诲姟闄勫睘瀹℃牳
+ else if (Type == "OtherMoneyCheck")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskOtherMoneyCheckFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskOtherMoneyCheckFlag = 1 where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸插鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //浠诲姟鑰冩牳璐瑰鏍�
+ else if (Type == "ExamMoneyCheck")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskExamMoneyCheckFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskExamMoneyCheckFlag = 1 where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸插鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //浠诲姟宸ヨ垂瀹℃牳鏍囪
+ else if (Type == "WorkMoneyCheck")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskWorkMoneyCheckFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskWorkMoneyCheckFlag = 1 where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸插鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //鍙嶅鏍歌垂鐢�
+ else if (Type == "UnCheck")
+ {
+
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskWorkMoneyCheckFlag = 0,HTaskExamMoneyCheckFlag = 0,HTaskOtherMoneyCheckFlag = 0,HTaskSetupMoneyCheckFlag = 0 where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳绫诲瀷涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 椤圭洰璐圭敤寰呬繚瀛樺垪琛�
+ #region 宸ョ▼椤圭洰璐圭敤寰呬繚瀛樺垪琛�
+ [Route("PM_ProjectBill/NeedSaveQuery")]
+ [HttpGet]
+ public object PM_ProjectBillNeedSaveQuery(string user,string sWhere)
+ {
+ DataSet ds;
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鍒ゆ柇鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log("Cg_POInStockBillQuery", 1, false, user))
+ //{
+ // objJsonResult.code = CodeConstant.FAIL;
+ // objJsonResult.count = CountConstant.FAIL;
+ // objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ //sWhere = sWhere.Replace("'", "''");
+ ds = oCN.RunProcReturn("exec h_p_PM_ProjectBillNeedSaveQuery "+sWhere, "h_p_PM_ProjectBillNeedSaveQuery");
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = CodeConstant.SUCCEED;
+ objJsonResult.count = CountConstant.SUCCEED;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.list = columnNameList;
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 宸ョ▼椤圭洰璐圭敤 淇濆瓨鍙嶄繚瀛�
+
+ [Route("PM_ProjectBill/SaveTaskMoney")]
+ [HttpGet]
+ public object SaveTaskMoney(string HInterID, string Type, string user,int HMoney)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夊鏍告潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Pm_ProjectBill_edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愬鏍�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "PM_ProjectBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //Type 浠诲姟瀹夎璐逛繚瀛樻爣璁�
+ if (Type == "SetupMoneySave")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskSetupMoneySaveFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskSetupMoneySaveFlag = 1,HTaskSetupMoney="+HMoney+" where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸蹭繚瀛橈紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //浠诲姟闄勫睘淇濆瓨
+ else if (Type == "OtherMoneySave")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskOtherMoneySaveFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskOtherMoneySaveFlag = 1,HTaskOtherMoney=" + HMoney + " where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸蹭繚瀛橈紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //浠诲姟鑰冩牳璐逛繚瀛�
+ else if (Type == "ExamMoneySave")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskExamMoneySaveFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskExamMoneySaveFlag = 1,HTaskExamMoney=" + HMoney + " where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸蹭繚瀛橈紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //浠诲姟宸ヨ垂淇濆瓨鏍囪
+ else if (Type == "WorkMoneySave")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskWorkMoneySaveFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskWorkMoneySaveFlag = 1,HTaskWorkMoney=" + HMoney + " where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸蹭繚瀛橈紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //鍙嶄繚瀛樿垂鐢�
+ else if (Type == "UnSave")
+ {
+
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskWorkMoneySaveFlag = 0,HTaskExamMoneySaveFlag = 0,HTaskOtherMoneySaveFlag = 0,HTaskSetupMoneySaveFlag = 0 where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳绫诲瀷涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.1