| | |
| | | /// 扫码信息为工单+工序条码 |
| | | /// </summary> |
| | | /// <param name="stu_torgcode">所属组织编码</param> |
| | | /// <param name="SelectType">设备编码</param> |
| | | /// <param name="ordercode">工单编号</param> |
| | | /// <param name="stepcode">工序编码</param> |
| | | /// <returns></returns> |
| | | public static ToMessage ZZEncodingSeach(string stu_torgcode, string ordercode, string stepcode) |
| | | public static ToMessage ZZEncodingSeach(string stu_torgcode, string SelectType, string ordercode, string stepcode) |
| | | { |
| | | var sql = ""; |
| | | string flwtype = ""; //工序属性 |
| | |
| | | mes.data = null; |
| | | return mes; |
| | | } |
| | | |
| | | switch (flwtype) |
| | | { |
| | | case "Z": //自制工序 |
| | |
| | | //1.首道工序时,判断是否有开工记录 |
| | | sql = @"select * from TK_Wrk_Record R |
| | | left join TEqpInfo E on R.eqp_code=E.code |
| | | where R.wo_code=@ordercode and R.step_code=@stepcode and R.style='S'"; |
| | | where R.wo_code=@ordercode and R.step_code=@stepcode and eqp_code=@eqp_code and R.style='S'"; |
| | | dynamicParams.Add("@ordercode", ordercode); |
| | | dynamicParams.Add("@stepcode", stepcode); |
| | | dynamicParams.Add("@eqp_code", SelectType); |
| | | var data0 = DapperHelper.selectdata(sql, dynamicParams); |
| | | if (data0.Rows.Count > 0) //有开工记录 |
| | | { |
| | |
| | | //1.非首道工序时,判断本道是否有开工记录 |
| | | sql = @"select * from TK_Wrk_Record R |
| | | left join TEqpInfo E on R.eqp_code=E.code |
| | | where R.wo_code=@ordercode and R.step_code=@stepcode and R.style='S'"; |
| | | where R.wo_code=@ordercode and R.step_code=@stepcode and eqp_code=@eqp_code and R.style='S'"; |
| | | dynamicParams.Add("@ordercode", ordercode); |
| | | dynamicParams.Add("@stepcode", stepcode); |
| | | dynamicParams.Add("@eqp_code", SelectType); |
| | | var data1 = DapperHelper.selectdata(sql, dynamicParams); |
| | | if (data1.Rows.Count > 0)//本道有开工记录 |
| | | { |