出站单列表增加多选审核功能,增加判断条件,反审核人和审核人必须是同一个
6个文件已修改
202 ■■■■■ 已修改文件
DAL/车间管理/ClsSc_ProcessExchangeBill.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/车间管理/ClsSc_ProcessExchangeBillMain.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/车间管理/ClsSc_ProcessExchangeBillSub.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs 186 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/LMESController.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/³µ¼ä¹ÜÀí/ClsSc_ProcessExchangeBill.cs
@@ -176,7 +176,7 @@
                      ",HLastProc,HKeyProc,HFstProc,HICMOInterID,HICMOBillNo,HWWOrderInterID," +
                      "HWWOrderEntryID,HWWOrderBillNo,HReportQty,HBackProc" +
                      ",HSupID,HSupFlag,HOverRate,HMaxQty,HTechnologyParameter,HProcCheckNote,HPicNum" +
                      ",HMouldNo,HProcWorkNum,HSeOrderInterID,HSeOrderEntryID" +
                      ",HMouldNo,HProcWorkNum,HSeOrderInterID,HSeOrderEntryID,HRelationQty_OutBad" +
                      ") values("
                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + omodel.HBillNo + "'" +
                      ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
@@ -194,7 +194,7 @@
                      ",'" + oSub.HKeyProc + "','" + oSub.HFstProc + "'," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HWWOrderInterID.ToString() +
                      "," + oSub.HWWOrderEntryID.ToString() + ",'" + oSub.HWWOrderBillNo + "'," + oSub.HReportQty.ToString() + "," + Convert.ToString(oSub.HBackProc ? 1 : 0) +
                      "," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "," + oSub.HOverRate.ToString() + "," + oSub.HMaxQty.ToString() + ",'" + oSub.HTechnologyParameter + "','" + oSub.HProcCheckNote + "','" + oSub.HPicNum + "'" +
                      ",'" + oSub.HMouldNo + "','" + oSub.HProcWorkNum + "','" + DBUtility.ClsPub.isStrNull(omodel.HSeOrderInterID) + "','" + DBUtility.ClsPub.isStrNull(omodel.HSeOrderEntryID) + "'"+
                      ",'" + oSub.HMouldNo + "','" + oSub.HProcWorkNum + "','" + DBUtility.ClsPub.isStrNull(omodel.HSeOrderInterID) + "','" + DBUtility.ClsPub.isStrNull(omodel.HSeOrderEntryID) + "','" + oSub.HRelationQty_OutBad + "'" +
                      ") ");
                    oCn.RunProc(sql1);
                }
Model/³µ¼ä¹ÜÀí/ClsSc_ProcessExchangeBillMain.cs
@@ -94,7 +94,7 @@
        public int HSplitSumQty;//拆分总量
        public int HSplitColorQty;//分缸号
        public string HMachineLine;//机台
        public string HRemark2;//备注2
        public string HRemark3;//底部备注
    }
Model/³µ¼ä¹ÜÀí/ClsSc_ProcessExchangeBillSub.cs
@@ -71,6 +71,7 @@
        public string HTechnologyParameter;//工艺参数
        public string HMouldNo;//模具编号
        public string HProcWorkNum;//程序号
        public string HRelationQty_OutBad;//不合格数量
    }
}
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -2128,7 +2128,7 @@
        #region å®¡æ ¸
        [Route("Cj_StationOutBill/set_CheckBill")]
        [HttpGet]
        public object set_CheckBill(int HInterID, string CurUserName)
        public object set_CheckBill(string HInterID, string CurUserName)
        {
            try
            {
@@ -2142,54 +2142,64 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (HInterID == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据ID为0,不能审核!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var HBillNo = HInterID.Split(',');
                DAL.ClsSc_StationOutBill oBill = new DAL.ClsSc_StationOutBill();
                //查看是否已审核,关闭,作废
                if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo))
                for (int i = 0; i < HBillNo.Length; i++)
                {
                    if (oBill.omodel.HChecker.Trim() != "")
                    if (HBillNo[i] == "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已审核!不能再次审核";
                        objJsonResult.Message = "第"+(i+1)+"行:单据ID为0,不能审核!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //查看是否已审核,关闭,作废
                    if (oBill.ShowBill(long.Parse(HBillNo[i]), ref DBUtility.ClsPub.sExeReturnInfo))
                    {
                        if (oBill.omodel.HChecker.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + (i + 1) + "行:单据已审核!不能再次审核";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "第" + (i + 1) + "行:单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                else
                int j = 0;
                for (int i = 0; i < HBillNo.Length; i++)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //审核
                if (Cj_StationOutBillCheckBill(HInterID, CurUserName, oBill.omodel.HLastSubProc, ref DBUtility.ClsPub.sExeReturnInfo))
                {
                    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 (Cj_StationOutBillCheckBill(long.Parse(HBillNo[i]), CurUserName, oBill.omodel.HLastSubProc, ref DBUtility.ClsPub.sExeReturnInfo))
                    {
                        j += 1;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "成功:" + j + "行,第" + (i + 1) + "行:审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "全部执行成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
@@ -2246,7 +2256,7 @@
        #region åå®¡æ ¸
        [Route("Cj_StationOutBill/set_AbandonCheck")]
        [HttpGet]
        public object set_AbandonCheck(int HInterID, string CurUserName)
        public object set_AbandonCheck(string HInterID, string CurUserName)
        {
            try
            {
@@ -2261,52 +2271,82 @@
                    return objJsonResult;
                }
                if (HInterID == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据ID为0,不能反审核!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var HBillNo = HInterID.Split(',');
                DAL.ClsSc_StationOutBill oBill = new DAL.ClsSc_StationOutBill();
                //查看是否已审核,关闭,作废
                if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo))
                //获取系统参数
                string Ret = "";
                oSystemParameter.ShowBill(ref Ret);
                    for (int i = 0; i < HBillNo.Length; i++)
                {
                    if (oBill.omodel.HChecker.Trim() == "")
                    if (long.Parse(HBillNo[i]) == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据未审核!不需要反审核!";
                        objJsonResult.Message = "第" + (i + 1) + "行:单据ID为0,不能反审核!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //查看是否已审核,关闭,作废
                    if (oBill.ShowBill(long.Parse(HBillNo[i]), ref DBUtility.ClsPub.sExeReturnInfo))
                    {
                        if (oBill.omodel.HChecker.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + (i + 1) + "行:单据未审核!不需要反审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //审核人必须和反审核人保持一致  ä¹”一
                        if (oSystemParameter.omodel.WMS_CampanyName == "乔一")
                        {
                            if (oBill.omodel.HChecker.Trim() != CurUserName)
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "第" + (i + 1) + "行:审核人和反审核人不一致!";
                                objJsonResult.data = null;
                                return objJsonResult;
                            }
                        }
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "第" + (i + 1) + "行:单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                else
                int j = 0;
                for (int i = 0; i < HBillNo.Length; i++)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                    //反审核
                    if (Cj_StationOutBillAbandonCheckBill(long.Parse(HBillNo[i]), CurUserName, oBill.omodel.HLastSubProc, ref DBUtility.ClsPub.sExeReturnInfo))
                    {
                        j += 1;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "成功:" + j + "行,第" + (i + 1) + "行:反审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                //反审核
                if (Cj_StationOutBillAbandonCheckBill(HInterID, CurUserName, oBill.omodel.HLastSubProc, ref DBUtility.ClsPub.sExeReturnInfo))
                {
                    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;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "全部执行成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -802,7 +802,7 @@
                                                å·¥ä½œä¸­å¿ƒ HCenterName,HSupID,供应商代码 HSupNumber,供应商 HSupName,isEntrust HSupFlag,计划数量 HQty,加工单价 HOutPrice, è¡¨ä½“备注 HRemark,
                                            è¿›ç«™å…³è”数量 HRelationQty_In,出站关联数量 HRelationQty_Out,委外工单数量 HRelationQty_WWOrder,不合格数量 HRelationQty_Bad,超额比例 HOverRate,
                                            è‰¯çއ HPassRate,累计良率 HSumPassRate,图纸编号 HPicNum,本工序确认记录 HProcCheckNote,工艺参数 HTechnologyParameter,HDeptID,
                                            åŠ å·¥è½¦é—´ä»£ç  HDeptNumber,加工车间 HDeptName
                                            åŠ å·¥è½¦é—´ä»£ç  HDeptNumber,加工车间 HDeptName,出站报废关联数量 HRelationQty_OutBad
                                            from h_v_Sc_ProcessExchangeBillQuerySub");
                ds = oCN.RunProcReturn(sql+ " where hmainid="+ HInterID + "  order by cast(流水号 as int) ", "h_v_Sc_ProcessExchangeBillQuerySub");
                objJsonResult.code = "0";
WebAPI/Controllers/LMESController.cs
@@ -425,7 +425,12 @@
                }
                else
                {
                    string sql1 = "select top 1000 * from h_v_Gy_RoutingBillList where 1 = 1 ";
                    string sql1 = "select * from h_v_Gy_RoutingBillList where 1 = 1 ";
                    //客户自定义
                    if (oSystemParameter.omodel.WMS_CampanyName == "瑞与祺")
                    {
                         sql1 = "select top 1000 * from h_v_Gy_RoutingBillList where 1 = 1 ";
                    }
                    string sql = sql1 + sWhere + " order by hmainid desc,cast(工序号 as int)";
                    ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillList");
                }