| | |
| | | using System.Web.Http; |
| | | using System.Windows.Forms; |
| | | using WebAPI.Models; |
| | | |
| | | using SyntacticSugar.constant; |
| | | namespace WebAPI.Controllers.项ç®ç®¡ç.å·¥ç¨é¡¹ç® |
| | | { |
| | | public class PM_ProjectBillController : ApiController |
| | |
| | | public DAL.ClsPM_ProjectMoneyBillMain BillNew4 = new DAL.ClsPM_ProjectMoneyBillMain(); //项ç®è´¹ç¨å对åºåæ®ç±» |
| | | public DAL.ClsPM_ProjectMoneyBillMain BillOld4 = new DAL.ClsPM_ProjectMoneyBillMain(); |
| | | |
| | | public DAL.ClsPM_ProjectBeginBillMain BillNew5 = new DAL.ClsPM_ProjectBeginBillMain(); //项ç®å¯å¨å对åºåæ®ç±» |
| | | public DAL.ClsPM_ProjectBeginBillMain BillOld5 = new DAL.ClsPM_ProjectBeginBillMain(); |
| | | |
| | | public DAL.ClsPM_ProjectEndBillMain BillNew6 = new DAL.ClsPM_ProjectEndBillMain(); //项ç®éªæ¶å对åºåæ®ç±» |
| | | public DAL.ClsPM_ProjectEndBillMain BillOld6 = new DAL.ClsPM_ProjectEndBillMain(); |
| | | |
| | | 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; |
| | |
| | | public int HConWorkDays; |
| | | public int HDepDays; |
| | | public double HLastMoney; |
| | | public int HProjectClassID; |
| | | public string HBuildComp; |
| | | public string HBuildAddress; |
| | | public string HWorkNo; |
| | | public string HReDate; |
| | | public string HPicNo; |
| | | public string HWorkTask; |
| | | public string HProjectNote; |
| | | public string HContacts; |
| | | public string HContactNumber; |
| | | |
| | | public int HSupplierID; //åå
åä½ï¼gy_supllierï¼ |
| | | public int HMangerEmpID; //管çåï¼gy_Employeeï¼ |
| | | public string HMaterPlanDate; //ææè®¡å |
| | | public int HWorkerID; //æ½å·¥åï¼gy_Employeeï¼ |
| | | public double HPlanWorkTimes; //计åå·¥æ |
| | | public double HRelWorkTimes; //å®é
å·¥æ |
| | | public string HTestDate; //è¯åæ¥æ |
| | | public int HTestCheckerID; //è¯åéªæ¶äººï¼gy_Employeeï¼ |
| | | public string HTestNote; //è¯åè®°å½ï¼å¯ææ¬ï¼ |
| | | public string HSewageDate; //ææ±¡æ¥æ |
| | | public string HWaterSupplyDate; //éæ°´æ¥æ |
| | | public string HWorkNote; //ç«£å·¥èµæï¼å¯ææ¬ï¼ |
| | | public string HWorkProcNote; //æ½å·¥å®ææ
åµï¼å¯ææ¬ï¼ |
| | | |
| | | public double HYuSuanMoney; //é¢ç®é ä»· |
| | | public double HHeTongMoney; //ååé ä»· |
| | | public double HJieSuanMoney; //ç»ç®é ä»· |
| | | public double HShenJiMoney; //审计é ä»· |
| | | public double HCaiLiaoMoney; //ææè´¹ |
| | | public double HAnZhuangMoney; //å®è£
è´¹ |
| | | public double HBanZuMoney; //çç»å·¥è´¹ |
| | | public double HYuShouKuanMoney; //颿¶æ¬¾ |
| | | public double HGongFeiMoney; //工费ç»è´¦ |
| | | public double 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 |
| | |
| | | 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; |
| | |
| | | int HMaterID = mainList[0].HMaterID; |
| | | string HUpdater = mainList[0].HUpdater; |
| | | string HUpdaterDate = mainList[0].HUpdaterDate; |
| | | int HProjectClassID = mainList[0].HProjectClassID; |
| | | string HBuildComp = mainList[0].HBuildComp; |
| | | string HBuildAddress = mainList[0].HBuildAddress; |
| | | string HWorkNo = mainList[0].HWorkNo; |
| | | string HReDate = mainList[0].HReDate; |
| | | string HPicNo = mainList[0].HPicNo; |
| | | string HWorkTask = mainList[0].HWorkTask; |
| | | string HProjectNote = mainList[0].HProjectNote; |
| | | string HContacts = mainList[0].HContacts; |
| | | string HContactNumber = mainList[0].HContactNumber; |
| | | |
| | | |
| | | int HSupplierID = mainList[0].HSupplierID; //åå
åä½ï¼gy_supllierï¼ |
| | | int HMangerEmpID = mainList[0].HMangerEmpID; //管çåï¼gy_Employeeï¼ |
| | | string HMaterPlanDate = mainList[0].HMaterPlanDate; //ææè®¡å |
| | | int HWorkerID = mainList[0].HWorkerID; //æ½å·¥åï¼gy_Employeeï¼ |
| | | double HPlanWorkTimes = mainList[0].HPlanWorkTimes; //计åå·¥æ |
| | | double HRelWorkTimes = mainList[0].HRelWorkTimes; //å®é
å·¥æ |
| | | string HTestDate = mainList[0].HTestDate; //è¯åæ¥æ |
| | | int HTestCheckerID = mainList[0].HTestCheckerID; //è¯åéªæ¶äººï¼gy_Employeeï¼ |
| | | string HTestNote = mainList[0].HTestNote; //è¯åè®°å½ï¼å¯ææ¬ï¼ |
| | | string HSewageDate = mainList[0].HSewageDate; //ææ±¡æ¥æ |
| | | string HWaterSupplyDate = mainList[0].HWaterSupplyDate; //éæ°´æ¥æ |
| | | string HWorkNote = mainList[0].HWorkNote; //ç«£å·¥èµæï¼å¯ææ¬ï¼ |
| | | string HWorkProcNote = mainList[0].HWorkProcNote; //æ½å·¥å®ææ
åµï¼å¯ææ¬ï¼ |
| | | |
| | | double HYuSuanMoney = mainList[0].HYuSuanMoney; //é¢ç®é ä»· |
| | | double HHeTongMoney = mainList[0].HHeTongMoney; //ååé ä»· |
| | | double HJieSuanMoney = mainList[0].HJieSuanMoney; //ç»ç®é ä»· |
| | | double HShenJiMoney = mainList[0].HShenJiMoney; //审计é ä»· |
| | | double HCaiLiaoMoney = mainList[0].HCaiLiaoMoney; //ææè´¹ |
| | | 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; //ç»ç®ç»è´¦ |
| | | |
| | | 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) |
| | | { |
| | |
| | | { |
| | | 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) " + |
| | | "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," + |
| | | "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)" + |
| | | "values(" + |
| | | "" + HYear + |
| | | "," + HPeriod + |
| | |
| | | "," + 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 + "'" + |
| | | ",'" + 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 + "'" + |
| | | ")"; |
| | | |
| | | //主表 |
| | |
| | | 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 + |
| | |
| | | ",HPayCusID = " + HPayCusID + |
| | | ",HOrgID = " + HOrgID + |
| | | ",HMaterID = " + HMaterID + |
| | | " where HInterID = " + HInterID; |
| | | ",HProjectClassID = " + HProjectClassID + |
| | | ",HBuildComp = '" + HBuildComp + |
| | | "',HBuildAddress = '" + HBuildAddress + |
| | | "',HWorkNo = '" + HWorkNo + |
| | | "',HReDate = '" + HReDate + |
| | | "',HPicNo = '" + HPicNo + |
| | | "',HWorkTask = '" + HWorkTask + |
| | | "',HProjectNote ='" + HProjectNote + |
| | | "',HContacts ='" + HContacts + |
| | | "',HContactNumber ='" + HContactNumber + |
| | | |
| | | "',HSupplierID = '" + HSupplierID + |
| | | "',HMangerEmpID = '" + HMangerEmpID + |
| | | "',HMaterPlanDate = '" + HMaterPlanDate + |
| | | "',HWorkerID = '" + HWorkerID + |
| | | "',HPlanWorkTimes = '" + HPlanWorkTimes + |
| | | "',HRelWorkTimes = '" + HRelWorkTimes + |
| | | "',HTestDate = '" + HTestDate + |
| | | "',HTestCheckerID = '" + HTestCheckerID + |
| | | "',HTestNote = '" + HTestNote + |
| | | "',HSewageDate = '" + HSewageDate + |
| | | "',HWaterSupplyDate = '" + HWaterSupplyDate + |
| | | "',HWorkNote = '" + HWorkNote + |
| | | "',HWorkProcNote = '" + HWorkProcNote + |
| | | "',HYuSuanMoney = '" + HYuSuanMoney + |
| | | "',HHeTongMoney = '" + HHeTongMoney + |
| | | "',HJieSuanMoney = '" + HJieSuanMoney + |
| | | "',HShenJiMoney = '" + HShenJiMoney + |
| | | "',HCaiLiaoMoney = '" + HCaiLiaoMoney + |
| | | "',HAnZhuangMoney = '" + HAnZhuangMoney + |
| | | "',HBanZuMoney = '" + HBanZuMoney + |
| | | "',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 + |
| | | |
| | | "' where HInterID = " + HInterID; |
| | | |
| | | oCN.RunProc(sql); |
| | | |
| | |
| | | } |
| | | } |
| | | #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));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | 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 å·¥ç¨é¡¹ç® ç¼è¾-页é¢èµå¼ |
| | | /// <summary> |
| | |
| | | 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 æåº¦é¶æ®µè®¡åä¿å/ç¼è¾ |
| | |
| | | if (refSav == "Add") |
| | | { |
| | | //忮巿¯å¦éå¤ |
| | | if (BillNew1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID)) |
| | | if (BillNew5.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | if (refSav == "Update") |
| | | { |
| | | if (BillOld1.ShowBill(oItem.HInterID, ref s) == false) |
| | | if (BillOld5.ShowBill(oItem.HInterID, ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | return objJsonResult; |
| | | } |
| | | //夿æ¯å¦å¯ç¼è¾ |
| | | if (BillOld1.omodel.HChecker != "" && BillOld1.omodel.HChecker != null) |
| | | if (BillOld5.omodel.HChecker != "" && BillOld5.omodel.HChecker != null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (BillOld1.omodel.HBillStatus > 1) |
| | | if (BillOld5.omodel.HBillStatus > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | if (refSav == "Add") |
| | | { |
| | | //忮巿¯å¦éå¤ |
| | | if (BillNew1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID)) |
| | | if (BillNew6.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | if (refSav == "Update") |
| | | { |
| | | if (BillOld1.ShowBill(oItem.HInterID, ref s) == false) |
| | | if (BillOld6.ShowBill(oItem.HInterID, ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | return objJsonResult; |
| | | } |
| | | //夿æ¯å¦å¯ç¼è¾ |
| | | if (BillOld1.omodel.HChecker != "" && BillOld1.omodel.HChecker != null) |
| | | if (BillOld6.omodel.HChecker != "" && BillOld6.omodel.HChecker != null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (BillOld1.omodel.HBillStatus > 1) |
| | | if (BillOld6.omodel.HBillStatus > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 项ç®è´¹ç¨æ¸
å |
| | | |
| | | #region 项ç®è´¹ç¨æ¸
å ä¿å/ç¼è¾ |
| | | /// <summary> |
| | | /// 项ç®è´¹ç¨æ¸
å |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <returns></returns> |
| | | [Route("PM_ProjectBill/SaveGy_ProjectMoneyBOMBill")] |
| | | [HttpPost] |
| | | public object SaveGy_ProjectMoneyBOMBill([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); //å表 |
| | | string refSav = sArray[2].ToString();//æä½æ¹å¼æ°æ®ç±»å 1æ·»å 3ä¿®æ¹ 2 å¤å¶ |
| | | string user = sArray[3].ToString();//ç¨æ·å |
| | | |
| | | string UserName = ""; |
| | | string s = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | //ä¿åæé |
| | | if (!DBUtility.ClsPub.Security_Log_second("PM_ProjectMoneyBOMBill_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿åå¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DAL.ClsGy_ProjectMoneyBOMBill oBill = new DAL.ClsGy_ProjectMoneyBOMBill(); |
| | | List<Model.ClsGy_ProjectMoneyBOMBillMain> lsmain = new List<Model.ClsGy_ProjectMoneyBOMBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | //åºååä¸»è¡¨æ°æ® |
| | | var jsonString = "[" + msg2.ToString() + "]"; |
| | | lsmain = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_ProjectMoneyBOMBillMain>>(jsonString); |
| | | foreach (Model.ClsGy_ProjectMoneyBOMBillMain oItem in lsmain) |
| | | { |
| | | if (refSav == "Add") |
| | | { |
| | | //忮巿¯å¦éå¤ |
| | | if (BillNew7.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·éå¤ï¼ä¸å
许ä¿åï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (refSav == "Update") |
| | | { |
| | | if (BillNew7.ShowBill(oItem.HInterID, ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®æè¯¯ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //夿æ¯å¦å¯ç¼è¾ |
| | | if (BillNew7.omodel.HChecker != "" && BillNew7.omodel.HChecker != null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®å·²ç»è¢«å®¡æ ¸ï¼ä¸å
许修æ¹ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (BillNew7.omodel.HBillStatus > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®å¤äºä¸å¯ç¼è¾ç¶æï¼ä¸å
许修æ¹ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | UserName = oItem.HMaker; //å¶å人 |
| | | oItem.HBillType = "3338"; |
| | | oItem.HBillSubType = "3338"; |
| | | |
| | | |
| | | |
| | | //oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿åå¤±è´¥ï¼æ²¡æåæ®æ¥æï¼æ æ³ä¿åï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | oBill.omodel = oItem; |
| | | } |
| | | // è¡¨ä½æ°æ® |
| | | //æ },{æ¥æåæ°ç» //廿ãåã |
| | | msg3 = msg3.Substring(1, msg3.Length - 2); |
| | | msg3 = msg3.Replace("\\", ""); |
| | | msg3 = msg3.Replace("\n", ""); //\n |
| | | List<Model.ClsGy_ProjectMoneyBOMBillSub> ls = new List<Model.ClsGy_ProjectMoneyBOMBillSub>(); |
| | | jsonString = "[" + msg3.ToString() + "]"; |
| | | ls = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_ProjectMoneyBOMBillSub>>(jsonString); |
| | | int i = 0; |
| | | foreach (Model.ClsGy_ProjectMoneyBOMBillSub oItemSub in ls) |
| | | { |
| | | i++; |
| | | oItemSub.HEntryID = i; |
| | | oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | oItemSub.HCloseType = false; //å
³éç±»å |
| | | |
| | | oBill.DetailColl.Add(oItemSub); |
| | | |
| | | } |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | bool bResult; |
| | | if (refSav == "Add") |
| | | { |
| | | |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else if (refSav == "Update") |
| | | { |
| | | bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else |
| | | { |
| | | bResult = false; |
| | | } |
| | | if (bResult) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 项ç®è´¹ç¨æ¸
åå表 æ¥è¯¢ |
| | | /// <summary> |
| | | /// è¿å项ç®è´¹ç¨æ¸
åå表 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("PM_ProjectBill/getGy_ProjectMoneyBOMBillList")] |
| | | [HttpGet] |
| | | public object getGy_ProjectMoneyBOMBillList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log_second("PM_ProjectMoneyBOMBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_ProjectMoneyBOMBillList order by åæ®å· desc", "h_v_Gy_ProjectMoneyBOMBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Gy_ProjectMoneyBOMBillList where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_ProjectMoneyBOMBillList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | 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/Gy_ProjectMoneyBOMBillEditList")] |
| | | [HttpGet] |
| | | public object Gy_ProjectMoneyBOMBillMainEditList(string HInterID, string User) |
| | | { |
| | | try |
| | | { |
| | | List<DataTable> tableList = new List<DataTable>(); |
| | | |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("PM_ProjectMoneyBOMBill_Edit", 1, false, User)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢å¤±è´¥!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (HInterID == null || HInterID.Equals("")) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterIDä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_ProjectMoneyBOMBillList where HInterID =" + HInterID, "h_v_Gy_ProjectMoneyBOMBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "falseï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | 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 项ç®è´¹ç¨æ¸
åå表 å®¡æ ¸/åå®¡æ ¸åè½ |
| | | [Route("PM_ProjectBill/CheckGy_ProjectMoneyBOMBill")] |
| | | |
| | | [HttpGet] |
| | | public object CheckGy_ProjectMoneyBOMBill(string HInterID, int Type, string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦æå®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log("PM_ProjectMoneyBOMBill_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; |
| | | BillOld1.MvarItemKey = "Gy_ProjectMoneyBOMBillMain"; |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | |
| | | //Type 1 å®¡æ ¸ 2 åå®¡æ ¸ |
| | | if (Type == 1) |
| | | { |
| | | //夿忮æ¯å¦å·²ç»å®¡æ ¸ |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld1.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld1.MvarItemKey); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·²å®¡æ ¸!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //å®¡æ ¸åæ® |
| | | if (!BillOld1.CheckBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //夿忮æ¯å¦å·²ç»åå®¡æ ¸ |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld1.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld1.MvarItemKey); |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½è¿è¡åå®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½è¿è¡åå®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªå®¡æ ¸!ä¸éè¦åå®¡æ ¸!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åå®¡æ ¸åæ® |
| | | if (!BillOld1.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | 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 |
| | | |
| | | #region 项ç®è´¹ç¨æ¸
åå表 å
³é/åå
³éåè½ |
| | | [Route("PM_ProjectBill/CloseGy_ProjectMoneyBOMBill")] |
| | | [HttpGet] |
| | | public object CloseGy_ProjectMoneyBOMBill(string HInterID, int Type, string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦æå 餿é |
| | | if (!DBUtility.ClsPub.Security_Log("PM_ProjectMoneyBOMBill_Close", 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; |
| | | BillOld7.MvarItemKey = "Gy_ProjectMoneyBOMBillMain"; |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | |
| | | //Type 1 å
³é 2 åå
³é |
| | | if (Type == 1) |
| | | { |
| | | //夿忮æ¯å¦å·²ç»å
³é |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld7.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld7.MvarItemKey); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½è¿è¡å
³é!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªå®¡æ ¸!ä¸è½è¿è¡å
³é!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½å次å
³é!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //å
³éåæ® |
| | | if (!BillOld7.CloseBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å
³é失败!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //夿忮æ¯å¦å·²ç»åå
³é |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld7.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld7.MvarItemKey); |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½è¿è¡å
³é!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªå®¡æ ¸!ä¸è½è¿è¡å
³é!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HCloseMan"] == null || ds.Tables[0].Rows[0]["HCloseMan"].ToString() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªå
³é!ä¸éè¦ååå
³é!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åå
³éåæ® |
| | | if (!BillOld7.CancelClose(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå
³é失败!åå :" + ClsPub.sExeReturnInfo; |
| | | 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 |
| | | |
| | | #region 项ç®è´¹ç¨æ¸
åå表 ä½åº/åä½åºåè½ |
| | | [Route("PM_ProjectBill/DropGy_ProjectMoneyBOMBill")] |
| | | [HttpGet] |
| | | public object DropGy_ProjectMoneyBOMBillMain(string HInterID, int Type, string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦æä½åºæé |
| | | if (!DBUtility.ClsPub.Security_Log("PM_ProjectMoneyBOMBill_Drop", 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; |
| | | BillOld7.MvarItemKey = "Gy_ProjectMoneyBOMBillMain"; |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | |
| | | //Type 1 ä½åº 2 åä½åº |
| | | if (Type == 1) |
| | | { |
| | | //夿忮æ¯å¦å·²ç»ä½åº |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld7.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld7.MvarItemKey); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·²å®¡æ ¸!ä¸è½è¿è¡ä½åº!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸éè¦åä½åº!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //ä½åºåæ® |
| | | if (!BillOld7.Cancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä½åºå¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //夿忮æ¯å¦å·²ç»åä½åº |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld7.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld7.MvarItemKey); |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·²å®¡æ ¸!ä¸è½è¿è¡ä½åº!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HDeleteMan"] == null || ds.Tables[0].Rows[0]["HDeleteMan"].ToString() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªä½åº!ä¸éè¦ååä½åº!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åä½åºåæ® |
| | | if (!BillOld7.AbandonCancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åä½åºå¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | 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 |
| | | |
| | | #region 项ç®è´¹ç¨æ¸
åå表 å é¤ |
| | | /// <summary> |
| | | ///åæ°ï¼string HInterIDã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("PM_ProjectBill/DeleteGy_ProjectMoneyBOMBill")] |
| | | [HttpGet] |
| | | public object DeleteGy_ProjectMoneyBOMBillMain(string HInterID, string user) |
| | | { |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("PM_ProjectMoneyBOMBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (HInterID == null || HInterID.Equals("")) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterIDä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | |
| | | oCN.RunProc("delete from Gy_ProjectMoneyBOMBillMain where HInterID = " + HInterID); |
| | | |
| | | oCN.RunProc("delete from Gy_ProjectMoneyBOMBillSub where HInterID = " + HInterID); |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 项ç®è´¹ç¨æ¸
å è¡å
³é/è¡åå
³é |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="IsAudit">å
³é(1),åå
³é(2)</param> |
| | | /// <param name="CurUserName">å
³é人</param> |
| | | /// <returns></returns> |
| | | [Route("PM_ProjectBill/CloseRowGy_ProjectMoneyBOMBill")] |
| | | [HttpGet] |
| | | public object CloseRowGy_ProjectMoneyBOMBill(int HInterID, int HEntryID, int IsAudit, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "PM_ProjectMoneyBOMBill_Close"; |
| | | string SubBillName = "Gy_ProjectMoneyBOMBillSub"; //å表表å |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | DataSet ds = null; |
| | | try |
| | | { |
| | | //æ£æ¥æé |
| | | if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¡å
³éå¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //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); //对HInterIDè¿è¡ç±»åçè½¬æ¢ |
| | | DAL.ClsGy_ProjectMoneyBOMBill oBill = new DAL.ClsGy_ProjectMoneyBOMBill(); //å®ä¾ååæ®æä½ç±»ï¼ç¨äºè¿è¡ç¸å
³æä½ |
| | | |
| | | //é对éè¦è¿è¡çæä½ï¼æ£éªå½ååæ®çç¶ææ¯å¦æ¯æéè¦è¿è¡çæä½ |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //æ ¹æ®HInterIDè·åè¯¥åæ®çæ°æ® |
| | | { |
| | | if (oBill.omodel.HDeleteMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½è¿è¡è¡å
³éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HCloseMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½è¿è¡è¡å
³éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HChecker.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªå®¡æ ¸!ä¸è½è¿è¡è¡å
³éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | string sql = "select * from " + SubBillName + " where HInterID = " + HInterID + " and HEntryID = " + HEntryID; |
| | | ds = oCN.RunProcReturn(sql, "Cg_POOrderBillSub"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¯¥è¡æ°æ®ä¸åå¨!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (IsAudit == 1) //è¡å
³é夿 |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¡å·²å
³é!ä¸è½å次è¡å
³éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 2) //è¡åå
³é夿 |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¡æªå
³é!ä¸éè¦åè¡åå
³éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //å¤æè¡æ¯å¦ä¸ºèªå¨å
³é |
| | | string temp = ds.Tables[0].Rows[0]["HCloseType"].ToString(); |
| | | if (ds.Tables[0].Rows[0]["HCloseType"].ToString() == "False") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¡åå
³é失败!è¡ä¸ºèªå¨å
³éï¼ä¸è½è¿è¡æå¨åå
³éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | //è¿è¡éè¦è¿è¡çè¡å
³é/è¡åå
³éæä½ |
| | | if (IsAudit == 1) //è¡å
³éæäº¤ |
| | | { |
| | | //è¡å
³éæäº¤ |
| | | if (oBill.CloseRow(lngBillKey, HEntryID, oBill.omodel.HBillNo, 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; |
| | | } |
| | | } |
| | | if (IsAudit == 2) //è¡åå
³éæäº¤ |
| | | { |
| | | //è¡åå
³éæäº¤ |
| | | if (oBill.CancelRow(lngBillKey, HEntryID, oBill.omodel.HBillNo, 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; |
| | | } |
| | | } |
| | | 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/NeedCheckQuery")] |
| | | [HttpGet] |
| | | public object PM_ProjectBillNeedCheckQuery(string user) |
| | | { |
| | | 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 ", "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));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | 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) |
| | | { |
| | | 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 ", "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));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | 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 |
| | | } |
| | | } |