1.工程项目的编辑页面,增加 工程信息 页签; 页签里 增加字段 项目类别HProjectClassID,状态,建设单位HBuildComp,地点HBuildAddress,任务编号HWorkNo,受理日期HReDate,图纸编号HPicNo,任务下达HWorkTask,项目内容HProjectNote ;
2.仓储流程的测试并完善功能; 分步式调出单-》分布式调入单 直接调拨单 (注意: 源单类型的下拉框 需要 根据数据库 表动态加载, 关联数量 要准确 , 审核 且 未关闭 未行关闭的行 才能下推 ,关联数量超额后,要 反写 关闭 源单 )
5个文件已修改
228 ■■■■ 已修改文件
DAL/仓库管理/ClsKf_MoveStockBill.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/仓存管理/领料发货/Kf_StepFoldOutBillController.cs 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/仓存管理/验收入库/Kf_StepFoldinBillController.cs 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/项目管理/工程项目/PM_ProjectBillController.cs 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/²Ö¿â¹ÜÀí/ClsKf_MoveStockBill.cs
@@ -140,6 +140,8 @@
                }
                //============================
                //直接调拨单 ä¿®æ”¹ å›žå¡« è°ƒæ‹¨ç”³è¯·å• å…³è”数量
                oCn.RunProc("exec h_p_Kf_UpDateRelation_MoveStockRequestToPOStockIn_Add " + omodel.HInterID.ToString());
                sReturn = "修改单据成功!";
                oCn.Commit();
@@ -254,6 +256,8 @@
                }
                //============================
                //直接调拨单 ä¿®æ”¹ å›žå¡« è°ƒæ‹¨ç”³è¯·å• å…³è”数量
                oCn.RunProc("exec h_p_Kf_UpDateRelation_MoveStockRequestToPOStockIn_Add " + omodel.HInterID.ToString());
                sReturn = "新增单据成功!";
                oCn.Commit();
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -1013,8 +1013,8 @@
                    oItemSub.HCloseType = false;   //关闭类型
                    oItemSub.HSourceInterID = 0;     // æºå•主内码
                    oItemSub.HSourceEntryID = 0;   //源单子内码
                    //oItemSub.HSourceInterID = 0;     // æºå•主内码
                    //oItemSub.HSourceEntryID = 0;   //源单子内码
                    oBill.DetailColl.Add(oItemSub);
@@ -1539,8 +1539,7 @@
        }
        #endregion
        #region è°ƒæ‹¨å•列表
        #region ç›´æŽ¥è°ƒæ‹¨å•列表
        /// <summary>
        /// è°ƒæ‹¨å•列表
        /// </summary>
@@ -1589,7 +1588,7 @@
        }
        #endregion
        #region è°ƒæ‹¨å•  åˆ é™¤
        #region ç›´æŽ¥è°ƒæ‹¨å•  åˆ é™¤
        [Route("Kf_MoveStockBill/DelteteGetMoveStockBill")]
        [HttpGet]
        public object DelteteGetMoveStockBill(string HInterID, string user)
@@ -1632,6 +1631,10 @@
                //==================================================================================  
                oCN.BeginTran();
                //分布式调入单新增回填分布式调出单关联数量
                oCN.RunProc("exec h_p_Kf_UpDateRelation_MoveStockRequestToPOStockIn_Del " + HInterID);
                oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
                oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÁìÁÏ·¢»õ/Kf_StepFoldOutBillController.cs
@@ -251,7 +251,7 @@
                        ,HDeleteMan,HCloseMan
                        ,HRemark,HExplanation,HInnerBillNo,HCurID)
                        values(" + HInterID + ",'" + HBillNo + "','" + HDate + "','" + 1250 + "','" +
                    HBillSubType + "'," + HBillStatus + "," + DateTime.Now.Year + "," + DateTime.Now.Month + "," + HSupID +
                    1250 + "'," + HBillStatus + "," + DateTime.Now.Year + "," + DateTime.Now.Month + "," + HSupID +
                    "," + HWHID + "," + HSCWHID + "," + HEmpID + "," + HManagerID + "," + HSecManagerID +
                    "," + HKeeperID + "," + HDeptID + ",'" + HMaker + "','" + HMakeDate + "','" + HChecker + "','" + HUpDater + "','" + HDeleteMan + "','" + HCloseMan + "','"
                    + HRemark + "','" + HExplanation + "','" + HInnerBillNo + "'," + HCurID + "" + ")");
@@ -259,7 +259,9 @@
                else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
                { //修改
                    String sql="update Kf_ICStockBillMain   set " +
                                "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" + " where HInterID=" + "HInterID";
                                    "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" +
                                 ",HSupID=" + HSupID + ",HWHID=" + HWHID + ",HSCWHID=" + HSCWHID + ", HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HSecManagerID = " + HSecManagerID
                                 + ",HKeeperID=" + HKeeperID + ",HDeptID=" + HDeptID + "  where HInterID=" + HInterID;
                    oCn.RunProc(sql);
                    //删除子表
@@ -719,25 +721,89 @@
                //Type 1 ä½œåºŸ  2  åä½œåºŸ
                if (Type == 1)
                {
                    if (!BillOld.Cancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                    DataSet ds;
                    string sql = "select * from Kf_ICStockBillMain where HinterID = " + HInterID;
                    ds = oCn.RunProcReturn(sql, "Kf_ICStockBillMain");
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废失败!原因:" + ClsPub.sExeReturnInfo;
                        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 (!BillOld.Cancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "作废失败!原因:" + ClsPub.sExeReturnInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    if (!BillOld.AbandonCancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                    DataSet ds;
                    string sql = "select * from Kf_ICStockBillMain where HinterID = " + HInterID;
                    ds = oCn.RunProcReturn(sql, "Kf_ICStockBillMain");
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反作废失败!原因:" + ClsPub.sExeReturnInfo;
                        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 (!BillOld.AbandonCancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "反作废失败!原因:" + ClsPub.sExeReturnInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                oCn.Commit();//提交事务
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÑéÊÕÈë¿â/Kf_StepFoldinBillController.cs
@@ -255,7 +255,7 @@
                        ,HDeleteMan,HCloseMan
                        ,HRemark,HExplanation,HInnerBillNo,HCurID)
                        values(" + HInterID + ",'" + HBillNo + "','" + HDate + "','" + 1251 + "','" +
                    HBillSubType + "'," + HBillStatus + "," + DateTime.Now.Year + "," + DateTime.Now.Month + "," + HSupID +
                    1251 + "'," + HBillStatus + "," + DateTime.Now.Year + "," + DateTime.Now.Month + "," + HSupID +
                    "," + HWHID + "," + HSCWHID + "," + HEmpID + "," + HManagerID + "," + HSecManagerID +
                    "," + HKeeperID + "," + HDeptID + ",'" + HMaker + "','" + HMakeDate + "','" + HChecker + "','" + HUpDater + "','" + HDeleteMan + "','" + HCloseMan + "','"
                    + HRemark + "','" + HExplanation + "','" + HInnerBillNo + "'," + HCurID + "" + ")");
@@ -263,7 +263,9 @@
                else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
                { //修改
                    String sql = "update Kf_ICStockBillMain   set " +
                                "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" + " where HInterID=" + "HInterID";
                               "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" +
                                 ",HSupID=" + HSupID + ",HWHID=" + HWHID + ",HSCWHID=" + HSCWHID + ", HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HSecManagerID = " + HSecManagerID
                                 + ",HKeeperID=" + HKeeperID + ",HDeptID=" + HDeptID + "  where HInterID=" + HInterID;
                    oCN.RunProc(sql);
                    //删除子表
@@ -271,6 +273,9 @@
                }
                //保存子表
                objJsonResult = AddBillSub(msg3, HInterID, OperationType);
                //分布式调入单新增回填分布式调出单关联数量
                oCN.RunProc("exec h_p_Kf_UpDateRelation_ICStockToPOStockIn_Add " + HInterID);
                if (objJsonResult.code == "0")
                {
@@ -374,8 +379,13 @@
            try
            {
                oCN.BeginTran();
                //分布式调入单新增回填分布式调出单关联数量
                oCN.RunProc("exec h_p_Kf_UpDateRelation_ICStockToPOStockIn_Del " + HInterID);
                oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
                oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
@@ -724,25 +734,89 @@
                //Type 1 ä½œåºŸ  2  åä½œåºŸ
                if (Type == 1)
                {
                    if (!BillOld.Cancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                    DataSet ds;
                    string sql = "select * from Kf_ICStockBillMain where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, "Kf_ICStockBillMain");
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废失败!原因:" + ClsPub.sExeReturnInfo;
                        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 (!BillOld.Cancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "作废失败!原因:" + ClsPub.sExeReturnInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    if (!BillOld.AbandonCancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                    DataSet ds;
                    string sql = "select * from Kf_ICStockBillMain where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, "Kf_ICStockBillMain");
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反作废失败!原因:" + ClsPub.sExeReturnInfo;
                        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 (!BillOld.AbandonCancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "反作废失败!原因:" + ClsPub.sExeReturnInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                oCN.Commit();//提交事务
WebAPI/Controllers/ÏîÄ¿¹ÜÀí/¹¤³ÌÏîÄ¿/PM_ProjectBillController.cs
@@ -81,6 +81,14 @@
            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;
        }
        #endregion
@@ -225,7 +233,14 @@
                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;
                if (OperationType == 2)
                {
                    ds = oCN.RunProcReturn("select * from PM_ProjectBillMain where HBillNo ='" + HBillNo + "'", "PM_ProjectBillMain");
@@ -245,7 +260,7 @@
                {
                    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) " +
                        "values(" +
                        "" + HYear +
                        "," + HPeriod +
@@ -277,7 +292,15 @@
                        "," + HPayCusID +
                        "," + HOrgID +
                        "," + HMaterID +
                        ")";
                        "," + HProjectClassID +
                        ",'" + HBuildComp +
                        "','" + HBuildAddress +
                        "','" + HWorkNo +
                        "','" + HReDate +
                        "','" + HPicNo +
                        "','" + HWorkTask +
                        "','" + HProjectNote +
                        "')";
                    //主表
                    oCN.RunProc(sql);
@@ -316,7 +339,15 @@
                        ",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 +
                        "' where HInterID = " + HInterID;
                    oCN.RunProc(sql);