yangle
2024-05-21 4fb572f2c1267a6252827737a7eabda8b4b8a4e5
流转卡生成条码
进站单增加配件条码
3个文件已修改
144 ■■■■■ 已修改文件
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_StationInBillController.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/仓存管理/条码生成/Sc_BarCodeController.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -316,6 +316,82 @@
        }
        #endregion
        #region å·¥åºè¿›ç«™æ‰«é…ä»¶ç 
        [Route("Cj_StationBill/txtHBarCode_Mater_KeyDown")]
        [HttpGet]
        public object txtHBarCode_Mater_KeyDown(string HBarCode, string HInterID)
        {
            try
            {
                if (HBarCode == null || HBarCode.Equals(""))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "空白码,条形码不能为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //判断条形码是否在条码档案中,判断条形码是否合理
                //先判断 ä¸´æ—¶è¡¨ä¸­æ˜¯å¦æœ‰æ•°æ®ï¼Œæ¡å½¢ç çš„物料是否在清单中,写入 æ‰«ç è®°å½•表
                //得到信息
                ds = oCN.RunProcReturn("exec h_p_MES_StationInBillSub_BindBarCode   " + HInterID.ToString() + " ,'" + HBarCode + "'", "h_p_MES_StationInBillSub_BindBarCode");
                //写入信息
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "未查询到条形码信息!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 2)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "错误!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0][1]);
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DataSet Dsplay = oCN.RunProcReturn("exec h_p_MES_StationInBillSub_BindDisplay   " + HInterID.ToString() + "  ", "h_p_MES_StationInBillSub_BindDisplay");
                //写入信息
                if (Dsplay == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "刷新失败,无数据显示!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else if (Dsplay.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "查无数据!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                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
        #region æŒ‡å¼•卡扫码获取信息
        [Route("MES_SampleRecordBill_PDA/SampleRecordBillHBarCode_KeyDown")]
        [HttpGet]
WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
@@ -468,6 +468,63 @@
        }
        #endregion
        #region å·¥åºè¿›ç«™æŽ¥æ”¶å•流水号回车 ç³»ç»Ÿå‚数判断是否绑定配件清单
        [Route("Cj_StationInBill/MES_StationInBillSubBindSource")]
        [HttpGet]
        public object MES_StationInBillSubBindSource(string HInterID, string HProcExchInterID,string HProcExchEntryID)
        {
            try
            {
                //如果系统参数启用了 è¿›ç«™å•绑定配件清单则 ä»Žç”Ÿäº§ç”¨æ–™æ¸…单中获取工序BOM写入 ä¸´æ—¶è¡¨ï¼Œå¹¶åŠ è½½è¡¨æ ¼
                Pub_Class.ClsXt_SystemParameter oParam = new ClsXt_SystemParameter();
                string sIsBingLine = oParam.GetSingleSystemParameter("MES_StationInBill_LineBindCtl", ref DBUtility.ClsPub.sExeReturnInfo);
                if (sIsBingLine.Trim() == "Y")
                {
                    oCN.RunProc("exec h_p_MES_StationInBillSubBindSource_Insert " + HProcExchInterID.ToString() + " , " + HProcExchEntryID.ToString() + "," + HInterID.ToString() + " ");
                    ds = oCN.RunProcReturn($@"select * from
(
 select
a.HICMOInterID,a.HICMOEntryID,b.HProcID
from Sc_ProcessExchangeBillMain a with(nolock)
inner join Sc_ProcessExchangeBillSub b with(nolock)  on a.HInterID=b.HinterID
Where a.HInterID={HProcExchInterID} and b.HEntryID={HProcExchEntryID}
) a
inner join (
select a.HICMOInterID,a.HICMOEntryID, b.HProcID
from Sc_PPBomBillMain a with(nolock)
inner join Sc_PPBomBillSub b with(nolock)  on a.HInterID=b.HInterID
Where b.HKeyMaterID_Line<>0
)b on a.HICMOInterID=b.HICMOInterID and a.HICMOEntryID=b.HICMOEntryID and a.HProcID=b.HProcID", "Sc_ProcessExchangeBillMain");
                    if (ds.Tables[0].Rows.Count > 0) {
                        objJsonResult.Message = "需要绑定配件!";
                    }
                    else
                    {
                        objJsonResult.Message = "不需要绑定配件!";
                    }
                }
                else {
                    objJsonResult.Message = "不需要绑定配件!";
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                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
        #region å·¥åºè¿›ç«™æŽ¥æ”¶å•流水号回车获取工序信息
        [Route("Cj_StationInBill/txtHProcNo_KeyDown_qiaoyi")]
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÌõÂëÉú³É/Sc_BarCodeController.cs
@@ -228,6 +228,11 @@
                        count = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_MateOutBackBillList_Source " + sWhere + " order by å•据号 desc,hsubid", tabname).Tables[0].Rows.Count;
                        sql = string.Format(@"select top " + pageSize + " * from(select row_number() over (order by å•据号 desc,hsubid) as HRowNumber,* from h_v_IF_MateOutBackBillList_Source " + sWhere + ")   as A where HRowNumber >" + pageSize + " *(" + pageNum + "-1)");
                        break;
                    case "工序流转卡":
                        tabname = "h_v_IF_ProcessExchangeBillList_Source";
                        count = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_ProcessExchangeBillList_Source " + sWhere + " order by å•据号 desc,hsubid", tabname).Tables[0].Rows.Count;
                        sql = string.Format(@"select top " + pageSize + " * from(select row_number() over (order by å•据号 desc,hsubid) as HRowNumber,* from h_v_IF_ProcessExchangeBillList_Source " + sWhere + ")   as A where HRowNumber >" + pageSize + " *(" + pageNum + "-1)");
                        break;
                    default:
                        break;
                }
@@ -396,6 +401,12 @@
                            break;
                        case "1255": //组装拆卸单
                            break;
                        case "3772": //工序流转卡
                                     //得到信息
                            ds = oCN.RunProcReturn("select * from h_v_IF_ProcessExchangeList where HMainID=" + oSelectRow.BillMainID + " and HSubID=" + oSelectRow.BillSubID, "h_v_IF_ProcessExchangeList", ref DBUtility.ClsPub.sExeReturnInfo);
                            //写入信息
                            ListRows.Add(HSourceOrderList1(ds.Tables[0], ordrlist, HBarCodeType, HSourceBillType));
                            break;
                        default:
                            break;
                    }