zrg
2024-03-29 d77020014b91dd5096102b548140f71d668d5779
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
6个文件已修改
117 ■■■■ 已修改文件
Model/生产管理/设备管理/ClsSc_ICMOBillMain.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/XSGL/Kf_SellOutEntryReportController.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/生产管理/生产任务单/Sc_ICMOBillController.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/Éú²ú¹ÜÀí/É豸¹ÜÀí/ClsSc_ICMOBillMain.cs
@@ -35,6 +35,7 @@
        public double? HPlanQty;        //计划生产数量
        public string HRemark;
        public string HIsStockQty;//是否取库存
        public string HIsStockQty_SeOrderBill;//销售是否取库存
        public string HRemark3;//底部备注
        public double HRelationQty;
WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -1762,8 +1762,24 @@
                if (IsAudit == 1) //反关闭提交
                {
                    //反关闭提交
                    oBill.oCn.BeginTran();
                    if (oBill.AbandonCancelltion(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        //控制关联数量,判断反关闭后,生产订单下推流转卡总数是否超过计划数量
                        ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBill_Checkqty " + lngBillKey, "h_p_Sc_ProcessExchangeBill_Checkqty");
                        if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) != 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "反作废失败!原因:" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]).ToString();
                            objJsonResult.data = null;
                            oBill.oCn.RollBack();
                            return objJsonResult;
                        }
                        oBill.oCn.Commit();
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反作废成功";
WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs
@@ -149,14 +149,7 @@
            {
                List<object> columnNameList = new List<object>();
                if (HDeptID == "0" || HDeptID.Equals("")|| HWorkCenterID == "0" || HWorkCenterID.Equals(""))
                {
                    ds = oCN.RunProcReturn("exec h_p_Sb_EquipmentLoadReportListt '0','0'", "h_p_Sb_EquipmentLoadReportListt");
                }
                else
                {
                    ds = oCN.RunProcReturn("exec h_p_Sb_EquipmentLoadReportListt '" + HDeptID + "','" + HWorkCenterID + "'", "h_p_Sb_EquipmentLoadReportListt");
                }
                ds = oCN.RunProcReturn("exec h_p_Sb_EquipmentLoadReportListt '" + HDeptID + "','" + HWorkCenterID + "'", "h_p_Sb_EquipmentLoadReportListt");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
WebAPI/Controllers/XSGL/Kf_SellOutEntryReportController.cs
@@ -37,15 +37,16 @@
            try
            {
                List<object> columnNameList = new List<object>();
                List<DataTable> tableList = new List<DataTable>();
                ////查看权限
                //if (!DBUtility.ClsPub.Security_Log("Kf_SellOutEntryReport_Query", 1, false, user))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "无查看权限!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                if (!DBUtility.ClsPub.Security_Log("Kf_SellOutEntryReport", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //查询
@@ -60,6 +61,9 @@
                    ds = oCN.RunProcReturn(sql, "h_p_Kf_SellOutEntryReport");
                }
                tableList.Add(ds.Tables[0]);
                tableList.Add(ds.Tables[1]);
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
@@ -71,7 +75,7 @@
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.data = tableList;
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
@@ -1209,8 +1209,11 @@
                    //oItemSub.HSourceBillType = ""; //源单类型
                    //oItemSub.HRelationQty = 0;     //关联数量
                    //oItemSub.HRelationMoney = 0;   //关联金额 
                    oBill.DetailColl.Add(oItemSub);
                    if (oItemSub.HMaterID != 0)
                    {
                        oBill.DetailColl.Add(oItemSub);
                    }
                }
                //保存
                //保存完毕后处理
@@ -1491,6 +1494,18 @@
                            objJsonResult.Message = "单据未审核!不需要反审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        foreach(Model.ClsXs_SeOrderBillSub oSub in oBill.DetailColl)
                        {
                            if (oSub.HCloseMan != "")
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "单据中存在行关闭的记录!反审核失败!";
                                objJsonResult.data = null;
                                return objJsonResult;
                            }
                        }
                    }
                }
@@ -2503,5 +2518,50 @@
            }
        }
        #endregion
        #region é”€å”®è®¢å• èŽ·å–æŽ’åºåŽçš„æ•°æ®
        [Route("Xs_SeOrderBill/sortList")]
        [HttpGet]
        public object sortList(string sWhere, string user)
        {
            try
            {
                //判断查询权限
                if (!DBUtility.ClsPub.Security_Log("Xs_SeOrderBillQuery", 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_IF_SeOrderBillList order by hmainid desc", "h_v_IF_SeOrderBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_IF_SeOrderBillList where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_IF_SeOrderBillList");
                }
                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
    }
}
WebAPI/Controllers/Éú²ú¹ÜÀí/Éú²úÈÎÎñµ¥/Sc_ICMOBillController.cs
@@ -487,6 +487,7 @@
                //double? HPlanQty = mainList[0].HPlanQty == null ? 0 : mainList[0].HPlanQty;//计划数量
                string HMaker = user;//制单人
                string HIsStockQty = mainList[0].HIsStockQty;
                string HIsStockQty_SeOrderBill = mainList[0].HIsStockQty_SeOrderBill;
                string HRemark3 = mainList[0].HRemark3;
                //保存前控制=========================================              
@@ -520,12 +521,12 @@
                        ,HYear,HPeriod,HRemark,HMaker,HMakeDate
                        ,HSeOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HEmpID,HCusID
                        ,HCenterID,HPlanQty,HDeptID,HMaterID,HUnitID,HBomID,HPlanBeginDate,HPlanEndDate
                        ,HIsStockQty,HRemark3)
                        ,HIsStockQty,HIsStockQty_SeOrderBill,HRemark3)
                        values('3710','" + (HMainSourceBillSubType==null?"":HMainSourceBillSubType) + "',1," + HInterID + ",'" + HBillNo + "','" + HDate + "'," + HPRDORGID +
                    "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + HRemark + "','" + HMaker + "',getdate()" +
                    ",'" + HSeOrderBillNo + "'," + HSeOrderInterID + "," + HSeOrderEntryID + "," + HEmpID + "," + HCusID +
                    "," + HCenterID + ",0,0,0,0," + HBomID + ",'',''" +
                    ",'"+ HIsStockQty + "','"+ HRemark3 + "') ");
                    ",'"+ HIsStockQty + "','" + HIsStockQty_SeOrderBill + "','"+ HRemark3 + "') ");
                    
@@ -549,7 +550,7 @@
                                "HMainSourceBillSubType='" + (HMainSourceBillSubType == null ? "" : HMainSourceBillSubType) + "'," +
                                "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" +
                                ", HSeOrderBillNo='" + HSeOrderBillNo + "', HSeOrderInterID=" + HSeOrderInterID + ", HSeOrderEntryID=" + HSeOrderEntryID + ", HEmpID=" + HEmpID + ", HCusID=" + HCusID +
                                ", HCenterID=" + HCenterID + ",HBomID=" + HBomID + ",HIsStockQty='"+ HIsStockQty + "',HRemark3='" + HRemark3 + "' where HInterID=" + HInterID);
                                ", HCenterID=" + HCenterID + ",HBomID=" + HBomID + ",HIsStockQty='"+ HIsStockQty + "',HIsStockQty_SeOrderBill='" + HIsStockQty_SeOrderBill + "',HRemark3='" + HRemark3 + "' where HInterID=" + HInterID);
                    //生产订单删除回填销售订单关联数量
                    oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToICMO_Delete " + HInterID);