zrg
2024-02-04 94c1fd6b7540d574d19234f21c10d6517d9a6423
工作任务的催促按钮,工作周总结的删除
3个文件已修改
141 ■■■■ 已修改文件
DAL/项目管理/ClsPM_WorkReportWeekBillMain.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/项目管理/工作任务/PM_WorkTaskBillController.cs 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/项目管理/工作周计划/PM_WorkTaskWeekBillController.cs 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/ÏîÄ¿¹ÜÀí/ClsPM_WorkReportWeekBillMain.cs
@@ -43,19 +43,20 @@
                    " HBillNo = '" + omodel.HBillNo +
                    "', HDate = '" + omodel.HDate +
                    "', HYear = " + omodel.HYear +
                    ", HPeriod = " + omodel.HPeriod +
                    ", HWeek  = " + omodel.HWeek +
                    ", HRemark = '" + omodel.HRemark +
                    "', HUpDater = '" + omodel.HUpDater +
                    "', HUpDateDate = getdate()" +
                    //===============================================================
                    ", HOrgID = " + omodel.HOrgID +
                    ", HYear = " + omodel.HYear +
                    ", HWeek = " + omodel.HWeek +
                    ", HBeginDate = '" + omodel.HBeginDate +
                    ", HWorkReport  = '" + omodel.HWorkReport +
                    "', HNextPlan   = '" + omodel.HNextPlan +
                    "', HWorkGain   = '" + omodel.HWorkGain +
                    "', HBeginDate = '" + omodel.HBeginDate +
                    "', HEndDate = '" + omodel.HEndDate +
                    "', HPlanEmpID = " + omodel.HReportEmpID +
                    "', HReportEmpID  = " + omodel.HReportEmpID +
                    " where HInterID = " + omodel.HInterID;
                oCn.RunProc(mainSql);
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
                //删除子表
WebAPI/Controllers/ÏîÄ¿¹ÜÀí/¹¤×÷ÈÎÎñ/PM_WorkTaskBillController.cs
@@ -65,7 +65,6 @@
            public string HMainSourceBillNo;
            public string HMainSourceBillType;
            public int HOrderLevID;
            public int HHasten;
        }
        #endregion
@@ -183,8 +182,8 @@
                int HMainSourceEntryID = mainList[0].HMainSourceEntryID;
                string HMainSourceBillNo = mainList[0].HMainSourceBillNo;
                string HMainSourceBillType = mainList[0].HMainSourceBillType;
                int HOrderLevID = mainList[0].HOrderLevID == null ? 0 : mainList[0].HOrderLevID;
                int HHasten = mainList[0].HHasten == null ? 0 : mainList[0].HHasten;
                int HOrderLevID = mainList[0].HOrderLevID;
                if (OperationType == 2)
@@ -206,7 +205,7 @@
                {
                    string sql = "insert into PM_WorkTaskBillMain" +
                        "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HBillNo,HProjectID,HProNumber,HProjectStageID,HName,HDate,HTaskNote,HPlanTimes" +
                        ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID,HHasten)" +
                        ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID)" +
                        "values(" +
                        "" + HYear +
                        "," + HPeriod +
@@ -236,7 +235,6 @@
                        ",'" + HMainSourceBillNo +
                        "','" + HMainSourceBillType +
                        "','" + HOrderLevID  +
                        "','" +  HHasten  +
                        "')";
                    //主表
@@ -274,7 +272,6 @@
                        ",HMainSourceBillNo = '" + HMainSourceBillNo +
                        "',HMainSourceBillType = '" + HMainSourceBillType +
                        "',HOrderLevID  = '" + HOrderLevID  +
                        "',HHasten  = '" + HHasten +
                        "' where HInterID = " + HInterID;
                    oCN.RunProc(sql);
@@ -288,7 +285,7 @@
                {
                    string sql = "insert into PM_WorkTaskBillMain" +
                        "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HBillNo,HProjectID,HProNumber,HProjectStageID,HName,HDate,HTaskNote,HPlanTimes" +
                        ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID,HHasten )" +
                        ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID )" +
                        "values(" +
                        "" + HYear +
                        "," + HPeriod +
@@ -318,7 +315,6 @@
                        ",'" + HMainSourceBillNo +
                        "','" + HMainSourceBillType +
                        "','" + HOrderLevID +
                        "','" + HHasten +
                        "')";
                    //主表
                    oCN.RunProc(sql);
@@ -1170,6 +1166,64 @@
        }
        #endregion
        #region å·¥ä½œä»»åŠ¡  å‚¬ä¿ƒæ¬¡æ•°åŠŸèƒ½
        [Route("PM_WorkTaskBill/UpdateHHasten")]
        [HttpGet]
        public object UpdateHHasten(string HInterID, int HHasten, string user)
        {
            try
            {
                if (string.IsNullOrWhiteSpace(HInterID))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ClsPub.CurUserName = user;
                BillOld.MvarItemKey = "PM_WorkTaskBillMain";
                oCN.BeginTran();//开始事务
                DataSet ds;
                string sql = "select * from PM_WorkTaskBillMain  where HinterID = " + HInterID;
                ds = oCN.RunProcReturn(sql, "PM_WorkTaskBillMain");
                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)
                {
                    string sql1 = "update PM_WorkTaskBillMain  set   HHasten='"+ HHasten+ "' where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql1, "PM_WorkTaskBillMain");
                }
                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 ä»»åŠ¡æ±‡æŠ¥ æ–°å¢ž/编辑-保存
        #region ä»»åŠ¡æ±‡æŠ¥ è¡¨å¤´æ•°æ®
        public class PM_WorkTaskReportBill_Main
WebAPI/Controllers/ÏîÄ¿¹ÜÀí/¹¤×÷Öܼƻ®/PM_WorkTaskWeekBillController.cs
@@ -884,9 +884,9 @@
        #endregion
        #region å·¥ä½œå‘¨æ€»ç»“ èŽ·å–åˆ—è¡¨æ•°æ®
        [Route("PM_WorkTaskWeekBill/PM_WorkReportWeekBillMainList")]
        [Route("PM_WorkTaskWeekBill/PM_WorkReportWeekBillList")]
        [HttpGet]
        public object PM_WorkReportWeekBillMainList(string sWhere, string user)
        public object PM_WorkReportWeekBillList(string sWhere, string user)
        {
            try
            {
@@ -1369,5 +1369,59 @@
            }
        }
        #endregion
        #region å·¥ä½œå‘¨æ€»ç»“ åˆ é™¤
        /// <summary>
        ///参数:string HInterID。
        ///返回值:object。
        /// </summary>
        [Route("PM_WorkTaskWeekBill/PM_WorkReportWeekBillMainDelete")]
        [HttpGet]
        public object PM_WorkReportWeekBillMainDelete(string HInterID, string user)
        {
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("PM_WorkReportWeekBillMain_Drop", 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 PM_WorkReportWeekBillMain where HInterID = " + HInterID);
                //oCn.RunProc("delete from PM_WorkTaskWeekBillSub 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
    }
}