llj
昨天 442c699c0950f15ae32980f7a187b93154b006cb
出运单修改
6个文件已修改
319 ■■■■■ 已修改文件
DAL/ClsWL_YayBillMain.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/物流管理/ClsWL_YayBillMainBillSub.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Cg_ContractTransportBillListController.cs 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/条码管理/MouldController.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/物流管理/出运单/WLYayBillController.cs 107 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/ClsWL_YayBillMain.cs
@@ -144,7 +144,7 @@
               "(HInterID,HBillNo_bak,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
               ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
               ",HMaterID,HUnitID,HMouldID,HMouldLength,HMouldHeight,HMouldWidth" +
               ",HMouldFoldHeight,HVolume,HQty,HSNP,HMouldQty) values("
               ",HMouldFoldHeight,HVolume,HQty,HSNP,HScatteredVolume,HMouldQty) values("
               + SafeInt(omodel.HInterID.ToString(), 0) + ",'" // HInterID int
               + SafeString(omodel.HBillNo.ToString()) + "'," // HBillNo_bak varchar(50)
               + (oSub.HEntryID) + ",'" // HEntryID int
@@ -168,6 +168,7 @@
               + (oSub.HVolume.ToString() == "" ? 0 : oSub.HVolume) + "," // HVolume dec(18,8)
               + (oSub.HQty.ToString() == "" ? 0 : oSub.HQty) + "," // HQty dec(18,8)
               + (oSub.HSNP.ToString() == "" ? 0 : oSub.HSNP) + "," // HSNP dec(18,8)
               + (oSub.HScatteredVolume) + "," // HSNP dec(18,8)
               + (oSub.HMouldQty.ToString() == "" ? 0 : oSub.HMouldQty) + ")"; // HMouldQty dec(18,8)
                    oCn.RunProc(sql);
                }
@@ -326,7 +327,7 @@
              "(HInterID,HBillNo_bak,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
              ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
              ",HMaterID,HUnitID,HMouldID,HMouldLength,HMouldHeight,HMouldWidth" +
              ",HMouldFoldHeight,HVolume,HQty,HSNP,HMouldQty) values("
              ",HMouldFoldHeight,HVolume,HQty,HSNP,HScatteredVolume,HMouldQty) values("
              + SafeInt(omodel.HInterID.ToString(), 0) + ",'" // HInterID int
              + SafeString(omodel.HBillNo.ToString()) + "'," // HBillNo_bak varchar(50)
              + (oSub.HEntryID) + ",'" // HEntryID int
@@ -350,6 +351,7 @@
              + (oSub.HVolume.ToString() == "" ? 0 : oSub.HVolume) + "," // HVolume dec(18,8)
              + (oSub.HQty.ToString() == "" ? 0 : oSub.HQty) + "," // HQty dec(18,8)
              + (oSub.HSNP.ToString() == "" ? 0 : oSub.HSNP) + "," // HSNP dec(18,8)
              + (oSub.HScatteredVolume) + "," // HSNP dec(18,8)
              + (oSub.HMouldQty.ToString() == "" ? 0 : oSub.HMouldQty) + ")"; // HMouldQty dec(18,8)
                    oCn.RunProc(sql);
                }
Model/ÎïÁ÷¹ÜÀí/ClsWL_YayBillMainBillSub.cs
@@ -26,6 +26,7 @@
        public int HSourceEntryID { get; set; }                // æºå•子ID
        public string HSourceBillNo { get; set; }              // æºå•单号
        public string HSourceBillType { get; set; }            // æºå•类型
        public string HScatteredVolume { get; set; }            // æºå•类型
        public decimal HRelationQty { get; set; }              // å…³è”数量
        public decimal HRelationMoney { get; set; }            // å…³è”金额
WebAPI/Controllers/Cg_ContractTransportBillListController.cs
@@ -382,5 +382,101 @@
            }
        }
        #endregion
        #region å®¡æ ¸ã€åå®¡æ ¸
        /// <summary>
        ///
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">审核(0),反审核(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Cg_ContractTransportBillEdit/AuditCg_ContractTransportBillEdit")]
        [HttpGet]
        public object AuditCg_ContractTransportBillEdit(int HInterID, int IsAudit, string CurUserName)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_Supplier_Check", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Cg_ContractTransportBillMain where HInterID=" + HInterID, "Cg_ContractTransportBillMain");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsAudit == 0)  //审核判断
                    {
                        if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已审核!不能再次审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反审核判断
                    {
                        if (ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未审核!不需要反审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();
                if (IsAudit == 0)  //审核判断
                {
                    oCN.RunProc("update Cg_ContractTransportBillMain set HChecker='" + CurUserName + "',HCheckDate=getdate() ,HBillStatus=2 where HInterID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "审核成功";
                    objJsonResult.data = null;
                }
                if (IsAudit == 1) //反审核判断
                {
                    oCN.RunProc("update Cg_ContractTransportBillMain set HChecker='',HCheckDate=null,HBillStatus=1 where HInterID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反审核成功";
                    objJsonResult.data = null;
                }
                oCN.Commit();
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "审核失败或者反审核失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -15957,6 +15957,60 @@
        #endregion
        #region å™¨å…·å¤„理出库单 è¿”回源单数据
        /// <summary>
        /// è¿”回源单数据
        /// </summary>
        /// <returns></returns>
        [Route("Sc_MouldScrapOutHouseBill/GetSourceBill_MouldScrapOutHouse_Json")]
        [HttpGet]
        public object GetSourceBill_MouldScrapOutHouse_Json(Int64 HInterID, Int64 HEntryID, string HBillType)
        {
            try
            {
                string sViewName = "";
                //器具领用申请单
                if (HBillType == "3823")
                {
                    sViewName = "h_v_Sc_MouldScrapRequestBillList";
                }
                if (sViewName == "")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "不支持该源单类型!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ds = oCn.RunProcReturn("select * from h_v_Sc_MouldScrapRequestBillList where hmainid="+ HInterID.ToString()+ "and hsubid="+ HEntryID, "h_v_Sc_MouldScrapRequestBillList");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "未查询到源单信息!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取源单信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/ÌõÂë¹ÜÀí/MouldController.cs
@@ -2049,6 +2049,61 @@
        }
        #endregion
        #region å™¨å…·é¢†ç”¨å•    æ‰«ææºå•条码
        /// <summary>
        /// å™¨å…·é¢†ç”¨å•    æ‰«ææºå•条码
        /// </summary>
        /// <returns></returns>
        [Route("MouldController/Get_SourceBarCode_ScrapRequest_Json")]
        [HttpGet]
        public object Get_SourceBarCode_ScrapRequest_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                //将源单信息存入条码出入库临时表
                DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddMouldBarCode_ScrapRequest " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + 0 + ",'" + HMaker + "'," + 0 + "," + HStockOrgID.ToString(), "h_p_WMS_AddMouldBarCode_ScrapRequest");
                if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";将源单信息存入条码出入库临时表失败!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "成功";
                        objJsonResult.data = ds1.Tables[0];
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]);
                        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
WebAPI/Controllers/ÎïÁ÷¹ÜÀí/³öÔ˵¥/WLYayBillController.cs
@@ -93,10 +93,10 @@
                }
                ListMaterial = ListMaterial.Replace(';', ',');
                List<object> columnNameList = new List<object>();
                    ds = oCN.RunProcReturn("select a.*,b.HUnitID from h_v_Gy_MaterialPackingRelationList_Edit a left JOIN Gy_Material b on a.HMaterID=b.HItemID where HDefaultSendPackFlag=1 and  HMaterID in (" + ListMaterial+")", "h_v_Gy_MaterialPackingRelationList");
                ds = oCN.RunProcReturn("select a.*,b.HUnitID from h_v_Gy_MaterialPackingRelationList_Edit a left JOIN Gy_Material b on a.HMaterID=b.HItemID where HDefaultSendPackFlag=1 and å®¡æ ¸äºº='' and  HMaterID in (" + ListMaterial + ")", "h_v_Gy_MaterialPackingRelationList");
                //添加列名
@@ -375,16 +375,23 @@
                }
                var ds = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HInterID, "WL_YayBillMain");
                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;
                }
                oCN.BeginTran();
                    oCN.RunProc("update WL_YayBillMain set HDate_CarrierSure='" + DateTime.Now.ToString("yyyy-MM-dd") + "' where HInterID=" + HInterID);
                oCN.RunProc("update WL_YayBillMain set HDate_CarrierSure='" + DateTime.Now.ToString("yyyy-MM-dd") + "' where HInterID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功";
                    objJsonResult.data = null;
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "成功";
                objJsonResult.data = null;
                oCN.Commit();
                return objJsonResult;
@@ -429,22 +436,54 @@
                var ds = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HInterID, "WL_YayBillMain");
                oCN.BeginTran();
                if(IsAudit== 1)
                if (IsAudit == 1)
                {
                    if (ds.Tables[0].Rows[0]["HDate_AllocationDriver"] == null || ds.Tables[0].Rows[0]["HDate_AllocationDriver"].ToString() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "请先分配司机!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    oCN.RunProc("update WL_YayBillMain set HSurer_Arrive='" + CurUserName + "',HDate_Arrive=getdate()  where HInterID=" + HInterID);
                }
                else if(IsAudit == 2)
                else if (IsAudit == 2)
                {
                    if (ds.Tables[0].Rows[0]["HSurer_Arrive"] == null)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "请先到厂确认!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    oCN.RunProc("update WL_YayBillMain set HSurer_Pick='" + CurUserName + "',HDate_Pick=getdate()  where HInterID=" + HInterID);
                }
                else if(IsAudit == 3)
                else if (IsAudit == 3)
                {
                    if (ds.Tables[0].Rows[0]["HSurer_Pick"] == null || ds.Tables[0].Rows[0]["HSurer_Pick"].ToString() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "请先提货确认!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    oCN.RunProc("update WL_YayBillMain set HSurer_Trans='" + CurUserName + "',HDate_Trans=getdate()  where HInterID=" + HInterID);
                }
                else if(IsAudit == 4)
                else if (IsAudit == 4)
                {
                    if (ds.Tables[0].Rows[0]["HSurer_Trans"] == null || ds.Tables[0].Rows[0]["HSurer_Trans"].ToString() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "请先出厂运输确认!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    oCN.RunProc("update WL_YayBillMain set HSurer_Receive='" + CurUserName + "',HDate_Receive=getdate()  where HInterID=" + HInterID);
                }
@@ -484,14 +523,25 @@
        /// <returns></returns>
        [Route("WLYayBillController/selectDriver")]
        [HttpGet]
        public object selectDriver(int HInterID,int HcheckID, int IsAudit, string CurUserName)
        public object selectDriver(int HInterID, int HcheckID, int IsAudit, string CurUserName)
        {
            try
            {
                DataSet ds;
                if(IsAudit==1)
                var dss = oCN.RunProcReturn("select * from WL_YayBillMain where HInterID=" + HInterID, "WL_YayBillMain");
                if (dss.Tables[0].Rows[0]["HDate_CarrierSure"] == null || dss.Tables[0].Rows[0]["HDate_CarrierSure"].ToString() == "")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "请先供应商确认!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (IsAudit == 1)
                {
                    ds = oCN.RunProcReturn("select * from h_v_Gy_CarList where HItemID=" + HcheckID, "h_v_Gy_CarList");
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        oCN.BeginTran();
@@ -507,7 +557,7 @@
                        return objJsonResult;
                    }
                }
                else
                {
@@ -547,5 +597,32 @@
            }
        }
        #endregion
        [Route("WLYayBillController/updateBillMEs")]
        [HttpGet]
        public object updateBillMEs(int HInterID,int HEntryID, int ScatteredVolume, string CurUserName)
        {
            var ds = oCN.RunProcReturn("select * from WL_YayBillMain a inner join WL_YayBillSub_Material b on b.HInterID=a.HInterID where a.HInterID=" + HInterID, "WL_YayBillMain");
            if (ds != null || ds.Tables[0].Rows.Count <= 0)
            {
                oCN.BeginTran();
                oCN.RunProc("update WL_YayBillSub_Material set HScatteredVolume= " + ScatteredVolume + " where HInterID=" + HInterID+ "and HEntryID="+ HEntryID);
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "成功";
                objJsonResult.data = null;
                oCN.Commit();
                return objJsonResult;
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "更新失败!";
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
    }
}